@rxap/tree 12.2.0-next.1 → 12.3.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('@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';
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/checkbox'), 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/checkbox', '@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.checkbox, global.ng.material.button, global.ng.material.progressSpinner, global.ng.material.divider, global.ng.flexLayout.flex, global.ng.common, global.ng.flexLayout.extended, global.i10, global.i11, global.ng.flexLayout));
5
+ }(this, (function (exports, rxjs, tree, collections, operators, dataSource, utilities, i0, rxjs$1, i12, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, 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 i11__namespace = /*#__PURE__*/_interopNamespace(i11);
28
+ var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
29
29
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
30
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
31
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
@@ -36,6 +36,7 @@
36
36
  var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
37
37
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
38
38
  var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
39
+ var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
39
40
 
40
41
  /*! *****************************************************************************
41
42
  Copyright (c) Microsoft Corporation.
@@ -368,6 +369,7 @@
368
369
  // im localStorage wird nur die id gespeichert.
369
370
  _this._preSelected = [];
370
371
  _this._data$ = new rxjs.BehaviorSubject([]);
372
+ _this.loading$ = new rxjs$1.ToggleSubject(true);
371
373
  _this.toDisplay = function () { return 'to display function not defined'; };
372
374
  _this.getIcon = function () { return null; };
373
375
  _this.hasDetails = function () { return true; };
@@ -387,16 +389,23 @@
387
389
  var _this = this;
388
390
  return __generator(this, function (_b) {
389
391
  switch (_b.label) {
390
- case 0: return [4 /*yield*/, this.getRoot()];
392
+ case 0:
393
+ this.loading$.enable();
394
+ return [4 /*yield*/, this.getRoot()];
391
395
  case 1:
392
396
  root = _b.sent();
393
- if (Array.isArray(root)) {
394
- rootNodes = root.map(function (node) { return _this._toNode(node); });
395
- }
396
- else {
397
- rootNodes = [this._toNode(root)];
398
- }
397
+ if (!Array.isArray(root)) return [3 /*break*/, 3];
398
+ return [4 /*yield*/, Promise.all(root.map(function (node) { return _this._toNode(node); }))];
399
+ case 2:
400
+ rootNodes = _b.sent();
401
+ return [3 /*break*/, 5];
402
+ case 3: return [4 /*yield*/, this._toNode(root)];
403
+ case 4:
404
+ rootNodes = [_b.sent()];
405
+ _b.label = 5;
406
+ case 5:
399
407
  this.tree$.next(rootNodes);
408
+ this.loading$.disable();
400
409
  return [2 /*return*/, rootNodes];
401
410
  }
402
411
  });
@@ -433,55 +442,69 @@
433
442
  };
434
443
  // - the SelectModel that stores the selection into the local storage?
