@rxap/tree 12.1.1 → 12.2.1

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.
@@ -389,12 +390,16 @@
389
390
  case 0: return [4 /*yield*/, this.getRoot()];
390
391
  case 1:
391
392
  root = _b.sent();
392
- if (Array.isArray(root)) {
393
- rootNodes = root.map(function (node) { return _this._toNode(node); });
394
- }
395
- else {
396
- rootNodes = [this._toNode(root)];
397
- }
393
+ if (!Array.isArray(root)) return [3 /*break*/, 3];
394
+ return [4 /*yield*/, Promise.all(root.map(function (node) { return _this._toNode(node); }))];
395
+ case 2:
396
+ rootNodes = _b.sent();
397
+ return [3 /*break*/, 5];
398
+ case 3: return [4 /*yield*/, this._toNode(root)];
399
+ case 4:
400
+ rootNodes = [_b.sent()];
401
+ _b.label = 5;
402
+ case 5:
398
403
  this.tree$.next(rootNodes);
399
404
  return [2 /*return*/, rootNodes];
400
405
  }
@@ -432,55 +437,72 @@
432
437
  };
433
438
  // - the SelectModel that stores the selection into the local storage?
434
439
  TreeDataSource.prototype._toNode = function (item, depth, onExpand, onCollapse, onSelect, onDeselect) {
435
- var _this = this;
436
440
  if (depth === void 0) { depth = 0; }
437
441
  if (onExpand === void 0) { onExpand = this.expandNode.bind(this); }
438
442
  if (onCollapse === void 0) { onCollapse = this.collapseNode.bind(this); }
439
443
  if (onSelect === void 0) { onSelect = this.selectNode.bind(this); }
440
444
  if (onDeselect === void 0) { onDeselect = this.deselectNode.bind(this); }
441
- var node = this.toNode(item, depth, onExpand, onCollapse, onSelect, onDeselect);
442
- if (this.expanded.isSelected(node.id)) {
443
- node
444
- .expand()
445
- .then(function () {
446
- // TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel
447
- // das problem ist das ich beim speicher in localStorage nur die id speicher.
448
- // Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel
449
- // nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird
450
- // möglich lösungen:
451
- // - das node object läde die entity mithilfe der id automatisch nach
452
- _this.treeControl.expansionModel.select(node);
453
- console.debug("Restore expand for node '" + node.id + "' SUCCESSFULLY");
454
- })
455
- .catch(function () { return console.debug("Restore expand for node '" + node.id + "' FAILED"); });
456
- }
457
- if (this._preSelected.includes(node.id)) {
458
- node
459
- .select()
460
- .then(function () { return console.debug("Restore select for node '" + node.id + "' SUCCESSFULLY"); })
461
- .catch(function () { return console.debug("Restore select for node '" + node.id + "' FAILED"); });
462
- }
463
- return node;
445
+ return __awaiter(this, void 0, void 0, function () {
446
+ var node;
447
+ var _this = this;
448
+ return __generator(this, function (_b) {
449
+ switch (_b.label) {
450
+ case 0: return [4 /*yield*/, this.toNode(item, depth, onExpand, onCollapse, onSelect, onDeselect)];
451
+ case 1:
452
+ node = _b.sent();
453
+ if (!this.expanded.isSelected(node.id)) return [3 /*break*/, 3];
454
+ return [4 /*yield*/, node
455
+ .expand()
456
+ .then(function () {
457
+ // TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel
458
+ // das problem ist das ich beim speicher in localStorage nur die id speicher.
459
+ // Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel
460
+ // nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird
461
+ // möglich lösungen:
462
+ // - das node object läde die entity mithilfe der id automatisch nach
463
+ _this.treeControl.expansionModel.select(node);
464
+ console.debug("Restore expand for node '" + node.id + "' SUCCESSFULLY");
465
+ })
466
+ .catch(function () { return console.debug("Restore expand for node '" + node.id + "' FAILED"); })];
467
+ case 2:
468
+ _b.sent();
469
+ _b.label = 3;
470
+ case 3:
471
+ if (!this._preSelected.includes(node.id)) return [3 /*break*/, 5];
472
+ return [4 /*yield*/, node
473
+ .select()
474
+ .then(function () { return console.debug("Restore select for node '" + node.id + "' SUCCESSFULLY"); })
475
+ .catch(function () { return console.debug("Restore select for node '" + node.id + "' FAILED"); })];
476
+ case 4:
477
+ _b.sent();
478
+ _b.label = 5;
479
+ case 5: return [2 /*return*/, node];
480
+ }
481
+ });
482
+ });
464
483
  };
