@coolon/angular-ui-powerups 12.1.0 → 12.3.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.
Files changed (19) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +23 -12
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/coolon-angular-ui-powerups.metadata.json +1 -1
  4. package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js +8 -2
  5. package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js.map +1 -1
  6. package/esm2015/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.metadata.json +1 -1
  7. package/esm2015/lib/components/tables/tree-table/tree-label-column-model.js +7 -1
  8. package/esm2015/lib/components/tables/tree-table/tree-label-column-model.js.map +1 -1
  9. package/esm2015/lib/components/tables/tree-table/tree-label-column-model.metadata.json +1 -1
  10. package/esm2015/lib/components/tables/tree-table/tree-table-model.js.map +1 -1
  11. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +2 -2
  12. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  13. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  14. package/fesm2015/coolon-angular-ui-powerups.js +105 -93
  15. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  16. package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +5 -2
  17. package/lib/components/tables/tree-table/tree-label-column-model.d.ts +7 -4
  18. package/lib/components/tables/tree-table/tree-table-model.d.ts +1 -0
  19. package/package.json +1 -1
@@ -5,7 +5,7 @@ import { DisposableComponent } from '../../../disposable-component';
5
5
  import { DecoratedTreeNode } from '../decorated-tree-node';
6
6
  import { TreeExpansionModel } from '../tree-expansion-model';
7
7
  import { TreeInheritanceIconComponent } from '../tree-inheritance-icon/tree-inheritance-icon.component';
8
- import { TreeLabelColumnModel } from '../tree-label-column-model';
8
+ import { TreeTableModel } from '../tree-table-model';
9
9
  export class TreeLabelCellRendererComponent extends DisposableComponent {
10
10
  constructor() {
11
11
  super();
@@ -31,7 +31,10 @@ export class TreeLabelCellRendererComponent extends DisposableComponent {
31
31
  return DecoratedTreeNode.getDecorator(node).hasChildren() && !this.expansionModel.isCollapsed(node);
32
32
  }, { dependsOn: this.expansionModel.isExpandedPredicate });
33
33
  this.iconModel = chain(this.nodeModel).map(node => {
34
- return DecoratedTreeNode.getDecorator(this.node).isLeaf() ? undefined : this.iconFactory(node, this.expansionModel.isExpanded(this.node));
34
+ var _a;
35
+ const expanded = this.expansionModel.isExpanded(this.node);
36
+ const iconFactory = (_a = this.iconFactory) !== null && _a !== void 0 ? _a : TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY;
37
+ return iconFactory(node, expanded, TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY(node, expanded, undefined));
35
38
  }, { dependsOn: this.expansionModel.isExpandedPredicate });
36
39
  }
