@rxap/tree 12.2.0-next.0 → 12.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/rxap-tree.umd.js +115 -68
- package/bundles/rxap-tree.umd.js.map +1 -1
- package/esm2015/lib/tree.component.js +16 -10
- package/esm2015/lib/tree.component.js.map +1 -1
- package/esm2015/lib/tree.component.module.js +7 -3
- package/esm2015/lib/tree.component.module.js.map +1 -1
- package/esm2015/lib/tree.data-source.js +38 -28
- package/esm2015/lib/tree.data-source.js.map +1 -1
- package/fesm2015/rxap-tree.js +61 -41
- package/fesm2015/rxap-tree.js.map +1 -1
- package/lib/tree.component.d.ts +2 -1
- package/lib/tree.component.module.d.ts +2 -1
- package/lib/tree.data-source.d.ts +8 -7
- package/package.json +5 -5
package/bundles/rxap-tree.umd.js
CHANGED
|
@@ -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.
|
|
5
|
-
}(this, (function (exports, rxjs, tree, collections, operators, dataSource, utilities, i0, rxjs$1,
|
|
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
|
|
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.
|
|
@@ -390,12 +391,16 @@
|
|
|
390
391
|
case 0: return [4 /*yield*/, this.getRoot()];
|
|
391
392
|
case 1:
|
|
392
393
|
root = _b.sent();
|
|
393
|
-
if (Array.isArray(root))
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
394
|
+
if (!Array.isArray(root)) return [3 /*break*/, 3];
|
|
395
|
+
return [4 /*yield*/, Promise.all(root.map(function (node) { return _this._toNode(node); }))];
|
|
396
|
+
case 2:
|
|
397
|
+
rootNodes = _b.sent();
|
|
398
|
+
return [3 /*break*/, 5];
|
|
399
|
+
case 3: return [4 /*yield*/, this._toNode(root)];
|
|
400
|
+
case 4:
|
|
401
|
+
rootNodes = [_b.sent()];
|
|
402
|
+
_b.label = 5;
|
|
403
|
+
case 5:
|
|
399
404
|
this.tree$.next(rootNodes);
|
|
400
405
|
return [2 /*return*/, rootNodes];
|
|
401
406
|
}
|
|
@@ -433,55 +438,72 @@
|
|
|
433
438
|
};
|
|
434
439
|
// - the SelectModel that stores the selection into the local storage?
|
|
435
440
|
TreeDataSource.prototype._toNode = function (item, depth, onExpand, onCollapse, onSelect, onDeselect) {
|
|
436
|
-
var _this = this;
|
|
437
441
|
if (depth === void 0) { depth = 0; }
|
|
438
442
|
if (onExpand === void 0) { onExpand = this.expandNode.bind(this); }
|
|
439
443
|
if (onCollapse === void 0) { onCollapse = this.collapseNode.bind(this); }
|
|
440
444
|
if (onSelect === void 0) { onSelect = this.selectNode.bind(this); }
|
|
441
445
|
if (onDeselect === void 0) { onDeselect = this.deselectNode.bind(this); }
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
446
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
447
|
+
var node;
|
|
448
|
+
var _this = this;
|
|
449
|
+
return __generator(this, function (_b) {
|
|
450
|
+
switch (_b.label) {
|
|
451
|
+
case 0: return [4 /*yield*/, this.toNode(item, depth, onExpand, onCollapse, onSelect, onDeselect)];
|
|
452
|
+
case 1:
|
|
453
|
+
node = _b.sent();
|
|
454
|
+
if (!this.expanded.isSelected(node.id)) return [3 /*break*/, 3];
|
|
455
|
+
return [4 /*yield*/, node
|
|
456
|
+
.expand()
|
|
457
|
+
.then(function () {
|
|
458
|
+
// TODO : remove redundant this.expanded SelectionModel. Only store expanded nodes in this.treeControl.expansionModel
|
|
459
|
+
// das problem ist das ich beim speicher in localStorage nur die id speicher.
|
|
460
|
+
// Des wegen kann ich beim laden aus dem localStorage this.treeControl.expansionModel
|
|
461
|
+
// nicht einfach mit den expanend nodes fullen. Da dort das node object benötigt wird
|
|
462
|
+
// möglich lösungen:
|
|
463
|
+
// - das node object läde die entity mithilfe der id automatisch nach
|
|
464
|
+
_this.treeControl.expansionModel.select(node);
|
|
465
|
+
console.debug("Restore expand for node '" + node.id + "' SUCCESSFULLY");
|
|
466
|
+
})
|
|
467
|
+
.catch(function () { return console.debug("Restore expand for node '" + node.id + "' FAILED"); })];
|
|
468
|
+
case 2:
|
|
469
|
+
_b.sent();
|
|
470
|
+
_b.label = 3;
|
|
471
|
+
case 3:
|
|
472
|
+
if (!this._preSelected.includes(node.id)) return [3 /*break*/, 5];
|
|
473
|
+
return [4 /*yield*/, node
|
|
474
|
+
.select()
|
|
475
|
+
.then(function () { return console.debug("Restore select for node '" + node.id + "' SUCCESSFULLY"); })
|
|
476
|
+
.catch(function () { return console.debug("Restore select for node '" + node.id + "' FAILED"); })];
|
|
477
|
+
case 4:
|
|
478
|
+
_b.sent();
|
|
479
|
+
_b.label = 5;
|
|
480
|
+
case 5: return [2 /*return*/, node];
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
});
|
|
465
484
|
};
|
|
466
485
|
TreeDataSource.prototype.expandNode = function (node) {
|
|
467
486
|
var _a;
|
|
468
487
|
return __awaiter(this, void 0, void 0, function () {
|
|
469
|
-
var children;
|
|
488
|
+
var children, _b, _c;
|
|
470
489
|
var _this = this;
|
|
471
|
-
return __generator(this, function (
|
|
472
|
-
switch (
|
|
490
|
+
return __generator(this, function (_d) {
|
|
491
|
+
switch (_d.label) {
|
|
473
492
|
case 0:
|
|
474
|
-
if (!(node.item.hasChildren && !((_a = node.item.children) === null || _a === void 0 ? void 0 : _a.length))) return [3 /*break*/,
|
|
493
|
+
if (!(node.item.hasChildren && !((_a = node.item.children) === null || _a === void 0 ? void 0 : _a.length))) return [3 /*break*/, 3];
|
|
475
494
|
node.isLoading$.enable();
|
|
476
495
|
return [4 /*yield*/, this.getChildren(node)];
|
|
477
496
|
case 1:
|
|
478
|
-
children =
|
|
497
|
+
children = _d.sent();
|
|
479
498
|
// add the loaded children to the item object
|
|
480
499
|
node.item.children = children;
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
_b.label = 2;
|
|
500
|
+
_c = (_b = node).addChildren;
|
|
501
|
+
return [4 /*yield*/, Promise.all(children.map(function (child) { return _this._toNode(child, node.depth + 1, node.onExpand, node.onCollapse); }))];
|
|
484
502
|
case 2:
|
|
503
|
+
_c.apply(_b, [_d.sent()]);
|
|
504
|
+
node.isLoading$.disable();
|
|
505
|
+
_d.label = 3;
|
|
506
|
+
case 3:
|
|
485
507
|
this.expanded.select(node.id);
|
|
486
508
|
this.tree$.next(this.tree$.value);
|
|
487
509
|
return [2 /*return*/];
|
|
@@ -498,8 +520,21 @@
|
|
|
498
520
|
};
|
|
499
521
|
TreeDataSource.prototype.getRoot = function () {
|
|
500
522
|
return __awaiter(this, void 0, void 0, function () {
|
|
523
|
+
var rootParameters;
|
|
501
524
|
return __generator(this, function (_b) {
|
|
502
|
-
|
|
525
|
+
switch (_b.label) {
|
|
526
|
+
case 0: return [4 /*yield*/, this.getRootParameters()];
|
|
527
|
+
case 1:
|
|
528
|
+
rootParameters = _b.sent();
|
|
529
|
+
return [2 /*return*/, this.rootRemoteMethod.call(rootParameters)];
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
});
|
|
533
|
+
};
|
|
534
|
+
TreeDataSource.prototype.getRootParameters = function () {
|
|
535
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
536
|
+
return __generator(this, function (_b) {
|
|
537
|
+
return [2 /*return*/, undefined];
|
|
503
538
|
});
|
|
504
539
|
});
|
|
505
540
|
};
|
|
@@ -562,7 +597,11 @@
|
|
|
562
597
|
if (onCollapse === void 0) { onCollapse = this.collapseNode.bind(this); }
|
|
563
598
|
if (onSelect === void 0) { onSelect = this.selectNode.bind(this); }
|
|
564
599
|
if (onDeselect === void 0) { onDeselect = this.deselectNode.bind(this); }
|
|
565
|
-
return
|
|
600
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
601
|
+
return __generator(this, function (_b) {
|
|
602
|
+
return [2 /*return*/, rxjs$1.Node.ToNode(item, depth, onExpand, onCollapse, this.toDisplay, this.getIcon, onSelect, onDeselect, this.hasDetails)];
|
|
603
|
+
});
|
|
604
|
+
});
|
|
566
605
|
};
|
|
567
606
|
TreeDataSource.prototype.collapseNode = function (node) {
|
|
568
607
|
this.expanded.deselect(node.id);
|
|
@@ -775,6 +814,7 @@
|
|
|
775
814
|
this.viewContainerRef = viewContainerRef;
|
|
776
815
|
this.cdr = cdr;
|
|
777
816
|
this.renderer = renderer;
|
|
817
|
+
this.multiple = false;
|
|
778
818
|
this.hideLeafIcon = false;
|
|
779
819
|
this.details = new i0.EventEmitter();
|
|
780
820
|
this.portal = null;
|
|
@@ -805,10 +845,12 @@
|
|
|
805
845
|
});
|
|
806
846
|
TreeComponent.prototype.ngOnInit = function () {
|
|
807
847
|
var _this = this;
|
|
848
|
+
var _a;
|
|
808
849
|
this.dataSource.setTreeControl(this.treeControl);
|
|
809
850
|
this.dataSource.setToDisplay(this.toDisplay);
|
|
810
851
|
this.dataSource.setGetIcon(this.getIcon);
|
|
811
852
|
this.dataSource.setHasDetails(this.hasDetails);
|
|
853
|
+
this.multiple = (_a = this.dataSource.metadata.selectMultiple) !== null && _a !== void 0 ? _a : this.multiple;
|
|
812
854
|
if (this.dataSource.selected.hasValue()) {
|
|
813
855
|
this.dataSource.selected.selected.forEach(function (node) { return _this.openDetails(node); });
|
|
814
856
|
}
|
|
@@ -821,7 +863,7 @@
|
|
|
821
863
|
};
|
|
822
864
|
TreeComponent.prototype.openDetails = function (node) {
|
|
823
865
|
if (this.content) {
|
|
824
|
-
this.portal = new
|
|
866
|
+
this.portal = new i12.TemplatePortal(this.content.template, this.viewContainerRef, {
|
|
825
867
|
$implicit: node.item,
|
|
826
868
|
node: node,
|
|
827
869
|
});
|
|
@@ -854,7 +896,7 @@
|
|
|
854
896
|
return TreeComponent;
|
|
855
897
|
}());
|
|
856
898
|
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 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: [".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 });
|
|
899
|
+
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
900
|
__decorate([
|
|
859
901
|
utilities.Required,
|
|
860
902
|
__metadata("design:type", TreeDataSource)
|
|
@@ -895,6 +937,8 @@
|
|
|
895
937
|
type: i0.Input
|
|
896
938
|
}], getIcon: [{
|
|
897
939
|
type: i0.Input
|
|
940
|
+
}], multiple: [{
|
|
941
|
+
type: i0.Input
|
|
898
942
|
}], hasDetails: [{
|
|
899
943
|
type: i0.Input
|
|
900
944
|
}], content: [{
|
|
@@ -921,42 +965,45 @@
|
|
|
921
965
|
return TreeComponentModule;
|
|
922
966
|
}());
|
|
923
967
|
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: [
|
|
968
|
+
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
969
|
i1.MatTreeModule,
|
|
926
|
-
|
|
970
|
+
i4.MatButtonModule,
|
|
927
971
|
i2.MatIconModule,
|
|
928
972
|
flexLayout.FlexLayoutModule,
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
973
|
+
i6.MatDividerModule,
|
|
974
|
+
i5.MatProgressSpinnerModule,
|
|
975
|
+
i12.PortalModule,
|
|
976
|
+
i11.ContenteditableDirectiveModule,
|
|
977
|
+
i10.IconDirectiveModule,
|
|
978
|
+
i3.MatCheckboxModule], exports: [TreeComponent, TreeContentDirective] });
|
|
934
979
|
TreeComponentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, imports: [[
|
|
935
|
-
|
|
980
|
+
i8.CommonModule,
|
|
936
981
|
i1.MatTreeModule,
|
|
937
|
-
|
|
982
|
+
i4.MatButtonModule,
|
|
938
983
|
i2.MatIconModule,
|
|
939
984
|
flexLayout.FlexLayoutModule,
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
985
|
+
i6.MatDividerModule,
|
|
986
|
+
i5.MatProgressSpinnerModule,
|
|
987
|
+
i12.PortalModule,
|
|
988
|
+
i11.ContenteditableDirectiveModule,
|
|
989
|
+
i10.IconDirectiveModule,
|
|
990
|
+
i3.MatCheckboxModule
|
|
945
991
|
]] });
|
|
946
992
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0__namespace, type: TreeComponentModule, decorators: [{
|
|
947
993
|
type: i0.NgModule,
|
|
948
994
|
args: [{
|
|
949
995
|
imports: [
|
|
950
|
-
|
|
996
|
+
i8.CommonModule,
|
|
951
997
|
i1.MatTreeModule,
|
|
952
|
-
|
|
998
|
+
i4.MatButtonModule,
|
|
953
999
|
i2.MatIconModule,
|
|
954
1000
|
flexLayout.FlexLayoutModule,
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1001
|
+
i6.MatDividerModule,
|
|
1002
|
+
i5.MatProgressSpinnerModule,
|
|
1003
|
+
i12.PortalModule,
|
|
1004
|
+
i11.ContenteditableDirectiveModule,
|
|
1005
|
+
i10.IconDirectiveModule,
|
|
1006
|
+
i3.MatCheckboxModule
|
|
960
1007
|
],
|
|
961
1008
|
declarations: [TreeComponent, TreeContentDirective],
|
|
962
1009
|
exports: [TreeComponent, TreeContentDirective],
|