@rxap/tree 12.1.1-next.0 → 12.2.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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('@angular/cdk/tree'), require('@angular/cdk/collections'), require('rxjs/operators'), require('@rxap/data-source'), require('@rxap/utilities'), require('@angular/core'), require('@rxap/utilities/rxjs'), require('@angular/cdk/portal'), require('@angular/material/tree'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/progress-spinner'), require('@angular/material/divider'), require('@angular/flex-layout/flex'), require('@angular/common'), require('@rxap/material-directives/icon'), require('@rxap/contenteditable'), require('@angular/flex-layout')) :
3
- typeof define === 'function' && define.amd ? define('@rxap/tree', ['exports', 'rxjs', '@angular/cdk/tree', '@angular/cdk/collections', 'rxjs/operators', '@rxap/data-source', '@rxap/utilities', '@angular/core', '@rxap/utilities/rxjs', '@angular/cdk/portal', '@angular/material/tree', '@angular/material/icon', '@angular/material/button', '@angular/material/progress-spinner', '@angular/material/divider', '@angular/flex-layout/flex', '@angular/common', '@rxap/material-directives/icon', '@rxap/contenteditable', '@angular/flex-layout'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap.tree = {}), global.rxjs, global.ng.cdk.tree, global.ng.cdk.collections, global.rxjs.operators, global.dataSource, global.utilities, global.ng.core, global.rxjs$1, global.ng.cdk.portal, global.ng.material.tree, global.ng.material.icon, global.ng.material.button, global.ng.material.progressSpinner, global.ng.material.divider, global.ng.flexLayout.flex, global.ng.common, global.i8, global.i9, global.ng.flexLayout));
5
- }(this, (function (exports, rxjs, tree, collections, operators, dataSource, utilities, i0, rxjs$1, i10, i1, i2, i3, i4, i5, i6, i7, i8, i9, flexLayout) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs'), require('@angular/cdk/tree'), require('@angular/cdk/collections'), require('rxjs/operators'), require('@rxap/data-source'), require('@rxap/utilities'), require('@angular/core'), require('@rxap/utilities/rxjs'), require('@angular/cdk/portal'), require('@angular/material/tree'), require('@angular/material/icon'), require('@angular/material/button'), require('@angular/material/progress-spinner'), require('@angular/material/divider'), require('@angular/flex-layout/flex'), require('@angular/common'), require('@angular/flex-layout/extended'), require('@rxap/material-directives/icon'), require('@rxap/contenteditable'), require('@angular/flex-layout')) :
3
+ typeof define === 'function' && define.amd ? define('@rxap/tree', ['exports', 'rxjs', '@angular/cdk/tree', '@angular/cdk/collections', 'rxjs/operators', '@rxap/data-source', '@rxap/utilities', '@angular/core', '@rxap/utilities/rxjs', '@angular/cdk/portal', '@angular/material/tree', '@angular/material/icon', '@angular/material/button', '@angular/material/progress-spinner', '@angular/material/divider', '@angular/flex-layout/flex', '@angular/common', '@angular/flex-layout/extended', '@rxap/material-directives/icon', '@rxap/contenteditable', '@angular/flex-layout'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.rxap = global.rxap || {}, global.rxap.tree = {}), global.rxjs, global.ng.cdk.tree, global.ng.cdk.collections, global.rxjs.operators, global.dataSource, global.utilities, global.ng.core, global.rxjs$1, global.ng.cdk.portal, global.ng.material.tree, global.ng.material.icon, global.ng.material.button, global.ng.material.progressSpinner, global.ng.material.divider, global.ng.flexLayout.flex, global.ng.common, global.ng.flexLayout.extended, global.i9, global.i10, global.ng.flexLayout));
5
+ }(this, (function (exports, rxjs, tree, collections, operators, dataSource, utilities, i0, rxjs$1, i11, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, flexLayout) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
28
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
29
29
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
30
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
31
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
@@ -35,6 +35,7 @@
35
35
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
36
36
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
37
37
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
38
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
38
39
 
39
40
  /*! *****************************************************************************
40
41
  Copyright (c) Microsoft Corporation.
@@ -774,6 +775,7 @@
774
775
  this.viewContainerRef = viewContainerRef;
775
776
  this.cdr = cdr;
776
777
  this.renderer = renderer;
778
+ this.hideLeafIcon = false;
777
779
  this.details = new i0.EventEmitter();
778
780
  this.portal = null;
779
781
  this.getLevel = function (node) { return node.depth; };
@@ -819,7 +821,7 @@
819
821
  };
820
822
  TreeComponent.prototype.openDetails = function (node) {
821
823
  if (this.content) {
822
- this.portal = new i10.TemplatePortal(this.content.template, this.viewContainerRef, {
824
+ this.portal = new i11.TemplatePortal(this.content.template, this.viewContainerRef, {
823
825
  $implicit: node.item,
824
826
  node: node,
825
827
  });
@@ -852,7 +854,7 @@
852
854
  return TreeComponent;
853
855
  }());
854
856
  TreeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponent, deps: [{ token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: RXAP_TREE_CONTENT_EDITABLE_METHOD, optional: true }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
855
- TreeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: TreeComponent, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", hasDetails: "hasDetails" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".tree-view{background-color:transparent;background-color:initial}.details,.tree-container{max-height:calc(100vh - 64px - 32px);overflow-y:auto}.tree-container{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}"], components: [{ type: i1__namespace.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { type: i2__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4__namespace.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i5__namespace.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i6__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i6__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { type: i1__namespace.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { type: i1__namespace.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { type: i6__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8__namespace.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i1__namespace.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i9__namespace.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { type: i6__namespace.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { type: i10__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
857
+ TreeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: TreeComponent, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", hasDetails: "hasDetails", hideLeafIcon: "hideLeafIcon" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0__namespace, template: "<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".container{height:100%}.tree-view{background-color:transparent;background-color:initial}.details,.tree-container{max-height:calc(100vh - 64px - 32px);overflow-y:auto}.tree-container{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}"], components: [{ type: i1__namespace.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { type: i2__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4__namespace.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i5__namespace.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i6__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i6__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i7__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { type: i1__namespace.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { type: i1__namespace.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { type: i6__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8__namespace.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i9__namespace.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i1__namespace.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i10__namespace.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { type: i6__namespace.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { type: i11__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i7__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
856
858
  __decorate([
857
859
  utilities.Required,
858
860
  __metadata("design:type", TreeDataSource)
@@ -898,6 +900,8 @@
898
900
  }], content: [{
899
901
  type: i0.ContentChild,
900
902
  args: [TreeContentDirective, { static: true }]
903
+ }], hideLeafIcon: [{
904
+ type: i0.Input
901
905
  }], details: [{
902
906
  type: i0.Output
903
907
  }], treeContainer: [{
@@ -924,9 +928,9 @@
924
928
  flexLayout.FlexLayoutModule,
925
929
  i5.MatDividerModule,
926
930
  i4.MatProgressSpinnerModule,
927
- i10.PortalModule,
928
- i9.ContenteditableDirectiveModule,
929
- i8.IconDirectiveModule], exports: [TreeComponent, TreeContentDirective] });
931
+ i11.PortalModule,
932
+ i10.ContenteditableDirectiveModule,
933
+ i9.IconDirectiveModule], exports: [TreeComponent, TreeContentDirective] });
930
934
  TreeComponentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, imports: [[
931
935
  i7.CommonModule,
932
936
  i1.MatTreeModule,
@@ -935,9 +939,9 @@
935
939
  flexLayout.FlexLayoutModule,
936
940
  i5.MatDividerModule,
937
941
  i4.MatProgressSpinnerModule,
938
- i10.PortalModule,
939
- i9.ContenteditableDirectiveModule,
940
- i8.IconDirectiveModule
942
+ i11.PortalModule,
943
+ i10.ContenteditableDirectiveModule,
944
+ i9.IconDirectiveModule
941
945
  ]] });
942
946
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, decorators: [{
943
947
  type: i0.NgModule,
@@ -950,9 +954,9 @@
950
954
  flexLayout.FlexLayoutModule,
951
955
  i5.MatDividerModule,
952
956
  i4.MatProgressSpinnerModule,
953
- i10.PortalModule,
954
- i9.ContenteditableDirectiveModule,
955
- i8.IconDirectiveModule
957
+ i11.PortalModule,
958
+ i10.ContenteditableDirectiveModule,
959
+ i9.IconDirectiveModule
956
960
  ],
957
961
  declarations: [TreeComponent, TreeContentDirective],
958
962
  exports: [TreeComponent, TreeContentDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-tree.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../../../libs/tree/src/lib/tree.data-source.ts","../../../../libs/tree/src/lib/tree-content.directive.ts","../../../../libs/tree/src/lib/tokens.ts","../../../../libs/tree/src/lib/tree.component.ts","../../../../libs/tree/src/lib/tree.component.html","../../../../libs/tree/src/lib/tree.component.module.ts","../../../../libs/tree/src/rxap-tree.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import {\n BehaviorSubject,\n from,\n merge,\n Observable,\n Subscription\n} from 'rxjs';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n SelectionChange,\n SelectionModel\n} from '@angular/cdk/collections';\nimport {\n map,\n switchMap,\n tap\n} from 'rxjs/operators';\nimport {\n BaseDataSource,\n BaseDataSourceMetadata,\n BaseDataSourceViewer,\n RXAP_DATA_SOURCE_METADATA\n} from '@rxap/data-source';\nimport {\n joinPath,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport {\n Inject,\n Injectable,\n InjectionToken\n} from '@angular/core';\nimport {\n ExpandNodeFunction,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction,\n Method\n} from '@rxap/utilities/rxjs';\n\nexport function isSelectionChange<T>(obj: any): obj is SelectionChange<T> {\n return !!obj && obj.hasOwnProperty('added') && obj.hasOwnProperty('removed');\n}\n\nexport interface TreeDataSourceMetadata extends BaseDataSourceMetadata {\n selectMultiple?: boolean;\n expandMultiple?: boolean;\n}\n\nexport const RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD = new InjectionToken(\n 'rxap/tree/data-source/root-remote-method'\n);\nexport const RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD = new InjectionToken(\n 'rxap/tree/data-source/children-remote-method'\n);\n\n@Injectable()\nexport class TreeDataSource<\n Data extends WithIdentifier & WithChildren = any\n> extends BaseDataSource<Array<Node<Data>>> {\n public tree$ = new BehaviorSubject<Array<Node<Data>>>([]);\n @Required public treeControl!: FlatTreeControl<Node<Data>>;\n public selected!: SelectionModel<Node<Data>>;\n public expanded!: SelectionModel<string>;\n\n private _expandedLocalStorageSubscription: Subscription | null = null;\n private _selectedLocalStorageSubscription: Subscription | null = null;\n\n // TODO : änlich problem wie bei der redundaten expand SelectionModel.\n // im localStorage wird nur die id gespeichert.\n private _preSelected: string[] = [];\n\n protected _data$ = new BehaviorSubject<Array<Node<Data>>>([]);\n public metadata!: TreeDataSourceMetadata;\n\n public toDisplay: NodeToDisplayFunction<Data> = () =>\n 'to display function not defined';\n public getIcon: NodeGetIconFunction<Data> = () => null;\n public hasDetails: NodeHasDetailsFunction<Data> = () => true;\n\n constructor(\n @Inject(RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD)\n public readonly rootRemoteMethod: Method<Data | Data[], void>,\n @Inject(RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD)\n public readonly childrenRemoteMethod: Method<Data[], Node<Data>>,\n @Inject(RXAP_DATA_SOURCE_METADATA)\n metadata: TreeDataSourceMetadata | null = null\n ) {\n super(metadata);\n this.tree$\n .pipe(\n map((tree) =>\n tree\n .map((child) => this.flatTree(child))\n .reduce((acc, nodes) => [...acc, ...nodes], [])\n )\n )\n .subscribe(this._data$);\n\n // TODO add new SelectModel class that saves the select model to the localStorage\n this.initSelected();\n this.initExpanded();\n }\n\n public async getTreeRoot(): Promise<Array<Node<Data>>> {\n const root: Data | Data[] = await this.getRoot();\n\n let rootNodes: Array<Node<Data>>;\n\n if (Array.isArray(root)) {\n rootNodes = root.map((node) => this._toNode(node));\n } else {\n rootNodes = [this._toNode(root)];\n }\n\n this.tree$.next(rootNodes);\n\n return rootNodes;\n }\n\n public selectNode(node: Node<Data>): Promise<void> {\n if (!this.selected.isMultipleSelection()) {\n if (this.selected.hasValue()) {\n const currentSelectedNode = this.selected.selected[0];\n currentSelectedNode.deselect();\n }\n }\n this.selected.select(node);\n return Promise.resolve();\n }\n\n public setTreeControl(treeControl: FlatTreeControl<Node<Data>>): void {\n this.treeControl = treeControl;\n }\n\n public setToDisplay(\n toDisplay: NodeToDisplayFunction<Data> = this.toDisplay\n ): void {\n this.toDisplay = toDisplay;\n }\n\n public setGetIcon(getIcon: NodeGetIconFunction<Data> = this.getIcon): void {\n this.getIcon = getIcon;\n }\n\n public setHasDetails(\n hasDetails: NodeHasDetailsFunction<Data> = this.hasDetails\n ): void {\n this.hasDetails = hasDetails;\n }\n\n public deselectNode(node: Node<Data>): Promise<void> {\n this.selected.deselect(node);\n return Promise.resolve();\n }\n\n // - the SelectModel that stores the selection into the local storage?\n public _toNode(\n item: Data,\n depth: number = 0,\n onExpand: ExpandNodeFunction<Data> = this.expandNode.bind(this),\n onCollapse: ExpandNodeFunction<Data> = this.collapseNode.bind(this),\n onSelect: ExpandNodeFunction<Data> = this.selectNode.bind(this),\n onDeselect: ExpandNodeFunction<Data> = this.deselectNode.bind(this)\n ): Node<Data> {\n const node = this.toNode(\n item,\n depth,\n onExpand,\n onCollapse,\n onSelect,\n onDeselect\n );\n\n if (this.expanded.isSelected(node.id)) {\n node\n .expand()\n .then(() => {\n // TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel\n // das problem ist das ich beim speicher in localStorage nur die id speicher.\n // Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel\n // nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird\n // möglich lösungen:\n // - das node object läde die entity mithilfe der id automatisch nach\n this.treeControl.expansionModel.select(node);\n console.debug(`Restore expand for node '${node.id}' SUCCESSFULLY`);\n })\n .catch(() =>\n console.debug(`Restore expand for node '${node.id}' FAILED`)\n );\n }\n\n if (this._preSelected.includes(node.id)) {\n node\n .select()\n .then(() =>\n console.debug(`Restore select for node '${node.id}' SUCCESSFULLY`)\n )\n .catch(() =>\n console.debug(`Restore select for node '${node.id}' FAILED`)\n );\n }\n\n return node;\n }\n\n public async expandNode(node: Node<Data>): Promise<void> {\n if (node.item.hasChildren && !node.item.children?.length) {\n node.isLoading$.enable();\n\n const children = await this.getChildren(node);\n\n // add the loaded children to the item object\n node.item.children = children;\n\n node.addChildren(\n children.map((child) =>\n this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse)\n )\n );\n\n node.isLoading$.disable();\n }\n\n this.expanded.select(node.id);\n\n this.tree$.next(this.tree$.value);\n }\n\n public async getChildren(node: Node<Data>): Promise<Data[]> {\n return this.childrenRemoteMethod.call(node);\n }\n\n public async getRoot(): Promise<Data | Data[]> {\n return this.rootRemoteMethod.call();\n }\n\n // TODO : find better solution to allow the overwrite of the toNode method\n // without losing the custom preselect and preexpand function\n\n protected _connect(\n collectionViewer: Required<BaseDataSourceViewer>\n ): Observable<Array<Node<Data>>> {\n this.treeControl.expansionModel.changed.subscribe((change: any) => {\n if (isSelectionChange<Node<Data>>(change)) {\n if (change.added) {\n change.added.forEach((node) => node.expand());\n }\n if (change.removed) {\n change.removed\n .slice()\n .reverse()\n .forEach((node) => node.collapse());\n }\n }\n });\n\n let loadRoot: Promise<Array<Node<Data>> | void> = Promise.resolve();\n\n if (this.tree$.value.length === 0) {\n loadRoot = this.getTreeRoot();\n }\n\n return from(loadRoot).pipe(\n tap((rootNodes) => {\n if (rootNodes) {\n const promises: Promise<any>[] = [];\n if (this.metadata.selectMultiple) {\n if (!this.selected.hasValue()) {\n promises.push(\n ...rootNodes\n .filter((node) => node.hasDetails)\n .map((node) => node.select())\n );\n }\n if (!this.expanded.hasValue()) {\n promises.push(\n ...rootNodes\n .filter((node) => node.hasChildren)\n .map((node) => node.expand())\n );\n }\n } else if (rootNodes.length) {\n const rootNode = rootNodes[0];\n if (!this.selected.hasValue()) {\n // TODO : rename hasDetails to isSelectable\n if (rootNode.hasDetails) {\n promises.push(rootNode.select());\n }\n }\n if (!this.expanded.hasValue()) {\n promises.push(rootNode.expand());\n }\n }\n return Promise.all(promises);\n }\n return Promise.resolve();\n }),\n switchMap(() =>\n merge(collectionViewer.viewChange, this._data$).pipe(\n map(() => this._data$.value)\n )\n )\n );\n }\n\n public toNode(\n item: Data,\n depth: number = 0,\n onExpand: ExpandNodeFunction<Data> = this.expandNode.bind(this),\n onCollapse: ExpandNodeFunction<Data> = this.collapseNode.bind(this),\n onSelect: ExpandNodeFunction<Data> = this.selectNode.bind(this),\n onDeselect: ExpandNodeFunction<Data> = this.deselectNode.bind(this)\n ): Node<Data> {\n return Node.ToNode(\n item,\n depth,\n onExpand,\n onCollapse,\n this.toDisplay,\n this.getIcon,\n onSelect,\n onDeselect,\n this.hasDetails\n );\n }\n\n public collapseNode(node: Node<Data>): Promise<void> {\n this.expanded.deselect(node.id);\n\n this.tree$.next(this.tree$.value);\n\n return Promise.resolve();\n }\n\n public flatTree(tree: Node<Data>): Array<Node<Data>> {\n function flat(acc: any[], list: any[]) {\n return [...acc, ...list];\n }\n\n const flatTree = (node: Node<Data>): Array<Node<Data>> => {\n if (!Array.isArray(node.children)) {\n console.log(node);\n throw new Error('Node has not defined children');\n }\n\n if (node.expanded || this.expanded.isSelected(node.id)) {\n return [\n node,\n ...node.children.map((child) => flatTree(child)).reduce(flat, []),\n ];\n } else {\n return [node];\n }\n };\n\n return flatTree(tree);\n }\n\n public destroy(): void {\n super.destroy();\n // TODO : add subscription handler to BaseDataSource\n if (this._expandedLocalStorageSubscription) {\n this._expandedLocalStorageSubscription.unsubscribe();\n }\n if (this._selectedLocalStorageSubscription) {\n this._selectedLocalStorageSubscription.unsubscribe();\n }\n }\n\n public getNodeById(id: string): Node<Data> | null {\n function getNodeById(node: Node<Data>, nodeId: string) {\n if (node.id === nodeId) {\n return node;\n }\n if (node.hasNode(nodeId)) {\n return node.getNode(nodeId);\n } else {\n return null;\n }\n }\n\n return (\n this.tree$.value\n .map((node) => getNodeById(node, id))\n .filter(Boolean)[0] || null\n );\n }\n\n private initSelected(): void {\n const key = joinPath('rxap/tree', this.id, 'selected');\n if (localStorage.getItem(key)) {\n try {\n this._preSelected = JSON.parse(localStorage.getItem(key)!);\n } catch (e) {\n console.debug('parse expanded tree data source nodes failed');\n }\n }\n\n this.selected = new SelectionModel<Node<Data>>(\n !!this.metadata.selectMultiple,\n []\n );\n this._selectedLocalStorageSubscription = this.selected.changed\n .pipe(\n tap(() =>\n localStorage.setItem(\n key,\n JSON.stringify(this.selected.selected.map((s) => s.id))\n )\n )\n )\n .subscribe();\n }\n\n public async refresh(): Promise<any> {\n const rootNodes = await this.getTreeRoot();\n\n // refresh all expanded nodes;\n\n const loadExpandedNodes = async (children: ReadonlyArray<Node<Data>>) => {\n for (const child of children) {\n if (this.expanded.isSelected(child.id)) {\n // call the node method to ensure that the expanded property of\n // Node is set.\n await child.expand();\n }\n\n if (child.hasChildren) {\n await loadExpandedNodes(child.children);\n }\n }\n };\n\n await Promise.all(\n rootNodes\n .filter((node) => node.hasChildren)\n .map((node) => loadExpandedNodes(node.children))\n );\n\n const selected: Array<Node<Data>> = this.selected.selected\n .map((node) => this.getNodeById(node.id))\n .filter(Boolean) as any;\n this.selected.clear();\n this.selected.select(...selected);\n }\n\n public reset(): any {\n this.selected.clear();\n this.expanded.clear();\n return this.getTreeRoot();\n }\n\n private initExpanded(): void {\n const key = joinPath('rxap/tree', this.id, 'expanded');\n let expanded = [];\n if (localStorage.getItem(key)) {\n try {\n expanded = JSON.parse(localStorage.getItem(key)!);\n } catch (e) {\n console.debug('parse expanded tree data source nodes failed');\n }\n }\n\n this.expanded = new SelectionModel<string>(\n this.metadata.expandMultiple !== false,\n expanded\n );\n this._expandedLocalStorageSubscription = this.expanded.changed\n .pipe(\n tap(() =>\n localStorage.setItem(key, JSON.stringify(this.expanded.selected))\n )\n )\n .subscribe();\n }\n}\n","import { Directive, TemplateRef, Inject } from '@angular/core';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: 'ng-template[rxapTreeContent]',\n})\nexport class TreeContentDirective {\n constructor(\n @Inject(TemplateRef)\n public readonly template: TemplateRef<any>\n ) {}\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_TREE_CONTENT_EDITABLE_METHOD = new InjectionToken('rxap/tree-content-editable-method');\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n ViewContainerRef,\n ElementRef,\n ViewChild,\n Renderer2,\n HostListener\n} from '@angular/core';\nimport {\n DebounceCall,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n map,\n startWith,\n tap\n} from 'rxjs/operators';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { RXAP_TREE_CONTENT_EDITABLE_METHOD } from './tokens';\nimport { TreeDataSource } from './tree.data-source';\nimport {\n Method,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction\n} from '@rxap/utilities/rxjs';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'rxap-tree',\n templateUrl: './tree.component.html',\n styleUrls: [ './tree.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeComponent<Data extends WithIdentifier & WithChildren = any>\n implements OnInit, AfterContentInit {\n public get nodeDisplayEditable(): boolean {\n return !!this.contentEditableMethod;\n }\n\n public treeControl: FlatTreeControl<Node<Data>>;\n @Input()\n @Required\n public dataSource!: TreeDataSource<Data>;\n @Input()\n public contentEditableMethod?: Method<any, string | null> | null;\n @Input()\n public toDisplay?: NodeToDisplayFunction<any>;\n\n @Input()\n public getIcon?: NodeGetIconFunction<any>;\n\n @Input()\n public hasDetails?: NodeHasDetailsFunction<any>;\n\n @ContentChild(TreeContentDirective, { static: true })\n public content?: TreeContentDirective;\n\n @Output()\n public details = new EventEmitter();\n\n public portal: TemplatePortal | null = null;\n public getLevel = (node: Node<Data>) => node.depth;\n public isExpandable = (node: Node<Data>) => node.hasChildren;\n public hasChild = (_: number, nodeData: Node<Data>) => nodeData.hasChildren;\n\n @ViewChild('treeContainer', { static: true })\n public treeContainer!: ElementRef;\n\n /**\n * Indicates that the divider is moved with mouse down\n * @private\n */\n private _moveDivider = false;\n\n /**\n * Holds the current tree container width.\n * If null the move divider feature was not yet used and the initial\n * container width is not calculated\n * @private\n */\n private _treeContainerWidth: number | null = null;\n\n constructor(\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n private readonly cdr: ChangeDetectorRef,\n @Optional()\n @Inject(RXAP_TREE_CONTENT_EDITABLE_METHOD)\n contentEditableMethod: Method<any, string | null> | null,\n private readonly renderer: Renderer2\n ) {\n this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);\n this.contentEditableMethod = contentEditableMethod;\n }\n\n public ngOnInit() {\n this.dataSource.setTreeControl(this.treeControl);\n this.dataSource.setToDisplay(this.toDisplay);\n this.dataSource.setGetIcon(this.getIcon);\n this.dataSource.setHasDetails(this.hasDetails);\n\n if (this.dataSource.selected.hasValue()) {\n this.dataSource.selected.selected.forEach((node) =>\n this.openDetails(node)\n );\n }\n }\n\n public ngAfterContentInit(): void {\n this.dataSource.selected.changed\n .pipe(\n map(($event) => $event.source.selected),\n startWith(this.dataSource.selected.selected),\n tap((selected) => selected.forEach((node) => this.openDetails(node)))\n )\n .subscribe();\n }\n\n @DebounceCall(100)\n public openDetails(node: Node<Data>): void {\n if (this.content) {\n this.portal = new TemplatePortal<any>(\n this.content.template,\n this.viewContainerRef,\n {\n $implicit: node.item,\n node,\n }\n );\n this.cdr.markForCheck();\n }\n this.details.emit(node.item);\n }\n\n public onContentEditableChange(value: string | null, node: Node<Data>) {\n return this.contentEditableMethod?.call(value, node.item, node);\n }\n\n\n onMousedown() {\n this._moveDivider = true;\n }\n\n @HostListener('mouseup')\n onMouseup() {\n this._moveDivider = false;\n }\n\n @HostListener('mousemove', [ '$event' ])\n onMousemove($event: MouseEvent) {\n if (this._moveDivider) {\n if (!this._treeContainerWidth) {\n this._treeContainerWidth = this.treeContainer.nativeElement.clientWidth as number;\n }\n this._treeContainerWidth = $event.clientX - 75;\n const width = this._treeContainerWidth + 'px';\n this.renderer.setStyle(this.treeContainer.nativeElement, 'max-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'min-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'flex-basis', width);\n }\n }\n}\n","<div fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n","import { NgModule } from '@angular/core';\nimport { TreeComponent } from './tree.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatTreeModule } from '@angular/material/tree';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { ContenteditableDirectiveModule } from '@rxap/contenteditable';\nimport { IconDirectiveModule } from '@rxap/material-directives/icon';\n\n@NgModule({\n imports: [\n CommonModule,\n MatTreeModule,\n MatButtonModule,\n MatIconModule,\n FlexLayoutModule,\n MatDividerModule,\n MatProgressSpinnerModule,\n PortalModule,\n ContenteditableDirectiveModule,\n IconDirectiveModule\n ],\n declarations: [ TreeComponent, TreeContentDirective ],\n exports: [ TreeComponent, TreeContentDirective ],\n entryComponents: [ TreeComponent ]\n})\nexport class TreeComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["InjectionToken","BehaviorSubject","map","from","tap","switchMap","merge","Node","joinPath","SelectionModel","BaseDataSource","RXAP_DATA_SOURCE_METADATA","Required","FlatTreeControl","Injectable","Inject","TemplateRef","Directive","EventEmitter","startWith","TemplatePortal","ViewContainerRef","ChangeDetectorRef","DebounceCall","Component","ChangeDetectionStrategy","Optional","Input","ContentChild","Output","ViewChild","HostListener","CommonModule","MatTreeModule","MatButtonModule","MatIconModule","FlexLayoutModule","MatDividerModule","MatProgressSpinnerModule","PortalModule","ContenteditableDirectiveModule","IconDirectiveModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,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RC,eAAY;2BAAC,SAAS;oBAMvB,WAAW;0BADVA,eAAY;2BAAC,WAAW,EAAE,CAAE,QAAQ,CAAE;;;;QEtIzC;;;;0IAAa,mBAAmB;2IAAnB,mBAAmB,iBAJX,aAAa,EAAE,oBAAoB,aAXpDC,eAAY;YACZC,gBAAa;YACbC,kBAAe;YACfC,gBAAa;YACbC,2BAAgB;YAChBC,mBAAgB;YAChBC,2BAAwB;YACxBC,gBAAY;YACZC,iCAA8B;YAC9BC,sBAAmB,aAGF,aAAa,EAAE,oBAAoB;2IAG3C,mBAAmB,YAhBb;gBACfT,eAAY;gBACZC,gBAAa;gBACbC,kBAAe;gBACfC,gBAAa;gBACbC,2BAAgB;gBAChBC,mBAAgB;gBAChBC,2BAAwB;gBACxBC,gBAAY;gBACZC,iCAA8B;gBAC9BC,sBAAmB;aACpB;qHAKU,mBAAmB;sBAjB/BC,WAAQ;uBAAC;wBACR,OAAO,EAAU;4BACfV,eAAY;4BACZC,gBAAa;4BACbC,kBAAe;4BACfC,gBAAa;4BACbC,2BAAgB;4BAChBC,mBAAgB;4BAChBC,2BAAwB;4BACxBC,gBAAY;4BACZC,iCAA8B;4BAC9BC,sBAAmB;yBACpB;wBACD,YAAY,EAAK,CAAE,aAAa,EAAE,oBAAoB,CAAE;wBACxD,OAAO,EAAU,CAAE,aAAa,EAAE,oBAAoB,CAAE;wBACxD,eAAe,EAAE,CAAE,aAAa,CAAE;qBACnC;;;IC9BD;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"rxap-tree.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","../../../../libs/tree/src/lib/tree.data-source.ts","../../../../libs/tree/src/lib/tree-content.directive.ts","../../../../libs/tree/src/lib/tokens.ts","../../../../libs/tree/src/lib/tree.component.ts","../../../../libs/tree/src/lib/tree.component.html","../../../../libs/tree/src/lib/tree.component.module.ts","../../../../libs/tree/src/rxap-tree.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import {\n BehaviorSubject,\n from,\n merge,\n Observable,\n Subscription\n} from 'rxjs';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n SelectionChange,\n SelectionModel\n} from '@angular/cdk/collections';\nimport {\n map,\n switchMap,\n tap\n} from 'rxjs/operators';\nimport {\n BaseDataSource,\n BaseDataSourceMetadata,\n BaseDataSourceViewer,\n RXAP_DATA_SOURCE_METADATA\n} from '@rxap/data-source';\nimport {\n joinPath,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport {\n Inject,\n Injectable,\n InjectionToken\n} from '@angular/core';\nimport {\n ExpandNodeFunction,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction,\n Method\n} from '@rxap/utilities/rxjs';\n\nexport function isSelectionChange<T>(obj: any): obj is SelectionChange<T> {\n return !!obj && obj.hasOwnProperty('added') && obj.hasOwnProperty('removed');\n}\n\nexport interface TreeDataSourceMetadata extends BaseDataSourceMetadata {\n selectMultiple?: boolean;\n expandMultiple?: boolean;\n}\n\nexport const RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD = new InjectionToken(\n 'rxap/tree/data-source/root-remote-method'\n);\nexport const RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD = new InjectionToken(\n 'rxap/tree/data-source/children-remote-method'\n);\n\n@Injectable()\nexport class TreeDataSource<\n Data extends WithIdentifier & WithChildren = any\n> extends BaseDataSource<Array<Node<Data>>> {\n public tree$ = new BehaviorSubject<Array<Node<Data>>>([]);\n @Required public treeControl!: FlatTreeControl<Node<Data>>;\n public selected!: SelectionModel<Node<Data>>;\n public expanded!: SelectionModel<string>;\n\n private _expandedLocalStorageSubscription: Subscription | null = null;\n private _selectedLocalStorageSubscription: Subscription | null = null;\n\n // TODO : änlich problem wie bei der redundaten expand SelectionModel.\n // im localStorage wird nur die id gespeichert.\n private _preSelected: string[] = [];\n\n protected _data$ = new BehaviorSubject<Array<Node<Data>>>([]);\n public metadata!: TreeDataSourceMetadata;\n\n public toDisplay: NodeToDisplayFunction<Data> = () =>\n 'to display function not defined';\n public getIcon: NodeGetIconFunction<Data> = () => null;\n public hasDetails: NodeHasDetailsFunction<Data> = () => true;\n\n constructor(\n @Inject(RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD)\n public readonly rootRemoteMethod: Method<Data | Data[], void>,\n @Inject(RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD)\n public readonly childrenRemoteMethod: Method<Data[], Node<Data>>,\n @Inject(RXAP_DATA_SOURCE_METADATA)\n metadata: TreeDataSourceMetadata | null = null\n ) {\n super(metadata);\n this.tree$\n .pipe(\n map((tree) =>\n tree\n .map((child) => this.flatTree(child))\n .reduce((acc, nodes) => [...acc, ...nodes], [])\n )\n )\n .subscribe(this._data$);\n\n // TODO add new SelectModel class that saves the select model to the localStorage\n this.initSelected();\n this.initExpanded();\n }\n\n public async getTreeRoot(): Promise<Array<Node<Data>>> {\n const root: Data | Data[] = await this.getRoot();\n\n let rootNodes: Array<Node<Data>>;\n\n if (Array.isArray(root)) {\n rootNodes = root.map((node) => this._toNode(node));\n } else {\n rootNodes = [this._toNode(root)];\n }\n\n this.tree$.next(rootNodes);\n\n return rootNodes;\n }\n\n public selectNode(node: Node<Data>): Promise<void> {\n if (!this.selected.isMultipleSelection()) {\n if (this.selected.hasValue()) {\n const currentSelectedNode = this.selected.selected[0];\n currentSelectedNode.deselect();\n }\n }\n this.selected.select(node);\n return Promise.resolve();\n }\n\n public setTreeControl(treeControl: FlatTreeControl<Node<Data>>): void {\n this.treeControl = treeControl;\n }\n\n public setToDisplay(\n toDisplay: NodeToDisplayFunction<Data> = this.toDisplay\n ): void {\n this.toDisplay = toDisplay;\n }\n\n public setGetIcon(getIcon: NodeGetIconFunction<Data> = this.getIcon): void {\n this.getIcon = getIcon;\n }\n\n public setHasDetails(\n hasDetails: NodeHasDetailsFunction<Data> = this.hasDetails\n ): void {\n this.hasDetails = hasDetails;\n }\n\n public deselectNode(node: Node<Data>): Promise<void> {\n this.selected.deselect(node);\n return Promise.resolve();\n }\n\n // - the SelectModel that stores the selection into the local storage?\n public _toNode(\n item: Data,\n depth: number = 0,\n onExpand: ExpandNodeFunction<Data> = this.expandNode.bind(this),\n onCollapse: ExpandNodeFunction<Data> = this.collapseNode.bind(this),\n onSelect: ExpandNodeFunction<Data> = this.selectNode.bind(this),\n onDeselect: ExpandNodeFunction<Data> = this.deselectNode.bind(this)\n ): Node<Data> {\n const node = this.toNode(\n item,\n depth,\n onExpand,\n onCollapse,\n onSelect,\n onDeselect\n );\n\n if (this.expanded.isSelected(node.id)) {\n node\n .expand()\n .then(() => {\n // TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel\n // das problem ist das ich beim speicher in localStorage nur die id speicher.\n // Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel\n // nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird\n // möglich lösungen:\n // - das node object läde die entity mithilfe der id automatisch nach\n this.treeControl.expansionModel.select(node);\n console.debug(`Restore expand for node '${node.id}' SUCCESSFULLY`);\n })\n .catch(() =>\n console.debug(`Restore expand for node '${node.id}' FAILED`)\n );\n }\n\n if (this._preSelected.includes(node.id)) {\n node\n .select()\n .then(() =>\n console.debug(`Restore select for node '${node.id}' SUCCESSFULLY`)\n )\n .catch(() =>\n console.debug(`Restore select for node '${node.id}' FAILED`)\n );\n }\n\n return node;\n }\n\n public async expandNode(node: Node<Data>): Promise<void> {\n if (node.item.hasChildren && !node.item.children?.length) {\n node.isLoading$.enable();\n\n const children = await this.getChildren(node);\n\n // add the loaded children to the item object\n node.item.children = children;\n\n node.addChildren(\n children.map((child) =>\n this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse)\n )\n );\n\n node.isLoading$.disable();\n }\n\n this.expanded.select(node.id);\n\n this.tree$.next(this.tree$.value);\n }\n\n public async getChildren(node: Node<Data>): Promise<Data[]> {\n return this.childrenRemoteMethod.call(node);\n }\n\n public async getRoot(): Promise<Data | Data[]> {\n return this.rootRemoteMethod.call();\n }\n\n // TODO : find better solution to allow the overwrite of the toNode method\n // without losing the custom preselect and preexpand function\n\n protected _connect(\n collectionViewer: Required<BaseDataSourceViewer>\n ): Observable<Array<Node<Data>>> {\n this.treeControl.expansionModel.changed.subscribe((change: any) => {\n if (isSelectionChange<Node<Data>>(change)) {\n if (change.added) {\n change.added.forEach((node) => node.expand());\n }\n if (change.removed) {\n change.removed\n .slice()\n .reverse()\n .forEach((node) => node.collapse());\n }\n }\n });\n\n let loadRoot: Promise<Array<Node<Data>> | void> = Promise.resolve();\n\n if (this.tree$.value.length === 0) {\n loadRoot = this.getTreeRoot();\n }\n\n return from(loadRoot).pipe(\n tap((rootNodes) => {\n if (rootNodes) {\n const promises: Promise<any>[] = [];\n if (this.metadata.selectMultiple) {\n if (!this.selected.hasValue()) {\n promises.push(\n ...rootNodes\n .filter((node) => node.hasDetails)\n .map((node) => node.select())\n );\n }\n if (!this.expanded.hasValue()) {\n promises.push(\n ...rootNodes\n .filter((node) => node.hasChildren)\n .map((node) => node.expand())\n );\n }\n } else if (rootNodes.length) {\n const rootNode = rootNodes[0];\n if (!this.selected.hasValue()) {\n // TODO : rename hasDetails to isSelectable\n if (rootNode.hasDetails) {\n promises.push(rootNode.select());\n }\n }\n if (!this.expanded.hasValue()) {\n promises.push(rootNode.expand());\n }\n }\n return Promise.all(promises);\n }\n return Promise.resolve();\n }),\n switchMap(() =>\n merge(collectionViewer.viewChange, this._data$).pipe(\n map(() => this._data$.value)\n )\n )\n );\n }\n\n public toNode(\n item: Data,\n depth: number = 0,\n onExpand: ExpandNodeFunction<Data> = this.expandNode.bind(this),\n onCollapse: ExpandNodeFunction<Data> = this.collapseNode.bind(this),\n onSelect: ExpandNodeFunction<Data> = this.selectNode.bind(this),\n onDeselect: ExpandNodeFunction<Data> = this.deselectNode.bind(this)\n ): Node<Data> {\n return Node.ToNode(\n item,\n depth,\n onExpand,\n onCollapse,\n this.toDisplay,\n this.getIcon,\n onSelect,\n onDeselect,\n this.hasDetails\n );\n }\n\n public collapseNode(node: Node<Data>): Promise<void> {\n this.expanded.deselect(node.id);\n\n this.tree$.next(this.tree$.value);\n\n return Promise.resolve();\n }\n\n public flatTree(tree: Node<Data>): Array<Node<Data>> {\n function flat(acc: any[], list: any[]) {\n return [...acc, ...list];\n }\n\n const flatTree = (node: Node<Data>): Array<Node<Data>> => {\n if (!Array.isArray(node.children)) {\n console.log(node);\n throw new Error('Node has not defined children');\n }\n\n if (node.expanded || this.expanded.isSelected(node.id)) {\n return [\n node,\n ...node.children.map((child) => flatTree(child)).reduce(flat, []),\n ];\n } else {\n return [node];\n }\n };\n\n return flatTree(tree);\n }\n\n public destroy(): void {\n super.destroy();\n // TODO : add subscription handler to BaseDataSource\n if (this._expandedLocalStorageSubscription) {\n this._expandedLocalStorageSubscription.unsubscribe();\n }\n if (this._selectedLocalStorageSubscription) {\n this._selectedLocalStorageSubscription.unsubscribe();\n }\n }\n\n public getNodeById(id: string): Node<Data> | null {\n function getNodeById(node: Node<Data>, nodeId: string) {\n if (node.id === nodeId) {\n return node;\n }\n if (node.hasNode(nodeId)) {\n return node.getNode(nodeId);\n } else {\n return null;\n }\n }\n\n return (\n this.tree$.value\n .map((node) => getNodeById(node, id))\n .filter(Boolean)[0] || null\n );\n }\n\n private initSelected(): void {\n const key = joinPath('rxap/tree', this.id, 'selected');\n if (localStorage.getItem(key)) {\n try {\n this._preSelected = JSON.parse(localStorage.getItem(key)!);\n } catch (e) {\n console.debug('parse expanded tree data source nodes failed');\n }\n }\n\n this.selected = new SelectionModel<Node<Data>>(\n !!this.metadata.selectMultiple,\n []\n );\n this._selectedLocalStorageSubscription = this.selected.changed\n .pipe(\n tap(() =>\n localStorage.setItem(\n key,\n JSON.stringify(this.selected.selected.map((s) => s.id))\n )\n )\n )\n .subscribe();\n }\n\n public async refresh(): Promise<any> {\n const rootNodes = await this.getTreeRoot();\n\n // refresh all expanded nodes;\n\n const loadExpandedNodes = async (children: ReadonlyArray<Node<Data>>) => {\n for (const child of children) {\n if (this.expanded.isSelected(child.id)) {\n // call the node method to ensure that the expanded property of\n // Node is set.\n await child.expand();\n }\n\n if (child.hasChildren) {\n await loadExpandedNodes(child.children);\n }\n }\n };\n\n await Promise.all(\n rootNodes\n .filter((node) => node.hasChildren)\n .map((node) => loadExpandedNodes(node.children))\n );\n\n const selected: Array<Node<Data>> = this.selected.selected\n .map((node) => this.getNodeById(node.id))\n .filter(Boolean) as any;\n this.selected.clear();\n this.selected.select(...selected);\n }\n\n public reset(): any {\n this.selected.clear();\n this.expanded.clear();\n return this.getTreeRoot();\n }\n\n private initExpanded(): void {\n const key = joinPath('rxap/tree', this.id, 'expanded');\n let expanded = [];\n if (localStorage.getItem(key)) {\n try {\n expanded = JSON.parse(localStorage.getItem(key)!);\n } catch (e) {\n console.debug('parse expanded tree data source nodes failed');\n }\n }\n\n this.expanded = new SelectionModel<string>(\n this.metadata.expandMultiple !== false,\n expanded\n );\n this._expandedLocalStorageSubscription = this.expanded.changed\n .pipe(\n tap(() =>\n localStorage.setItem(key, JSON.stringify(this.expanded.selected))\n )\n )\n .subscribe();\n }\n}\n","import { Directive, TemplateRef, Inject } from '@angular/core';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: 'ng-template[rxapTreeContent]',\n})\nexport class TreeContentDirective {\n constructor(\n @Inject(TemplateRef)\n public readonly template: TemplateRef<any>\n ) {}\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_TREE_CONTENT_EDITABLE_METHOD = new InjectionToken('rxap/tree-content-editable-method');\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n ViewContainerRef,\n ElementRef,\n ViewChild,\n Renderer2,\n HostListener\n} from '@angular/core';\nimport {\n DebounceCall,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n map,\n startWith,\n tap\n} from 'rxjs/operators';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { RXAP_TREE_CONTENT_EDITABLE_METHOD } from './tokens';\nimport { TreeDataSource } from './tree.data-source';\nimport {\n Method,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction\n} from '@rxap/utilities/rxjs';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'rxap-tree',\n templateUrl: './tree.component.html',\n styleUrls: [ './tree.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeComponent<Data extends WithIdentifier & WithChildren = any>\n implements OnInit, AfterContentInit {\n public get nodeDisplayEditable(): boolean {\n return !!this.contentEditableMethod;\n }\n\n public treeControl: FlatTreeControl<Node<Data>>;\n @Input()\n @Required\n public dataSource!: TreeDataSource<Data>;\n @Input()\n public contentEditableMethod?: Method<any, string | null> | null;\n @Input()\n public toDisplay?: NodeToDisplayFunction<any>;\n\n @Input()\n public getIcon?: NodeGetIconFunction<any>;\n\n @Input()\n public hasDetails?: NodeHasDetailsFunction<any>;\n\n @ContentChild(TreeContentDirective, { static: true })\n public content?: TreeContentDirective;\n\n @Input()\n public hideLeafIcon: boolean = false;\n\n @Output()\n public details = new EventEmitter();\n\n public portal: TemplatePortal | null = null;\n public getLevel = (node: Node<Data>) => node.depth;\n public isExpandable = (node: Node<Data>) => node.hasChildren;\n public hasChild = (_: number, nodeData: Node<Data>) => nodeData.hasChildren;\n\n @ViewChild('treeContainer', { static: true })\n public treeContainer!: ElementRef;\n\n /**\n * Indicates that the divider is moved with mouse down\n * @private\n */\n private _moveDivider = false;\n\n /**\n * Holds the current tree container width.\n * If null the move divider feature was not yet used and the initial\n * container width is not calculated\n * @private\n */\n private _treeContainerWidth: number | null = null;\n\n constructor(\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n private readonly cdr: ChangeDetectorRef,\n @Optional()\n @Inject(RXAP_TREE_CONTENT_EDITABLE_METHOD)\n contentEditableMethod: Method<any, string | null> | null,\n private readonly renderer: Renderer2\n ) {\n this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);\n this.contentEditableMethod = contentEditableMethod;\n }\n\n public ngOnInit() {\n this.dataSource.setTreeControl(this.treeControl);\n this.dataSource.setToDisplay(this.toDisplay);\n this.dataSource.setGetIcon(this.getIcon);\n this.dataSource.setHasDetails(this.hasDetails);\n\n if (this.dataSource.selected.hasValue()) {\n this.dataSource.selected.selected.forEach((node) =>\n this.openDetails(node)\n );\n }\n }\n\n public ngAfterContentInit(): void {\n this.dataSource.selected.changed\n .pipe(\n map(($event) => $event.source.selected),\n startWith(this.dataSource.selected.selected),\n tap((selected) => selected.forEach((node) => this.openDetails(node)))\n )\n .subscribe();\n }\n\n @DebounceCall(100)\n public openDetails(node: Node<Data>): void {\n if (this.content) {\n this.portal = new TemplatePortal<any>(\n this.content.template,\n this.viewContainerRef,\n {\n $implicit: node.item,\n node,\n }\n );\n this.cdr.markForCheck();\n }\n this.details.emit(node.item);\n }\n\n public onContentEditableChange(value: string | null, node: Node<Data>) {\n return this.contentEditableMethod?.call(value, node.item, node);\n }\n\n\n onMousedown() {\n this._moveDivider = true;\n }\n\n @HostListener('mouseup')\n onMouseup() {\n this._moveDivider = false;\n }\n\n @HostListener('mousemove', [ '$event' ])\n onMousemove($event: MouseEvent) {\n if (this._moveDivider) {\n if (!this._treeContainerWidth) {\n this._treeContainerWidth = this.treeContainer.nativeElement.clientWidth as number;\n }\n this._treeContainerWidth = $event.clientX - 75;\n const width = this._treeContainerWidth + 'px';\n this.renderer.setStyle(this.treeContainer.nativeElement, 'max-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'min-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'flex-basis', width);\n }\n }\n}\n","<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n","import { NgModule } from '@angular/core';\nimport { TreeComponent } from './tree.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatTreeModule } from '@angular/material/tree';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { ContenteditableDirectiveModule } from '@rxap/contenteditable';\nimport { IconDirectiveModule } from '@rxap/material-directives/icon';\n\n@NgModule({\n imports: [\n CommonModule,\n MatTreeModule,\n MatButtonModule,\n MatIconModule,\n FlexLayoutModule,\n MatDividerModule,\n MatProgressSpinnerModule,\n PortalModule,\n ContenteditableDirectiveModule,\n IconDirectiveModule\n ],\n declarations: [ TreeComponent, TreeContentDirective ],\n exports: [ TreeComponent, TreeContentDirective ],\n entryComponents: [ TreeComponent ]\n})\nexport class TreeComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["InjectionToken","BehaviorSubject","map","from","tap","switchMap","merge","Node","joinPath","SelectionModel","BaseDataSource","RXAP_DATA_SOURCE_METADATA","Required","FlatTreeControl","Injectable","Inject","TemplateRef","Directive","EventEmitter","startWith","TemplatePortal","ViewContainerRef","ChangeDetectorRef","DebounceCall","Component","ChangeDetectionStrategy","Optional","Input","ContentChild","Output","ViewChild","HostListener","CommonModule","MatTreeModule","MatButtonModule","MatIconModule","FlexLayoutModule","MatDividerModule","MatProgressSpinnerModule","PortalModule","ContenteditableDirectiveModule","IconDirectiveModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;;;;;;;;;;;;;;IAcA;IAEA,IAAI,aAAa,GAAG,UAAS,CAAC,EAAE,CAAC;QAC7B,aAAa,GAAG,MAAM,CAAC,cAAc;aAChC,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;YAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;gBAAE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC;oBAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,C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BC,mBAAgB;YAChBC,2BAAwB;YACxBC,gBAAY;YACZC,kCAA8B;YAC9BC,sBAAmB,aAGF,aAAa,EAAE,oBAAoB;2IAG3C,mBAAmB,YAhBb;gBACfT,eAAY;gBACZC,gBAAa;gBACbC,kBAAe;gBACfC,gBAAa;gBACbC,2BAAgB;gBAChBC,mBAAgB;gBAChBC,2BAAwB;gBACxBC,gBAAY;gBACZC,kCAA8B;gBAC9BC,sBAAmB;aACpB;qHAKU,mBAAmB;sBAjB/BC,WAAQ;uBAAC;wBACR,OAAO,EAAU;4BACfV,eAAY;4BACZC,gBAAa;4BACbC,kBAAe;4BACfC,gBAAa;4BACbC,2BAAgB;4BAChBC,mBAAgB;4BAChBC,2BAAwB;4BACxBC,gBAAY;4BACZC,kCAA8B;4BAC9BC,sBAAmB;yBACpB;wBACD,YAAY,EAAK,CAAE,aAAa,EAAE,oBAAoB,CAAE;wBACxD,OAAO,EAAU,CAAE,aAAa,EAAE,oBAAoB,CAAE;wBACxD,eAAe,EAAE,CAAE,aAAa,CAAE;qBACnC;;;IC9BD;;;;;;;;;;;;;;;;;;;"}