37
40
  get isRoot() {
@@ -68,4 +71,7 @@ __decorate([
68
71
  StoreInValueModel('nodeModel'),
69
72
  __metadata("design:type", Object)
70
73
  ], TreeLabelCellRendererComponent.prototype, "value", void 0);
74
+ (function (TreeLabelCellRendererComponent) {
75
+ TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY = (node, expanded, defaultIcon) => expanded ? 'mat:expand_more' : 'mat:chevron_right';
76
+ })(TreeLabelCellRendererComponent || (TreeLabelCellRendererComponent = {}));
71
77
  //# sourceMappingURL=tree-label-cell-renderer.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tree-label-cell-renderer.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU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,CAAC;QAC5I,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED,IACI,MAAM;QACR,OAAO,iBAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5D,CAAC;IAED,IACI,MAAM;QACR,OAAO,iBAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5D,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED,WAAW;IACX,gBAAgB,CAAC,IAA0B;QACzC,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChH,CAAC;;;YA7EF,SAAS,SAAC;gBACT,QAAQ,EAAE,8BAA8B;gBACxC,qaAAwD;;aAEzD;;;;oBAOE,KAAK;oBAIL,KAAK;0BAGL,KAAK;6BAIL,KAAK;qBAsCL,WAAW,SAAC,YAAY;qBAKxB,WAAW,SAAC,YAAY;;AApDzB;IADC,iBAAiB,CAAC,WAAW,CAAC;;6DACtB","sourcesContent":["import { Component, HostBinding, Input, OnInit } from '@angular/core';\nimport { Dsl, ListModelChain, MutableValueModel, StoreInValueModel, ValueModelChain } from '@coolon/pectin';\nimport { DisposableComponent } from '../../../disposable-component';\nimport { CellRenderer } from '../../table/cell-renderer';\nimport { DecoratedTreeNode } from '../decorated-tree-node';\nimport { TreeExpansionModel } from '../tree-expansion-model';\nimport { TreeInheritanceIconComponent } from '../tree-inheritance-icon/tree-inheritance-icon.component';\nimport { TreeLabelColumnModel } from '../tree-label-column-model';\n\n@Component({\n selector: 'aup-tree-label-cell-renderer',\n templateUrl: './tree-label-cell-renderer.component.html',\n styleUrls: ['./tree-label-cell-renderer.component.scss']\n})\nexport class TreeLabelCellRendererComponent<T> extends DisposableComponent implements CellRenderer<T>, OnInit {\n\n iconTypes: string[] = [];\n\n private nodeModel = new MutableValueModel<T>();\n\n @Input()\n @StoreInValueModel('nodeModel')\n value: T;\n\n @Input()\n label: string;\n\n @Input()\n iconFactory: TreeLabelColumnModel.LabelFactory<T>;\n\n // TODO: Make this have a proper delegate so I can safely use it here..\n @Input()\n expansionModel: TreeExpansionModel<T>;\n\n readonly iconList: ListModelChain<string>;\n\n canExpand: ValueModelChain<boolean>;\n canCollapse: ValueModelChain<boolean>;\n iconModel: ValueModelChain<string>;\n\n constructor() {\n super();\n const { chain } = Dsl.disposeWith(this);\n this.iconList = chain(this.nodeModel).mapToList(node => {\n const icons: string[] = DecoratedTreeNode.getDecorator(node).ancestors().slice(1).map(ancestor => {\n return DecoratedTreeNode.getDecorator(ancestor).isLastChild() ? TreeInheritanceIconComponent.Type.ICON_BLANK : TreeInheritanceIconComponent.Type.ICON_THROUGH;\n });\n if (!DecoratedTreeNode.getDecorator(node).isRoot()) {\n icons.push(DecoratedTreeNode.getDecorator(node).isLastChild() ? TreeInheritanceIconComponent.Type.ICON_INHERITED_TERMINAL : TreeInheritanceIconComponent.Type.ICON_INHERITED_THROUGH_TERMINAL);\n }\n return icons;\n });\n }\n\n ngOnInit(): void {\n const { chain } = Dsl.disposeWith(this);\n this.canExpand = chain(this.nodeModel).map(node => {\n return DecoratedTreeNode.getDecorator(node).hasChildren() && this.expansionModel.isCollapsed(node);\n }, { dependsOn: this.expansionModel.isExpandedPredicate });\n\n this.canCollapse = chain(this.nodeModel).map(node => {\n return DecoratedTreeNode.getDecorator(node).hasChildren() && !this.expansionModel.isCollapsed(node);\n }, { dependsOn: this.expansionModel.isExpandedPredicate });\n\n this.iconModel = chain(this.nodeModel).map(node => {\n return DecoratedTreeNode.getDecorator(this.node).isLeaf() ? undefined : this.iconFactory(node, this.expansionModel.isExpanded(this.node));\n }, { dependsOn: this.expansionModel.isExpandedPredicate });\n }\n\n @HostBinding('class.root')\n get isRoot() {\n return DecoratedTreeNode.getDecorator(this.node).isRoot();\n }\n\n @HostBinding('class.leaf')\n get isLeaf() {\n return DecoratedTreeNode.getDecorator(this.node).isLeaf();\n }\n\n get node() {\n return this.nodeModel.value;\n }\n\n // @Trace()\n expandOrCollapse(node: DecoratedTreeNode<T>) {\n this.expansionModel.isCollapsed(node) ? this.expansionModel.expand(node) : this.expansionModel.collapse(node);\n }\n}\n"]}
1
+ {"version":3,"file":"tree-label-cell-renderer.component.js","sourceRoot":"","sources":["../../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,GAAG,EAAkB,iBAAiB,EAAE,iBAAiB,EAAmB,MAAM,gBAAgB,CAAC;AAC5G,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAOrD,MAAM,OAAO,8BAAkC,SAAQ,mBAAmB;IA0BxE;QACE,KAAK,EAAE,CAAC;QAzBV,cAAS,GAAa,EAAE,CAAC;QAEjB,cAAS,GAAG,IAAI,iBAAiB,EAAK,CAAC;QAwB7C,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,C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AAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAChH,CAAC;;;YA/EF,SAAS,SAAC;gBACT,QAAQ,EAAE,8BAA8B;gBACxC,qaAAwD;;aAEzD;;;;oBAOE,KAAK;oBAIL,KAAK;0BAGL,KAAK;6BAIL,KAAK;qBAwCL,WAAW,SAAC,YAAY;qBAKxB,WAAW,SAAC,YAAY;;AAtDzB;IADC,iBAAiB,CAAC,WAAW,CAAC;;6DACtB;AAqEX,WAAiB,8BAA8B;IAChC,mDAAoB,GAAoC,CAAC,IAAS,EAAE,QAAiB,EAAE,WAAmB,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,mBAAmB,CAAC;AACjL,CAAC,EAFgB,8BAA8B,KAA9B,8BAA8B,QAE9C","sourcesContent":["import { Component, HostBinding, Input, OnInit } from '@angular/core';\nimport { Dsl, ListModelChain, MutableValueModel, StoreInValueModel, ValueModelChain } from '@coolon/pectin';\nimport { DisposableComponent } from '../../../disposable-component';\nimport { CellRenderer } from '../../table/cell-renderer';\nimport { DecoratedTreeNode } from '../decorated-tree-node';\nimport { TreeExpansionModel } from '../tree-expansion-model';\nimport { TreeInheritanceIconComponent } from '../tree-inheritance-icon/tree-inheritance-icon.component';\nimport { TreeTableModel } from '../tree-table-model';\n\n@Component({\n selector: 'aup-tree-label-cell-renderer',\n templateUrl: './tree-label-cell-renderer.component.html',\n styleUrls: ['./tree-label-cell-renderer.component.scss']\n})\nexport class TreeLabelCellRendererComponent<T> extends DisposableComponent implements CellRenderer<T>, OnInit {\n\n iconTypes: string[] = [];\n\n private nodeModel = new MutableValueModel<T>();\n\n @Input()\n @StoreInValueModel('nodeModel')\n value: T;\n\n @Input()\n label: string;\n\n @Input()\n iconFactory: TreeTableModel.IconFactory<T>;\n\n // TODO: Make this have a proper delegate so I can safely use it here..\n @Input()\n expansionModel: TreeExpansionModel<T>;\n\n readonly iconList: ListModelChain<string>;\n\n canExpand: ValueModelChain<boolean>;\n canCollapse: ValueModelChain<boolean>;\n iconModel: ValueModelChain<string>;\n\n constructor() {\n super();\n const { chain } = Dsl.disposeWith(this);\n this.iconList = chain(this.nodeModel).mapToList(node => {\n const icons: string[] = DecoratedTreeNode.getDecorator(node).ancestors().slice(1).map(ancestor => {\n return DecoratedTreeNode.getDecorator(ancestor).isLastChild() ? TreeInheritanceIconComponent.Type.ICON_BLANK : TreeInheritanceIconComponent.Type.ICON_THROUGH;\n });\n if (!DecoratedTreeNode.getDecorator(node).isRoot()) {\n icons.push(DecoratedTreeNode.getDecorator(node).isLastChild() ? TreeInheritanceIconComponent.Type.ICON_INHERITED_TERMINAL : TreeInheritanceIconComponent.Type.ICON_INHERITED_THROUGH_TERMINAL);\n }\n return icons;\n });\n }\n\n ngOnInit(): void {\n const { chain } = Dsl.disposeWith(this);\n this.canExpand = chain(this.nodeModel).map(node => {\n return DecoratedTreeNode.getDecorator(node).hasChildren() && this.expansionModel.isCollapsed(node);\n }, { dependsOn: this.expansionModel.isExpandedPredicate });\n\n this.canCollapse = chain(this.nodeModel).map(node => {\n return DecoratedTreeNode.getDecorator(node).hasChildren() && !this.expansionModel.isCollapsed(node);\n }, { dependsOn: this.expansionModel.isExpandedPredicate });\n\n this.iconModel = chain(this.nodeModel).map(node => {\n const expanded = this.expansionModel.isExpanded(this.node);\n const iconFactory = this.iconFactory ?? TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY;\n return iconFactory(node, expanded, TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY(node, expanded, undefined));\n }, { dependsOn: this.expansionModel.isExpandedPredicate });\n }\n\n @HostBinding('class.root')\n get isRoot() {\n return DecoratedTreeNode.getDecorator(this.node).isRoot();\n }\n\n @HostBinding('class.leaf')\n get isLeaf() {\n return DecoratedTreeNode.getDecorator(this.node).isLeaf();\n }\n\n get node() {\n return this.nodeModel.value;\n }\n\n // @Trace()\n expandOrCollapse(node: DecoratedTreeNode<T>) {\n this.expansionModel.isCollapsed(node) ? this.expansionModel.expand(node) : this.expansionModel.collapse(node);\n }\n}\n\nexport namespace TreeLabelCellRendererComponent {\n export const DEFAULT_ICON_FACTORY: TreeTableModel.IconFactory<any> = (node: any, expanded: boolean, defaultIcon: string) => expanded ? 'mat:expand_more' : 'mat:chevron_right';\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"TreeLabelCellRendererComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../disposable-component","name":"DisposableComponent","line":14,"character":55},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"selector":"aup-tree-label-cell-renderer","template":"<div class=\"tree-icons\">\n <aup-tree-inheritance-icon *ngFor=\"let iconClass of iconList.value\" [type]=\"iconClass\"></aup-tree-inheritance-icon>\n <aup-icon *ngIf=\"iconModel.value\"\n [icon]=\"iconModel.value\"\n [class.clickable]=\"canExpand.value || canCollapse.value\"\n (click)=\"expandOrCollapse(node)\" ></aup-icon>\n</div>\n<div class=\"label\">{{label}}</div>\n","styles":[":host{--line-color:#ddd;--node-color:#999;display:inline-flex;flex-direction:row;align-items:stretch}:host div.label{display:flex;flex-direction:row;align-items:center;white-space:nowrap;padding-left:6px}:host div.tree-icons{display:grid;grid-auto-flow:column;grid-auto-columns:auto;grid-template-rows:1fr;align-items:stretch;justify-content:stretch}:host div.tree-icons aup-icon{align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-icon,:host div.tree-icons aup-tree-inheritance-icon{margin-left:4px}"]}]}],"members":{"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":21,"character":3},"arguments":["nodeModel"]}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"iconFactory":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"expansionModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"isRoot":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":69,"character":3},"arguments":["class.root"]}]}],"isLeaf":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":74,"character":3},"arguments":["class.leaf"]}]}],"expandOrCollapse":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"TreeLabelCellRendererComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../../../disposable-component","name":"DisposableComponent","line":14,"character":55},"arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"selector":"aup-tree-label-cell-renderer","template":"<div class=\"tree-icons\">\n <aup-tree-inheritance-icon *ngFor=\"let iconClass of iconList.value\" [type]=\"iconClass\"></aup-tree-inheritance-icon>\n <aup-icon *ngIf=\"iconModel.value\"\n [icon]=\"iconModel.value\"\n [class.clickable]=\"canExpand.value || canCollapse.value\"\n (click)=\"expandOrCollapse(node)\" ></aup-icon>\n</div>\n<div class=\"label\">{{label}}</div>\n","styles":[":host{--line-color:#ddd;--node-color:#999;display:inline-flex;flex-direction:row;align-items:stretch}:host div.label{display:flex;flex-direction:row;align-items:center;white-space:nowrap;padding-left:6px}:host div.tree-icons{display:grid;grid-auto-flow:column;grid-auto-columns:auto;grid-template-rows:1fr;align-items:stretch;justify-content:stretch}:host div.tree-icons aup-icon{align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-icon,:host div.tree-icons aup-tree-inheritance-icon{margin-left:4px}"]}]}],"members":{"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":20,"character":3}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@coolon/pectin","name":"StoreInValueModel","line":21,"character":3},"arguments":["nodeModel"]}]}],"label":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"iconFactory":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":27,"character":3}}]}],"expansionModel":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":31,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"ngOnInit":[{"__symbolic":"method"}],"isRoot":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":71,"character":3},"arguments":["class.root"]}]}],"isLeaf":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":76,"character":3},"arguments":["class.leaf"]}]}],"expandOrCollapse":[{"__symbolic":"method"}]}}}}]
@@ -6,13 +6,19 @@ 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:expand_more' : 'mat:chevron_right';
10
9
  this.cellRenderer(TreeLabelCellRendererComponent);
