@ali-hm/angular-tree-component 21.0.0 → 21.0.2
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/README.md
CHANGED
|
@@ -36,7 +36,7 @@ angular-tree-component supports angular 12+ versions, and AoT compilation.
|
|
|
36
36
|
|
|
37
37
|
versioning has been change to align with supported Angular version.
|
|
38
38
|
so:\
|
|
39
|
-
v21.\*.\* = Angular 21
|
|
39
|
+
v21.\*.\* = Angular 21 \
|
|
40
40
|
v20.\*.\* = Angular 20
|
|
41
41
|
v19.\*.\* = Angular 19
|
|
42
42
|
v18.\*.\* = Angular 18
|
|
@@ -244,7 +244,7 @@ class TreeNode {
|
|
|
244
244
|
return this.options.allowDragoverStyling;
|
|
245
245
|
};
|
|
246
246
|
if (this.id === undefined || this.id === null) {
|
|
247
|
-
this.id = uuid();
|
|
247
|
+
this.id = this.treeModel.uuid();
|
|
248
248
|
} // Make sure there's a unique id without overriding existing ids to work with immutable data structures
|
|
249
249
|
this.index = index;
|
|
250
250
|
if (this.getField('children')) {
|
|
@@ -524,9 +524,6 @@ class TreeNode {
|
|
|
524
524
|
.map((c, index) => new TreeNode(c, this, this.treeModel, index));
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
function uuid() {
|
|
528
|
-
return Math.floor(Math.random() * 10000000000000);
|
|
529
|
-
}
|
|
530
527
|
|
|
531
528
|
class TreeModel {
|
|
532
529
|
constructor() {
|
|
@@ -538,10 +535,12 @@ class TreeModel {
|
|
|
538
535
|
this._selectedLeafNodeIds = signal({}, ...(ngDevMode ? [{ debugName: "_selectedLeafNodeIds" }] : []));
|
|
539
536
|
this._activeNodeIds = signal({}, ...(ngDevMode ? [{ debugName: "_activeNodeIds" }] : []));
|
|
540
537
|
this._hiddenNodeIds = signal({}, ...(ngDevMode ? [{ debugName: "_hiddenNodeIds" }] : []));
|
|
538
|
+
this._hiddenNodes = [];
|
|
541
539
|
this._focusedNodeId = signal(null, ...(ngDevMode ? [{ debugName: "_focusedNodeId" }] : []));
|
|
542
540
|
this._virtualRoot = signal(undefined, ...(ngDevMode ? [{ debugName: "_virtualRoot" }] : []));
|
|
543
541
|
this.firstUpdate = true;
|
|
544
542
|
this.subscriptions = [];
|
|
543
|
+
this.generatedIds = {};
|
|
545
544
|
}
|
|
546
545
|
static { this.focusedTree = null; }
|
|
547
546
|
// Public getters/setters to maintain API compatibility
|
|
@@ -567,10 +566,14 @@ class TreeModel {
|
|
|
567
566
|
return nodes.filter(Boolean);
|
|
568
567
|
}
|
|
569
568
|
get hiddenNodes() {
|
|
570
|
-
const ids = this._hiddenNodeIds();
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
569
|
+
/*const ids = this._hiddenNodeIds();
|
|
570
|
+
var ids2 = Object.keys(ids).filter((id) => ids[id]);
|
|
571
|
+
//const nodes = ids2.map((id) => this.getNodeById(id));
|
|
572
|
+
var nodes=[];
|
|
573
|
+
for(var i=0;i<ids2.length;i++){
|
|
574
|
+
nodes.push(this.getNodeById(ids2[i]));
|
|
575
|
+
}*/
|
|
576
|
+
const nodes = this._hiddenNodes;
|
|
574
577
|
return nodes.filter(Boolean);
|
|
575
578
|
}
|
|
576
579
|
get selectedLeafNodes() {
|
|
@@ -840,8 +843,10 @@ class TreeModel {
|
|
|
840
843
|
return;
|
|
841
844
|
}
|
|
842
845
|
const ids = {};
|
|
843
|
-
|
|
846
|
+
var hiddenNodes = [];
|
|
847
|
+
this.roots.forEach((node) => this._filterNode(ids, node, filterFn, autoShow, hiddenNodes));
|
|
844
848
|
this._hiddenNodeIds.set(ids);
|
|
849
|
+
this._hiddenNodes = hiddenNodes;
|
|
845
850
|
this.fireEvent({ eventName: TREE_EVENTS.changeFilter });
|
|
846
851
|
}
|
|
847
852
|
clearFilter() {
|
|
@@ -924,13 +929,13 @@ class TreeModel {
|
|
|
924
929
|
this._calculateExpandedNodes();
|
|
925
930
|
}
|
|
926
931
|
// private methods
|
|
927
|
-
_filterNode(ids, node, filterFn, autoShow) {
|
|
932
|
+
_filterNode(ids, node, filterFn, autoShow, hiddenNodes) {
|
|
928
933
|
// if node passes function then it's visible
|
|
929
934
|
let isVisible = filterFn(node);
|
|
930
935
|
if (node.children) {
|
|
931
936
|
// if one of node's children passes filter then this node is also visible
|
|
932
937
|
node.children.forEach((child) => {
|
|
933
|
-
if (this._filterNode(ids, child, filterFn, autoShow)) {
|
|
938
|
+
if (this._filterNode(ids, child, filterFn, autoShow, hiddenNodes)) {
|
|
934
939
|
isVisible = true;
|
|
935
940
|
}
|
|
936
941
|
});
|
|
@@ -938,6 +943,7 @@ class TreeModel {
|
|
|
938
943
|
// mark node as hidden
|
|
939
944
|
if (!isVisible) {
|
|
940
945
|
ids[node.id] = true;
|
|
946
|
+
hiddenNodes.push(node);
|
|
941
947
|
}
|
|
942
948
|
// auto expand parents to make sure the filtered nodes are visible
|
|
943
949
|
if (autoShow && isVisible) {
|
|
@@ -972,10 +978,18 @@ class TreeModel {
|
|
|
972
978
|
_setActiveNodeMulti(node, value) {
|
|
973
979
|
this._activeNodeIds.update(ids => ({ ...ids, [node.id]: value }));
|
|
974
980
|
}
|
|
975
|
-
|
|
976
|
-
|
|
981
|
+
uuid() {
|
|
982
|
+
var res = Math.floor(Math.random() * 10000000000000);
|
|
983
|
+
while (this.generatedIds[res]) {
|
|
984
|
+
res = Math.floor(Math.random() * 10000000000000);
|
|
985
|
+
}
|
|
986
|
+
this.generatedIds[res] = true;
|
|
987
|
+
return res;
|
|
988
|
+
}
|
|
989
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeModel, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
990
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeModel }); }
|
|
977
991
|
}
|
|
978
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
992
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeModel, decorators: [{
|
|
979
993
|
type: Injectable
|
|
980
994
|
}] });
|
|
981
995
|
|
|
@@ -992,10 +1006,10 @@ class TreeDraggedElement {
|
|
|
992
1006
|
isDragging() {
|
|
993
1007
|
return !!this.get();
|
|
994
1008
|
}
|
|
995
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
996
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.
|
|
1009
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeDraggedElement, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1010
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeDraggedElement, providedIn: 'root' }); }
|
|
997
1011
|
}
|
|
998
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeDraggedElement, decorators: [{
|
|
999
1013
|
type: Injectable,
|
|
1000
1014
|
args: [{
|
|
1001
1015
|
providedIn: 'root'
|
|
@@ -1043,19 +1057,19 @@ class TreeVirtualScroll {
|
|
|
1043
1057
|
const totalHeight = this.totalHeight;
|
|
1044
1058
|
const viewportHeight = this._viewportHeight();
|
|
1045
1059
|
this.fixScroll();
|
|
1046
|
-
}, ...(ngDevMode ?
|
|
1060
|
+
}, { ...(ngDevMode ? { debugName: "fixScrollEffect" } : {}), injector });
|
|
1047
1061
|
const rootsEffect = effect(() => {
|
|
1048
1062
|
const roots = this.treeModel.roots;
|
|
1049
1063
|
fn();
|
|
1050
|
-
}, ...(ngDevMode ?
|
|
1064
|
+
}, { ...(ngDevMode ? { debugName: "rootsEffect" } : {}), injector });
|
|
1051
1065
|
const expandedEffect = effect(() => {
|
|
1052
1066
|
const expandedNodes = this.treeModel.expandedNodes;
|
|
1053
1067
|
fn();
|
|
1054
|
-
}, ...(ngDevMode ?
|
|
1068
|
+
}, { ...(ngDevMode ? { debugName: "expandedEffect" } : {}), injector });
|
|
1055
1069
|
const hiddenEffect = effect(() => {
|
|
1056
1070
|
const hiddenNodes = this.treeModel.hiddenNodes;
|
|
1057
1071
|
fn();
|
|
1058
|
-
}, ...(ngDevMode ?
|
|
1072
|
+
}, { ...(ngDevMode ? { debugName: "hiddenEffect" } : {}), injector });
|
|
1059
1073
|
this._dispose = [
|
|
1060
1074
|
() => fixScrollEffect.destroy(),
|
|
1061
1075
|
() => rootsEffect.destroy(),
|
|
@@ -1169,10 +1183,10 @@ class TreeVirtualScroll {
|
|
|
1169
1183
|
if (this.y > maxY)
|
|
1170
1184
|
this._setYBlocks(maxY / Y_EPSILON);
|
|
1171
1185
|
}
|
|
1172
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1173
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.
|
|
1186
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1187
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeVirtualScroll }); }
|
|
1174
1188
|
}
|
|
1175
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeVirtualScroll, decorators: [{
|
|
1176
1190
|
type: Injectable
|
|
1177
1191
|
}], ctorParameters: () => [] });
|
|
1178
1192
|
function binarySearch(nodes, condition, firstIndex = 0) {
|
|
@@ -1198,8 +1212,8 @@ class LoadingComponent {
|
|
|
1198
1212
|
this.template = input(undefined, ...(ngDevMode ? [{ debugName: "template" }] : []));
|
|
1199
1213
|
this.node = input(undefined, ...(ngDevMode ? [{ debugName: "node" }] : []));
|
|
1200
1214
|
}
|
|
1201
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1202
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1215
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1216
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: LoadingComponent, isStandalone: true, selector: "tree-loading-component", inputs: { template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1203
1217
|
@if (!template()) {
|
|
1204
1218
|
<span>loading...</span>
|
|
1205
1219
|
}
|
|
@@ -1210,7 +1224,7 @@ class LoadingComponent {
|
|
|
1210
1224
|
</ng-container>
|
|
1211
1225
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1212
1226
|
}
|
|
1213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: LoadingComponent, decorators: [{
|
|
1214
1228
|
type: Component,
|
|
1215
1229
|
args: [{
|
|
1216
1230
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -1273,14 +1287,14 @@ class TreeViewportComponent {
|
|
|
1273
1287
|
}
|
|
1274
1288
|
};
|
|
1275
1289
|
}
|
|
1276
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1277
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.
|
|
1290
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeViewportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1291
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.3", type: TreeViewportComponent, isStandalone: true, selector: "tree-viewport", providers: [TreeVirtualScroll], ngImport: i0, template: `
|
|
1278
1292
|
<div [style.height]="getTotalHeight()">
|
|
1279
1293
|
<ng-content></ng-content>
|
|
1280
1294
|
</div>
|
|
1281
1295
|
`, isInline: true }); }
|
|
1282
1296
|
}
|
|
1283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeViewportComponent, decorators: [{
|
|
1284
1298
|
type: Component,
|
|
1285
1299
|
args: [{ selector: 'tree-viewport', providers: [TreeVirtualScroll], template: `
|
|
1286
1300
|
<div [style.height]="getTotalHeight()">
|
|
@@ -1389,10 +1403,10 @@ class TreeDropDirective {
|
|
|
1389
1403
|
removeDisabledClass() {
|
|
1390
1404
|
this.renderer.removeClass(this.el.nativeElement, DRAG_DISABLED_CLASS);
|
|
1391
1405
|
}
|
|
1392
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1393
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
1406
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1407
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.3", type: TreeDropDirective, isStandalone: true, selector: "[treeDrop]", inputs: { allowDragoverStyling: { classPropertyName: "allowDragoverStyling", publicName: "allowDragoverStyling", isSignal: true, isRequired: false, transformFunction: null }, treeAllowDrop: { classPropertyName: "treeAllowDrop", publicName: "treeAllowDrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onDropCallback: "treeDrop", onDragOverCallback: "treeDropDragOver", onDragLeaveCallback: "treeDropDragLeave", onDragEnterCallback: "treeDropDragEnter" }, host: { listeners: { "drop": "onDrop($event)" } }, ngImport: i0 }); }
|
|
1394
1408
|
}
|
|
1395
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeDropDirective, decorators: [{
|
|
1396
1410
|
type: Directive,
|
|
1397
1411
|
args: [{ selector: '[treeDrop]' }]
|
|
1398
1412
|
}], ctorParameters: () => [], propDecorators: { allowDragoverStyling: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowDragoverStyling", required: false }] }], treeAllowDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeAllowDrop", required: false }] }], onDropCallback: [{ type: i0.Output, args: ["treeDrop"] }], onDragOverCallback: [{ type: i0.Output, args: ["treeDropDragOver"] }], onDragLeaveCallback: [{ type: i0.Output, args: ["treeDropDragLeave"] }], onDragEnterCallback: [{ type: i0.Output, args: ["treeDropDragEnter"] }], onDrop: [{
|
|
@@ -1414,8 +1428,8 @@ class TreeNodeDropSlot {
|
|
|
1414
1428
|
allowDrop(element, $event) {
|
|
1415
1429
|
return this.node().options.allowDrop(element, { parent: this.node(), index: this.dropIndex() }, $event);
|
|
1416
1430
|
}
|
|
1417
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1418
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
1431
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeDropSlot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1432
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: TreeNodeDropSlot, isStandalone: true, selector: "TreeNodeDropSlot, tree-node-drop-slot", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, dropIndex: { classPropertyName: "dropIndex", publicName: "dropIndex", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1419
1433
|
<div
|
|
1420
1434
|
class="node-drop-slot"
|
|
1421
1435
|
(treeDrop)="onDrop($event)"
|
|
@@ -1424,7 +1438,7 @@ class TreeNodeDropSlot {
|
|
|
1424
1438
|
></div>
|
|
1425
1439
|
`, isInline: true, dependencies: [{ kind: "directive", type: TreeDropDirective, selector: "[treeDrop]", inputs: ["allowDragoverStyling", "treeAllowDrop"], outputs: ["treeDrop", "treeDropDragOver", "treeDropDragLeave", "treeDropDragEnter"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1426
1440
|
}
|
|
1427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeDropSlot, decorators: [{
|
|
1428
1442
|
type: Component,
|
|
1429
1443
|
args: [{ selector: 'TreeNodeDropSlot, tree-node-drop-slot', encapsulation: ViewEncapsulation.None, template: `
|
|
1430
1444
|
<div
|
|
@@ -1440,8 +1454,8 @@ class TreeNodeCheckboxComponent {
|
|
|
1440
1454
|
constructor() {
|
|
1441
1455
|
this.node = input(undefined, ...(ngDevMode ? [{ debugName: "node" }] : []));
|
|
1442
1456
|
}
|
|
1443
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1444
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.
|
|
1457
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1458
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.3", type: TreeNodeCheckboxComponent, isStandalone: true, selector: "tree-node-checkbox", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1445
1459
|
<input
|
|
1446
1460
|
class="tree-node-checkbox"
|
|
1447
1461
|
type="checkbox"
|
|
@@ -1451,7 +1465,7 @@ class TreeNodeCheckboxComponent {
|
|
|
1451
1465
|
/>
|
|
1452
1466
|
`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1453
1467
|
}
|
|
1454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeCheckboxComponent, decorators: [{
|
|
1455
1469
|
type: Component,
|
|
1456
1470
|
args: [{ selector: 'tree-node-checkbox', encapsulation: ViewEncapsulation.None, template: `
|
|
1457
1471
|
<input
|
|
@@ -1469,8 +1483,8 @@ class TreeNodeExpanderComponent {
|
|
|
1469
1483
|
this.node = input(...(ngDevMode ? [undefined, { debugName: "node" }] : []));
|
|
1470
1484
|
this.hasChildren = computed(() => this.node().hasChildren, ...(ngDevMode ? [{ debugName: "hasChildren" }] : []));
|
|
1471
1485
|
}
|
|
1472
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1473
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1486
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1487
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TreeNodeExpanderComponent, isStandalone: true, selector: "tree-node-expander", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1474
1488
|
@if (hasChildren()) {
|
|
1475
1489
|
<span
|
|
1476
1490
|
[class.toggle-children-wrapper-expanded]="node().isExpanded"
|
|
@@ -1485,7 +1499,7 @@ class TreeNodeExpanderComponent {
|
|
|
1485
1499
|
}
|
|
1486
1500
|
`, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1487
1501
|
}
|
|
1488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1502
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeExpanderComponent, decorators: [{
|
|
1489
1503
|
type: Component,
|
|
1490
1504
|
args: [{ selector: 'tree-node-expander', encapsulation: ViewEncapsulation.None, template: `
|
|
1491
1505
|
@if (hasChildren()) {
|
|
@@ -1508,7 +1522,7 @@ class TreeDragDirective {
|
|
|
1508
1522
|
this.el = inject(ElementRef);
|
|
1509
1523
|
this.renderer = inject(Renderer2);
|
|
1510
1524
|
this.treeDraggedElement = inject(TreeDraggedElement);
|
|
1511
|
-
this.draggedElement = input(undefined, ...(ngDevMode ?
|
|
1525
|
+
this.draggedElement = input(undefined, { ...(ngDevMode ? { debugName: "draggedElement" } : {}), alias: "treeDrag" });
|
|
1512
1526
|
this.treeDragEnabled = input(undefined, ...(ngDevMode ? [{ debugName: "treeDragEnabled" }] : []));
|
|
1513
1527
|
this.dragUnlisten = null;
|
|
1514
1528
|
this.dragEventHandler = this.onDrag.bind(this);
|
|
@@ -1546,10 +1560,10 @@ class TreeDragDirective {
|
|
|
1546
1560
|
}
|
|
1547
1561
|
this.treeDraggedElement.set(null);
|
|
1548
1562
|
}
|
|
1549
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1550
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
1563
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1564
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.3", type: TreeDragDirective, isStandalone: true, selector: "[treeDrag]", inputs: { draggedElement: { classPropertyName: "draggedElement", publicName: "treeDrag", isSignal: true, isRequired: false, transformFunction: null }, treeDragEnabled: { classPropertyName: "treeDragEnabled", publicName: "treeDragEnabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "dragstart": "onDragStart($event)", "dragend": "onDragEnd()" } }, ngImport: i0 }); }
|
|
1551
1565
|
}
|
|
1552
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeDragDirective, decorators: [{
|
|
1553
1567
|
type: Directive,
|
|
1554
1568
|
args: [{ selector: '[treeDrag]' }]
|
|
1555
1569
|
}], ctorParameters: () => [], propDecorators: { draggedElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeDrag", required: false }] }], treeDragEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeDragEnabled", required: false }] }], onDragStart: [{
|
|
@@ -1566,8 +1580,8 @@ class TreeNodeContent {
|
|
|
1566
1580
|
this.index = input(undefined, ...(ngDevMode ? [{ debugName: "index" }] : []));
|
|
1567
1581
|
this.template = input(undefined, ...(ngDevMode ? [{ debugName: "template" }] : []));
|
|
1568
1582
|
}
|
|
1569
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1570
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1583
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1584
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TreeNodeContent, isStandalone: true, selector: "tree-node-content", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1571
1585
|
@if (!template()) {
|
|
1572
1586
|
<span>{{ node().displayField }}</span>
|
|
1573
1587
|
}
|
|
@@ -1582,7 +1596,7 @@ class TreeNodeContent {
|
|
|
1582
1596
|
</ng-container>
|
|
1583
1597
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1584
1598
|
}
|
|
1585
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeContent, decorators: [{
|
|
1586
1600
|
type: Component,
|
|
1587
1601
|
args: [{
|
|
1588
1602
|
selector: 'tree-node-content',
|
|
@@ -1612,8 +1626,8 @@ class TreeNodeWrapperComponent {
|
|
|
1612
1626
|
this.templates = input(...(ngDevMode ? [undefined, { debugName: "templates" }] : []));
|
|
1613
1627
|
this.treeNodeWrapperTemplate = computed(() => this.templates().treeNodeWrapperTemplate, ...(ngDevMode ? [{ debugName: "treeNodeWrapperTemplate" }] : []));
|
|
1614
1628
|
}
|
|
1615
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1616
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1629
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1630
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TreeNodeWrapperComponent, isStandalone: true, selector: "tree-node-wrapper", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, templates: { classPropertyName: "templates", publicName: "templates", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1617
1631
|
@if (!treeNodeWrapperTemplate()) {
|
|
1618
1632
|
<div class="node-wrapper" [style.padding-left]="node().getNodePadding()">
|
|
1619
1633
|
@if (node().options.useCheckbox) {
|
|
@@ -1659,7 +1673,7 @@ class TreeNodeWrapperComponent {
|
|
|
1659
1673
|
</ng-container>
|
|
1660
1674
|
`, isInline: true, dependencies: [{ kind: "component", type: TreeNodeCheckboxComponent, selector: "tree-node-checkbox", inputs: ["node"] }, { kind: "component", type: TreeNodeExpanderComponent, selector: "tree-node-expander", inputs: ["node"] }, { kind: "directive", type: TreeDragDirective, selector: "[treeDrag]", inputs: ["treeDrag", "treeDragEnabled"] }, { kind: "directive", type: TreeDropDirective, selector: "[treeDrop]", inputs: ["allowDragoverStyling", "treeAllowDrop"], outputs: ["treeDrop", "treeDropDragOver", "treeDropDragLeave", "treeDropDragEnter"] }, { kind: "component", type: TreeNodeContent, selector: "tree-node-content", inputs: ["node", "index", "template"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1661
1675
|
}
|
|
1662
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeWrapperComponent, decorators: [{
|
|
1663
1677
|
type: Component,
|
|
1664
1678
|
args: [{ selector: 'tree-node-wrapper', encapsulation: ViewEncapsulation.None, template: `
|
|
1665
1679
|
@if (!treeNodeWrapperTemplate()) {
|
|
@@ -1721,16 +1735,10 @@ class TreeAnimateOpenDirective {
|
|
|
1721
1735
|
this.renderer = inject(Renderer2);
|
|
1722
1736
|
this.templateRef = inject(TemplateRef);
|
|
1723
1737
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
1724
|
-
this.isOpen = input(undefined, ...(ngDevMode ?
|
|
1725
|
-
this.animateSpeed = input(undefined, ...(ngDevMode ?
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
this.animateAcceleration = input(undefined, ...(ngDevMode ? [{ debugName: "animateAcceleration", alias: 'treeAnimateOpenAcceleration' }] : [{
|
|
1729
|
-
alias: 'treeAnimateOpenAcceleration'
|
|
1730
|
-
}]));
|
|
1731
|
-
this.isEnabled = input(undefined, ...(ngDevMode ? [{ debugName: "isEnabled", alias: 'treeAnimateOpenEnabled' }] : [{
|
|
1732
|
-
alias: 'treeAnimateOpenEnabled'
|
|
1733
|
-
}]));
|
|
1738
|
+
this.isOpen = input(undefined, { ...(ngDevMode ? { debugName: "isOpen" } : {}), alias: 'treeAnimateOpen' });
|
|
1739
|
+
this.animateSpeed = input(undefined, { ...(ngDevMode ? { debugName: "animateSpeed" } : {}), alias: 'treeAnimateOpenSpeed' });
|
|
1740
|
+
this.animateAcceleration = input(undefined, { ...(ngDevMode ? { debugName: "animateAcceleration" } : {}), alias: 'treeAnimateOpenAcceleration' });
|
|
1741
|
+
this.isEnabled = input(undefined, { ...(ngDevMode ? { debugName: "isEnabled" } : {}), alias: 'treeAnimateOpenEnabled' });
|
|
1734
1742
|
this.startOpenTimeout = null;
|
|
1735
1743
|
this.openInterval = null;
|
|
1736
1744
|
this.closeInterval = null;
|
|
@@ -1839,10 +1847,10 @@ class TreeAnimateOpenDirective {
|
|
|
1839
1847
|
this.closeInterval = null;
|
|
1840
1848
|
}
|
|
1841
1849
|
}
|
|
1842
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1843
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.
|
|
1850
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeAnimateOpenDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1851
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.3", type: TreeAnimateOpenDirective, isStandalone: true, selector: "[treeAnimateOpen]", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "treeAnimateOpen", isSignal: true, isRequired: false, transformFunction: null }, animateSpeed: { classPropertyName: "animateSpeed", publicName: "treeAnimateOpenSpeed", isSignal: true, isRequired: false, transformFunction: null }, animateAcceleration: { classPropertyName: "animateAcceleration", publicName: "treeAnimateOpenAcceleration", isSignal: true, isRequired: false, transformFunction: null }, isEnabled: { classPropertyName: "isEnabled", publicName: "treeAnimateOpenEnabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
1844
1852
|
}
|
|
1845
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1853
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeAnimateOpenDirective, decorators: [{
|
|
1846
1854
|
type: Directive,
|
|
1847
1855
|
args: [{ selector: '[treeAnimateOpen]' }]
|
|
1848
1856
|
}], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeAnimateOpen", required: false }] }], animateSpeed: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeAnimateOpenSpeed", required: false }] }], animateAcceleration: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeAnimateOpenAcceleration", required: false }] }], isEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "treeAnimateOpenEnabled", required: false }] }] } });
|
|
@@ -1853,8 +1861,8 @@ class TreeNodeChildrenComponent {
|
|
|
1853
1861
|
this.templates = input(undefined, ...(ngDevMode ? [{ debugName: "templates" }] : []));
|
|
1854
1862
|
this.children = computed(() => this.node().children, ...(ngDevMode ? [{ debugName: "children" }] : []));
|
|
1855
1863
|
}
|
|
1856
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1857
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1864
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeChildrenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1865
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TreeNodeChildrenComponent, isStandalone: true, selector: "tree-node-children", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, templates: { classPropertyName: "templates", publicName: "templates", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1858
1866
|
<div
|
|
1859
1867
|
[class.tree-children]="true"
|
|
1860
1868
|
[class.tree-children-no-padding]="node().options.levelPadding"
|
|
@@ -1883,7 +1891,7 @@ class TreeNodeChildrenComponent {
|
|
|
1883
1891
|
</div>
|
|
1884
1892
|
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => TreeAnimateOpenDirective), selector: "[treeAnimateOpen]", inputs: ["treeAnimateOpen", "treeAnimateOpenSpeed", "treeAnimateOpenAcceleration", "treeAnimateOpenEnabled"] }, { kind: "component", type: i0.forwardRef(() => TreeNodeCollectionComponent), selector: "tree-node-collection", inputs: ["nodes", "treeModel", "templates"] }, { kind: "component", type: i0.forwardRef(() => LoadingComponent), selector: "tree-loading-component", inputs: ["template", "node"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1885
1893
|
}
|
|
1886
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1894
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeChildrenComponent, decorators: [{
|
|
1887
1895
|
type: Component,
|
|
1888
1896
|
args: [{ selector: 'tree-node-children', encapsulation: ViewEncapsulation.None, template: `
|
|
1889
1897
|
<div
|
|
@@ -1945,7 +1953,7 @@ class TreeNodeCollectionComponent {
|
|
|
1945
1953
|
const viewportNodes = this.virtualScroll.getViewportNodes(nodes);
|
|
1946
1954
|
this.viewportNodes.set(viewportNodes);
|
|
1947
1955
|
}
|
|
1948
|
-
}, ...(ngDevMode ?
|
|
1956
|
+
}, { ...(ngDevMode ? { debugName: "viewportEffect" } : {}), injector: this.injector });
|
|
1949
1957
|
this._disposeEffects = [() => viewportEffect.destroy()];
|
|
1950
1958
|
}
|
|
1951
1959
|
ngOnDestroy() {
|
|
@@ -1954,8 +1962,8 @@ class TreeNodeCollectionComponent {
|
|
|
1954
1962
|
trackNode(index, node) {
|
|
1955
1963
|
return node.id;
|
|
1956
1964
|
}
|
|
1957
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1958
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1965
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeCollectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1966
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TreeNodeCollectionComponent, isStandalone: true, selector: "tree-node-collection", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null }, treeModel: { classPropertyName: "treeModel", publicName: "treeModel", isSignal: true, isRequired: false, transformFunction: null }, templates: { classPropertyName: "templates", publicName: "templates", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1959
1967
|
<div [style.margin-top]="marginTop()">
|
|
1960
1968
|
@for (node of viewportNodes(); track trackNode(i, node); let i = $index) {
|
|
1961
1969
|
<tree-node [node]="node" [index]="i" [templates]="templates()">
|
|
@@ -1964,7 +1972,7 @@ class TreeNodeCollectionComponent {
|
|
|
1964
1972
|
</div>
|
|
1965
1973
|
`, isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() => TreeNodeComponent), selector: "TreeNode, tree-node", inputs: ["node", "index", "templates"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1966
1974
|
}
|
|
1967
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
1975
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeCollectionComponent, decorators: [{
|
|
1968
1976
|
type: Component,
|
|
1969
1977
|
args: [{
|
|
1970
1978
|
selector: 'tree-node-collection',
|
|
@@ -1987,8 +1995,8 @@ class TreeNodeComponent {
|
|
|
1987
1995
|
this.templates = input(...(ngDevMode ? [undefined, { debugName: "templates" }] : []));
|
|
1988
1996
|
this.treeNodeFullTemplate = computed(() => this.templates().treeNodeFullTemplate, ...(ngDevMode ? [{ debugName: "treeNodeFullTemplate" }] : []));
|
|
1989
1997
|
}
|
|
1990
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
1991
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
1998
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1999
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TreeNodeComponent, isStandalone: true, selector: "TreeNode, tree-node", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, templates: { classPropertyName: "templates", publicName: "templates", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
1992
2000
|
@if (!treeNodeFullTemplate()) {
|
|
1993
2001
|
<div
|
|
1994
2002
|
[class]="node().getClass()"
|
|
@@ -2034,7 +2042,7 @@ class TreeNodeComponent {
|
|
|
2034
2042
|
</ng-container>
|
|
2035
2043
|
`, isInline: true, dependencies: [{ kind: "component", type: TreeNodeDropSlot, selector: "TreeNodeDropSlot, tree-node-drop-slot", inputs: ["node", "dropIndex"] }, { kind: "component", type: TreeNodeWrapperComponent, selector: "tree-node-wrapper", inputs: ["node", "index", "templates"] }, { kind: "component", type: TreeNodeChildrenComponent, selector: "tree-node-children", inputs: ["node", "templates"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2036
2044
|
}
|
|
2037
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
2045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeNodeComponent, decorators: [{
|
|
2038
2046
|
type: Component,
|
|
2039
2047
|
args: [{ selector: 'TreeNode, tree-node', encapsulation: ViewEncapsulation.None, template: `
|
|
2040
2048
|
@if (!treeNodeFullTemplate()) {
|
|
@@ -2145,8 +2153,8 @@ class TreeComponent {
|
|
|
2145
2153
|
return obj;
|
|
2146
2154
|
}, {});
|
|
2147
2155
|
}
|
|
2148
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
2149
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
2156
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2157
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: TreeComponent, isStandalone: true, selector: "Tree, tree-root", inputs: { nodes: "nodes", options: "options", focused: "focused", state: "state" }, outputs: { toggleExpanded: "toggleExpanded", activate: "activate", deactivate: "deactivate", nodeActivate: "nodeActivate", nodeDeactivate: "nodeDeactivate", select: "select", deselect: "deselect", focus: "focus", blur: "blur", updateData: "updateData", initialized: "initialized", moveNode: "moveNode", copyNode: "copyNode", loadNodeChildren: "loadNodeChildren", changeFilter: "changeFilter", event: "event", stateChange: "stateChange" }, host: { listeners: { "body: keydown": "onKeydown($event)", "body: mousedown": "onMousedown($event)" } }, providers: [TreeModel], queries: [{ propertyName: "loadingTemplate", first: true, predicate: ["loadingTemplate"], descendants: true }, { propertyName: "treeNodeTemplate", first: true, predicate: ["treeNodeTemplate"], descendants: true }, { propertyName: "treeNodeWrapperTemplate", first: true, predicate: ["treeNodeWrapperTemplate"], descendants: true }, { propertyName: "treeNodeFullTemplate", first: true, predicate: ["treeNodeFullTemplate"], descendants: true }], viewQueries: [{ propertyName: "viewportComponent", first: true, predicate: ["viewport"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
2150
2158
|
<tree-viewport #viewport>
|
|
2151
2159
|
<div
|
|
2152
2160
|
class="angular-tree-component"
|
|
@@ -2178,7 +2186,7 @@ class TreeComponent {
|
|
|
2178
2186
|
</tree-viewport>
|
|
2179
2187
|
`, isInline: true, dependencies: [{ kind: "component", type: TreeViewportComponent, selector: "tree-viewport" }, { kind: "component", type: TreeNodeCollectionComponent, selector: "tree-node-collection", inputs: ["nodes", "treeModel", "templates"] }, { kind: "component", type: TreeNodeDropSlot, selector: "TreeNodeDropSlot, tree-node-drop-slot", inputs: ["node", "dropIndex"] }] }); }
|
|
2180
2188
|
}
|
|
2181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
2189
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeComponent, decorators: [{
|
|
2182
2190
|
type: Component,
|
|
2183
2191
|
args: [{ selector: 'Tree, tree-root', providers: [TreeModel], template: `
|
|
2184
2192
|
<tree-viewport #viewport>
|
|
@@ -2281,8 +2289,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
2281
2289
|
}] } });
|
|
2282
2290
|
|
|
2283
2291
|
class TreeModule {
|
|
2284
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
2285
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.
|
|
2292
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2293
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.3", ngImport: i0, type: TreeModule, imports: [CommonModule, TreeComponent,
|
|
2286
2294
|
TreeNodeComponent,
|
|
2287
2295
|
TreeNodeContent,
|
|
2288
2296
|
LoadingComponent,
|
|
@@ -2309,9 +2317,9 @@ class TreeModule {
|
|
|
2309
2317
|
TreeNodeWrapperComponent,
|
|
2310
2318
|
TreeNodeCheckboxComponent,
|
|
2311
2319
|
TreeAnimateOpenDirective] }); }
|
|
2312
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.
|
|
2320
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeModule, imports: [CommonModule] }); }
|
|
2313
2321
|
}
|
|
2314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
2322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: TreeModule, decorators: [{
|
|
2315
2323
|
type: NgModule,
|
|
2316
2324
|
args: [{
|
|
2317
2325
|
declarations: [],
|