@@ -16,14 +16,16 @@ import * as i4 from "@angular/material/progress-spinner";
16
16
  import * as i5 from "@angular/material/divider";
17
17
  import * as i6 from "@angular/flex-layout/flex";
18
18
  import * as i7 from "@angular/common";
19
- import * as i8 from "@rxap/material-directives/icon";
20
- import * as i9 from "@rxap/contenteditable";
21
- import * as i10 from "@angular/cdk/portal";
19
+ import * as i8 from "@angular/flex-layout/extended";
20
+ import * as i9 from "@rxap/material-directives/icon";
21
+ import * as i10 from "@rxap/contenteditable";
22
+ import * as i11 from "@angular/cdk/portal";
22
23
  export class TreeComponent {
23
24
  constructor(viewContainerRef, cdr, contentEditableMethod, renderer) {
24
25
  this.viewContainerRef = viewContainerRef;
25
26
  this.cdr = cdr;
26
27
  this.renderer = renderer;
28
+ this.hideLeafIcon = false;
27
29
  this.details = new EventEmitter();
28
30
  this.portal = null;
29
31
  this.getLevel = (node) => node.depth;
@@ -95,7 +97,7 @@ export class TreeComponent {
95
97
  }
96
98
  }
97
99
  TreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: TreeComponent, deps: [{ token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: RXAP_TREE_CONTENT_EDITABLE_METHOD, optional: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
98
- TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: TreeComponent, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", hasDetails: "hasDetails" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0, template: "<div fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".tree-view{background-color:transparent;background-color:initial}.details,.tree-container{max-height:calc(100vh - 64px - 32px);overflow-y:auto}.tree-container{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}"], components: [{ type: i1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { type: i1.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { type: i1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i9.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { type: i6.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { type: i10.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i7.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
100
+ TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: TreeComponent, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", hasDetails: "hasDetails", hideLeafIcon: "hideLeafIcon" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".container{height:100%}.tree-view{background-color:transparent;background-color:initial}.details,.tree-container{max-height:calc(100vh - 64px - 32px);overflow-y:auto}.tree-container{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}"], components: [{ type: i1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { type: i1.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { type: i1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i9.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i10.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { type: i6.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { type: i11.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i7.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
99
101
  __decorate([
100
102
  Required,
101
103
  __metadata("design:type", TreeDataSource)
@@ -139,6 +141,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
139
141
  }], content: [{
140
142
  type: ContentChild,
141
143
  args: [TreeContentDirective, { static: true }]
144
+ }], hideLeafIcon: [{
145
+ type: Input
142
146
  }], details: [{
143
147
  type: Output
144
148
  }], treeContainer: [{
@@ -1 +1 @@
1
- {"version":3,"file":"tree.component.js","sourceRoot":"","sources":["../../../../../libs/tree/src/lib/tree.component.ts","../../../../../libs/tree/src/lib/tree.component.html"],"names":[],"mappings":";AAAA,OAAO,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,EAEL,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACZ,QAAQ,EAGT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,GAAG,EACH,SAAS,EACT,GAAG,EACJ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,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;0BAExB,QAAQ;;0BACR,MAAM;2BAAC,iCAAiC;oEA9CpC,UAAU;sBAFhB,KAAK;gBAIC,qBAAqB;sBAD3B,KAAK;gBAGC,SAAS;sBADf,KAAK;gBAIC,OAAO;sBADb,KAAK;gBAIC,UAAU;sBADhB,KAAK;gBAIC,OAAO;sBADb,YAAY;uBAAC,oBAAoB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBAI7C,OAAO;sBADb,MAAM;gBASA,aAAa;sBADnB,SAAS;uBAAC,eAAe,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBAuDrC,WAAW,MAyBlB,SAAS;sBADR,YAAY;uBAAC,SAAS;gBAMvB,WAAW;sBADV,YAAY;uBAAC,WAAW,EAAE,CAAE,QAAQ,CAAE","sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n ViewContainerRef,\n ElementRef,\n ViewChild,\n Renderer2,\n HostListener\n} from '@angular/core';\nimport {\n DebounceCall,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n map,\n startWith,\n tap\n} from 'rxjs/operators';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { RXAP_TREE_CONTENT_EDITABLE_METHOD } from './tokens';\nimport { TreeDataSource } from './tree.data-source';\nimport {\n Method,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction\n} from '@rxap/utilities/rxjs';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'rxap-tree',\n templateUrl: './tree.component.html',\n styleUrls: [ './tree.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeComponent<Data extends WithIdentifier & WithChildren = any>\n implements OnInit, AfterContentInit {\n public get nodeDisplayEditable(): boolean {\n return !!this.contentEditableMethod;\n }\n\n public treeControl: FlatTreeControl<Node<Data>>;\n @Input()\n @Required\n public dataSource!: TreeDataSource<Data>;\n @Input()\n public contentEditableMethod?: Method<any, string | null> | null;\n @Input()\n public toDisplay?: NodeToDisplayFunction<any>;\n\n @Input()\n public getIcon?: NodeGetIconFunction<any>;\n\n @Input()\n public hasDetails?: NodeHasDetailsFunction<any>;\n\n @ContentChild(TreeContentDirective, { static: true })\n public content?: TreeContentDirective;\n\n @Output()\n public details = new EventEmitter();\n\n public portal: TemplatePortal | null = null;\n public getLevel = (node: Node<Data>) => node.depth;\n public isExpandable = (node: Node<Data>) => node.hasChildren;\n public hasChild = (_: number, nodeData: Node<Data>) => nodeData.hasChildren;\n\n @ViewChild('treeContainer', { static: true })\n public treeContainer!: ElementRef;\n\n /**\n * Indicates that the divider is moved with mouse down\n * @private\n */\n private _moveDivider = false;\n\n /**\n * Holds the current tree container width.\n * If null the move divider feature was not yet used and the initial\n * container width is not calculated\n * @private\n */\n private _treeContainerWidth: number | null = null;\n\n constructor(\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n private readonly cdr: ChangeDetectorRef,\n @Optional()\n @Inject(RXAP_TREE_CONTENT_EDITABLE_METHOD)\n contentEditableMethod: Method<any, string | null> | null,\n private readonly renderer: Renderer2\n ) {\n this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);\n this.contentEditableMethod = contentEditableMethod;\n }\n\n public ngOnInit() {\n this.dataSource.setTreeControl(this.treeControl);\n this.dataSource.setToDisplay(this.toDisplay);\n this.dataSource.setGetIcon(this.getIcon);\n this.dataSource.setHasDetails(this.hasDetails);\n\n if (this.dataSource.selected.hasValue()) {\n this.dataSource.selected.selected.forEach((node) =>\n this.openDetails(node)\n );\n }\n }\n\n public ngAfterContentInit(): void {\n this.dataSource.selected.changed\n .pipe(\n map(($event) => $event.source.selected),\n startWith(this.dataSource.selected.selected),\n tap((selected) => selected.forEach((node) => this.openDetails(node)))\n )\n .subscribe();\n }\n\n @DebounceCall(100)\n public openDetails(node: Node<Data>): void {\n if (this.content) {\n this.portal = new TemplatePortal<any>(\n this.content.template,\n this.viewContainerRef,\n {\n $implicit: node.item,\n node,\n }\n );\n this.cdr.markForCheck();\n }\n this.details.emit(node.item);\n }\n\n public onContentEditableChange(value: string | null, node: Node<Data>) {\n return this.contentEditableMethod?.call(value, node.item, node);\n }\n\n\n onMousedown() {\n this._moveDivider = true;\n }\n\n @HostListener('mouseup')\n onMouseup() {\n this._moveDivider = false;\n }\n\n @HostListener('mousemove', [ '$event' ])\n onMousemove($event: MouseEvent) {\n if (this._moveDivider) {\n if (!this._treeContainerWidth) {\n this._treeContainerWidth = this.treeContainer.nativeElement.clientWidth as number;\n }\n this._treeContainerWidth = $event.clientX - 75;\n const width = this._treeContainerWidth + 'px';\n this.renderer.setStyle(this.treeContainer.nativeElement, 'max-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'min-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'flex-basis', width);\n }\n }\n}\n","<div fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n"]}
1
+ {"version":3,"file":"tree.component.js","sourceRoot":"","sources":["../../../../../libs/tree/src/lib/tree.component.ts","../../../../../libs/tree/src/lib/tree.component.html"],"names":[],"mappings":";AAAA,OAAO,EAEL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,KAAK,E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a,CAAC,aAAa,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;SAC/E;IACH,CAAC;;0GAnIU,aAAa,kBAqDd,gBAAgB,aAEhB,iBAAiB,aAGjB,iCAAiC;8FA1DhC,aAAa,wYAqBV,oBAAoB,4LCtEpC,y7FAiFA;ADvBE;IADC,QAAQ;8BACW,cAAc;iDAAO;AAiFzC;IADC,YAAY,CAAC,GAAG,CAAC;;qCACO,IAAI;;gDAa5B;2FAvGU,aAAa;kBAPzB,SAAS;mBAAC;oBACT,8CAA8C;oBAC9C,QAAQ,EAAS,WAAW;oBAC5B,WAAW,EAAM,uBAAuB;oBACxC,SAAS,EAAQ,CAAE,uBAAuB,CAAE;oBAC5C,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;0BAsDI,MAAM;2BAAC,gBAAgB;;0BAEvB,MAAM;2BAAC,iBAAiB;;0BAExB,QAAQ;;0BACR,MAAM;2BAAC,iCAAiC;oEAjDpC,UAAU;sBAFhB,KAAK;gBAIC,qBAAqB;sBAD3B,KAAK;gBAGC,SAAS;sBADf,KAAK;gBAIC,OAAO;sBADb,KAAK;gBAIC,UAAU;sBADhB,KAAK;gBAIC,OAAO;sBADb,YAAY;uBAAC,oBAAoB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBAI7C,YAAY;sBADlB,KAAK;gBAIC,OAAO;sBADb,MAAM;gBASA,aAAa;sBADnB,SAAS;uBAAC,eAAe,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;gBAuDrC,WAAW,MAyBlB,SAAS;sBADR,YAAY;uBAAC,SAAS;gBAMvB,WAAW;sBADV,YAAY;uBAAC,WAAW,EAAE,CAAE,QAAQ,CAAE","sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n ViewContainerRef,\n ElementRef,\n ViewChild,\n Renderer2,\n HostListener\n} from '@angular/core';\nimport {\n DebounceCall,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n map,\n startWith,\n tap\n} from 'rxjs/operators';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { RXAP_TREE_CONTENT_EDITABLE_METHOD } from './tokens';\nimport { TreeDataSource } from './tree.data-source';\nimport {\n Method,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction\n} from '@rxap/utilities/rxjs';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'rxap-tree',\n templateUrl: './tree.component.html',\n styleUrls: [ './tree.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeComponent<Data extends WithIdentifier & WithChildren = any>\n implements OnInit, AfterContentInit {\n public get nodeDisplayEditable(): boolean {\n return !!this.contentEditableMethod;\n }\n\n public treeControl: FlatTreeControl<Node<Data>>;\n @Input()\n @Required\n public dataSource!: TreeDataSource<Data>;\n @Input()\n public contentEditableMethod?: Method<any, string | null> | null;\n @Input()\n public toDisplay?: NodeToDisplayFunction<any>;\n\n @Input()\n public getIcon?: NodeGetIconFunction<any>;\n\n @Input()\n public hasDetails?: NodeHasDetailsFunction<any>;\n\n @ContentChild(TreeContentDirective, { static: true })\n public content?: TreeContentDirective;\n\n @Input()\n public hideLeafIcon: boolean = false;\n\n @Output()\n public details = new EventEmitter();\n\n public portal: TemplatePortal | null = null;\n public getLevel = (node: Node<Data>) => node.depth;\n public isExpandable = (node: Node<Data>) => node.hasChildren;\n public hasChild = (_: number, nodeData: Node<Data>) => nodeData.hasChildren;\n\n @ViewChild('treeContainer', { static: true })\n public treeContainer!: ElementRef;\n\n /**\n * Indicates that the divider is moved with mouse down\n * @private\n */\n private _moveDivider = false;\n\n /**\n * Holds the current tree container width.\n * If null the move divider feature was not yet used and the initial\n * container width is not calculated\n * @private\n */\n private _treeContainerWidth: number | null = null;\n\n constructor(\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n private readonly cdr: ChangeDetectorRef,\n @Optional()\n @Inject(RXAP_TREE_CONTENT_EDITABLE_METHOD)\n contentEditableMethod: Method<any, string | null> | null,\n private readonly renderer: Renderer2\n ) {\n this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);\n this.contentEditableMethod = contentEditableMethod;\n }\n\n public ngOnInit() {\n this.dataSource.setTreeControl(this.treeControl);\n this.dataSource.setToDisplay(this.toDisplay);\n this.dataSource.setGetIcon(this.getIcon);\n this.dataSource.setHasDetails(this.hasDetails);\n\n if (this.dataSource.selected.hasValue()) {\n this.dataSource.selected.selected.forEach((node) =>\n this.openDetails(node)\n );\n }\n }\n\n public ngAfterContentInit(): void {\n this.dataSource.selected.changed\n .pipe(\n map(($event) => $event.source.selected),\n startWith(this.dataSource.selected.selected),\n tap((selected) => selected.forEach((node) => this.openDetails(node)))\n )\n .subscribe();\n }\n\n @DebounceCall(100)\n public openDetails(node: Node<Data>): void {\n if (this.content) {\n this.portal = new TemplatePortal<any>(\n this.content.template,\n this.viewContainerRef,\n {\n $implicit: node.item,\n node,\n }\n );\n this.cdr.markForCheck();\n }\n this.details.emit(node.item);\n }\n\n public onContentEditableChange(value: string | null, node: Node<Data>) {\n return this.contentEditableMethod?.call(value, node.item, node);\n }\n\n\n onMousedown() {\n this._moveDivider = true;\n }\n\n @HostListener('mouseup')\n onMouseup() {\n this._moveDivider = false;\n }\n\n @HostListener('mousemove', [ '$event' ])\n onMousemove($event: MouseEvent) {\n if (this._moveDivider) {\n if (!this._treeContainerWidth) {\n this._treeContainerWidth = this.treeContainer.nativeElement.clientWidth as number;\n }\n this._treeContainerWidth = $event.clientX - 75;\n const width = this._treeContainerWidth + 'px';\n this.renderer.setStyle(this.treeContainer.nativeElement, 'max-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'min-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'flex-basis', width);\n }\n }\n}\n","<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n"]}
@@ -8,7 +8,7 @@ import { joinPath, Required, DebounceCall } from '@rxap/utilities';
8
8
  import * as i0 from '@angular/core';
9
9
  import { InjectionToken, Injectable, Inject, TemplateRef, Directive, EventEmitter, ViewContainerRef, ChangeDetectorRef, Component, ChangeDetectionStrategy, Optional, Input, ContentChild, Output, ViewChild, HostListener, NgModule } from '@angular/core';
10
10
  import { Node } from '@rxap/utilities/rxjs';
11
- import * as i10 from '@angular/cdk/portal';
11
+ import * as i11 from '@angular/cdk/portal';
12
12
  import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
13
13
  import * as i1 from '@angular/material/tree';
14
14
  import { MatTreeModule } from '@angular/material/tree';
@@ -23,9 +23,10 @@ import { MatDividerModule } from '@angular/material/divider';
23
23
  import * as i6 from '@angular/flex-layout/flex';
24
24
  import * as i7 from '@angular/common';
25
25
  import { CommonModule } from '@angular/common';
26
- import * as i8 from '@rxap/material-directives/icon';
26
+ import * as i8 from '@angular/flex-layout/extended';
27
+ import * as i9 from '@rxap/material-directives/icon';
27
28
  import { IconDirectiveModule } from '@rxap/material-directives/icon';
28
- import * as i9 from '@rxap/contenteditable';
29
+ import * as i10 from '@rxap/contenteditable';
29
30
  import { ContenteditableDirectiveModule } from '@rxap/contenteditable';
30
31
  import { FlexLayoutModule } from '@angular/flex-layout';
31
32
 
@@ -363,6 +364,7 @@ class TreeComponent {
363
364
  this.viewContainerRef = viewContainerRef;
364
365
  this.cdr = cdr;
365
366
  this.renderer = renderer;
367
+ this.hideLeafIcon = false;
366
368
  this.details = new EventEmitter();
367
369
  this.portal = null;
368
370
  this.getLevel = (node) => node.depth;
@@ -434,7 +436,7 @@ class TreeComponent {
434
436
  }
435
437
  }
436
438
  TreeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: TreeComponent, deps: [{ token: ViewContainerRef }, { token: ChangeDetectorRef }, { token: RXAP_TREE_CONTENT_EDITABLE_METHOD, optional: true }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
437
- TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: TreeComponent, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", hasDetails: "hasDetails" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0, template: "<div fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".tree-view{background-color:transparent;background-color:initial}.details,.tree-container{max-height:calc(100vh - 64px - 32px);overflow-y:auto}.tree-container{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}"], components: [{ type: i1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { type: i1.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { type: i1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i9.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { type: i6.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { type: i10.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i7.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
439
+ TreeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: TreeComponent, selector: "rxap-tree", inputs: { dataSource: "dataSource", contentEditableMethod: "contentEditableMethod", toDisplay: "toDisplay", getIcon: "getIcon", hasDetails: "hasDetails", hideLeafIcon: "hideLeafIcon" }, outputs: { details: "details" }, host: { listeners: { "mouseup": "onMouseup()", "mousemove": "onMousemove($event)" } }, queries: [{ propertyName: "content", first: true, predicate: TreeContentDirective, descendants: true, static: true }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n", styles: [".container{height:100%}.tree-view{background-color:transparent;background-color:initial}.details,.tree-container{max-height:calc(100vh - 64px - 32px);overflow-y:auto}.tree-container{min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}.divider{cursor:ew-resize;padding:12px}.divider ::ng-deep .mat-divider{height:100%}"], components: [{ type: i1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { type: i1.MatTreeNode, selector: "mat-tree-node", inputs: ["role", "disabled", "tabIndex"], exportAs: ["matTreeNode"] }, { type: i1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i8.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { type: i9.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i10.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { type: i6.DefaultFlexOffsetDirective, selector: " [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md], [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md], [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm], [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]", inputs: ["fxFlexOffset", "fxFlexOffset.xs", "fxFlexOffset.sm", "fxFlexOffset.md", "fxFlexOffset.lg", "fxFlexOffset.xl", "fxFlexOffset.lt-sm", "fxFlexOffset.lt-md", "fxFlexOffset.lt-lg", "fxFlexOffset.lt-xl", "fxFlexOffset.gt-xs", "fxFlexOffset.gt-sm", "fxFlexOffset.gt-md", "fxFlexOffset.gt-lg"] }, { type: i11.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i7.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
438
440
  __decorate([
439
441
  Required,
440
442
  __metadata("design:type", TreeDataSource)
@@ -478,6 +480,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImpor
478
480
  }], content: [{
479
481
  type: ContentChild,
480
482
  args: [TreeContentDirective, { static: true }]
483
+ }], hideLeafIcon: [{
484
+ type: Input
481
485
  }], details: [{
482
486
  type: Output
483
487
  }], treeContainer: [{
@@ -1 +1 @@
1
- {"version":3,"file":"rxap-tree.js","sources":["../../../../libs/tree/src/lib/tree.data-source.ts","../../../../libs/tree/src/lib/tree-content.directive.ts","../../../../libs/tree/src/lib/tokens.ts","../../../../libs/tree/src/lib/tree.component.ts","../../../../libs/tree/src/lib/tree.component.html","../../../../libs/tree/src/lib/tree.component.module.ts","../../../../libs/tree/src/rxap-tree.ts"],"sourcesContent":["import {\n BehaviorSubject,\n from,\n merge,\n Observable,\n Subscription\n} from 'rxjs';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n SelectionChange,\n SelectionModel\n} from '@angular/cdk/collections';\nimport {\n map,\n switchMap,\n tap\n} from 'rxjs/operators';\nimport {\n BaseDataSource,\n BaseDataSourceMetadata,\n BaseDataSourceViewer,\n RXAP_DATA_SOURCE_METADATA\n} from '@rxap/data-source';\nimport {\n joinPath,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport {\n Inject,\n Injectable,\n InjectionToken\n} from '@angular/core';\nimport {\n ExpandNodeFunction,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction,\n Method\n} from '@rxap/utilities/rxjs';\n\nexport function isSelectionChange<T>(obj: any): obj is SelectionChange<T> {\n return !!obj && obj.hasOwnProperty('added') && obj.hasOwnProperty('removed');\n}\n\nexport interface TreeDataSourceMetadata extends BaseDataSourceMetadata {\n selectMultiple?: boolean;\n expandMultiple?: boolean;\n}\n\nexport const RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD = new InjectionToken(\n 'rxap/tree/data-source/root-remote-method'\n);\nexport const RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD = new InjectionToken(\n 'rxap/tree/data-source/children-remote-method'\n);\n\n@Injectable()\nexport class TreeDataSource<\n Data extends WithIdentifier & WithChildren = any\n> extends BaseDataSource<Array<Node<Data>>> {\n public tree$ = new BehaviorSubject<Array<Node<Data>>>([]);\n @Required public treeControl!: FlatTreeControl<Node<Data>>;\n public selected!: SelectionModel<Node<Data>>;\n public expanded!: SelectionModel<string>;\n\n private _expandedLocalStorageSubscription: Subscription | null = null;\n private _selectedLocalStorageSubscription: Subscription | null = null;\n\n // TODO : änlich problem wie bei der redundaten expand SelectionModel.\n // im localStorage wird nur die id gespeichert.\n private _preSelected: string[] = [];\n\n protected _data$ = new BehaviorSubject<Array<Node<Data>>>([]);\n public metadata!: TreeDataSourceMetadata;\n\n public toDisplay: NodeToDisplayFunction<Data> = () =>\n 'to display function not defined';\n public getIcon: NodeGetIconFunction<Data> = () => null;\n public hasDetails: NodeHasDetailsFunction<Data> = () => true;\n\n constructor(\n @Inject(RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD)\n public readonly rootRemoteMethod: Method<Data | Data[], void>,\n @Inject(RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD)\n public readonly childrenRemoteMethod: Method<Data[], Node<Data>>,\n @Inject(RXAP_DATA_SOURCE_METADATA)\n metadata: TreeDataSourceMetadata | null = null\n ) {\n super(metadata);\n this.tree$\n .pipe(\n map((tree) =>\n tree\n .map((child) => this.flatTree(child))\n .reduce((acc, nodes) => [...acc, ...nodes], [])\n )\n )\n .subscribe(this._data$);\n\n // TODO add new SelectModel class that saves the select model to the localStorage\n this.initSelected();\n this.initExpanded();\n }\n\n public async getTreeRoot(): Promise<Array<Node<Data>>> {\n const root: Data | Data[] = await this.getRoot();\n\n let rootNodes: Array<Node<Data>>;\n\n if (Array.isArray(root)) {\n rootNodes = root.map((node) => this._toNode(node));\n } else {\n rootNodes = [this._toNode(root)];\n }\n\n this.tree$.next(rootNodes);\n\n return rootNodes;\n }\n\n public selectNode(node: Node<Data>): Promise<void> {\n if (!this.selected.isMultipleSelection()) {\n if (this.selected.hasValue()) {\n const currentSelectedNode = this.selected.selected[0];\n currentSelectedNode.deselect();\n }\n }\n this.selected.select(node);\n return Promise.resolve();\n }\n\n public setTreeControl(treeControl: FlatTreeControl<Node<Data>>): void {\n this.treeControl = treeControl;\n }\n\n public setToDisplay(\n toDisplay: NodeToDisplayFunction<Data> = this.toDisplay\n ): void {\n this.toDisplay = toDisplay;\n }\n\n public setGetIcon(getIcon: NodeGetIconFunction<Data> = this.getIcon): void {\n this.getIcon = getIcon;\n }\n\n public setHasDetails(\n hasDetails: NodeHasDetailsFunction<Data> = this.hasDetails\n ): void {\n this.hasDetails = hasDetails;\n }\n\n public deselectNode(node: Node<Data>): Promise<void> {\n this.selected.deselect(node);\n return Promise.resolve();\n }\n\n // - the SelectModel that stores the selection into the local storage?\n public _toNode(\n item: Data,\n depth: number = 0,\n onExpand: ExpandNodeFunction<Data> = this.expandNode.bind(this),\n onCollapse: ExpandNodeFunction<Data> = this.collapseNode.bind(this),\n onSelect: ExpandNodeFunction<Data> = this.selectNode.bind(this),\n onDeselect: ExpandNodeFunction<Data> = this.deselectNode.bind(this)\n ): Node<Data> {\n const node = this.toNode(\n item,\n depth,\n onExpand,\n onCollapse,\n onSelect,\n onDeselect\n );\n\n if (this.expanded.isSelected(node.id)) {\n node\n .expand()\n .then(() => {\n // TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel\n // das problem ist das ich beim speicher in localStorage nur die id speicher.\n // Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel\n // nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird\n // möglich lösungen:\n // - das node object läde die entity mithilfe der id automatisch nach\n this.treeControl.expansionModel.select(node);\n console.debug(`Restore expand for node '${node.id}' SUCCESSFULLY`);\n })\n .catch(() =>\n console.debug(`Restore expand for node '${node.id}' FAILED`)\n );\n }\n\n if (this._preSelected.includes(node.id)) {\n node\n .select()\n .then(() =>\n console.debug(`Restore select for node '${node.id}' SUCCESSFULLY`)\n )\n .catch(() =>\n console.debug(`Restore select for node '${node.id}' FAILED`)\n );\n }\n\n return node;\n }\n\n public async expandNode(node: Node<Data>): Promise<void> {\n if (node.item.hasChildren && !node.item.children?.length) {\n node.isLoading$.enable();\n\n const children = await this.getChildren(node);\n\n // add the loaded children to the item object\n node.item.children = children;\n\n node.addChildren(\n children.map((child) =>\n this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse)\n )\n );\n\n node.isLoading$.disable();\n }\n\n this.expanded.select(node.id);\n\n this.tree$.next(this.tree$.value);\n }\n\n public async getChildren(node: Node<Data>): Promise<Data[]> {\n return this.childrenRemoteMethod.call(node);\n }\n\n public async getRoot(): Promise<Data | Data[]> {\n return this.rootRemoteMethod.call();\n }\n\n // TODO : find better solution to allow the overwrite of the toNode method\n // without losing the custom preselect and preexpand function\n\n protected _connect(\n collectionViewer: Required<BaseDataSourceViewer>\n ): Observable<Array<Node<Data>>> {\n this.treeControl.expansionModel.changed.subscribe((change: any) => {\n if (isSelectionChange<Node<Data>>(change)) {\n if (change.added) {\n change.added.forEach((node) => node.expand());\n }\n if (change.removed) {\n change.removed\n .slice()\n .reverse()\n .forEach((node) => node.collapse());\n }\n }\n });\n\n let loadRoot: Promise<Array<Node<Data>> | void> = Promise.resolve();\n\n if (this.tree$.value.length === 0) {\n loadRoot = this.getTreeRoot();\n }\n\n return from(loadRoot).pipe(\n tap((rootNodes) => {\n if (rootNodes) {\n const promises: Promise<any>[] = [];\n if (this.metadata.selectMultiple) {\n if (!this.selected.hasValue()) {\n promises.push(\n ...rootNodes\n .filter((node) => node.hasDetails)\n .map((node) => node.select())\n );\n }\n if (!this.expanded.hasValue()) {\n promises.push(\n ...rootNodes\n .filter((node) => node.hasChildren)\n .map((node) => node.expand())\n );\n }\n } else if (rootNodes.length) {\n const rootNode = rootNodes[0];\n if (!this.selected.hasValue()) {\n // TODO : rename hasDetails to isSelectable\n if (rootNode.hasDetails) {\n promises.push(rootNode.select());\n }\n }\n if (!this.expanded.hasValue()) {\n promises.push(rootNode.expand());\n }\n }\n return Promise.all(promises);\n }\n return Promise.resolve();\n }),\n switchMap(() =>\n merge(collectionViewer.viewChange, this._data$).pipe(\n map(() => this._data$.value)\n )\n )\n );\n }\n\n public toNode(\n item: Data,\n depth: number = 0,\n onExpand: ExpandNodeFunction<Data> = this.expandNode.bind(this),\n onCollapse: ExpandNodeFunction<Data> = this.collapseNode.bind(this),\n onSelect: ExpandNodeFunction<Data> = this.selectNode.bind(this),\n onDeselect: ExpandNodeFunction<Data> = this.deselectNode.bind(this)\n ): Node<Data> {\n return Node.ToNode(\n item,\n depth,\n onExpand,\n onCollapse,\n this.toDisplay,\n this.getIcon,\n onSelect,\n onDeselect,\n this.hasDetails\n );\n }\n\n public collapseNode(node: Node<Data>): Promise<void> {\n this.expanded.deselect(node.id);\n\n this.tree$.next(this.tree$.value);\n\n return Promise.resolve();\n }\n\n public flatTree(tree: Node<Data>): Array<Node<Data>> {\n function flat(acc: any[], list: any[]) {\n return [...acc, ...list];\n }\n\n const flatTree = (node: Node<Data>): Array<Node<Data>> => {\n if (!Array.isArray(node.children)) {\n console.log(node);\n throw new Error('Node has not defined children');\n }\n\n if (node.expanded || this.expanded.isSelected(node.id)) {\n return [\n node,\n ...node.children.map((child) => flatTree(child)).reduce(flat, []),\n ];\n } else {\n return [node];\n }\n };\n\n return flatTree(tree);\n }\n\n public destroy(): void {\n super.destroy();\n // TODO : add subscription handler to BaseDataSource\n if (this._expandedLocalStorageSubscription) {\n this._expandedLocalStorageSubscription.unsubscribe();\n }\n if (this._selectedLocalStorageSubscription) {\n this._selectedLocalStorageSubscription.unsubscribe();\n }\n }\n\n public getNodeById(id: string): Node<Data> | null {\n function getNodeById(node: Node<Data>, nodeId: string) {\n if (node.id === nodeId) {\n return node;\n }\n if (node.hasNode(nodeId)) {\n return node.getNode(nodeId);\n } else {\n return null;\n }\n }\n\n return (\n this.tree$.value\n .map((node) => getNodeById(node, id))\n .filter(Boolean)[0] || null\n );\n }\n\n private initSelected(): void {\n const key = joinPath('rxap/tree', this.id, 'selected');\n if (localStorage.getItem(key)) {\n try {\n this._preSelected = JSON.parse(localStorage.getItem(key)!);\n } catch (e) {\n console.debug('parse expanded tree data source nodes failed');\n }\n }\n\n this.selected = new SelectionModel<Node<Data>>(\n !!this.metadata.selectMultiple,\n []\n );\n this._selectedLocalStorageSubscription = this.selected.changed\n .pipe(\n tap(() =>\n localStorage.setItem(\n key,\n JSON.stringify(this.selected.selected.map((s) => s.id))\n )\n )\n )\n .subscribe();\n }\n\n public async refresh(): Promise<any> {\n const rootNodes = await this.getTreeRoot();\n\n // refresh all expanded nodes;\n\n const loadExpandedNodes = async (children: ReadonlyArray<Node<Data>>) => {\n for (const child of children) {\n if (this.expanded.isSelected(child.id)) {\n // call the node method to ensure that the expanded property of\n // Node is set.\n await child.expand();\n }\n\n if (child.hasChildren) {\n await loadExpandedNodes(child.children);\n }\n }\n };\n\n await Promise.all(\n rootNodes\n .filter((node) => node.hasChildren)\n .map((node) => loadExpandedNodes(node.children))\n );\n\n const selected: Array<Node<Data>> = this.selected.selected\n .map((node) => this.getNodeById(node.id))\n .filter(Boolean) as any;\n this.selected.clear();\n this.selected.select(...selected);\n }\n\n public reset(): any {\n this.selected.clear();\n this.expanded.clear();\n return this.getTreeRoot();\n }\n\n private initExpanded(): void {\n const key = joinPath('rxap/tree', this.id, 'expanded');\n let expanded = [];\n if (localStorage.getItem(key)) {\n try {\n expanded = JSON.parse(localStorage.getItem(key)!);\n } catch (e) {\n console.debug('parse expanded tree data source nodes failed');\n }\n }\n\n this.expanded = new SelectionModel<string>(\n this.metadata.expandMultiple !== false,\n expanded\n );\n this._expandedLocalStorageSubscription = this.expanded.changed\n .pipe(\n tap(() =>\n localStorage.setItem(key, JSON.stringify(this.expanded.selected))\n )\n )\n .subscribe();\n }\n}\n","import { Directive, TemplateRef, Inject } from '@angular/core';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: 'ng-template[rxapTreeContent]',\n})\nexport class TreeContentDirective {\n constructor(\n @Inject(TemplateRef)\n public readonly template: TemplateRef<any>\n ) {}\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_TREE_CONTENT_EDITABLE_METHOD = new InjectionToken('rxap/tree-content-editable-method');\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n ViewContainerRef,\n ElementRef,\n ViewChild,\n Renderer2,\n HostListener\n} from '@angular/core';\nimport {\n DebounceCall,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n map,\n startWith,\n tap\n} from 'rxjs/operators';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { RXAP_TREE_CONTENT_EDITABLE_METHOD } from './tokens';\nimport { TreeDataSource } from './tree.data-source';\nimport {\n Method,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction\n} from '@rxap/utilities/rxjs';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'rxap-tree',\n templateUrl: './tree.component.html',\n styleUrls: [ './tree.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeComponent<Data extends WithIdentifier & WithChildren = any>\n implements OnInit, AfterContentInit {\n public get nodeDisplayEditable(): boolean {\n return !!this.contentEditableMethod;\n }\n\n public treeControl: FlatTreeControl<Node<Data>>;\n @Input()\n @Required\n public dataSource!: TreeDataSource<Data>;\n @Input()\n public contentEditableMethod?: Method<any, string | null> | null;\n @Input()\n public toDisplay?: NodeToDisplayFunction<any>;\n\n @Input()\n public getIcon?: NodeGetIconFunction<any>;\n\n @Input()\n public hasDetails?: NodeHasDetailsFunction<any>;\n\n @ContentChild(TreeContentDirective, { static: true })\n public content?: TreeContentDirective;\n\n @Output()\n public details = new EventEmitter();\n\n public portal: TemplatePortal | null = null;\n public getLevel = (node: Node<Data>) => node.depth;\n public isExpandable = (node: Node<Data>) => node.hasChildren;\n public hasChild = (_: number, nodeData: Node<Data>) => nodeData.hasChildren;\n\n @ViewChild('treeContainer', { static: true })\n public treeContainer!: ElementRef;\n\n /**\n * Indicates that the divider is moved with mouse down\n * @private\n */\n private _moveDivider = false;\n\n /**\n * Holds the current tree container width.\n * If null the move divider feature was not yet used and the initial\n * container width is not calculated\n * @private\n */\n private _treeContainerWidth: number | null = null;\n\n constructor(\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n private readonly cdr: ChangeDetectorRef,\n @Optional()\n @Inject(RXAP_TREE_CONTENT_EDITABLE_METHOD)\n contentEditableMethod: Method<any, string | null> | null,\n private readonly renderer: Renderer2\n ) {\n this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);\n this.contentEditableMethod = contentEditableMethod;\n }\n\n public ngOnInit() {\n this.dataSource.setTreeControl(this.treeControl);\n this.dataSource.setToDisplay(this.toDisplay);\n this.dataSource.setGetIcon(this.getIcon);\n this.dataSource.setHasDetails(this.hasDetails);\n\n if (this.dataSource.selected.hasValue()) {\n this.dataSource.selected.selected.forEach((node) =>\n this.openDetails(node)\n );\n }\n }\n\n public ngAfterContentInit(): void {\n this.dataSource.selected.changed\n .pipe(\n map(($event) => $event.source.selected),\n startWith(this.dataSource.selected.selected),\n tap((selected) => selected.forEach((node) => this.openDetails(node)))\n )\n .subscribe();\n }\n\n @DebounceCall(100)\n public openDetails(node: Node<Data>): void {\n if (this.content) {\n this.portal = new TemplatePortal<any>(\n this.content.template,\n this.viewContainerRef,\n {\n $implicit: node.item,\n node,\n }\n );\n this.cdr.markForCheck();\n }\n this.details.emit(node.item);\n }\n\n public onContentEditableChange(value: string | null, node: Node<Data>) {\n return this.contentEditableMethod?.call(value, node.item, node);\n }\n\n\n onMousedown() {\n this._moveDivider = true;\n }\n\n @HostListener('mouseup')\n onMouseup() {\n this._moveDivider = false;\n }\n\n @HostListener('mousemove', [ '$event' ])\n onMousemove($event: MouseEvent) {\n if (this._moveDivider) {\n if (!this._treeContainerWidth) {\n this._treeContainerWidth = this.treeContainer.nativeElement.clientWidth as number;\n }\n this._treeContainerWidth = $event.clientX - 75;\n const width = this._treeContainerWidth + 'px';\n this.renderer.setStyle(this.treeContainer.nativeElement, 'max-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'min-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'flex-basis', width);\n }\n }\n}\n","<div fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n","import { NgModule } from '@angular/core';\nimport { TreeComponent } from './tree.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatTreeModule } from '@angular/material/tree';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { ContenteditableDirectiveModule } from '@rxap/contenteditable';\nimport { IconDirectiveModule } from '@rxap/material-directives/icon';\n\n@NgModule({\n imports: [\n CommonModule,\n MatTreeModule,\n MatButtonModule,\n MatIconModule,\n FlexLayoutModule,\n MatDividerModule,\n MatProgressSpinnerModule,\n PortalModule,\n ContenteditableDirectiveModule,\n IconDirectiveModule\n ],\n declarations: [ TreeComponent, TreeContentDirective ],\n exports: [ TreeComponent, TreeContentDirective ],\n entryComponents: [ TreeComponent ]\n})\nexport class TreeComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA2CgB,iBAAiB,CAAI,GAAQ;IAC3C,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAC/E,CAAC;MAOY,wCAAwC,GAAG,IAAI,cAAc,CACxE,0CAA0C,EAC1C;MACW,4CAA4C,GAAG,IAAI,cAAc,CAC5E,8CAA8C,EAC9C;MAGW,cAEX,SAAQ,cAAiC;IAqBzC,YAEkB,gBAA6C,EAE7C,oBAAgD,EAE9D,WAA0C,IAAI;QAEhD,KAAK,CAAC,QAAQ,CAAC,CAAC;QANA,qBAAgB,GAAhB,gBAAgB,CAA6B;QAE7C,yBAAoB,GAApB,oBAAoB,CAA4B;QAxB3D,UAAK,GAAG,IAAI,eAA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AC;oBACR,OAAO,EAAU;wBACf,YAAY;wBACZ,aAAa;wBACb,eAAe;wBACf,aAAa;wBACb,gBAAgB;wBAChB,gBAAgB;wBAChB,wBAAwB;wBACxB,YAAY;wBACZ,8BAA8B;wBAC9B,mBAAmB;qBACpB;oBACD,YAAY,EAAK,CAAE,aAAa,EAAE,oBAAoB,CAAE;oBACxD,OAAO,EAAU,CAAE,aAAa,EAAE,oBAAoB,CAAE;oBACxD,eAAe,EAAE,CAAE,aAAa,CAAE;iBACnC;;;AC9BD;;;;;;"}
1
+ {"version":3,"file":"rxap-tree.js","sources":["../../../../libs/tree/src/lib/tree.data-source.ts","../../../../libs/tree/src/lib/tree-content.directive.ts","../../../../libs/tree/src/lib/tokens.ts","../../../../libs/tree/src/lib/tree.component.ts","../../../../libs/tree/src/lib/tree.component.html","../../../../libs/tree/src/lib/tree.component.module.ts","../../../../libs/tree/src/rxap-tree.ts"],"sourcesContent":["import {\n BehaviorSubject,\n from,\n merge,\n Observable,\n Subscription\n} from 'rxjs';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n SelectionChange,\n SelectionModel\n} from '@angular/cdk/collections';\nimport {\n map,\n switchMap,\n tap\n} from 'rxjs/operators';\nimport {\n BaseDataSource,\n BaseDataSourceMetadata,\n BaseDataSourceViewer,\n RXAP_DATA_SOURCE_METADATA\n} from '@rxap/data-source';\nimport {\n joinPath,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport {\n Inject,\n Injectable,\n InjectionToken\n} from '@angular/core';\nimport {\n ExpandNodeFunction,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction,\n Method\n} from '@rxap/utilities/rxjs';\n\nexport function isSelectionChange<T>(obj: any): obj is SelectionChange<T> {\n return !!obj && obj.hasOwnProperty('added') && obj.hasOwnProperty('removed');\n}\n\nexport interface TreeDataSourceMetadata extends BaseDataSourceMetadata {\n selectMultiple?: boolean;\n expandMultiple?: boolean;\n}\n\nexport const RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD = new InjectionToken(\n 'rxap/tree/data-source/root-remote-method'\n);\nexport const RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD = new InjectionToken(\n 'rxap/tree/data-source/children-remote-method'\n);\n\n@Injectable()\nexport class TreeDataSource<\n Data extends WithIdentifier & WithChildren = any\n> extends BaseDataSource<Array<Node<Data>>> {\n public tree$ = new BehaviorSubject<Array<Node<Data>>>([]);\n @Required public treeControl!: FlatTreeControl<Node<Data>>;\n public selected!: SelectionModel<Node<Data>>;\n public expanded!: SelectionModel<string>;\n\n private _expandedLocalStorageSubscription: Subscription | null = null;\n private _selectedLocalStorageSubscription: Subscription | null = null;\n\n // TODO : änlich problem wie bei der redundaten expand SelectionModel.\n // im localStorage wird nur die id gespeichert.\n private _preSelected: string[] = [];\n\n protected _data$ = new BehaviorSubject<Array<Node<Data>>>([]);\n public metadata!: TreeDataSourceMetadata;\n\n public toDisplay: NodeToDisplayFunction<Data> = () =>\n 'to display function not defined';\n public getIcon: NodeGetIconFunction<Data> = () => null;\n public hasDetails: NodeHasDetailsFunction<Data> = () => true;\n\n constructor(\n @Inject(RXAP_TREE_DATA_SOURCE_ROOT_REMOTE_METHOD)\n public readonly rootRemoteMethod: Method<Data | Data[], void>,\n @Inject(RXAP_TREE_DATA_SOURCE_CHILDREN_REMOTE_METHOD)\n public readonly childrenRemoteMethod: Method<Data[], Node<Data>>,\n @Inject(RXAP_DATA_SOURCE_METADATA)\n metadata: TreeDataSourceMetadata | null = null\n ) {\n super(metadata);\n this.tree$\n .pipe(\n map((tree) =>\n tree\n .map((child) => this.flatTree(child))\n .reduce((acc, nodes) => [...acc, ...nodes], [])\n )\n )\n .subscribe(this._data$);\n\n // TODO add new SelectModel class that saves the select model to the localStorage\n this.initSelected();\n this.initExpanded();\n }\n\n public async getTreeRoot(): Promise<Array<Node<Data>>> {\n const root: Data | Data[] = await this.getRoot();\n\n let rootNodes: Array<Node<Data>>;\n\n if (Array.isArray(root)) {\n rootNodes = root.map((node) => this._toNode(node));\n } else {\n rootNodes = [this._toNode(root)];\n }\n\n this.tree$.next(rootNodes);\n\n return rootNodes;\n }\n\n public selectNode(node: Node<Data>): Promise<void> {\n if (!this.selected.isMultipleSelection()) {\n if (this.selected.hasValue()) {\n const currentSelectedNode = this.selected.selected[0];\n currentSelectedNode.deselect();\n }\n }\n this.selected.select(node);\n return Promise.resolve();\n }\n\n public setTreeControl(treeControl: FlatTreeControl<Node<Data>>): void {\n this.treeControl = treeControl;\n }\n\n public setToDisplay(\n toDisplay: NodeToDisplayFunction<Data> = this.toDisplay\n ): void {\n this.toDisplay = toDisplay;\n }\n\n public setGetIcon(getIcon: NodeGetIconFunction<Data> = this.getIcon): void {\n this.getIcon = getIcon;\n }\n\n public setHasDetails(\n hasDetails: NodeHasDetailsFunction<Data> = this.hasDetails\n ): void {\n this.hasDetails = hasDetails;\n }\n\n public deselectNode(node: Node<Data>): Promise<void> {\n this.selected.deselect(node);\n return Promise.resolve();\n }\n\n // - the SelectModel that stores the selection into the local storage?\n public _toNode(\n item: Data,\n depth: number = 0,\n onExpand: ExpandNodeFunction<Data> = this.expandNode.bind(this),\n onCollapse: ExpandNodeFunction<Data> = this.collapseNode.bind(this),\n onSelect: ExpandNodeFunction<Data> = this.selectNode.bind(this),\n onDeselect: ExpandNodeFunction<Data> = this.deselectNode.bind(this)\n ): Node<Data> {\n const node = this.toNode(\n item,\n depth,\n onExpand,\n onCollapse,\n onSelect,\n onDeselect\n );\n\n if (this.expanded.isSelected(node.id)) {\n node\n .expand()\n .then(() => {\n // TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel\n // das problem ist das ich beim speicher in localStorage nur die id speicher.\n // Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel\n // nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird\n // möglich lösungen:\n // - das node object läde die entity mithilfe der id automatisch nach\n this.treeControl.expansionModel.select(node);\n console.debug(`Restore expand for node '${node.id}' SUCCESSFULLY`);\n })\n .catch(() =>\n console.debug(`Restore expand for node '${node.id}' FAILED`)\n );\n }\n\n if (this._preSelected.includes(node.id)) {\n node\n .select()\n .then(() =>\n console.debug(`Restore select for node '${node.id}' SUCCESSFULLY`)\n )\n .catch(() =>\n console.debug(`Restore select for node '${node.id}' FAILED`)\n );\n }\n\n return node;\n }\n\n public async expandNode(node: Node<Data>): Promise<void> {\n if (node.item.hasChildren && !node.item.children?.length) {\n node.isLoading$.enable();\n\n const children = await this.getChildren(node);\n\n // add the loaded children to the item object\n node.item.children = children;\n\n node.addChildren(\n children.map((child) =>\n this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse)\n )\n );\n\n node.isLoading$.disable();\n }\n\n this.expanded.select(node.id);\n\n this.tree$.next(this.tree$.value);\n }\n\n public async getChildren(node: Node<Data>): Promise<Data[]> {\n return this.childrenRemoteMethod.call(node);\n }\n\n public async getRoot(): Promise<Data | Data[]> {\n return this.rootRemoteMethod.call();\n }\n\n // TODO : find better solution to allow the overwrite of the toNode method\n // without losing the custom preselect and preexpand function\n\n protected _connect(\n collectionViewer: Required<BaseDataSourceViewer>\n ): Observable<Array<Node<Data>>> {\n this.treeControl.expansionModel.changed.subscribe((change: any) => {\n if (isSelectionChange<Node<Data>>(change)) {\n if (change.added) {\n change.added.forEach((node) => node.expand());\n }\n if (change.removed) {\n change.removed\n .slice()\n .reverse()\n .forEach((node) => node.collapse());\n }\n }\n });\n\n let loadRoot: Promise<Array<Node<Data>> | void> = Promise.resolve();\n\n if (this.tree$.value.length === 0) {\n loadRoot = this.getTreeRoot();\n }\n\n return from(loadRoot).pipe(\n tap((rootNodes) => {\n if (rootNodes) {\n const promises: Promise<any>[] = [];\n if (this.metadata.selectMultiple) {\n if (!this.selected.hasValue()) {\n promises.push(\n ...rootNodes\n .filter((node) => node.hasDetails)\n .map((node) => node.select())\n );\n }\n if (!this.expanded.hasValue()) {\n promises.push(\n ...rootNodes\n .filter((node) => node.hasChildren)\n .map((node) => node.expand())\n );\n }\n } else if (rootNodes.length) {\n const rootNode = rootNodes[0];\n if (!this.selected.hasValue()) {\n // TODO : rename hasDetails to isSelectable\n if (rootNode.hasDetails) {\n promises.push(rootNode.select());\n }\n }\n if (!this.expanded.hasValue()) {\n promises.push(rootNode.expand());\n }\n }\n return Promise.all(promises);\n }\n return Promise.resolve();\n }),\n switchMap(() =>\n merge(collectionViewer.viewChange, this._data$).pipe(\n map(() => this._data$.value)\n )\n )\n );\n }\n\n public toNode(\n item: Data,\n depth: number = 0,\n onExpand: ExpandNodeFunction<Data> = this.expandNode.bind(this),\n onCollapse: ExpandNodeFunction<Data> = this.collapseNode.bind(this),\n onSelect: ExpandNodeFunction<Data> = this.selectNode.bind(this),\n onDeselect: ExpandNodeFunction<Data> = this.deselectNode.bind(this)\n ): Node<Data> {\n return Node.ToNode(\n item,\n depth,\n onExpand,\n onCollapse,\n this.toDisplay,\n this.getIcon,\n onSelect,\n onDeselect,\n this.hasDetails\n );\n }\n\n public collapseNode(node: Node<Data>): Promise<void> {\n this.expanded.deselect(node.id);\n\n this.tree$.next(this.tree$.value);\n\n return Promise.resolve();\n }\n\n public flatTree(tree: Node<Data>): Array<Node<Data>> {\n function flat(acc: any[], list: any[]) {\n return [...acc, ...list];\n }\n\n const flatTree = (node: Node<Data>): Array<Node<Data>> => {\n if (!Array.isArray(node.children)) {\n console.log(node);\n throw new Error('Node has not defined children');\n }\n\n if (node.expanded || this.expanded.isSelected(node.id)) {\n return [\n node,\n ...node.children.map((child) => flatTree(child)).reduce(flat, []),\n ];\n } else {\n return [node];\n }\n };\n\n return flatTree(tree);\n }\n\n public destroy(): void {\n super.destroy();\n // TODO : add subscription handler to BaseDataSource\n if (this._expandedLocalStorageSubscription) {\n this._expandedLocalStorageSubscription.unsubscribe();\n }\n if (this._selectedLocalStorageSubscription) {\n this._selectedLocalStorageSubscription.unsubscribe();\n }\n }\n\n public getNodeById(id: string): Node<Data> | null {\n function getNodeById(node: Node<Data>, nodeId: string) {\n if (node.id === nodeId) {\n return node;\n }\n if (node.hasNode(nodeId)) {\n return node.getNode(nodeId);\n } else {\n return null;\n }\n }\n\n return (\n this.tree$.value\n .map((node) => getNodeById(node, id))\n .filter(Boolean)[0] || null\n );\n }\n\n private initSelected(): void {\n const key = joinPath('rxap/tree', this.id, 'selected');\n if (localStorage.getItem(key)) {\n try {\n this._preSelected = JSON.parse(localStorage.getItem(key)!);\n } catch (e) {\n console.debug('parse expanded tree data source nodes failed');\n }\n }\n\n this.selected = new SelectionModel<Node<Data>>(\n !!this.metadata.selectMultiple,\n []\n );\n this._selectedLocalStorageSubscription = this.selected.changed\n .pipe(\n tap(() =>\n localStorage.setItem(\n key,\n JSON.stringify(this.selected.selected.map((s) => s.id))\n )\n )\n )\n .subscribe();\n }\n\n public async refresh(): Promise<any> {\n const rootNodes = await this.getTreeRoot();\n\n // refresh all expanded nodes;\n\n const loadExpandedNodes = async (children: ReadonlyArray<Node<Data>>) => {\n for (const child of children) {\n if (this.expanded.isSelected(child.id)) {\n // call the node method to ensure that the expanded property of\n // Node is set.\n await child.expand();\n }\n\n if (child.hasChildren) {\n await loadExpandedNodes(child.children);\n }\n }\n };\n\n await Promise.all(\n rootNodes\n .filter((node) => node.hasChildren)\n .map((node) => loadExpandedNodes(node.children))\n );\n\n const selected: Array<Node<Data>> = this.selected.selected\n .map((node) => this.getNodeById(node.id))\n .filter(Boolean) as any;\n this.selected.clear();\n this.selected.select(...selected);\n }\n\n public reset(): any {\n this.selected.clear();\n this.expanded.clear();\n return this.getTreeRoot();\n }\n\n private initExpanded(): void {\n const key = joinPath('rxap/tree', this.id, 'expanded');\n let expanded = [];\n if (localStorage.getItem(key)) {\n try {\n expanded = JSON.parse(localStorage.getItem(key)!);\n } catch (e) {\n console.debug('parse expanded tree data source nodes failed');\n }\n }\n\n this.expanded = new SelectionModel<string>(\n this.metadata.expandMultiple !== false,\n expanded\n );\n this._expandedLocalStorageSubscription = this.expanded.changed\n .pipe(\n tap(() =>\n localStorage.setItem(key, JSON.stringify(this.expanded.selected))\n )\n )\n .subscribe();\n }\n}\n","import { Directive, TemplateRef, Inject } from '@angular/core';\n\n@Directive({\n // tslint:disable-next-line:directive-selector\n selector: 'ng-template[rxapTreeContent]',\n})\nexport class TreeContentDirective {\n constructor(\n @Inject(TemplateRef)\n public readonly template: TemplateRef<any>\n ) {}\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const RXAP_TREE_CONTENT_EDITABLE_METHOD = new InjectionToken('rxap/tree-content-editable-method');\n","import {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n ViewContainerRef,\n ElementRef,\n ViewChild,\n Renderer2,\n HostListener\n} from '@angular/core';\nimport {\n DebounceCall,\n Required,\n WithChildren,\n WithIdentifier\n} from '@rxap/utilities';\nimport { FlatTreeControl } from '@angular/cdk/tree';\nimport {\n map,\n startWith,\n tap\n} from 'rxjs/operators';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { RXAP_TREE_CONTENT_EDITABLE_METHOD } from './tokens';\nimport { TreeDataSource } from './tree.data-source';\nimport {\n Method,\n Node,\n NodeGetIconFunction,\n NodeHasDetailsFunction,\n NodeToDisplayFunction\n} from '@rxap/utilities/rxjs';\n\n@Component({\n // tslint:disable-next-line:component-selector\n selector: 'rxap-tree',\n templateUrl: './tree.component.html',\n styleUrls: [ './tree.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TreeComponent<Data extends WithIdentifier & WithChildren = any>\n implements OnInit, AfterContentInit {\n public get nodeDisplayEditable(): boolean {\n return !!this.contentEditableMethod;\n }\n\n public treeControl: FlatTreeControl<Node<Data>>;\n @Input()\n @Required\n public dataSource!: TreeDataSource<Data>;\n @Input()\n public contentEditableMethod?: Method<any, string | null> | null;\n @Input()\n public toDisplay?: NodeToDisplayFunction<any>;\n\n @Input()\n public getIcon?: NodeGetIconFunction<any>;\n\n @Input()\n public hasDetails?: NodeHasDetailsFunction<any>;\n\n @ContentChild(TreeContentDirective, { static: true })\n public content?: TreeContentDirective;\n\n @Input()\n public hideLeafIcon: boolean = false;\n\n @Output()\n public details = new EventEmitter();\n\n public portal: TemplatePortal | null = null;\n public getLevel = (node: Node<Data>) => node.depth;\n public isExpandable = (node: Node<Data>) => node.hasChildren;\n public hasChild = (_: number, nodeData: Node<Data>) => nodeData.hasChildren;\n\n @ViewChild('treeContainer', { static: true })\n public treeContainer!: ElementRef;\n\n /**\n * Indicates that the divider is moved with mouse down\n * @private\n */\n private _moveDivider = false;\n\n /**\n * Holds the current tree container width.\n * If null the move divider feature was not yet used and the initial\n * container width is not calculated\n * @private\n */\n private _treeContainerWidth: number | null = null;\n\n constructor(\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef,\n @Inject(ChangeDetectorRef)\n private readonly cdr: ChangeDetectorRef,\n @Optional()\n @Inject(RXAP_TREE_CONTENT_EDITABLE_METHOD)\n contentEditableMethod: Method<any, string | null> | null,\n private readonly renderer: Renderer2\n ) {\n this.treeControl = new FlatTreeControl(this.getLevel, this.isExpandable);\n this.contentEditableMethod = contentEditableMethod;\n }\n\n public ngOnInit() {\n this.dataSource.setTreeControl(this.treeControl);\n this.dataSource.setToDisplay(this.toDisplay);\n this.dataSource.setGetIcon(this.getIcon);\n this.dataSource.setHasDetails(this.hasDetails);\n\n if (this.dataSource.selected.hasValue()) {\n this.dataSource.selected.selected.forEach((node) =>\n this.openDetails(node)\n );\n }\n }\n\n public ngAfterContentInit(): void {\n this.dataSource.selected.changed\n .pipe(\n map(($event) => $event.source.selected),\n startWith(this.dataSource.selected.selected),\n tap((selected) => selected.forEach((node) => this.openDetails(node)))\n )\n .subscribe();\n }\n\n @DebounceCall(100)\n public openDetails(node: Node<Data>): void {\n if (this.content) {\n this.portal = new TemplatePortal<any>(\n this.content.template,\n this.viewContainerRef,\n {\n $implicit: node.item,\n node,\n }\n );\n this.cdr.markForCheck();\n }\n this.details.emit(node.item);\n }\n\n public onContentEditableChange(value: string | null, node: Node<Data>) {\n return this.contentEditableMethod?.call(value, node.item, node);\n }\n\n\n onMousedown() {\n this._moveDivider = true;\n }\n\n @HostListener('mouseup')\n onMouseup() {\n this._moveDivider = false;\n }\n\n @HostListener('mousemove', [ '$event' ])\n onMousemove($event: MouseEvent) {\n if (this._moveDivider) {\n if (!this._treeContainerWidth) {\n this._treeContainerWidth = this.treeContainer.nativeElement.clientWidth as number;\n }\n this._treeContainerWidth = $event.clientX - 75;\n const width = this._treeContainerWidth + 'px';\n this.renderer.setStyle(this.treeContainer.nativeElement, 'max-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'min-width', width);\n this.renderer.setStyle(this.treeContainer.nativeElement, 'flex-basis', width);\n }\n }\n}\n","<div class=\"container\" fxLayout=\"row\">\n <div #treeContainer class=\"tree-container\" fxFlex=\"nogrow\">\n <mat-tree *ngIf=\"dataSource; else loading\" [dataSource]=\"dataSource\" [treeControl]=\"treeControl\" class=\"tree-view\">\n\n <!-- Node without children -->\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon [fxHide]=\"hideLeafIcon\" fxFlex=\"40px\">subdirectory_arrow_right</mat-icon>\n <mat-icon *ngIf=\"node.icon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n [disabled]=\"!node.hasDetails\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </div>\n </mat-tree-node>\n\n <!-- Node with children -->\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\n <button [attr.aria-label]=\"'toggle ' + node.filename\" mat-icon-button matTreeNodeToggle>\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <mat-icon *ngIf=\"node.icon; else withoutIcon\" [rxapIcon]=\"node.icon\" fxFlex=\"40px\"></mat-icon>\n <ng-template #withoutIcon>\n <div fxFlex=\"0\"></div>\n </ng-template>\n <ng-template [ngIfElse]=\"withoutDetails\" [ngIf]=\"node.hasDetails\">\n <button\n (click)=\"node.select()\"\n [color]=\"node.selected ? 'primary' : null\"\n fxFlex=\"nogrow\"\n mat-button\n >\n {{ node.display }}\n </button>\n </ng-template>\n <ng-template #withoutDetails>\n <span\n (change)=\"onContentEditableChange($event, node)\"\n [disabled]=\"!nodeDisplayEditable\"\n fxFlex=\"nogrow\"\n rxapContenteditable>\n {{ node.display }}\n </span>\n </ng-template>\n <mat-progress-spinner\n *ngIf=\"node.isLoading$ | async\"\n [diameter]=\"16\"\n fxFlex=\"nogrow\"\n fxFlexOffset=\"16px\"\n mode=\"indeterminate\"\n ></mat-progress-spinner>\n </div>\n </mat-tree-node>\n\n </mat-tree>\n </div>\n\n <div (mousedown)=\"onMousedown()\"\n class=\"divider\"\n fxFlex=\"nogrow\">\n <mat-divider\n [vertical]=\"true\"\n >\n </mat-divider>\n </div>\n\n <div class=\"details\" fxFlex=\"grow\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n <ng-content></ng-content>\n </div>\n</div>\n\n<ng-template #loading>Load data source</ng-template>\n","import { NgModule } from '@angular/core';\nimport { TreeComponent } from './tree.component';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatTreeModule } from '@angular/material/tree';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { TreeContentDirective } from './tree-content.directive';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { ContenteditableDirectiveModule } from '@rxap/contenteditable';\nimport { IconDirectiveModule } from '@rxap/material-directives/icon';\n\n@NgModule({\n imports: [\n CommonModule,\n MatTreeModule,\n MatButtonModule,\n MatIconModule,\n FlexLayoutModule,\n MatDividerModule,\n MatProgressSpinnerModule,\n PortalModule,\n ContenteditableDirectiveModule,\n IconDirectiveModule\n ],\n declarations: [ TreeComponent, TreeContentDirective ],\n exports: [ TreeComponent, TreeContentDirective ],\n entryComponents: [ TreeComponent ]\n})\nexport class TreeComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA2CgB,iBAAiB,CAAI,GAAQ;IAC3C,OAAO,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;AAC/E,CAAC;MAOY,wCAAwC,GAAG,IAAI,cAAc,CACxE,0CAA0C,EAC1C;MACW,4CAA4C,GAAG,IAAI,cAAc,CAC5E,8CAA8C,EAC9C;MAGW,cAEX,SAAQ,cAAiC;IAqBzC,YAEkB,gBAA6C,EAE7C,oBAAgD,EAE9D,WAA0C,IAAI;QAEhD,KAAK,CAAC,QAAQ,CAAC,CAAC;QANA,qBAAgB,GAAhB,gBAAgB,CAA6B;QAE7C,yBAAoB,GAApB,oBAAoB,CAA4B;QAxB3D,UAAK,GAAG,IAAI,eAAe,CAAoB,EAAE,CAAC,CAAC;QAKlD,sCAAiC,GAAwB,IAAI,CAAC;QAC9D,sCAAiC,GAAwB,IAAI,CAAC;;;QAI9D,iBAAY,GAAa,EAAE,CAAC;QAE1B,WAAM,GAAG,IAAI,eAAe,CAAoB,EAAE,CAAC,CAAC;QAGvD,cAAS,GAAgC,MAC9C,iCAAiC,CAAC;QAC7B,YAAO,GAA8B,MAAM,IAAI,CAAC;QAChD,eAAU,GAAiC,MAA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O,EAAU,CAAE,aAAa,EAAE,oBAAoB,CAAE;oBACxD,eAAe,EAAE,CAAE,aAAa,CAAE;iBACnC;;;AC9BD;;;;;;"}
@@ -18,6 +18,7 @@ export declare class TreeComponent<Data extends WithIdentifier & WithChildren =
18
18
  getIcon?: NodeGetIconFunction<any>;
19
19
  hasDetails?: NodeHasDetailsFunction<any>;
20
20
  content?: TreeContentDirective;
21
+ hideLeafIcon: boolean;
21
22
  details: EventEmitter<any>;
22
23
  portal: TemplatePortal | null;
23
24
  getLevel: (node: Node<Data>) => number;
@@ -45,5 +46,5 @@ export declare class TreeComponent<Data extends WithIdentifier & WithChildren =
45
46
  onMouseup(): void;
46
47
  onMousemove($event: MouseEvent): void;
47
48
  static ɵfac: i0.ɵɵFactoryDeclaration<TreeComponent<any>, [null, null, { optional: true; }, null]>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent<any>, "rxap-tree", never, { "dataSource": "dataSource"; "contentEditableMethod": "contentEditableMethod"; "toDisplay": "toDisplay"; "getIcon": "getIcon"; "hasDetails": "hasDetails"; }, { "details": "details"; }, ["content"], ["*"]>;
49
+ static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent<any>, "rxap-tree", never, { "dataSource": "dataSource"; "contentEditableMethod": "contentEditableMethod"; "toDisplay": "toDisplay"; "getIcon": "getIcon"; "hasDetails": "hasDetails"; "hideLeafIcon": "hideLeafIcon"; }, { "details": "details"; }, ["content"], ["*"]>;
49
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rxap/tree",
3
- "version": "12.1.1-next.0",
3
+ "version": "12.2.0",
4
4
  "author": "Merzough Münker",
5
5
  "homepage": "https://gitlab.com/rxap/packages/libs/tree",
6
6
  "repository": "git@gitlab.com:rxap/packages.git",
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "description": "A collection of components, data-sources and remote methods the simplify the usage of tree like components",
20
20
  "peerDependencies": {
21
+ "@angular-devkit/schematics": "^12.2.9",
21
22
  "@angular/cdk": "^12.0.1",
22
23
  "@angular/common": "^12.0.1",
23
24
  "@angular/core": "^12.0.1",
@@ -26,13 +27,13 @@
26
27
  "@angular/material": "^12.0.1",
27
28
  "@angular/platform-browser": "^12.0.1",
28
29
  "@angular/router": "^12.0.1",
29
- "@rxap/config": "^12.1.0",
30
- "@rxap/contenteditable": "^12.0.7-next.0",
31
- "@rxap/data-source": "^12.0.9-next.0",
32
- "@rxap/definition": "^12.0.8-next.0",
33
- "@rxap/material-directives": "^12.0.6",
34
- "@rxap/services": "^12.0.7-next.0",
35
- "@rxap/utilities": "^12.2.0-next.0",
30
+ "@rxap/config": "^12.3.0",
31
+ "@rxap/contenteditable": "^12.0.7",
32
+ "@rxap/data-source": "^12.1.3",
33
+ "@rxap/definition": "^12.0.8",
34
+ "@rxap/material-directives": "^12.0.7",
35
+ "@rxap/services": "^12.0.8",
36
+ "@rxap/utilities": "^12.2.2",
36
37
  "reflect-metadata": "^0.1.13",
37
38
  "rxjs": "^6.5.5",
38
39
  "uuid": "^8.3.2"
@@ -60,9 +61,9 @@
60
61
  "save": "dependencies"
61
62
  },
62
63
  "dependencies": {
63
- "@rxap/schematics-utilities": "^12.4.0",
64
+ "@rxap/schematics-utilities": "^12.7.0",
64
65
  "tslib": "^2.2.0",
65
- "@rxap/schematics-ts-morph": "^12.2.0"
66
+ "@rxap/schematics-ts-morph": "^12.3.2"
66
67
  },
67
68
  "main": "bundles/rxap-tree.umd.js",
68
69
  "module": "fesm2015/rxap-tree.js",