[ACA-1809] app header extensions (#659)

* move header to separate component

* code fixes

* project header buttons and menus

* app menu example

* delete empty style

* logout action

* update docs

* and one more test
This commit is contained in:
Denys Vuika
2018-09-23 17:53:56 +01:00
committed by GitHub
parent ac0a29e14a
commit 8a7fbaa70a
26 changed files with 1131 additions and 863 deletions

View File

@@ -58,6 +58,7 @@ export class AppExtensionService implements RuleContext {
auth: ['app.auth']
};
headerActions: Array<ContentActionRef> = [];
toolbarActions: Array<ContentActionRef> = [];
viewerToolbarActions: Array<ContentActionRef> = [];
viewerToolbarMoreActions: Array<ContentActionRef> = [];
@@ -95,7 +96,10 @@ export class AppExtensionService implements RuleContext {
console.error('Extension configuration not found');
return;
}
this.headerActions = this.loader.getContentActions(
config,
'features.header'
);
this.toolbarActions = this.loader.getContentActions(
config,
'features.toolbar'
@@ -233,6 +237,10 @@ export class AppExtensionService implements RuleContext {
);
}
getHeaderActions(): Array<ContentActionRef> {
return this.headerActions.filter(action => this.filterByRules(action));
}
getViewerToolbarMoreActions(): Array<ContentActionRef> {
return this.viewerToolbarMoreActions.filter(action =>
this.filterByRules(action)