11
10
  }
12
11
  pluck(property) {
13
12
  this.labelProperty = property;
14
13
  }
14
+ /**
15
+ * @deprecated use #useIcon instead.
16
+ * @param factory
17
+ */
15
18
  addIcon(factory) {
19
+ this.useIcon(factory);
20
+ }
21
+ useIcon(factory) {
16
22
  this.iconFactory = factory;
17
23
  }
18
24
  cellRenderer(componentType) {
@@ -1 +1 @@
1
- {"version":3,"file":"tree-label-column-model.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/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;AAE/G,MAAM,OAAO,oBAA0B,SAAQ,WAAgB;IAK7D,YAAY,QAAgB,EAChB,sBAA0D,EACjD,cAAuC;QAC1D,KAAK,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;QADrB,mBAAc,GAAd,cAAc,CAAyB;QAJpD,gBAAW,GAA2C,CAAC,IAAS,EAAE,QAAiB,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,mBAAmB,CAAC;QAMjJ,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, HasTreeNodeDecorator } from './decorated-tree-node';\nimport { TreeExpansionModel } from './tree-expansion-model';\nimport { TreeLabelCellRendererComponent } from './tree-label-cell-renderer/tree-label-cell-renderer.component';\n\nexport class TreeLabelColumnModel<Row> extends ColumnModel<Row> {\n\n private labelProperty: string | number | symbol;\n private iconFactory: TreeLabelColumnModel.LabelFactory<Row> = (node: Row, expanded: boolean) => expanded ? 'mat:expand_more' : 'mat:chevron_right';\n\n constructor(columnId: string,\n textPropertiesProvider: ColumnModel.TextPropertiesProvider,\n readonly expansionModel: TreeExpansionModel<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> = (node: Row, expanded: boolean) => string;\n}\n"]}
1
+ {"version":3,"file":"tree-label-column-model.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/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;AAEpD,OAAO,EAAE,8BAA8B,EAAE,MAAM,+DAA+D,CAAC;AAG/G,MAAM,OAAO,oBAA0B,SAAQ,WAAgB;IAK7D,YAAY,QAAgB,EAChB,sBAA0D,EACjD,cAAuC;QAC1D,KAAK,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;QADrB,mBAAc,GAAd,cAAc,CAAyB;QAE1D,IAAI,CAAC,YAAY,CAAC,8BAA8B,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAyC,QAAW;QACvD,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;IAChC,CAAC;IAED;;;OAGG;IACH,OAAO,CAAyC,OAAwC;QACtF,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,CAAyC,OAAwC;QACtF,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 { TreeExpansionModel } from './tree-expansion-model';\nimport { TreeLabelCellRendererComponent } from './tree-label-cell-renderer/tree-label-cell-renderer.component';\nimport { TreeTableModel } from './tree-table-model';\n\nexport class TreeLabelColumnModel<Row> extends ColumnModel<Row> {\n\n private labelProperty: string | number | symbol;\n private iconFactory: TreeTableModel.IconFactory<Row>;\n\n constructor(columnId: string,\n textPropertiesProvider: ColumnModel.TextPropertiesProvider,\n readonly expansionModel: TreeExpansionModel<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 /**\n * @deprecated use #useIcon instead.\n * @param factory\n */\n addIcon<P extends Types.ValuePropertiesOf<Row>>(factory: TreeTableModel.IconFactory<Row>) {\n this.useIcon(factory);\n }\n\n useIcon<P extends Types.ValuePropertiesOf<Row>>(factory: TreeTableModel.IconFactory<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"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"TreeLabelColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../table/column-model","name":"ColumnModel","line":9,"character":47},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../table/column-model","name":"ColumnModel","line":15,"character":38},"member":"TextPropertiesProvider"},{"__symbolic":"reference","module":"./tree-expansion-model","name":"TreeExpansionModel","line":16,"character":39,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":16,"character":58,"context":{"typeName":"Row"}}]}]}],"pluck":[{"__symbolic":"method"}],"addIcon":[{"__symbolic":"method"}],"cellRenderer":[{"__symbolic":"method"}],"_selectRowOnClick":[{"__symbolic":"method"}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"TreeLabelColumnModel":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../table/column-model","name":"ColumnModel","line":9,"character":47},"arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../table/column-model","name":"ColumnModel","line":15,"character":38},"member":"TextPropertiesProvider"},{"__symbolic":"reference","module":"./tree-expansion-model","name":"TreeExpansionModel","line":16,"character":39,"arguments":[{"__symbolic":"error","message":"Could not resolve type","line":16,"character":58,"context":{"typeName":"Row"}}]}]}],"pluck":[{"__symbolic":"method"}],"addIcon":[{"__symbolic":"method"}],"useIcon":[{"__symbolic":"method"}],"cellRenderer":[{"__symbolic":"method"}],"_selectRowOnClick":[{"__symbolic":"method"}]}}}}]
@@ -1 +1 @@
1
- {"version":3,"file":"tree-table-model.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/components/tables/tree-table/tree-table-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAIjE,QAAQ;AACR,uBAAuB;AACvB,mCAAmC;AACnC,0DAA0D;AAC1D,uDAAuD;AACvD,+GAA+G;AAC/G,uBAAuB;AACvB,2CAA2C;AAC3C,0FAA0F;AAC1F,EAAE;AACF,MAAM,OAAO,cAAoB,SAAQ,kBAAuB;IAK9D,YAAY,MAAsB,EAAE,aAAmE,EAAE,OAA8C;QACrJ,KAAK,EAAE,CAAC;QAJD,uBAAkB,GAAG,IAAI,kBAAkB,CAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;QAKrF,IAAI,OAAO;YAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3B,MAAM,cAAc,GAAG,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAC/F,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,kBAAkB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;AACvC,MAAM;AACN,EAAE;AACF,gCAAgC;AAChC,0BAA0B;AAC1B,MAAM;AACN,EAAE;AACF,IAAI;AAEJ,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 { ListModel, MutableValueModel, SelectionModel, ValueModel } from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { AbstractTableModel } from '../abstract-table-model';\nimport { SelectionColumnModel } from '../table/column-model';\nimport { DecoratedTreeNode } from './decorated-tree-node';\nimport { FlattenedTreeListModel } from './flattened-tree-list-model';\nimport { TreeExpansionModel } from './tree-expansion-model';\nimport { TreeLabelColumnModel } from './tree-label-column-model';\n\nexport type ChildArrayPropertiesOf<T> = { [K in keyof T]: T[K] extends T[] ? K : never }[keyof T];\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 AbstractTableModel<Row> {\n\n readonly treeExpansionModel = new TreeExpansionModel<Row>(row => this.identityOf(row));\n private readonly flattenedDataSource: FlattenedTreeListModel<Row>;\n\n constructor(source: ListModel<Row>, childAccessor: ChildArrayPropertiesOf<Row> | ((node: Row) => Row[]), builder?: (model: TreeTableModel<Row>) => void) {\n super();\n if (builder) builder(this);\n const childExtractor = _.isFunction(childAccessor) ? childAccessor : row => row[childAccessor];\n this.flattenedDataSource = this.registerDisposable(new FlattenedTreeListModel<Row>(source, childExtractor, this.treeExpansionModel));\n this.setDataSource(this.flattenedDataSource);\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<Row>, showSelectionColumn?: ValueModel<boolean> | boolean): SelectionColumnModel<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\nexport namespace TreeTableModel {\n\n export interface Options<T, K extends keyof T> {\n storeIdIn: MutableValueModel<K>\n }\n\n}\n\n\n// export 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/tables/tree-table/tree-table-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAIjE,QAAQ;AACR,uBAAuB;AACvB,mCAAmC;AACnC,0DAA0D;AAC1D,uDAAuD;AACvD,+GAA+G;AAC/G,uBAAuB;AACvB,2CAA2C;AAC3C,0FAA0F;AAC1F,EAAE;AACF,MAAM,OAAO,cAAoB,SAAQ,kBAAuB;IAK9D,YAAY,MAAsB,EAAE,aAAmE,EAAE,OAA8C;QACrJ,KAAK,EAA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6BAA6B,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAED,kBAAkB,CAAC,cAAoC,EAAE,mBAAmD;QAC1G,OAAO,IAAI,CAAC,mBAAmB,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;IACvE,CAAC;CAoCF;AAcD,oGAAoG;AACpG,EAAE;AACF,8BAA8B;AAC9B,gCAAgC;AAChC,EAAE;AACF,6CAA6C;AAC7C,eAAe;AACf,kDAAkD;AAClD,MAAM;AACN,EAAE;AACF,+BAA+B;AAC/B,4BAA4B;AAC5B,MAAM;AACN,EAAE;AACF,sDAAsD;AACtD,uCAAuC;AACvC,MAAM;AACN,EAAE;AACF,gCAAgC;AAChC,0BAA0B;AAC1B,MAAM;AACN,EAAE;AACF,IAAI;AAEJ,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 { ListModel, MutableValueModel, SelectionModel, ValueModel } from '@coolon/pectin';\nimport * as _ from 'lodash';\nimport { AbstractTableModel } from '../abstract-table-model';\nimport { SelectionColumnModel } from '../table/column-model';\nimport { DecoratedTreeNode } from './decorated-tree-node';\nimport { FlattenedTreeListModel } from './flattened-tree-list-model';\nimport { TreeExpansionModel } from './tree-expansion-model';\nimport { TreeLabelColumnModel } from './tree-label-column-model';\n\nexport type ChildArrayPropertiesOf<T> = { [K in keyof T]: T[K] extends T[] ? K : never }[keyof T];\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 AbstractTableModel<Row> {\n\n readonly treeExpansionModel = new TreeExpansionModel<Row>(row => this.identityOf(row));\n private readonly flattenedDataSource: FlattenedTreeListModel<Row>;\n\n constructor(source: ListModel<Row>, childAccessor: ChildArrayPropertiesOf<Row> | ((node: Row) => Row[]), builder?: (model: TreeTableModel<Row>) => void) {\n super();\n if (builder) builder(this);\n const childExtractor = _.isFunction(childAccessor) ? childAccessor : row => row[childAccessor];\n this.flattenedDataSource = this.registerDisposable(new FlattenedTreeListModel<Row>(source, childExtractor, this.treeExpansionModel));\n this.setDataSource(this.flattenedDataSource);\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<Row>, showSelectionColumn?: ValueModel<boolean> | boolean): SelectionColumnModel<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\nexport namespace TreeTableModel {\n\n export interface Options<T, K extends keyof T> {\n storeIdIn: MutableValueModel<K>\n }\n\n export type IconFactory<Row> = (node: Row, expanded: boolean, defaultIcon: string) => string;\n\n}\n\n\n// export 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"]}
@@ -9,8 +9,8 @@ export class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationCompo
9
9
  TabbedPlaceNavigationComponent.decorators = [
10
10
  { type: Component, args: [{
11
11
  selector: 'aup-tabbed-place-navigation',
12
- template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</nav>\n",
13
- styles: [""]
12
+ template: "<nav mat-tab-nav-bar>\n <ng-content select=\"[nav-start]\"></ng-content>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n <ng-content select=\"[nav-end]\"></ng-content>\n</nav>\n",
13
+ styles: [":host{display:block}div.place-holder{border:1px solid green}"]
14
14
  },] }
15
15
  ];
