extensibility: rules engine (#511)

* rules format prototype

* config container

* lightweight rules

* fdescribe

* basic rule integration

* migrate "create folder" to click actions

* migrate toolbar to new action handlers

* rule support for "create folder" (toolbar)

* upgrade "View" toolbar command

* migrate to rules

* cleanup tests
This commit is contained in:
Denys Vuika
2018-07-16 11:27:27 +01:00
committed by Cilibiu Bogdan
parent d5763f585d
commit 51af2071c2
17 changed files with 441 additions and 247 deletions

View File

@@ -83,8 +83,7 @@ export abstract class PageComponent implements OnInit, OnDestroy {
if (selection.isEmpty) {
this.infoDrawerOpened = false;
}
const selectedNodes = selection ? selection.nodes : null;
this.actions = this.extensions.getAllowedContentActions(selectedNodes, this.node);
this.actions = this.extensions.getAllowedContentActions();
this.canUpdateFile = this.selection.file && this.content.canUpdateNode(selection.file);
this.canUpdateNode = this.selection.count === 1 && this.content.canUpdateNode(selection.first);
this.canDelete = !this.selection.isEmpty && this.content.canDeleteNodes(selection.nodes);