435
444
  TreeDataSource.prototype._toNode = function (item, depth, onExpand, onCollapse, onSelect, onDeselect) {
436
- var _this = this;
437
445
  if (depth === void 0) { depth = 0; }
438
446
  if (onExpand === void 0) { onExpand = this.expandNode.bind(this); }
439
447
  if (onCollapse === void 0) { onCollapse = this.collapseNode.bind(this); }
440
448
  if (onSelect === void 0) { onSelect = this.selectNode.bind(this); }
441
449
  if (onDeselect === void 0) { onDeselect = this.deselectNode.bind(this); }
442
- var node = this.toNode(item, depth, onExpand, onCollapse, onSelect, onDeselect);
443
- if (this.expanded.isSelected(node.id)) {
444
- node
445
- .expand()
446
- .then(function () {
447
- // TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel
448
- // das problem ist das ich beim speicher in localStorage nur die id speicher.
449
- // Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel
450
- // nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird
451
- // möglich lösungen:
452
- // - das node object läde die entity mithilfe der id automatisch nach
453
- _this.treeControl.expansionModel.select(node);
454
- console.debug("Restore expand for node '" + node.id + "' SUCCESSFULLY");
455
- })
456
- .catch(function () { return console.debug("Restore expand for node '" + node.id + "' FAILED"); });
457
- }
458
- if (this._preSelected.includes(node.id)) {
459
- node
460
- .select()
461
- .then(function () { return console.debug("Restore select for node '" + node.id + "' SUCCESSFULLY"); })
462
- .catch(function () { return console.debug("Restore select for node '" + node.id + "' FAILED"); });
463
- }
464
- return node;
450
+ return __awaiter(this, void 0, void 0, function () {
451
+ var node;
452
+ var _this = this;
453
+ return __generator(this, function (_b) {
454
+ switch (_b.label) {
455
+ case 0: return [4 /*yield*/, this.toNode(item, depth, onExpand, onCollapse, onSelect, onDeselect)];
456
+ case 1:
457
+ node = _b.sent();
458
+ if (this.expanded.isSelected(node.id)) {
459
+ node
460
+ .expand()
461
+ .then(function () {
462
+ // TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel
463
+ // das problem ist das ich beim speicher in localStorage nur die id speicher.
464
+ // Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel
465
+ // nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird
466
+ // möglich lösungen:
467
+ // - das node object läde die entity mithilfe der id automatisch nach
468
+ _this.treeControl.expansionModel.select(node);
469
+ console.debug("Restore expand for node '" + node.id + "' SUCCESSFULLY");
470
+ })
471
+ .catch(function () { return console.debug("Restore expand for node '" + node.id + "' FAILED"); });
472
+ }
473
+ if (!this._preSelected.includes(node.id)) return [3 /*break*/, 3];
474
+ return [4 /*yield*/, node
475
+ .select()
476
+ .then(function () { return console.debug("Restore select for node '" + node.id + "' SUCCESSFULLY"); })
477
+ .catch(function () { return console.debug("Restore select for node '" + node.id + "' FAILED"); })];
478
+ case 2:
479
+ _b.sent();
480
+ _b.label = 3;
481
+ case 3: return [2 /*return*/, node];
482
+ }
483
+ });
484
+ });
465
485
  };