16
16
  TabbedPlaceNavigationComponent.ctorParameters = () => [
@@ -1 +1 @@
1
- {"version":3,"file":"tabbed-place-navigation.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,8BAA+B,SAAQ,gCAAgC;IAClF,YAAY,MAAmB;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;;;YARF,SAAS,SAAC;gBACT,QAAQ,EAAE,6BAA6B;gBACvC,yXAAuD;;aAExD;;;YAPQ,WAAW","sourcesContent":["import { Component } from '@angular/core';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n@Component({\n selector: 'aup-tabbed-place-navigation',\n templateUrl: './tabbed-place-navigation.component.html',\n styleUrls: ['./tabbed-place-navigation.component.scss']\n})\nexport class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n constructor(router: PlaceRouter) {\n super(router);\n }\n}\n"]}
1
+ {"version":3,"file":"tabbed-place-navigation.component.js","sourceRoot":"","sources":["../../../../../../../../libs/angular-ui-powerups/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAO1F,MAAM,OAAO,8BAA+B,SAAQ,gCAAgC;IAClF,YAAY,MAAmB;QAC7B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;;;YARF,SAAS,SAAC;gBACT,QAAQ,EAAE,6BAA6B;gBACvC,+dAAuD;;aAExD;;;YAPQ,WAAW","sourcesContent":["import { Component } from '@angular/core';\nimport { PlaceRouter } from '../../place-router';\nimport { AbstractPlaceNavigationComponent } from '../abstract-place-navigation.component';\n\n@Component({\n selector: 'aup-tabbed-place-navigation',\n templateUrl: './tabbed-place-navigation.component.html',\n styleUrls: ['./tabbed-place-navigation.component.scss']\n})\nexport class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {\n constructor(router: PlaceRouter) {\n super(router);\n }\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"TabbedPlaceNavigationComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-place-navigation.component","name":"AbstractPlaceNavigationComponent","line":9,"character":52},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-tabbed-place-navigation","template":"<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</nav>\n","styles":[""]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../place-router","name":"PlaceRouter","line":10,"character":22}]}]}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"TabbedPlaceNavigationComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"../abstract-place-navigation.component","name":"AbstractPlaceNavigationComponent","line":9,"character":52},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":4,"character":1},"arguments":[{"selector":"aup-tabbed-place-navigation","template":"<nav mat-tab-nav-bar>\n <ng-content select=\"[nav-start]\"></ng-content>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n <ng-content select=\"[nav-end]\"></ng-content>\n</nav>\n","styles":[":host{display:block}div.place-holder{border:1px solid green}"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../../place-router","name":"PlaceRouter","line":10,"character":22}]}]}}}}]
@@ -3505,17 +3505,50 @@ class TreeExpansionModel {
3505
3505
  }
3506
3506
  }
3507
3507
 
3508
+ class FlattenedTreeListModel extends ComputedListModel {
3509
+ constructor(source, childRef, expansionModel) {
3510
+ super(source);
3511
+ this.source = source;
3512
+ this.childRef = childRef;
3513
+ this.expansionModel = expansionModel;
3514
+ this.trackSource(expansionModel.isExpandedPredicate);
3515
+ }
3516
+ getIdentityOf(item) {
3517
+ return this.source.identityOf(item);
3518
+ }
3519
+ compute(values) {
3520
+ const result = [];
3521
+ values.forEach(rootNode => {
3522
+ return this.addNodeAndVisibleChildren(DecoratedTreeNode.decorateRoot(rootNode, this.childRef), result);
3523
+ });
3524
+ return result;
3525
+ }
3526
+ addNodeAndVisibleChildren(node, result) {
3527
+ result.push(node);
3528
+ const decorator = node[treeNodeDecorator];
3529
+ if (decorator.hasChildren() && !this.expansionModel.isCollapsed(node)) {
3530
+ decorator.children.forEach(child => this.addNodeAndVisibleChildren(child, result));
3531
+ }
3532
+ }
3533
+ }
3534
+
3508
3535
  class TreeLabelColumnModel extends ColumnModel {
3509
3536
  constructor(columnId, textPropertiesProvider, expansionModel) {
3510
3537
  super(columnId, textPropertiesProvider);
3511
3538
  this.expansionModel = expansionModel;
3512
- this.iconFactory = (node, expanded) => expanded ? 'mat:expand_more' : 'mat:chevron_right';
3513
3539
  this.cellRenderer(TreeLabelCellRendererComponent);
3514
3540
  }
3515
3541
  pluck(property) {
3516
3542
  this.labelProperty = property;
3517
3543
  }
3544
+ /**
3545
+ * @deprecated use #useIcon instead.
3546
+ * @param factory
3547
+ */
3518
3548
  addIcon(factory) {
3549
+ this.useIcon(factory);
3550
+ }
3551
+ useIcon(factory) {
3519
3552
  this.iconFactory = factory;
3520
3553
  }
3521
3554
  cellRenderer(componentType) {
@@ -3534,96 +3567,6 @@ class TreeLabelColumnModel extends ColumnModel {
3534
3567
  }
3535
3568
  }
3536
3569
 
3537
- class TreeLabelCellRendererComponent extends DisposableComponent {
3538
- constructor() {
3539
- super();
3540
- this.iconTypes = [];
3541
- this.nodeModel = new MutableValueModel();
3542
- const { chain } = Dsl.disposeWith(this);
3543
- this.iconList = chain(this.nodeModel).mapToList(node => {
3544
- const icons = DecoratedTreeNode.getDecorator(node).ancestors().slice(1).map(ancestor => {
3545
- return DecoratedTreeNode.getDecorator(ancestor).isLastChild() ? TreeInheritanceIconComponent.Type.ICON_BLANK : TreeInheritanceIconComponent.Type.ICON_THROUGH;
3546
- });
3547
- if (!DecoratedTreeNode.getDecorator(node).isRoot()) {
3548
- icons.push(DecoratedTreeNode.getDecorator(node).isLastChild() ? TreeInheritanceIconComponent.Type.ICON_INHERITED_TERMINAL : TreeInheritanceIconComponent.Type.ICON_INHERITED_THROUGH_TERMINAL);
3549
- }
3550
- return icons;
3551
- });
3552
- }
3553
- ngOnInit() {
3554
- const { chain } = Dsl.disposeWith(this);
3555
- this.canExpand = chain(this.nodeModel).map(node => {
3556
- return DecoratedTreeNode.getDecorator(node).hasChildren() && this.expansionModel.isCollapsed(node);
3557
- }, { dependsOn: this.expansionModel.isExpandedPredicate });
3558
- this.canCollapse = chain(this.nodeModel).map(node => {
3559
- return DecoratedTreeNode.getDecorator(node).hasChildren() && !this.expansionModel.isCollapsed(node);
3560
- }, { dependsOn: this.expansionModel.isExpandedPredicate });
3561
- this.iconModel = chain(this.nodeModel).map(node => {
3562
- return DecoratedTreeNode.getDecorator(this.node).isLeaf() ? undefined : this.iconFactory(node, this.expansionModel.isExpanded(this.node));
3563
- }, { dependsOn: this.expansionModel.isExpandedPredicate });
3564
- }
3565
- get isRoot() {
3566
- return DecoratedTreeNode.getDecorator(this.node).isRoot();
3567
- }
3568
- get isLeaf() {
3569
- return DecoratedTreeNode.getDecorator(this.node).isLeaf();
3570
- }
3571
- get node() {
3572
- return this.nodeModel.value;
3573
- }
3574
- // @Trace()
3575
- expandOrCollapse(node) {
3576
- this.expansionModel.isCollapsed(node) ? this.expansionModel.expand(node) : this.expansionModel.collapse(node);
3577
- }
3578
- }
3579
- TreeLabelCellRendererComponent.decorators = [
3580
- { type: Component, args: [{
3581
- selector: 'aup-tree-label-cell-renderer',
3582
- template: "<div class=\"tree-icons\">\n <aup-tree-inheritance-icon *ngFor=\"let iconClass of iconList.value\" [type]=\"iconClass\"></aup-tree-inheritance-icon>\n <aup-icon *ngIf=\"iconModel.value\"\n [icon]=\"iconModel.value\"\n [class.clickable]=\"canExpand.value || canCollapse.value\"\n (click)=\"expandOrCollapse(node)\" ></aup-icon>\n</div>\n<div class=\"label\">{{label}}</div>\n",
3583
- styles: [":host{--line-color:#ddd;--node-color:#999;display:inline-flex;flex-direction:row;align-items:stretch}:host div.label{display:flex;flex-direction:row;align-items:center;white-space:nowrap;padding-left:6px}:host div.tree-icons{display:grid;grid-auto-flow:column;grid-auto-columns:auto;grid-template-rows:1fr;align-items:stretch;justify-content:stretch}:host div.tree-icons aup-icon{align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-icon,:host div.tree-icons aup-tree-inheritance-icon{margin-left:4px}"]
3584
- },] }
3585
- ];
3586
- TreeLabelCellRendererComponent.ctorParameters = () => [];
3587
- TreeLabelCellRendererComponent.propDecorators = {
3588
- value: [{ type: Input }],
3589
- label: [{ type: Input }],
3590
- iconFactory: [{ type: Input }],
3591
- expansionModel: [{ type: Input }],
3592
- isRoot: [{ type: HostBinding, args: ['class.root',] }],
3593
- isLeaf: [{ type: HostBinding, args: ['class.leaf',] }]
3594
- };
3595
- __decorate([
3596
- StoreInValueModel('nodeModel'),
3597
- __metadata("design:type", Object)
3598
- ], TreeLabelCellRendererComponent.prototype, "value", void 0);
3599
-
3600
- class FlattenedTreeListModel extends ComputedListModel {
3601
- constructor(source, childRef, expansionModel) {
3602
- super(source);
3603
- this.source = source;
3604
- this.childRef = childRef;
3605
- this.expansionModel = expansionModel;
3606
- this.trackSource(expansionModel.isExpandedPredicate);
3607
- }
3608
- getIdentityOf(item) {
3609
- return this.source.identityOf(item);
3610
- }
3611
- compute(values) {
3612
- const result = [];
3613
- values.forEach(rootNode => {
3614
- return this.addNodeAndVisibleChildren(DecoratedTreeNode.decorateRoot(rootNode, this.childRef), result);
3615
- });
3616
- return result;
3617
- }
3618
- addNodeAndVisibleChildren(node, result) {
3619
- result.push(node);
3620
- const decorator = node[treeNodeDecorator];
3621
- if (decorator.hasChildren() && !this.expansionModel.isCollapsed(node)) {
3622
- decorator.children.forEach(child => this.addNodeAndVisibleChildren(child, result));
3623
- }
3624
- }
3625
- }
3626
-
3627
3570
  // TODO:
3628
3571
  // Selection Models:
3629
3572
  // - as simple navigation tree
@@ -3712,6 +3655,75 @@ class TreeTableModel extends AbstractTableModel {
3712
3655
  //
3713
3656
  // }
3714
3657
 
3658
+ class TreeLabelCellRendererComponent extends DisposableComponent {
3659
+ constructor() {
3660
+ super();
3661
+ this.iconTypes = [];
3662
+ this.nodeModel = new MutableValueModel();
3663
+ const { chain } = Dsl.disposeWith(this);
3664
+ this.iconList = chain(this.nodeModel).mapToList(node => {
3665
+ const icons = DecoratedTreeNode.getDecorator(node).ancestors().slice(1).map(ancestor => {
3666
+ return DecoratedTreeNode.getDecorator(ancestor).isLastChild() ? TreeInheritanceIconComponent.Type.ICON_BLANK : TreeInheritanceIconComponent.Type.ICON_THROUGH;
3667
+ });
3668
+ if (!DecoratedTreeNode.getDecorator(node).isRoot()) {
3669
+ icons.push(DecoratedTreeNode.getDecorator(node).isLastChild() ? TreeInheritanceIconComponent.Type.ICON_INHERITED_TERMINAL : TreeInheritanceIconComponent.Type.ICON_INHERITED_THROUGH_TERMINAL);
3670
+ }
3671
+ return icons;
3672
+ });
3673
+ }
3674
+ ngOnInit() {
3675
+ const { chain } = Dsl.disposeWith(this);
3676
+ this.canExpand = chain(this.nodeModel).map(node => {
3677
+ return DecoratedTreeNode.getDecorator(node).hasChildren() && this.expansionModel.isCollapsed(node);
3678
+ }, { dependsOn: this.expansionModel.isExpandedPredicate });
3679
+ this.canCollapse = chain(this.nodeModel).map(node => {
3680
+ return DecoratedTreeNode.getDecorator(node).hasChildren() && !this.expansionModel.isCollapsed(node);
3681
+ }, { dependsOn: this.expansionModel.isExpandedPredicate });
3682
+ this.iconModel = chain(this.nodeModel).map(node => {
3683
+ var _a;
3684
+ const expanded = this.expansionModel.isExpanded(this.node);
3685
+ const iconFactory = (_a = this.iconFactory) !== null && _a !== void 0 ? _a : TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY;
3686
+ return iconFactory(node, expanded, TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY(node, expanded, undefined));
3687
+ }, { dependsOn: this.expansionModel.isExpandedPredicate });
3688
+ }
3689
+ get isRoot() {
3690
+ return DecoratedTreeNode.getDecorator(this.node).isRoot();
3691
+ }
3692
+ get isLeaf() {
3693
+ return DecoratedTreeNode.getDecorator(this.node).isLeaf();
3694
+ }
3695
+ get node() {
3696
+ return this.nodeModel.value;
3697
+ }
3698
+ // @Trace()
3699
+ expandOrCollapse(node) {
3700
+ this.expansionModel.isCollapsed(node) ? this.expansionModel.expand(node) : this.expansionModel.collapse(node);
3701
+ }
3702
+ }
3703
+ TreeLabelCellRendererComponent.decorators = [
3704
+ { type: Component, args: [{
3705
+ selector: 'aup-tree-label-cell-renderer',
3706
+ template: "<div class=\"tree-icons\">\n <aup-tree-inheritance-icon *ngFor=\"let iconClass of iconList.value\" [type]=\"iconClass\"></aup-tree-inheritance-icon>\n <aup-icon *ngIf=\"iconModel.value\"\n [icon]=\"iconModel.value\"\n [class.clickable]=\"canExpand.value || canCollapse.value\"\n (click)=\"expandOrCollapse(node)\" ></aup-icon>\n</div>\n<div class=\"label\">{{label}}</div>\n",
3707
+ styles: [":host{--line-color:#ddd;--node-color:#999;display:inline-flex;flex-direction:row;align-items:stretch}:host div.label{display:flex;flex-direction:row;align-items:center;white-space:nowrap;padding-left:6px}:host div.tree-icons{display:grid;grid-auto-flow:column;grid-auto-columns:auto;grid-template-rows:1fr;align-items:stretch;justify-content:stretch}:host div.tree-icons aup-icon{align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-icon,:host div.tree-icons aup-tree-inheritance-icon{margin-left:4px}"]
3708
+ },] }
3709
+ ];
3710
+ TreeLabelCellRendererComponent.ctorParameters = () => [];
3711
+ TreeLabelCellRendererComponent.propDecorators = {
3712
+ value: [{ type: Input }],
3713
+ label: [{ type: Input }],
3714
+ iconFactory: [{ type: Input }],
3715
+ expansionModel: [{ type: Input }],
3716
+ isRoot: [{ type: HostBinding, args: ['class.root',] }],
3717
+ isLeaf: [{ type: HostBinding, args: ['class.leaf',] }]
3718
+ };
3719
+ __decorate([
3720
+ StoreInValueModel('nodeModel'),
3721
+ __metadata("design:type", Object)
3722
+ ], TreeLabelCellRendererComponent.prototype, "value", void 0);
3723
+ (function (TreeLabelCellRendererComponent) {
3724
+ TreeLabelCellRendererComponent.DEFAULT_ICON_FACTORY = (node, expanded, defaultIcon) => expanded ? 'mat:expand_more' : 'mat:chevron_right';
3725
+ })(TreeLabelCellRendererComponent || (TreeLabelCellRendererComponent = {}));
3726
+
3715
3727
  /**
3716
3728
  * Create your model:
3717
3729
  * @example
@@ -7780,8 +7792,8 @@ class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
7780
7792
  TabbedPlaceNavigationComponent.decorators = [
7781
7793
  { type: Component, args: [{
7782
7794
  selector: 'aup-tabbed-place-navigation',
7783
- template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</nav>\n",
7784
- styles: [""]
7795
+ template: "<nav mat-tab-nav-bar>\n <ng-content select=\"[nav-start]\"></ng-content>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n <ng-content select=\"[nav-end]\"></ng-content>\n</nav>\n",
7796
+ styles: [":host{display:block}div.place-holder{border:1px solid green}"]
7785
7797
  },] }
7786
7798
  ];
7787
7799
  TabbedPlaceNavigationComponent.ctorParameters = () => [