[ACA-2216] Shared link preview - use extension actions (#964)

* isSharedFileViewer evaluator

* navigation evaluators tests

* update docs

* fallback for SharedLink entry

* shared link view use extensions

* rules for link shared view actions

* dedicated extension definition for shared link action toolbar

* resolve selection and actions

* update tests

* remove un used imports

* nest shared link viewer toolbar actions in to viewer structure
This commit is contained in:
Cilibiu Bogdan
2019-02-24 14:50:23 +02:00
committed by Denys Vuika
parent 88ca0cb886
commit 525ba7e73e
12 changed files with 582 additions and 10 deletions

View File

@@ -71,6 +71,7 @@ export class AppExtensionService implements RuleContext {
headerActions: Array<ContentActionRef> = [];
toolbarActions: Array<ContentActionRef> = [];
viewerToolbarActions: Array<ContentActionRef> = [];
sharedLinkViewerToolbarActions: Array<ContentActionRef> = [];
viewerContentExtensions: Array<ViewerExtensionRef> = [];
contextMenuActions: Array<ContentActionRef> = [];
openWithActions: Array<ContentActionRef> = [];
@@ -147,6 +148,10 @@ export class AppExtensionService implements RuleContext {
config,
'features.viewer.toolbarActions'
);
this.sharedLinkViewerToolbarActions = this.loader.getContentActions(
config,
'features.viewer.shared.toolbarActions'
);
this.viewerContentExtensions = this.loader.getElements<ViewerExtensionRef>(
config,
'features.viewer.content'
@@ -422,6 +427,10 @@ export class AppExtensionService implements RuleContext {
return this.getAllowedActions(this.viewerToolbarActions);
}
getSharedLinkViewerToolbarActions(): Array<ContentActionRef> {
return this.getAllowedActions(this.sharedLinkViewerToolbarActions);
}
getHeaderActions(): Array<ContentActionRef> {
return this.headerActions.filter(action => this.filterByRules(action));
}