466
486
  TreeDataSource.prototype.expandNode = function (node) {
467
487
  var _a;
468
488
  return __awaiter(this, void 0, void 0, function () {
469
- var children;
489
+ var children, _b, _c;
470
490
  var _this = this;
471
- return __generator(this, function (_b) {
472
- switch (_b.label) {
491
+ return __generator(this, function (_d) {
492
+ switch (_d.label) {
473
493
  case 0:
474
- if (!(node.item.hasChildren && !((_a = node.item.children) === null || _a === void 0 ? void 0 : _a.length))) return [3 /*break*/, 2];
494
+ if (!(node.item.hasChildren && !((_a = node.item.children) === null || _a === void 0 ? void 0 : _a.length))) return [3 /*break*/, 3];
475
495
  node.isLoading$.enable();
476
496
  return [4 /*yield*/, this.getChildren(node)];
477
497
  case 1:
478
- children = _b.sent();
498
+ children = _d.sent();
479
499
  // add the loaded children to the item object
480
500
  node.item.children = children;
481
- node.addChildren(children.map(function (child) { return _this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse); }));
482
- node.isLoading$.disable();
483
- _b.label = 2;
501
+ _c = (_b = node).addChildren;
502
+ return [4 /*yield*/, Promise.all(children.map(function (child) { return _this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse); }))];
484
503
  case 2:
504
+ _c.apply(_b, [_d.sent()]);
505
+ node.isLoading$.disable();
506
+ _d.label = 3;
507
+ case 3:
485
508
  this.expanded.select(node.id);
486
509
  this.tree$.next(this.tree$.value);
487
510
  return [2 /*return*/];
@@ -498,8 +521,21 @@
498
521
  };
499
522
  TreeDataSource.prototype.getRoot = function () {
500
523
  return __awaiter(this, void 0, void 0, function () {
524
+ var rootParameters;
501
525
  return __generator(this, function (_b) {
502
- return [2 /*return*/, this.rootRemoteMethod.call()];
526
+ switch (_b.label) {
527
+ case 0: return [4 /*yield*/, this.getRootParameters()];
528
+ case 1:
529
+ rootParameters = _b.sent();
530
+ return [2 /*return*/, this.rootRemoteMethod.call(rootParameters)];
531
+ }
532
+ });
533
+ });
534
+ };
535
+ TreeDataSource.prototype.getRootParameters = function () {
536
+ return __awaiter(this, void 0, void 0, function () {
537
+ return __generator(this, function (_b) {
538
+ return [2 /*return*/, undefined];
503
539
  });
504
540
  });
505
541
  };
@@ -562,7 +598,11 @@
562
598
  if (onCollapse === void 0) { onCollapse = this.collapseNode.bind(this); }
563
599
  if (onSelect === void 0) { onSelect = this.selectNode.bind(this); }
564
600
  if (onDeselect === void 0) { onDeselect = this.deselectNode.bind(this); }
565
- return rxjs$1.Node.ToNode(item, depth, onExpand, onCollapse, this.toDisplay, this.getIcon, onSelect, onDeselect, this.hasDetails);
601
+ return __awaiter(this, void 0, void 0, function () {
602
+ return __generator(this, function (_b) {
603
+ return [2 /*return*/, rxjs$1.Node.ToNode(item, depth, onExpand, onCollapse, this.toDisplay, this.getIcon, onSelect, onDeselect, this.hasDetails)];
604
+ });
605
+ });
566
606
  };
567
607
  TreeDataSource.prototype.collapseNode = function (node) {
568
608
  this.expanded.deselect(node.id);
@@ -775,6 +815,7 @@
775
815
  this.viewContainerRef = viewContainerRef;
776
816
  this.cdr = cdr;
777
817
  this.renderer = renderer;
818
+ this.multiple = false;
778
819
  this.hideLeafIcon = false;
779
820
  this.details = new i0.EventEmitter();
780
821
  this.portal = null;
@@ -805,10 +846,12 @@
805
846
  });
806
847
  TreeComponent.prototype.ngOnInit = function () {
807
848
  var _this = this;
849
+ var _a;
808
850
  this.dataSource.setTreeControl(this.treeControl);
809
851
  this.dataSource.setToDisplay(this.toDisplay);
810
852
  this.dataSource.setGetIcon(this.getIcon);
811
853
  this.dataSource.setHasDetails(this.hasDetails);
854
+ this.multiple = (_a = this.dataSource.metadata.selectMultiple) !== null && _a !== void 0 ? _a : this.multiple;
812
855
  if (this.dataSource.selected.hasValue()) {
813
856
  this.dataSource.selected.selected.forEach(function (node) { return _this.openDetails(node); });
814
857
  }
@@ -821,7 +864,7 @@
821
864
  };
822
865
  TreeComponent.prototype.openDetails = function (node) {
823
866
  if (this.content) {
824
- this.portal = new i11.TemplatePortal(this.content.template, this.viewContainerRef, {
867
+ this.portal = new i12.TemplatePortal(this.content.template, this.viewContainerRef, {
825
868
  $implicit: node.item,
826
869
  node: node,
827
870
  });
@@ -854,7 +897,7 @@
854
897
  return TreeComponent;
855
898
  }());
856
899
  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 });
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 });
900
+ 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", multiple: "multiple", 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 <ng-template [ngIf]=\"multiple\">\n <mat-checkbox (change)=\"node.toggleSelect()\" [checked]=\"node.selected\" [disabled]=\"!node.hasDetails\" fxFlex=\"nogrow\">{{ node.display }}</mat-checkbox>\n </ng-template>\n <ng-template [ngIf]=\"!multiple\">\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 </ng-template>\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.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i4__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: i5__namespace.MatProgressSpinner, selector: "mat-progress-spinner", inputs: ["color", "mode", "diameter", "strokeWidth", "value"], exportAs: ["matProgressSpinner"] }, { type: i6__namespace.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i7__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: i7__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: i8__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: i7__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: i9__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: i10__namespace.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }, { type: i1__namespace.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { type: i11__namespace.ContenteditableDirective, selector: "[rxapContenteditable]", inputs: ["rxapContenteditable", "disabled"], outputs: ["change"] }, { type: i7__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: i12__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i8__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
858
901
  __decorate([
859
902
  utilities.Required,
860
903
  __metadata("design:type", TreeDataSource)
@@ -895,6 +938,8 @@
895
938
  type: i0.Input
896
939
  }], getIcon: [{
897
940
  type: i0.Input
941
+ }], multiple: [{
942
+ type: i0.Input
898
943
  }], hasDetails: [{
899
944
  type: i0.Input
900
945
  }], content: [{
@@ -921,42 +966,45 @@
921
966
  return TreeComponentModule;
922
967
  }());
923
968
  TreeComponentModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
924
- TreeComponentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, declarations: [TreeComponent, TreeContentDirective], imports: [i7.CommonModule,
969
+ TreeComponentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, declarations: [TreeComponent, TreeContentDirective], imports: [i8.CommonModule,
925
970
  i1.MatTreeModule,
926
- i3.MatButtonModule,
971
+ i4.MatButtonModule,
927
972
  i2.MatIconModule,
928
973
  flexLayout.FlexLayoutModule,
929
- i5.MatDividerModule,
930
- i4.MatProgressSpinnerModule,
931
- i11.PortalModule,
932
- i10.ContenteditableDirectiveModule,
933
- i9.IconDirectiveModule], exports: [TreeComponent, TreeContentDirective] });
974
+ i6.MatDividerModule,
975
+ i5.MatProgressSpinnerModule,
976
+ i12.PortalModule,
977
+ i11.ContenteditableDirectiveModule,
978
+ i10.IconDirectiveModule,
979
+ i3.MatCheckboxModule], exports: [TreeComponent, TreeContentDirective] });
934
980
  TreeComponentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, imports: [[
935
- i7.CommonModule,
981
+ i8.CommonModule,
936
982
  i1.MatTreeModule,
937
- i3.MatButtonModule,
983
+ i4.MatButtonModule,
938
984
  i2.MatIconModule,
939
985
  flexLayout.FlexLayoutModule,
940
- i5.MatDividerModule,
941
- i4.MatProgressSpinnerModule,
942
- i11.PortalModule,
943
- i10.ContenteditableDirectiveModule,
944
- i9.IconDirectiveModule
986
+ i6.MatDividerModule,
987
+ i5.MatProgressSpinnerModule,
988
+ i12.PortalModule,
989
+ i11.ContenteditableDirectiveModule,
990
+ i10.IconDirectiveModule,
991
+ i3.MatCheckboxModule
945
992
  ]] });
946
993
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, decorators: [{
947
994
  type: i0.NgModule,
948
995
  args: [{
949
996
  imports: [
950
- i7.CommonModule,
997
+ i8.CommonModule,
951
998
  i1.MatTreeModule,
952
- i3.MatButtonModule,
999
+ i4.MatButtonModule,
953
1000
  i2.MatIconModule,
954
1001
  flexLayout.FlexLayoutModule,
955
- i5.MatDividerModule,
956
- i4.MatProgressSpinnerModule,
957
- i11.PortalModule,
958
- i10.ContenteditableDirectiveModule,
959
- i9.IconDirectiveModule
1002
+ i6.MatDividerModule,
1003
+ i5.MatProgressSpinnerModule,
1004
+ i12.PortalModule,
1005
+ i11.ContenteditableDirectiveModule,
1006
+ i10.IconDirectiveModule,
1007
+ i3.MatCheckboxModule
960
1008
  ],
961
1009
  declarations: [TreeComponent, TreeContentDirective],
962
1010
  exports: [TreeComponent, TreeContentDirective],