465
484
  TreeDataSource.prototype.expandNode = function (node) {
466
485
  var _a;
467
486
  return __awaiter(this, void 0, void 0, function () {
468
- var children;
487
+ var children, _b, _c;
469
488
  var _this = this;
470
- return __generator(this, function (_b) {
471
- switch (_b.label) {
489
+ return __generator(this, function (_d) {
490
+ switch (_d.label) {
472
491
  case 0:
473
- if (!(node.item.hasChildren && !((_a = node.item.children) === null || _a === void 0 ? void 0 : _a.length))) return [3 /*break*/, 2];
492
+ if (!(node.item.hasChildren && !((_a = node.item.children) === null || _a === void 0 ? void 0 : _a.length))) return [3 /*break*/, 3];
474
493
  node.isLoading$.enable();
475
494
  return [4 /*yield*/, this.getChildren(node)];
476
495
  case 1:
477
- children = _b.sent();
496
+ children = _d.sent();
478
497
  // add the loaded children to the item object
479
498
  node.item.children = children;
480
- node.addChildren(children.map(function (child) { return _this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse); }));
481
- node.isLoading$.disable();
482
- _b.label = 2;
499
+ _c = (_b = node).addChildren;
500
+ return [4 /*yield*/, Promise.all(children.map(function (child) { return _this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse); }))];
483
501
  case 2:
502
+ _c.apply(_b, [_d.sent()]);
503
+ node.isLoading$.disable();
504
+ _d.label = 3;
505
+ case 3:
484
506
  this.expanded.select(node.id);
485
507
  this.tree$.next(this.tree$.value);
486
508
  return [2 /*return*/];
@@ -496,9 +518,22 @@
496
518
  });
497
519
  };
498
520
  TreeDataSource.prototype.getRoot = function () {
521
+ return __awaiter(this, void 0, void 0, function () {
522
+ var rootParameters;
523
+ return __generator(this, function (_b) {
524
+ switch (_b.label) {
525
+ case 0: return [4 /*yield*/, this.getRootParameters()];
526
+ case 1:
527
+ rootParameters = _b.sent();
528
+ return [2 /*return*/, this.rootRemoteMethod.call(rootParameters)];
529
+ }
530
+ });
531
+ });
532
+ };
533
+ TreeDataSource.prototype.getRootParameters = function () {
499
534
  return __awaiter(this, void 0, void 0, function () {
500
535
  return __generator(this, function (_b) {
501
- return [2 /*return*/, this.rootRemoteMethod.call()];
536
+ return [2 /*return*/, undefined];
502
537
  });
503
538
  });
504
539
  };
@@ -561,7 +596,11 @@
561
596
  if (onCollapse === void 0) { onCollapse = this.collapseNode.bind(this); }
562
597
  if (onSelect === void 0) { onSelect = this.selectNode.bind(this); }
563
598
  if (onDeselect === void 0) { onDeselect = this.deselectNode.bind(this); }
564
- return rxjs$1.Node.ToNode(item, depth, onExpand, onCollapse, this.toDisplay, this.getIcon, onSelect, onDeselect, this.hasDetails);
599
+ return __awaiter(this, void 0, void 0, function () {
600
+ return __generator(this, function (_b) {
601
+ return [2 /*return*/, rxjs$1.Node.ToNode(item, depth, onExpand, onCollapse, this.toDisplay, this.getIcon, onSelect, onDeselect, this.hasDetails)];
602
+ });
603
+ });
565
604
  };
566
605
  TreeDataSource.prototype.collapseNode = function (node) {
567
606
  this.expanded.deselect(node.id);
@@ -774,6 +813,7 @@
774
813
  this.viewContainerRef = viewContainerRef;
775
814
  this.cdr = cdr;
776
815
  this.renderer = renderer;
816
+ this.hideLeafIcon = false;
777
817
  this.details = new i0.EventEmitter();
778
818
  this.portal = null;
779
819
  this.getLevel = function (node) { return node.depth; };
@@ -819,7 +859,7 @@
819
859
  };
820
860
  TreeComponent.prototype.openDetails = function (node) {
821
861
  if (this.content) {
822
- this.portal = new i10.TemplatePortal(this.content.template, this.viewContainerRef, {
862
+ this.portal = new i11.TemplatePortal(this.content.template, this.viewContainerRef, {
823
863
  $implicit: node.item,
824
864
  node: node,
825
865
  });
@@ -852,7 +892,7 @@
852
892
  return TreeComponent;
853
893
  }());
854
894
  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 });
895
+ 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
896
  __decorate([
857
897
  utilities.Required,
858
898
  __metadata("design:type", TreeDataSource)
@@ -898,6 +938,8 @@
898
938
  }], content: [{
899
939
  type: i0.ContentChild,
900
940
  args: [TreeContentDirective, { static: true }]
941
+ }], hideLeafIcon: [{
942
+ type: i0.Input
901
943
  }], details: [{
902
944
  type: i0.Output
903
945
  }], treeContainer: [{
@@ -924,9 +966,9 @@
924
966
  flexLayout.FlexLayoutModule,
925
967
  i5.MatDividerModule,
926
968
  i4.MatProgressSpinnerModule,
927
- i10.PortalModule,
928
- i9.ContenteditableDirectiveModule,
929
- i8.IconDirectiveModule], exports: [TreeComponent, TreeContentDirective] });
969
+ i11.PortalModule,
970
+ i10.ContenteditableDirectiveModule,
971
+ i9.IconDirectiveModule], exports: [TreeComponent, TreeContentDirective] });
930
972
  TreeComponentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, imports: [[
931
973
  i7.CommonModule,
932
974
  i1.MatTreeModule,
@@ -935,9 +977,9 @@
935
977
  flexLayout.FlexLayoutModule,
936
978
  i5.MatDividerModule,
937
979
  i4.MatProgressSpinnerModule,
938
- i10.PortalModule,
939
- i9.ContenteditableDirectiveModule,
940
- i8.IconDirectiveModule
980
+ i11.PortalModule,
981
+ i10.ContenteditableDirectiveModule,
982
+ i9.IconDirectiveModule
941
983
  ]] });
942
984
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, decorators: [{
943
985
  type: i0.NgModule,
@@ -950,9 +992,9 @@
950
992
  flexLayout.FlexLayoutModule,
951
993
  i5.MatDividerModule,
952
994
  i4.MatProgressSpinnerModule,
953
- i10.PortalModule,
954
- i9.ContenteditableDirectiveModule,
955
- i8.IconDirectiveModule
995
+ i11.PortalModule,
996
+ i10.ContenteditableDirectiveModule,
997
+ i9.IconDirectiveModule
956
998
  ],
957
999
  declarations: [TreeComponent, TreeContentDirective],
958
1000
  exports: [TreeComponent, TreeContentDirective],