@coolon/angular-ui-powerups 12.0.0-alpha.3 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/coolon-angular-ui-powerups.umd.js +216 -54
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/alignment.js +7 -0
- package/esm2015/lib/components/alignment.js.map +1 -0
- package/esm2015/lib/components/alignment.metadata.json +1 -0
- package/esm2015/lib/components/commands/command/command.component.js +7 -4
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.js +1 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/exports.js +1 -0
- package/esm2015/lib/components/exports.js.map +1 -1
- package/esm2015/lib/components/exports.metadata.json +1 -1
- package/esm2015/lib/components/table/abstract-table-model.js +15 -10
- package/esm2015/lib/components/table/abstract-table-model.js.map +1 -1
- package/esm2015/lib/components/table/abstract-table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/column-model.js +19 -31
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +2 -2
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-label-column-model.js +3 -3
- package/esm2015/lib/components/tree-table/tree-label-column-model.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-label-column-model.metadata.json +1 -1
- package/esm2015/lib/components/tree-table/tree-table-model.js +3 -0
- package/esm2015/lib/components/tree-table/tree-table-model.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-table-model.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js +74 -0
- package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js +20 -0
- package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js +20 -0
- package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js +24 -0
- package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.metadata.json +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.ngfactory.js.map +1 -0
- package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +0 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +11 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
- package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/interaction/exports.js +4 -0
- package/esm2015/lib/interaction/exports.js.map +1 -1
- package/esm2015/lib/interaction/exports.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.js +13 -2
- package/esm2015/lib/interaction/interaction.module.js.map +1 -1
- package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +197 -55
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/alignment.d.ts +7 -0
- package/lib/components/commands/command/command.component.d.ts +2 -0
- package/lib/components/exports.d.ts +1 -0
- package/lib/components/table/abstract-table-model.d.ts +4 -4
- package/lib/components/table/column-model.d.ts +7 -10
- package/lib/components/table/table-model.d.ts +2 -2
- package/lib/components/tree-table/tree-label-column-model.d.ts +1 -1
- package/lib/components/tree-table/tree-table-model.d.ts +3 -1
- package/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.d.ts +23 -0
- package/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.d.ts +6 -0
- package/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.d.ts +7 -0
- package/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.d.ts +8 -0
- package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +0 -1
- package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +10 -0
- package/lib/interaction/exports.d.ts +4 -0
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export class TreeLabelColumnModel extends ColumnModel {
|
|
|
6
6
|
constructor(columnId, textPropertiesProvider, expansionModel) {
|
|
7
7
|
super(columnId, textPropertiesProvider);
|
|
8
8
|
this.expansionModel = expansionModel;
|
|
9
|
-
this.iconFactory = (node, expanded) => expanded ? 'mat:
|
|
9
|
+
this.iconFactory = (node, expanded) => expanded ? 'mat:expand_more' : 'mat:chevron_right';
|
|
10
10
|
this.cellRenderer(TreeLabelCellRendererComponent);
|
|
11
11
|
}
|
|
12
12
|
pluck(property) {
|
|
@@ -26,8 +26,8 @@ export class TreeLabelColumnModel extends ColumnModel {
|
|
|
26
26
|
}));
|
|
27
27
|
return this;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
return super.
|
|
29
|
+
_selectRowOnClick(selectOnRowClick) {
|
|
30
|
+
return super._selectRowOnClick(selectOnRowClick);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=tree-label-column-model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-label-column-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tree-table/tree-label-column-model.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,+DAA+D,CAAC;AAG/G,MAAM,OAAO,oBAAgD,SAAQ,WAAmC;IAKtG,YAAY,QAAgB,EAChB,sBAA0D,EACjD,cAA0D;QAC7E,KAAK,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;QADrB,mBAAc,GAAd,cAAc,CAA4C;QAJvE,gBAAW,GAA2C,CAAC,IAA4B,EAAE,QAAiB,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"tree-label-column-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tree-table/tree-label-column-model.ts"],"names":[],"mappings":"AAEA,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,+DAA+D,CAAC;AAG/G,MAAM,OAAO,oBAAgD,SAAQ,WAAmC;IAKtG,YAAY,QAAgB,EAChB,sBAA0D,EACjD,cAA0D;QAC7E,KAAK,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;QADrB,mBAAc,GAAd,cAAc,CAA4C;QAJvE,gBAAW,GAA2C,CAAC,IAA4B,EAAE,QAAiB,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,mBAAmB,CAAC;QAMpK,IAAI,CAAC,YAAY,CAAC,8BAA8B,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAyC,QAAW;QACvD,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;IAChC,CAAC;IAED,OAAO,CAAyC,OAA+C;QAC7F,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;IAC7B,CAAC;IAES,YAAY,CAAgD,aAA+B;QACnG,IAAI,CAAC,qBAAqB,CAAC,IAAI,8BAA8B,CAAC,aAAa,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;YAC7G,IAAI,SAAS,EAAE;gBACb,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC;aAChD;YACD,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC;YAC9B,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC5F,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAC3C,CAAC,CAAC,CAAC,CAAC;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,iBAAiB,CAAC,gBAAyB;QAChD,OAAO,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACnD,CAAC;CAEF","sourcesContent":["import { ComponentType } from '@angular/cdk/overlay';\nimport { Types } from '@coolon/pectin';\nimport _ from 'lodash';\nimport { ComponentCellRendererPortalRef } from '../table/cell-portal-ref';\nimport { ColumnModel } from '../table/column-model';\nimport { DecoratedTreeNode } from './decorated-tree-node';\nimport { TreeExpansionModel } from './tree-expansion-model';\nimport { TreeLabelCellRendererComponent } from './tree-label-cell-renderer/tree-label-cell-renderer.component';\nimport { TreeNode } from './tree-node';\n\nexport class TreeLabelColumnModel<Row extends TreeNode<Row>> extends ColumnModel<DecoratedTreeNode<Row>> {\n\n private labelProperty: string | number | symbol;\n private iconFactory: TreeLabelColumnModel.LabelFactory<Row> = (node: DecoratedTreeNode<Row>, expanded: boolean) => expanded ? 'mat:expand_more' : 'mat:chevron_right';\n\n constructor(columnId: string,\n textPropertiesProvider: ColumnModel.TextPropertiesProvider,\n readonly expansionModel: TreeExpansionModel<DecoratedTreeNode<Row>>) {\n super(columnId, textPropertiesProvider);\n this.cellRenderer(TreeLabelCellRendererComponent);\n }\n\n pluck<P extends Types.ValuePropertiesOf<Row>>(property: P) {\n this.labelProperty = property;\n }\n\n addIcon<P extends Types.ValuePropertiesOf<Row>>(factory: TreeLabelColumnModel.LabelFactory<Row>) {\n this.iconFactory = factory;\n }\n\n protected cellRenderer<C extends TreeLabelCellRendererComponent<Row>>(componentType: ComponentType<C>): this {\n this.configureCellRenderer(new ComponentCellRendererPortalRef(componentType, (component, rowData, firstTime) => {\n if (firstTime) {\n component.expansionModel = this.expansionModel;\n }\n component.value = rowData.row;\n component.label = _.isNil(this.labelProperty) ? undefined : rowData.row[this.labelProperty];\n component.iconFactory = this.iconFactory;\n }));\n return this;\n }\n\n public _selectRowOnClick(selectOnRowClick: boolean): this {\n return super._selectRowOnClick(selectOnRowClick);\n }\n\n}\n\nexport namespace TreeLabelColumnModel {\n export type LabelFactory<Row extends TreeNode<Row>> = (node: DecoratedTreeNode<Row>, expanded: boolean) => string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TreeLabelColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../table/column-model","name":"ColumnModel","line":10,"character":69},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../table/column-model","name":"ColumnModel","line":16,"character":38},"member":"TextPropertiesProvider"},{"__symbolic":"reference","module":"./tree-expansion-model","name":"TreeExpansionModel","line":17,"character":39,"arguments":[{"__symbolic":"reference","module":"./decorated-tree-node","name":"DecoratedTreeNode","line":17,"character":58,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":17,"character":76,"context":{"typeName":"Row"}}]}]}]}],"pluck":[{"__symbolic":"method"}],"addIcon":[{"__symbolic":"method"}],"cellRenderer":[{"__symbolic":"method"}],"
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TreeLabelColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../table/column-model","name":"ColumnModel","line":10,"character":69},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../table/column-model","name":"ColumnModel","line":16,"character":38},"member":"TextPropertiesProvider"},{"__symbolic":"reference","module":"./tree-expansion-model","name":"TreeExpansionModel","line":17,"character":39,"arguments":[{"__symbolic":"reference","module":"./decorated-tree-node","name":"DecoratedTreeNode","line":17,"character":58,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":17,"character":76,"context":{"typeName":"Row"}}]}]}]}],"pluck":[{"__symbolic":"method"}],"addIcon":[{"__symbolic":"method"}],"cellRenderer":[{"__symbolic":"method"}],"_selectRowOnClick":[{"__symbolic":"method"}]}}}}]
|
|
@@ -65,6 +65,9 @@ export class TreeTableModel extends AbstractTableModel {
|
|
|
65
65
|
ensureAncestorsAndSelfVisible(node) {
|
|
66
66
|
this.treeExpansionModel.ensureAncestorsAndSelfVisible(node);
|
|
67
67
|
}
|
|
68
|
+
addSelectionColumn(selectionModel, showSelectionColumn) {
|
|
69
|
+
return this._addSelectionColumn(selectionModel, showSelectionColumn);
|
|
70
|
+
}
|
|
68
71
|
}
|
|
69
72
|
export class FlattenStrategy extends SelfAndDescendantsVisitor {
|
|
70
73
|
constructor(collapsedIds) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-table-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tree-table/tree-table-model.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,sGAAs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;AACF,IAAI","sourcesContent":["// import {T } from '@client/api/light-architect/model/area/area.class';\n// import { SelfAndDescendantsVisitor } from '@client/api/light-architect/model/area/visitable.class';\n// import { Zone } from '@client/api/light-architect/model/area/zone.class';\nimport { Dsl, GarbageCollector, ListModel, MutableValueModel, ValueModel } from '@coolon/pectin';\nimport { AbstractTableModel } from '../table/abstract-table-model';\nimport { DecoratedTreeNode } from './decorated-tree-node';\nimport { TreeExpansionModel } from './tree-expansion-model';\nimport { TreeLabelColumnModel } from './tree-label-column-model';\nimport { TreeNode } from './tree-node';\nimport { TreeToListModel } from './tree-to-list-model';\nimport { SelfAndDescendantsVisitor, VisitableTree } from './visitable.class';\n\n\n// TODO:\n// Selection Models:\n// - as simple navigation tree\n// - as editable grid (selecte all, even hidden etc?)\n// - fixing selection on underlying model changes.\n// - rendering selection: row highlighting, checkboxes (in the tree renderer or in separate column), both.\n// Expansion Models:\n// - Add ability to auto show to depth\n// - Add a predicate to check default expansion (i.e. has children of a certain type)\n//\nexport class TreeTableModel<Row extends TreeNode<Row>> extends AbstractTableModel<DecoratedTreeNode<Row>> {\n\n constructor(source: ListModel<DecoratedTreeNode<Row>>, readonly treeExpansionModel: TreeExpansionModel<DecoratedTreeNode<Row>>) {\n super(source);\n }\n\n static fromRoot<Row extends TreeNode<Row>>(sourceOfTruth: ValueModel<Row>, builder?: (tableModel: TreeTableModel<Row>) => void): TreeTableModel<Row> {\n const garbage = new GarbageCollector();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(garbage);\n const children = chain(sourceOfTruth).mapToList(root => [root]);\n const model = this.fromList(children, builder);\n model.registerDisposable(garbage);\n return model;\n }\n\n static fromChildrenOf<Row extends TreeNode<Row>>(sourceOfTruth: ValueModel<Row>, builder?: (tableModel: TreeTableModel<Row>) => void): TreeTableModel<Row> {\n const garbage = new GarbageCollector();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(garbage);\n const children = chain(sourceOfTruth).mapToList(root => root.children); // for some reason pluck list can't see 'children'\n const model = this.fromList(children, builder);\n model.registerDisposable(garbage);\n return model;\n }\n\n static fromList<Row extends TreeNode<Row>>(sourceOfTruth: ListModel<Row>, builder?: (tableModel: TreeTableModel<Row>) => void): TreeTableModel<Row> {\n const treeExpansionModel = new TreeExpansionModel<DecoratedTreeNode<Row>>(sourceOfTruth.identityOf);\n const nodes = new TreeToListModel(sourceOfTruth, treeExpansionModel);\n const model = new TreeTableModel<Row>(nodes, treeExpansionModel);\n model.registerDisposable(nodes);\n if (builder) builder(model);\n return model;\n }\n\n treeControlColumn(builder: (column: TreeLabelColumnModel<Row>) => void) {\n const columnId = 'tree-label';\n const column = new TreeLabelColumnModel<Row>(columnId, () => this.getColumnTextProperties(columnId), this.treeExpansionModel);\n builder(column);\n this.addColumn(column);\n }\n\n expand(node: DecoratedTreeNode<Row>) {\n this.treeExpansionModel.expand(node);\n }\n\n collapse(node: DecoratedTreeNode<Row>) {\n this.treeExpansionModel.expand(node);\n }\n\n isCollapsed(node: DecoratedTreeNode<Row>): boolean {\n return this.treeExpansionModel.isCollapsed(node);\n }\n\n ensureAncestorsAndSelfVisible(node: DecoratedTreeNode<Row>) {\n this.treeExpansionModel.ensureAncestorsAndSelfVisible(node);\n }\n\n\n // saveSelection() {\n // let ids: number[] = [];\n // const selectedArea = this._decoratedSelectionModel.leadSelection.value;\n // if (selectedArea) {\n // ids.push(selectedArea.id);\n // ids = ids.concat(selectedArea.siblingsAfter().map(a => a.id));\n // ids = ids.concat(selectedArea.siblingsBefore().reverse().map(a => a.id));\n // ids = ids.concat(selectedArea.ancestorsToZone().reverse().map(a => a.id));\n // }\n // this._storedSelection = ids;\n // }\n //\n //\n // restoreSelection() {\n // const all = this.rootNodeModel.value.selfAndDescendants();\n // for (let i = 0; i < this._storedSelection.length; i++) {\n // const id = this._storedSelection[i];\n // const found = all.find(area => area.id === id);\n // if (found) {\n // this.selectedAreaId.value = found.id;\n // break;\n // }\n // }\n // }\n //\n // collapseAll(areas: T[]) {\n // this.collapsedAreaIds.value = [].concat(this.collapsedAreaIds.value, areas.map(a => a.id));\n // }\n\n // disableSelection(disable: boolean = true) {\n // this._disableSelection.value = disable;\n // }\n\n\n}\n\n\n// /**\n// * 1. Make this a TreeModel<T extends AbstractTree>\n// * 2. Move the decorated items to the view (along with viewToModel and modelToView)\n// */\n// export class TreeTableModel<T, K extends keyof T> {\n//\n// // public readonly decoratedVisibleAreas: ListModel<T>;\n// //\n// // private decoratorCache = undefined; //new DecoratorCache();\n// // private collapsedAreaIds: MutableListModel<number> = new MutableListModel<number>();\n// //\n// // private _rawSelectionModel: SingleSelectionModel<T, T[K]>;\n// // private _decoratedSelectionModel: SingleSelectionModel<T, T[K]>;\n// //\n// // private readonly _disableSelection = new MutableValueModel<boolean>(false);\n// // private _hoveredAreaModel: MutableValueModel<T> = new MutableValueModel<T>();\n// //\n// // private _decoratedHoverModel: ValueModel<T> = new MutableValueModel<T>();\n// // private _storedSelection: number[] = [];\n// //\n// // readonly visibleNodes: ListModelChain<T>;\n// //\n// // protected constructor(readonly rootNodeModel: ValueModel<T>, identifiedBy: K, readonly selectedAreaId: MutableValueModel<K>) {\n// // super();\n// // const {chain, valueOf, before, when, after, observe, switchOn} = Dsl.disposeWith(this);\n// //\n// // this.visibleNodes = chain(this.rootNodeModel).mapToList(root => {\n// // return root.visit(new FlattenStrategy(this.collapsedAreaIds.value)).flattenedAreas;\n// // }, {dependsOn: this.collapsedAreaIds});\n// //\n// // this.decoratedVisibleAreas = this.visibleNodes.map(area => {\n// // return this.decoratorCache.get(area);\n// // });\n// //\n// // this._rawSelectionModel = this.registerDisposable(SingleSelectionModel.fromList(this.visibleNodes, identifiedBy, {\n// // storeIdIn: this.selectedAreaId,\n// // // toggleSelection: false\n// // }));\n// // this._rawSelectionModel.selectBehaviour.disableWhen(this._disableSelection);\n// // this._decoratedSelectionModel = this.registerDisposable(SingleSelectionModel.fromList(this.decoratedVisibleAreas, identifiedBy, {\n// // storeIdIn: this.selectedAreaId,\n// // toggleSelection: false\n// // }));\n// // this._decoratedSelectionModel.selectBehaviour.disableWhen(this._disableSelection);\n// //\n// // // our areas will be different objects so we have to save, restore the\n// // // selection and rebuild our decorators\n// // before(rootNodeModel).changes(() => this.saveSelection());\n// // before(rootNodeModel).changes(() => this.decoratorCache.clear());\n// // when(rootNodeModel).changes(() => this.restoreSelection(), {asLongAs: () => !!rootNodeModel.value});\n// //\n// //\n// // this.registerDisposable(new Binding(this._decoratedHoverModel, this._hoveredAreaModel, {\n// // toLeft: (area) => area ? this.modelToView(area) : null,\n// // toRight: (decoratedArea) => decoratedArea ? this.viewToModel(decoratedArea) : null\n// // }));\n// //\n// // when(this.decoratedSelectionModel.leadSelection)\n// // .changes(selection => this.ensureAncestorsAndSelfVisible(selection), {\n// // asLongAs: selection => !!selection\n// // });\n// // }\n// //\n// // static fromRoot<T, K extends keyof T>(rootNodeModel: ValueModel<T>, identifiedBy: K, options?: TreeModel.Options<T, K>) {\n// //\n// // }\n// //\n// // public viewToModel(decoratedArea: T): T {\n// // assert.notNil(decoratedArea);\n// // return TreeModel.AreaDecorator.undecorate(decoratedArea);\n// // }\n// //\n// // public modelToView(area: T): T {\n// // assert.notNil(area);\n// // return this.decoratorCache.get(area);\n// // }\n// //\n// // get hoveredAreaModel(): ValueModel<T> {\n// // return this._hoveredAreaModel;\n// // }\n// //\n// // clearHover() {\n// // this._hoveredAreaModel.value = null;\n// // }\n// //\n// // get selectionModel(): SelectionModel<T> {\n// // return this._rawSelectionModel;\n// // }\n// //\n// // get decoratedSelectionModel(): SelectionModel<T> {\n// // return this._decoratedSelectionModel;\n// // }\n// //\n// // get decoratedHoverModel(): ValueModel<T> {\n// // return this._decoratedHoverModel;\n// // }\n// //\n// // decoratedArea(area: T): T {\n// // return this.decoratorCache.get(area);\n// // }\n// //\n// // select(area: T) {\n// // this.selectedAreaId.value = area ? area.id : null;\n// // }\n// }\n\n\nexport namespace TreeTableModel {\n\n export interface Options<T, K extends keyof T> {\n storeIdIn: MutableValueModel<K>\n }\n\n // export interface DecoratedArea extendsTDecorator,T {\n // }\n //\n // export classTDecorator extends Decorator<T> {\n //\n // static decorate(area:T): DecoratedArea {\n // return Decorator.create(area, newTDecorator(area)) as DecoratedArea;\n // }\n //\n // pathToRoot() {\n // return this.object.ancestorsToZone().slice(1);\n // }\n //\n // isLastChild() {\n // return this.object.isLastChild();\n // }\n //\n // isRoot() {\n // return this.object.isZone();\n // }\n // }\n\n}\n\n\nexport class FlattenStrategy<T extends VisitableTree<any>> extends SelfAndDescendantsVisitor<T> {\n\n private _areas: T[] = [];\n private _collapsed: Set<T>;\n\n constructor(private collapsedIds: T[]) {\n super();\n this._collapsed = new Set<T>(collapsedIds);\n }\n\n protected onVisit(it: T) {\n this._areas.push(it);\n }\n\n protected shouldVisitChildrenOf(it: T): boolean {\n return !this._collapsed.has(it);\n }\n\n get flattenedAreas(): T[] {\n return this._areas;\n }\n\n}\n\n// class DecoratorCache {\n//\n// private map = new Map<number, T>();\n//\n// get(area:T): T {\n//\n// if (!area) return null;\n//\n// let decoratedArea = this.map.get(area.id);\n// if (!decoratedArea) {\n// decoratedArea = TreeModel.AreaDecorator.decorate(area);\n// this.map.set(area.id, decoratedArea);\n// }\n// return decoratedArea;\n// }\n//\n// clear() {\n// this.map.clear();\n// }\n//\n//\n// }\n\n\n\n\n"]}
|
|
1
|
+
{"version":3,"file":"tree-table-model.js","sourceRoot":"","sources":["../../../../../../../libs/angular-ui-powerups/src/lib/components/tree-table/tree-table-model.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,sGAAsG;AACtG,4EAA4E;AAC5E,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAA4D,MAAM,gBAAgB,CAAC;AACjH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,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;QACtC,OAAO,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,6BAA6B,CAAC,IAA4B;QACxD,IAAI,CAAC,kBAAkB,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,kBAAkB,CAAC,cAAuD,EAAE,mBAAmD;QAC7H,OAAO,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;IACvE,CAAC;CAoCF;AA6ID,MAAM,OAAO,eAA8C,SAAQ,yBAA4B;IAK7F,YAAoB,YAAiB;QACnC,KAAK,EAAE,CAAC;QADU,iBAAY,GAAZ,YAAY,CAAK;QAH7B,WAAM,GAAQ,EAAE,CAAC;QAKvB,IAAI,CAAC,UAAU,GAAG,IAAI,GAAG,CAAI,YAAY,CAAC,CAAC;IAC7C,CAAC;IAES,OAAO,CAAC,EAAK;QACrB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC;IAES,qBAAqB,CAAC,EAAK;QACnC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CAEF;AAED,yBAAyB;AACzB,EAAE;AACF,0CAA0C;AAC1C,EAAE;AACF,uBAAuB;AACvB,EAAE;AACF,kCAAkC;AAClC,EAAE;AACF,qDAAqD;AACrD,gCAAgC;AAChC,sEAAsE;AACtE,oDAAoD;AACpD,YAAY;AACZ,gCAAgC;AAChC,QAAQ;AACR,EAAE;AACF,gBAAgB;AAChB,4BAA4B;AAC5B,QAAQ;AACR,EAAE;AACF,EAAE;AACF,IAAI","sourcesContent":["// import {T } from '@client/api/light-architect/model/area/area.class';\n// import { SelfAndDescendantsVisitor } from '@client/api/light-architect/model/area/visitable.class';\n// import { Zone } from '@client/api/light-architect/model/area/zone.class';\nimport { Dsl, GarbageCollector, ListModel, MutableValueModel, SelectionModel, ValueModel } from '@coolon/pectin';\nimport { AbstractTableModel } from '../table/abstract-table-model';\nimport { SelectionColumnModel } from '../table/column-model';\nimport { DecoratedTreeNode } from './decorated-tree-node';\nimport { TreeExpansionModel } from './tree-expansion-model';\nimport { TreeLabelColumnModel } from './tree-label-column-model';\nimport { TreeNode } from './tree-node';\nimport { TreeToListModel } from './tree-to-list-model';\nimport { SelfAndDescendantsVisitor, VisitableTree } from './visitable.class';\n\n\n// TODO:\n// Selection Models:\n// - as simple navigation tree\n// - as editable grid (selecte all, even hidden etc?)\n// - fixing selection on underlying model changes.\n// - rendering selection: row highlighting, checkboxes (in the tree renderer or in separate column), both.\n// Expansion Models:\n// - Add ability to auto show to depth\n// - Add a predicate to check default expansion (i.e. has children of a certain type)\n//\nexport class TreeTableModel<Row extends TreeNode<Row>> extends AbstractTableModel<DecoratedTreeNode<Row>> {\n\n constructor(source: ListModel<DecoratedTreeNode<Row>>, readonly treeExpansionModel: TreeExpansionModel<DecoratedTreeNode<Row>>) {\n super(source);\n }\n\n static fromRoot<Row extends TreeNode<Row>>(sourceOfTruth: ValueModel<Row>, builder?: (tableModel: TreeTableModel<Row>) => void): TreeTableModel<Row> {\n const garbage = new GarbageCollector();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(garbage);\n const children = chain(sourceOfTruth).mapToList(root => [root]);\n const model = this.fromList(children, builder);\n model.registerDisposable(garbage);\n return model;\n }\n\n static fromChildrenOf<Row extends TreeNode<Row>>(sourceOfTruth: ValueModel<Row>, builder?: (tableModel: TreeTableModel<Row>) => void): TreeTableModel<Row> {\n const garbage = new GarbageCollector();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(garbage);\n const children = chain(sourceOfTruth).mapToList(root => root.children); // for some reason pluck list can't see 'children'\n const model = this.fromList(children, builder);\n model.registerDisposable(garbage);\n return model;\n }\n\n static fromList<Row extends TreeNode<Row>>(sourceOfTruth: ListModel<Row>, builder?: (tableModel: TreeTableModel<Row>) => void): TreeTableModel<Row> {\n const treeExpansionModel = new TreeExpansionModel<DecoratedTreeNode<Row>>(sourceOfTruth.identityOf);\n const nodes = new TreeToListModel(sourceOfTruth, treeExpansionModel);\n const model = new TreeTableModel<Row>(nodes, treeExpansionModel);\n model.registerDisposable(nodes);\n if (builder) builder(model);\n return model;\n }\n\n treeControlColumn(builder: (column: TreeLabelColumnModel<Row>) => void) {\n const columnId = 'tree-label';\n const column = new TreeLabelColumnModel<Row>(columnId, () => this.getColumnTextProperties(columnId), this.treeExpansionModel);\n builder(column);\n this.addColumn(column);\n }\n\n expand(node: DecoratedTreeNode<Row>) {\n this.treeExpansionModel.expand(node);\n }\n\n collapse(node: DecoratedTreeNode<Row>) {\n this.treeExpansionModel.expand(node);\n }\n\n isCollapsed(node: DecoratedTreeNode<Row>): boolean {\n return this.treeExpansionModel.isCollapsed(node);\n }\n\n ensureAncestorsAndSelfVisible(node: DecoratedTreeNode<Row>) {\n this.treeExpansionModel.ensureAncestorsAndSelfVisible(node);\n }\n\n addSelectionColumn(selectionModel?: SelectionModel<DecoratedTreeNode<Row>>, showSelectionColumn?: ValueModel<boolean> | boolean): SelectionColumnModel<DecoratedTreeNode<Row>> {\n return this._addSelectionColumn(selectionModel, showSelectionColumn);\n }\n\n // saveSelection() {\n // let ids: number[] = [];\n // const selectedArea = this._decoratedSelectionModel.leadSelection.value;\n // if (selectedArea) {\n // ids.push(selectedArea.id);\n // ids = ids.concat(selectedArea.siblingsAfter().map(a => a.id));\n // ids = ids.concat(selectedArea.siblingsBefore().reverse().map(a => a.id));\n // ids = ids.concat(selectedArea.ancestorsToZone().reverse().map(a => a.id));\n // }\n // this._storedSelection = ids;\n // }\n //\n //\n // restoreSelection() {\n // const all = this.rootNodeModel.value.selfAndDescendants();\n // for (let i = 0; i < this._storedSelection.length; i++) {\n // const id = this._storedSelection[i];\n // const found = all.find(area => area.id === id);\n // if (found) {\n // this.selectedAreaId.value = found.id;\n // break;\n // }\n // }\n // }\n //\n // collapseAll(areas: T[]) {\n // this.collapsedAreaIds.value = [].concat(this.collapsedAreaIds.value, areas.map(a => a.id));\n // }\n\n // disableSelection(disable: boolean = true) {\n // this._disableSelection.value = disable;\n // }\n\n\n}\n\n\n// /**\n// * 1. Make this a TreeModel<T extends AbstractTree>\n// * 2. Move the decorated items to the view (along with viewToModel and modelToView)\n// */\n// export class TreeTableModel<T, K extends keyof T> {\n//\n// // public readonly decoratedVisibleAreas: ListModel<T>;\n// //\n// // private decoratorCache = undefined; //new DecoratorCache();\n// // private collapsedAreaIds: MutableListModel<number> = new MutableListModel<number>();\n// //\n// // private _rawSelectionModel: SingleSelectionModel<T, T[K]>;\n// // private _decoratedSelectionModel: SingleSelectionModel<T, T[K]>;\n// //\n// // private readonly _disableSelection = new MutableValueModel<boolean>(false);\n// // private _hoveredAreaModel: MutableValueModel<T> = new MutableValueModel<T>();\n// //\n// // private _decoratedHoverModel: ValueModel<T> = new MutableValueModel<T>();\n// // private _storedSelection: number[] = [];\n// //\n// // readonly visibleNodes: ListModelChain<T>;\n// //\n// // protected constructor(readonly rootNodeModel: ValueModel<T>, identifiedBy: K, readonly selectedAreaId: MutableValueModel<K>) {\n// // super();\n// // const {chain, valueOf, before, when, after, observe, switchOn} = Dsl.disposeWith(this);\n// //\n// // this.visibleNodes = chain(this.rootNodeModel).mapToList(root => {\n// // return root.visit(new FlattenStrategy(this.collapsedAreaIds.value)).flattenedAreas;\n// // }, {dependsOn: this.collapsedAreaIds});\n// //\n// // this.decoratedVisibleAreas = this.visibleNodes.map(area => {\n// // return this.decoratorCache.get(area);\n// // });\n// //\n// // this._rawSelectionModel = this.registerDisposable(SingleSelectionModel.fromList(this.visibleNodes, identifiedBy, {\n// // storeIdIn: this.selectedAreaId,\n// // // toggleSelection: false\n// // }));\n// // this._rawSelectionModel.selectBehaviour.disableWhen(this._disableSelection);\n// // this._decoratedSelectionModel = this.registerDisposable(SingleSelectionModel.fromList(this.decoratedVisibleAreas, identifiedBy, {\n// // storeIdIn: this.selectedAreaId,\n// // toggleSelection: false\n// // }));\n// // this._decoratedSelectionModel.selectBehaviour.disableWhen(this._disableSelection);\n// //\n// // // our areas will be different objects so we have to save, restore the\n// // // selection and rebuild our decorators\n// // before(rootNodeModel).changes(() => this.saveSelection());\n// // before(rootNodeModel).changes(() => this.decoratorCache.clear());\n// // when(rootNodeModel).changes(() => this.restoreSelection(), {asLongAs: () => !!rootNodeModel.value});\n// //\n// //\n// // this.registerDisposable(new Binding(this._decoratedHoverModel, this._hoveredAreaModel, {\n// // toLeft: (area) => area ? this.modelToView(area) : null,\n// // toRight: (decoratedArea) => decoratedArea ? this.viewToModel(decoratedArea) : null\n// // }));\n// //\n// // when(this.decoratedSelectionModel.leadSelection)\n// // .changes(selection => this.ensureAncestorsAndSelfVisible(selection), {\n// // asLongAs: selection => !!selection\n// // });\n// // }\n// //\n// // static fromRoot<T, K extends keyof T>(rootNodeModel: ValueModel<T>, identifiedBy: K, options?: TreeModel.Options<T, K>) {\n// //\n// // }\n// //\n// // public viewToModel(decoratedArea: T): T {\n// // assert.notNil(decoratedArea);\n// // return TreeModel.AreaDecorator.undecorate(decoratedArea);\n// // }\n// //\n// // public modelToView(area: T): T {\n// // assert.notNil(area);\n// // return this.decoratorCache.get(area);\n// // }\n// //\n// // get hoveredAreaModel(): ValueModel<T> {\n// // return this._hoveredAreaModel;\n// // }\n// //\n// // clearHover() {\n// // this._hoveredAreaModel.value = null;\n// // }\n// //\n// // get selectionModel(): SelectionModel<T> {\n// // return this._rawSelectionModel;\n// // }\n// //\n// // get decoratedSelectionModel(): SelectionModel<T> {\n// // return this._decoratedSelectionModel;\n// // }\n// //\n// // get decoratedHoverModel(): ValueModel<T> {\n// // return this._decoratedHoverModel;\n// // }\n// //\n// // decoratedArea(area: T): T {\n// // return this.decoratorCache.get(area);\n// // }\n// //\n// // select(area: T) {\n// // this.selectedAreaId.value = area ? area.id : null;\n// // }\n// }\n\n\nexport namespace TreeTableModel {\n\n export interface Options<T, K extends keyof T> {\n storeIdIn: MutableValueModel<K>\n }\n\n // export interface DecoratedArea extendsTDecorator,T {\n // }\n //\n // export classTDecorator extends Decorator<T> {\n //\n // static decorate(area:T): DecoratedArea {\n // return Decorator.create(area, newTDecorator(area)) as DecoratedArea;\n // }\n //\n // pathToRoot() {\n // return this.object.ancestorsToZone().slice(1);\n // }\n //\n // isLastChild() {\n // return this.object.isLastChild();\n // }\n //\n // isRoot() {\n // return this.object.isZone();\n // }\n // }\n\n}\n\n\nexport class FlattenStrategy<T extends VisitableTree<any>> extends SelfAndDescendantsVisitor<T> {\n\n private _areas: T[] = [];\n private _collapsed: Set<T>;\n\n constructor(private collapsedIds: T[]) {\n super();\n this._collapsed = new Set<T>(collapsedIds);\n }\n\n protected onVisit(it: T) {\n this._areas.push(it);\n }\n\n protected shouldVisitChildrenOf(it: T): boolean {\n return !this._collapsed.has(it);\n }\n\n get flattenedAreas(): T[] {\n return this._areas;\n }\n\n}\n\n// class DecoratorCache {\n//\n// private map = new Map<number, T>();\n//\n// get(area:T): T {\n//\n// if (!area) return null;\n//\n// let decoratedArea = this.map.get(area.id);\n// if (!decoratedArea) {\n// decoratedArea = TreeModel.AreaDecorator.decorate(area);\n// this.map.set(area.id, decoratedArea);\n// }\n// return decoratedArea;\n// }\n//\n// clear() {\n// this.map.clear();\n// }\n//\n//\n// }\n\n\n\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"TreeTableModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../table/abstract-table-model","name":"AbstractTableModel","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"TreeTableModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../table/abstract-table-model","name":"AbstractTableModel","line":24,"character":63},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@coolon/pectin","name":"ListModel","line":26,"character":22,"arguments":[{"__symbolic":"reference","module":"./decorated-tree-node","name":"DecoratedTreeNode","line":26,"character":32,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":26,"character":123,"context":{"typeName":"Row"}}]}]},{"__symbolic":"reference","module":"./tree-expansion-model","name":"TreeExpansionModel","line":26,"character":86,"arguments":[{"__symbolic":"reference","module":"./decorated-tree-node","name":"DecoratedTreeNode","line":26,"character":32,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":26,"character":123,"context":{"typeName":"Row"}}]}]}]}],"treeControlColumn":[{"__symbolic":"method"}],"expand":[{"__symbolic":"method"}],"collapse":[{"__symbolic":"method"}],"isCollapsed":[{"__symbolic":"method"}],"ensureAncestorsAndSelfVisible":[{"__symbolic":"method"}],"addSelectionColumn":[{"__symbolic":"method"}]}},"FlattenStrategy":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./visitable.class","name":"SelfAndDescendantsVisitor","line":259,"character":67},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":264,"character":36,"context":{"typeName":"T"}}]}]}],"onVisit":[{"__symbolic":"method"}],"shouldVisitChildrenOf":[{"__symbolic":"method"}]}}}}]
|
package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';
|
|
3
|
+
import { assert, Command, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';
|
|
4
|
+
import { HorizontalAlignment } from '../../../components/alignment';
|
|
5
|
+
import { CommandFace } from '../../../components/commands/command-face';
|
|
6
|
+
import { DisposableComponent } from '../../../components/disposable-component';
|
|
7
|
+
export class AbstractActivityTriggerComponent extends DisposableComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.alignFace = HorizontalAlignment.CENTER;
|
|
11
|
+
this.confirmEvent = new EventEmitter();
|
|
12
|
+
this.cancelEvent = new EventEmitter();
|
|
13
|
+
this.startActivityCommand = Command.create(() => {
|
|
14
|
+
assert.notNil(this.activityClass);
|
|
15
|
+
assert.notNil(this.interactionContext);
|
|
16
|
+
this.interactionContext.startActivity(this.activityClass, this.activityData)
|
|
17
|
+
.then(result => {
|
|
18
|
+
this.confirmEvent.emit(result);
|
|
19
|
+
}).catch(error => {
|
|
20
|
+
this.cancelEvent.emit(error);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
ngOnInit() {
|
|
25
|
+
}
|
|
26
|
+
get isActive() {
|
|
27
|
+
var _a;
|
|
28
|
+
return (_a = this.interactionContext) === null || _a === void 0 ? void 0 : _a.isActive();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
AbstractActivityTriggerComponent.decorators = [
|
|
32
|
+
{ type: Component, args: [{
|
|
33
|
+
selector: 'aup-abstract-activity-trigger',
|
|
34
|
+
template: ''
|
|
35
|
+
},] }
|
|
36
|
+
];
|
|
37
|
+
AbstractActivityTriggerComponent.ctorParameters = () => [];
|
|
38
|
+
AbstractActivityTriggerComponent.propDecorators = {
|
|
39
|
+
activityClass: [{ type: Input }],
|
|
40
|
+
activityClassModel: [{ type: Input }],
|
|
41
|
+
activityData: [{ type: Input }],
|
|
42
|
+
activityDataModel: [{ type: Input }],
|
|
43
|
+
face: [{ type: Input }],
|
|
44
|
+
faceModel: [{ type: Input }],
|
|
45
|
+
alignFace: [{ type: Input }],
|
|
46
|
+
confirmEvent: [{ type: Output }],
|
|
47
|
+
cancelEvent: [{ type: Output }],
|
|
48
|
+
isActive: [{ type: HostBinding, args: ['class.active',] }]
|
|
49
|
+
};
|
|
50
|
+
__decorate([
|
|
51
|
+
StoreInValueModel('activityClassModel'),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], AbstractActivityTriggerComponent.prototype, "activityClass", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
TrackExternal(),
|
|
56
|
+
__metadata("design:type", ValueModel)
|
|
57
|
+
], AbstractActivityTriggerComponent.prototype, "activityClassModel", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
StoreInValueModel('activityDataModel'),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], AbstractActivityTriggerComponent.prototype, "activityData", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
TrackExternal(),
|
|
64
|
+
__metadata("design:type", ValueModel)
|
|
65
|
+
], AbstractActivityTriggerComponent.prototype, "activityDataModel", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
StoreInValueModel('faceModel'),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], AbstractActivityTriggerComponent.prototype, "face", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
TrackExternal(),
|
|
72
|
+
__metadata("design:type", ValueModel)
|
|
73
|
+
], AbstractActivityTriggerComponent.prototype, "faceModel", void 0);
|
|
74
|
+
//# sourceMappingURL=abstract-activity-trigger.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-activity-trigger.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,OAAO,EAAiB,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAQ/E,MAAM,OAAO,gCAA4D,SAAQ,mBA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aAAa,EAAE;8BACG,UAAU;2EAAI;AAIjC;IADC,iBAAiB,CAAC,WAAW,CAAC;;8DACb;AAIlB;IADC,aAAa,EAAE;8BACL,UAAU;mEAAc","sourcesContent":["import { Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';\nimport { assert, Command, Constructable, StoreInValueModel, TrackExternal, ValueModel } from '@coolon/pectin';\nimport { HorizontalAlignment } from '../../../components/alignment';\nimport { CommandFace } from '../../../components/commands/command-face';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { Activity } from '../../activity';\nimport { InteractionContext } from '../../interaction-context';\n\n@Component({\n selector: 'aup-abstract-activity-trigger',\n template: ''\n})\nexport class AbstractActivityTriggerComponent<D = any, R = any, E = any> extends DisposableComponent implements OnInit {\n\n @Input()\n @StoreInValueModel('activityClassModel')\n activityClass: Constructable<Activity<D, R, E>>;\n\n @Input()\n @TrackExternal()\n activityClassModel: ValueModel<Constructable<Activity<D, R, E>>>;\n\n @Input()\n @StoreInValueModel('activityDataModel')\n activityData: D;\n\n @Input()\n @TrackExternal()\n activityDataModel: ValueModel<D>;\n\n @Input()\n @StoreInValueModel('faceModel')\n face: CommandFace;\n\n @Input()\n @TrackExternal()\n faceModel: ValueModel<CommandFace>;\n\n @Input()\n alignFace: HorizontalAlignment = HorizontalAlignment.CENTER;\n\n readonly startActivityCommand: Command<unknown>;\n\n interactionContext: InteractionContext;\n\n @Output()\n confirmEvent = new EventEmitter<R>();\n\n @Output()\n cancelEvent = new EventEmitter<E>();\n\n constructor() {\n super();\n this.startActivityCommand = Command.create(() => {\n assert.notNil(this.activityClass);\n assert.notNil(this.interactionContext);\n this.interactionContext.startActivity(this.activityClass, this.activityData)\n .then(result => {\n this.confirmEvent.emit(result);\n }).catch(error => {\n this.cancelEvent.emit(error);\n });\n });\n }\n\n ngOnInit(): void {\n }\n\n @HostBinding('class.active')\n get isActive() {\n return this.interactionContext?.isActive();\n }\n\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"AbstractActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":12,"character":81},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":8,"character":1},"arguments":[{"selector":"aup-abstract-activity-trigger","template":""}]}],"members":{"activityClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":15,"character":3},"arguments":["activityClassModel"]}]}],"activityClassModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":18,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":19,"character":3}}]}],"activityData":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":22,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":23,"character":3},"arguments":["activityDataModel"]}]}],"activityDataModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":27,"character":3}}]}],"face":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":31,"character":3},"arguments":["faceModel"]}]}],"faceModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":34,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"TrackExternal","line":35,"character":3}}]}],"alignFace":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"confirmEvent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":45,"character":3}}]}],"cancelEvent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":48,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":68,"character":3},"arguments":["class.active"]}]}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-activity-trigger.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, ViewChild } from '@angular/core';
|
|
2
|
+
import { InPlaceInteractionContextComponent } from '../../inplace-interaction-context/in-place-interaction-context.component';
|
|
3
|
+
import { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.component';
|
|
4
|
+
export class InlineActivityTriggerComponent extends AbstractActivityTriggerComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
InlineActivityTriggerComponent.decorators = [
|
|
10
|
+
{ type: Component, args: [{
|
|
11
|
+
selector: 'aup-inline-activity-trigger',
|
|
12
|
+
template: "<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-in-place-interaction-context>\n",
|
|
13
|
+
styles: [":host{display:inline-block}"]
|
|
14
|
+
},] }
|
|
15
|
+
];
|
|
16
|
+
InlineActivityTriggerComponent.ctorParameters = () => [];
|
|
17
|
+
InlineActivityTriggerComponent.propDecorators = {
|
|
18
|
+
interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }]
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=inline-activity-trigger.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-activity-trigger.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAE,kCAAkC,EAAE,MAAM,0EAA0E,CAAC;AAE9H,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,8BAA0D,SAAQ,gCAAyC;IAKtH;QACE,KAAK,EAAE,CAAC;IACV,CAAC;;;YAZF,SAAS,SAAC;gBACT,QAAQ,EAAE,6BAA6B;gBACvC,gQAAuD;;aAExD;;;;iCAGE,SAAS,SAAC,kCAAkC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE","sourcesContent":["import { Component, ViewChild } from '@angular/core';\nimport { Activity } from '../../../activity';\nimport { InteractionContext } from '../../../interaction-context';\nimport { InPlaceInteractionContextComponent } from '../../inplace-interaction-context/in-place-interaction-context.component';\nimport { PopupInteractionContextComponent } from '../../popup-interaction-context/popup-interaction-context.component';\nimport { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.component';\n\n@Component({\n selector: 'aup-inline-activity-trigger',\n templateUrl: './inline-activity-trigger.component.html',\n styleUrls: ['./inline-activity-trigger.component.scss']\n})\nexport class InlineActivityTriggerComponent<D = any, R = any, E = any> extends AbstractActivityTriggerComponent<D, R, E> {\n\n @ViewChild(InPlaceInteractionContextComponent, { static: true })\n interactionContext: InteractionContext;\n\n constructor() {\n super();\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"InlineActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":12,"character":79},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":7,"character":1},"arguments":[{"selector":"aup-inline-activity-trigger","template":"<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-in-place-interaction-context>\n","styles":[":host{display:inline-block}"]}]}],"members":{"interactionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":14,"character":3},"arguments":[{"__symbolic":"reference","module":"../../inplace-interaction-context/in-place-interaction-context.component","name":"InPlaceInteractionContextComponent","line":14,"character":13},{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor"}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-activity-trigger.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-activity-trigger.component.scss.shim.ngstyle.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { InteractionService } from '../../../services/interaction.service';
|
|
3
|
+
import { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.component';
|
|
4
|
+
export class ModalActivityTriggerComponent extends AbstractActivityTriggerComponent {
|
|
5
|
+
constructor(interactionService) {
|
|
6
|
+
super();
|
|
7
|
+
this.interactionContext = interactionService.createModalInteractionContextDisposedWith(this);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
ModalActivityTriggerComponent.decorators = [
|
|
11
|
+
{ type: Component, args: [{
|
|
12
|
+
selector: 'aup-modal-activity-trigger',
|
|
13
|
+
template: "<aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n",
|
|
14
|
+
styles: [":host{display:inline-block}"]
|
|
15
|
+
},] }
|
|
16
|
+
];
|
|
17
|
+
ModalActivityTriggerComponent.ctorParameters = () => [
|
|
18
|
+
{ type: InteractionService }
|
|
19
|
+
];
|
|
20
|
+
//# sourceMappingURL=modal-activity-trigger.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-activity-trigger.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,6BAAyD,SAAQ,gCAAyC;IAIrH,YAAY,kBAAsC;QAChD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC,yCAAyC,CAAC,IAAI,CAAC,CAAC;IAC/F,CAAC;;;YAZF,SAAS,SAAC;gBACT,QAAQ,EAAE,4BAA4B;gBACtC,gIAAsD;;aAEvD;;;YAPQ,kBAAkB","sourcesContent":["import { Component } from '@angular/core';\nimport { Activity } from '../../../activity';\nimport { InteractionContext } from '../../../interaction-context';\nimport { InteractionService } from '../../../services/interaction.service';\nimport { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.component';\n\n@Component({\n selector: 'aup-modal-activity-trigger',\n templateUrl: './modal-activity-trigger.component.html',\n styleUrls: ['./modal-activity-trigger.component.scss']\n})\nexport class ModalActivityTriggerComponent<D = any, R = any, E = any> extends AbstractActivityTriggerComponent<D, R, E> {\n\n interactionContext: InteractionContext;\n\n constructor(interactionService: InteractionService) {\n super();\n this.interactionContext = interactionService.createModalInteractionContextDisposedWith(this);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"ModalActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":11,"character":78},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":6,"character":1},"arguments":[{"selector":"aup-modal-activity-trigger","template":"<aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n","styles":[":host{display:inline-block}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../../services/interaction.service","name":"InteractionService","line":15,"character":34}]}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-activity-trigger.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal-activity-trigger.component.scss.shim.ngstyle.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { PopupInteractionContextComponent } from '../../popup-interaction-context/popup-interaction-context.component';
|
|
3
|
+
import { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.component';
|
|
4
|
+
export class PopupActivityTriggerComponent extends AbstractActivityTriggerComponent {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this.anchorX = 'start';
|
|
8
|
+
this.anchorY = 'bottom';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
PopupActivityTriggerComponent.decorators = [
|
|
12
|
+
{ type: Component, args: [{
|
|
13
|
+
selector: 'aup-popup-activity-trigger',
|
|
14
|
+
template: "<aup-popup-interaction-context [anchorX]=\"anchorX\" [anchorY]=\"anchorY\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-popup-interaction-context>\n",
|
|
15
|
+
styles: [":host{display:inline-block}"]
|
|
16
|
+
},] }
|
|
17
|
+
];
|
|
18
|
+
PopupActivityTriggerComponent.ctorParameters = () => [];
|
|
19
|
+
PopupActivityTriggerComponent.propDecorators = {
|
|
20
|
+
anchorX: [{ type: Input }],
|
|
21
|
+
anchorY: [{ type: Input }],
|
|
22
|
+
interactionContext: [{ type: ViewChild, args: [PopupInteractionContextComponent, { static: true },] }]
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=popup-activity-trigger.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-activity-trigger.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,qEAAqE,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,6BAAyD,SAAQ,gCAAyC;IAWrH;QACE,KAAK,EAAE,CAAC;QATV,YAAO,GAAoB,OAAO,CAAC;QAGnC,YAAO,GAAqB,QAAQ,CAAC;IAOrC,CAAC;;;YAlBF,SAAS,SAAC;gBACT,QAAQ,EAAE,4BAA4B;gBACtC,iPAAsD;;aAEvD;;;;sBAGE,KAAK;sBAGL,KAAK;iCAGJ,SAAS,SAAC,gCAAgC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE","sourcesContent":["import { Component, Input, ViewChild } from '@angular/core';\nimport { InteractionContext } from '../../../interaction-context';\nimport { PopupInteractionContextComponent } from '../../popup-interaction-context/popup-interaction-context.component';\nimport { AbstractActivityTriggerComponent } from '../abstract-activity-trigger.component';\n\n@Component({\n selector: 'aup-popup-activity-trigger',\n templateUrl: './popup-activity-trigger.component.html',\n styleUrls: ['./popup-activity-trigger.component.scss']\n})\nexport class PopupActivityTriggerComponent<D = any, R = any, E = any> extends AbstractActivityTriggerComponent<D, R, E> {\n\n @Input()\n anchorX: 'start' | 'end' = 'start';\n\n @Input()\n anchorY: 'top' | 'bottom' = 'bottom';\n\n @ViewChild(PopupInteractionContextComponent, { static: true })\n interactionContext: InteractionContext;\n\n constructor() {\n super();\n }\n\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PopupActivityTriggerComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-activity-trigger.component","name":"AbstractActivityTriggerComponent","line":10,"character":78},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":5,"character":1},"arguments":[{"selector":"aup-popup-activity-trigger","template":"<aup-popup-interaction-context [anchorX]=\"anchorX\" [anchorY]=\"anchorY\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-popup-interaction-context>\n","styles":[":host{display:inline-block}"]}]}],"members":{"anchorX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"anchorY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"interactionContext":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":18,"character":4},"arguments":[{"__symbolic":"reference","module":"../../popup-interaction-context/popup-interaction-context.component","name":"PopupInteractionContextComponent","line":18,"character":14},{"static":true}]}]}],"__ctor__":[{"__symbolic":"constructor"}]}}}}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-activity-trigger.component.ngfactory.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.ngfactory.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup-activity-trigger.component.scss.shim.ngstyle.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.scss.shim.ngstyle.ts"],"names":[],"mappings":"","sourcesContent":["import * as i0 from '@angular/core';\ni0.ComponentFactory;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in-place-interaction-context.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAGxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAK/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG
|
|
1
|
+
{"version":3,"file":"in-place-interaction-context.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAiB,MAAM,wBAAwB,CAAC;AAGxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAK/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAC;AAEhG;;;;;;;;;;GAUG;AAMH,MAAM,OAAO,kCAA4C,SAAQ,mBAAmB;IAgBlF,YAAqB,kBAAsC,EAAwD,SAAwB;QACzI,KAAK,EAAE,CAAC;QADW,uBAAkB,GAAlB,kBAAkB,CAAoB;QAAwD,cAAS,GAAT,SAAS,CAAe;QAX3I;;;WAGG;QAEH,yBAAoB,GAAG,IAAI,CAAC;IAQ5B,CAAC;IAND,IAAI,iBAAiB;;QACnB,OAAO,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC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gBAC5C,oXAA4D;;aAE7D;;;YAlBQ,kBAAkB;4CAmCqC,MAAM,SAAC,eAAe,cAAG,QAAQ;;;yCAd9F,SAAS,SAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;mCAO/C,KAAK","sourcesContent":["import { AfterViewInit, Component, Inject, Input, Optional, ViewChild } from '@angular/core';\nimport { MAT_TABS_CONFIG, MatTabsConfig } from '@angular/material/tabs';\nimport { Constructable } from '@coolon/pectin';\nimport _ from 'lodash';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { Activity } from '../../activity';\nimport { Alert } from '../../alert';\nimport { Confirm } from '../../confirm';\nimport { InteractionContext } from '../../interaction-context';\nimport { InteractionService } from '../../services/interaction.service';\nimport { ActivityContainerComponent } from '../activity-container/activity-container.component';\n\n/**\n * @example\n * <aup-in-place-interaction-context #inPlaceInteractionContext>\n * </aup-in-place-interaction-context>\n *\n * in your component\n * @ViewChild('inPlaceInteractionContext', { static: true })\n * interactionContext: InteractionContext;\n *\n *\n */\n@Component({\n selector: 'aup-in-place-interaction-context',\n templateUrl: './in-place-interaction-context.component.html',\n styleUrls: ['./in-place-interaction-context.component.scss']\n})\nexport class InPlaceInteractionContextComponent<D, R, E> extends DisposableComponent implements InteractionContext, AfterViewInit {\n\n @ViewChild('activityContainer', { static: true })\n activityContainerComponent: ActivityContainerComponent<any, any, any>;\n\n /**\n * If true then the first startActivity call will slide the activity into view. If false\n * the activity will replace the existing content immediately.\n */\n @Input()\n animateFirstActivity = true;\n\n get animationDuration(): string {\n return this.animateFirstActivity ? (this.tabConfig?.animationDuration || '500ms') : '0ms';\n }\n\n constructor(readonly interactionService: InteractionService, @Inject(MAT_TABS_CONFIG) @Optional() private readonly tabConfig: MatTabsConfig) {\n super();\n }\n\n ngAfterViewInit(): void {\n this.interactionService.registerInplaceInteractionContext(this);\n }\n\n initialise(id: string, api: InteractionService.Api) {\n this.activityContainerComponent.initialise(id, api);\n }\n\n get identifier() {\n return this.activityContainerComponent.identifier;\n }\n\n alert(alert: Alert): Promise<void> {\n return this.activityContainerComponent.alert(alert);\n }\n\n cancelActiveActivity(): Promise<boolean> {\n return this.activityContainerComponent.cancelActiveActivity();\n }\n\n confirm(confirm: Confirm): Promise<boolean> {\n return this.activityContainerComponent.confirm(confirm);\n }\n\n confirmOrReject(confirm: Confirm): Promise<void> {\n return this.activityContainerComponent.confirmOrReject(confirm);\n }\n\n confirmThen<D1, R1, E1>(confirm: Confirm, activityType: Constructable<Activity<D1, R1, E1>>, data?: D1): Promise<R1> {\n return this.activityContainerComponent.confirmThen(confirm, activityType);\n }\n\n isActive(): boolean {\n return this.activityContainerComponent.isActive();\n }\n\n startActivity<D1, R1, E1>(activityType: Constructable<Activity<D1, R1, E1>>, data?: D1, options?: InteractionContext.Options): Promise<R1> {\n return this.activityContainerComponent.startActivity(activityType, data, options);\n }\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"InPlaceInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"InPlaceInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":28,"character":65},"arity":3,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":23,"character":1},"arguments":[{"selector":"aup-in-place-interaction-context","template":"<mat-tab-group no-tab-header [selectedIndex]=\"isActive() ? 1 : 0\" full-height-tabs [dynamicHeight]=\"false\" [animationDuration]=\"animationDuration\">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer [dynamicHeight]=\"false\"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n","styles":[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],"members":{"activityContainerComponent":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":30,"character":3},"arguments":["activityContainer",{"static":true}]}]}],"animateFirstActivity":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":37,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":44,"character":64},"arguments":[{"__symbolic":"reference","module":"@angular/material/tabs","name":"MAT_TABS_CONFIG","line":44,"character":71}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":44,"character":89}}]],"parameters":[{"__symbolic":"reference","module":"../../services/interaction.service","name":"InteractionService","line":44,"character":43},{"__symbolic":"reference","module":"@angular/material/tabs","name":"MatTabsConfig","line":44,"character":128}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"initialise":[{"__symbolic":"method"}],"alert":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"confirm":[{"__symbolic":"method"}],"confirmOrReject":[{"__symbolic":"method"}],"confirmThen":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"startActivity":[{"__symbolic":"method"}]}}}}]
|
|
@@ -3,6 +3,16 @@ import { ComponentPortal } from '@angular/cdk/portal';
|
|
|
3
3
|
import { Component, ElementRef, HostBinding, Input, Optional, SkipSelf } from '@angular/core';
|
|
4
4
|
import { DisposableComponent } from '../../../components/disposable-component';
|
|
5
5
|
import { InPlaceInteractionContextComponent } from '../inplace-interaction-context/in-place-interaction-context.component';
|
|
6
|
+
/**
|
|
7
|
+
* <aup-popup-interaction-context #ctx></aup-popup-interaction-context>
|
|
8
|
+
*
|
|
9
|
+
* in your component
|
|
10
|
+
* @ViewChild('inPlaceInteractionContext', { static: true })
|
|
11
|
+
* interactionContext: InteractionContext;
|
|
12
|
+
* or
|
|
13
|
+
* @ViewChild('ctx', { static: true })
|
|
14
|
+
* interactionContext: InteractionContext;
|
|
15
|
+
*/
|
|
6
16
|
export class PopupInteractionContextComponent extends DisposableComponent {
|
|
7
17
|
constructor(_element, _overlay, scrollable) {
|
|
8
18
|
super();
|
|
@@ -75,7 +85,7 @@ PopupInteractionContextComponent.decorators = [
|
|
|
75
85
|
{ type: Component, args: [{
|
|
76
86
|
selector: 'aup-popup-interaction-context',
|
|
77
87
|
template: "<ng-content></ng-content>\n",
|
|
78
|
-
styles: [":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]
|
|
88
|
+
styles: [":host{display:inline-block}:host.interaction-active{background:rgba(0,0,0,.05)}"]
|
|
79
89
|
},] }
|
|
80
90
|
];
|
|
81
91
|
PopupInteractionContextComponent.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup-interaction-context.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAqB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAU,QAAQ,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEtG,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,kCAAkC,EAAE,MAAM,uEAAuE,CAAC;
|
|
1
|
+
{"version":3,"file":"popup-interaction-context.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAqB,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,SAAS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AO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE;YACxF,8CAA8C;YAC9C,+EAA+E;YAC/E,2EAA2E;YAC3E,+EAA+E;YAC/E,0EAA0E;SAC3E,CAAC;IACJ,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,EAAE,CAAC;IACxD,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,CAAC;IACvE,CAAC;IAED,QAAQ;IACR,CAAC;;;YA1FF,SAAS,SAAC;gBACT,QAAQ,EAAE,+BAA+B;gBACzC,uCAAyD;;aAE1D;;;YApBmB,UAAU;YAFa,OAAO;YAAzC,aAAa,uBAyCkD,QAAQ,YAAI,QAAQ;;;qBAbzF,WAAW,SAAC,0BAA0B;sBAOtC,KAAK;sBAGL,KAAK","sourcesContent":["import { CdkScrollable, ConnectedPosition, Overlay } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { Component, ElementRef, HostBinding, Input, OnInit, Optional, SkipSelf } from '@angular/core';\nimport { Constructable } from '@coolon/pectin';\nimport { DisposableComponent } from '../../../components/disposable-component';\nimport { Activity } from '../../activity';\nimport { InPlaceInteractionContextComponent } from '../inplace-interaction-context/in-place-interaction-context.component';\n\n/**\n * <aup-popup-interaction-context #ctx></aup-popup-interaction-context>\n *\n * in your component\n * @ViewChild('inPlaceInteractionContext', { static: true })\n * interactionContext: InteractionContext;\n * or\n * @ViewChild('ctx', { static: true })\n * interactionContext: InteractionContext;\n */\n@Component({\n selector: 'aup-popup-interaction-context',\n templateUrl: './popup-interaction-context.component.html',\n styleUrls: ['./popup-interaction-context.component.scss']\n})\nexport class PopupInteractionContextComponent extends DisposableComponent implements OnInit {\n\n private interactionContext: InPlaceInteractionContextComponent<any, any, any>;\n private scrollContainers: CdkScrollable[];\n\n @HostBinding('class.interaction-active')\n public get active(): boolean {\n return this.isActive();\n }\n\n readonly outputPortal = new ComponentPortal<InPlaceInteractionContextComponent<any, any, any>>(InPlaceInteractionContextComponent);\n\n @Input()\n anchorX: 'start' | 'end' = 'start';\n\n @Input()\n anchorY: 'top' | 'bottom' = 'bottom';\n\n constructor(private _element: ElementRef, private _overlay: Overlay, @Optional() @SkipSelf() scrollable: CdkScrollable) {\n super();\n this.scrollContainers = scrollable ? [scrollable] : [];\n }\n\n startActivity<D, R, E>(activityType: Constructable<Activity<D, R, E>>, data?: D): Promise<R> {\n // console.log({ element: this._element });\n const self = this;\n const overlayRef = this._overlay.create({\n hasBackdrop: false,\n panelClass: 'aup-popup-interaction-panel',\n positionStrategy: this._overlay.position()\n .flexibleConnectedTo(this._element)\n .withPush(true)\n .withPositions(this.computePositions())\n .withGrowAfterOpen(true)\n .withScrollableContainers(self.scrollContainers) // this isn't working. sigh.\n });\n\n const subs = this.scrollContainers.map(sc => sc.elementScrolled().subscribe(() => {\n overlayRef.updatePosition();\n }))\n\n\n const componentRef = overlayRef.attach(this.outputPortal);\n this.interactionContext = componentRef.instance;\n\n return new Promise((resolve, reject) => {\n // HACK: afterViewInit won't have been called yet. Need to add when(interactionContext.ready).becomesTruthy(...)\n setTimeout(() => {\n this.interactionContext.startActivity(activityType, data)\n .then(resolve)\n .catch(reject)\n .finally(() => {\n subs.forEach(s => s.unsubscribe())\n overlayRef.dispose();\n });\n setTimeout(() => {\n overlayRef.updatePosition();\n })\n });\n\n });\n }\n\n computePositions(): ConnectedPosition[] {\n const overlayX = this.anchorX === 'start' ? 'start' : 'end';\n const overlayY = this.anchorY === 'top' ? 'bottom' : 'top';\n return [\n { originX: this.anchorX, originY: this.anchorY, overlayX: overlayX, overlayY: overlayY }\n // TODO: compute some meaningful alternatives.\n // { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n // { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' },\n // { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n // { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom' }\n ];\n }\n\n cancelActiveActivity(): Promise<boolean> {\n return this.interactionContext.cancelActiveActivity();\n }\n\n isActive(): boolean {\n return this.interactionContext && this.interactionContext.isActive();\n }\n\n ngOnInit() {\n }\n\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"PopupInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"PopupInteractionContextComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../components/disposable-component","name":"DisposableComponent","line":23,"character":54},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":18,"character":1},"arguments":[{"selector":"aup-popup-interaction-context","template":"<ng-content></ng-content>\n","styles":[":host{display:inline-block}:host.interaction-active{background:rgba(0,0,0,.05)}"]}]}],"members":{"active":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":28,"character":3},"arguments":["class.interaction-active"]}]}],"anchorX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":35,"character":3}}]}],"anchorY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":41,"character":72}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf","line":41,"character":84}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":41,"character":32},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":41,"character":62},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"CdkScrollable","line":41,"character":107}]}],"startActivity":[{"__symbolic":"method"}],"computePositions":[{"__symbolic":"method"}],"cancelActiveActivity":[{"__symbolic":"method"}],"isActive":[{"__symbolic":"method"}],"ngOnInit":[{"__symbolic":"method"}]}}}}]
|
|
@@ -15,6 +15,10 @@ export * from "./components/activity-body/activity-body.component";
|
|
|
15
15
|
export * from "./components/activity-container/activity-container.component";
|
|
16
16
|
export * from "./components/activity-container/activity-outlet/activity-outlet.component";
|
|
17
17
|
export * from "./components/activity-title/activity-title.component";
|
|
18
|
+
export * from "./components/activity-triggers/abstract-activity-trigger.component";
|
|
19
|
+
export * from "./components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component";
|
|
20
|
+
export * from "./components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component";
|
|
21
|
+
export * from "./components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component";
|
|
18
22
|
export * from "./components/add-item-interaction-context/add-item-interaction-context.component";
|
|
19
23
|
export * from "./components/alert-dialog/alert-dialog.component";
|
|
20
24
|
export * from "./components/confirm-then-dialog/confirm-then-dialog.component";
|