@ali-hm/angular-tree-component 19.2.5 → 20.0.3
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 +2 -1
- package/fesm2022/ali-hm-angular-tree-component.mjs +94 -92
- package/fesm2022/ali-hm-angular-tree-component.mjs.map +1 -1
- package/index.d.ts +1109 -3
- package/package.json +3 -3
- package/lib/angular-tree-component.module.d.ts +0 -43
- package/lib/components/loading.component.d.ts +0 -9
- package/lib/components/tree-node-checkbox.component.d.ts +0 -7
- package/lib/components/tree-node-collection.component.d.ts +0 -34
- package/lib/components/tree-node-content.component.d.ts +0 -10
- package/lib/components/tree-node-drop-slot.component.d.ts +0 -10
- package/lib/components/tree-node-expander.component.d.ts +0 -7
- package/lib/components/tree-node-wrapper.component.d.ts +0 -9
- package/lib/components/tree-viewport.component.d.ts +0 -17
- package/lib/components/tree.component.d.ts +0 -47
- package/lib/constants/events.d.ts +0 -19
- package/lib/constants/keys.d.ts +0 -9
- package/lib/defs/api.d.ts +0 -611
- package/lib/directives/tree-animate-open.directive.d.ts +0 -20
- package/lib/directives/tree-drag.directive.d.ts +0 -21
- package/lib/directives/tree-drop.directive.d.ts +0 -33
- package/lib/mobx-angular/mobx-proxy.d.ts +0 -7
- package/lib/mobx-angular/tree-mobx-autorun.directive.d.ts +0 -17
- package/lib/models/tree-dragged-element.model.d.ts +0 -9
- package/lib/models/tree-node.model.d.ts +0 -83
- package/lib/models/tree-options.model.d.ts +0 -77
- package/lib/models/tree-virtual-scroll.model.d.ts +0 -27
- package/lib/models/tree.model.d.ts +0 -91
- package/public-api.d.ts +0 -1
package/README.md
CHANGED
|
@@ -32,10 +32,11 @@ Add css to `styles.scss` or include in `angular.json`:
|
|
|
32
32
|
|
|
33
33
|
## Angular supported version
|
|
34
34
|
|
|
35
|
-
angular-tree-component supports angular
|
|
35
|
+
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
|
+
v20.\*.\* = Angular 20
|
|
39
40
|
v19.\*.\* = Angular 19
|
|
40
41
|
v18.\*.\* = Angular 18
|
|
41
42
|
v17.\*.\* = Angular 17
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, Directive, Injectable, ViewEncapsulation, Component, EventEmitter, HostListener, Output, forwardRef, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, TemplateRef, ViewContainerRef, Input, Directive, Injectable, ViewEncapsulation, Component, ElementRef, Renderer2, NgZone, EventEmitter, HostListener, Output, forwardRef, ViewChild, ContentChild, NgModule } from '@angular/core';
|
|
3
3
|
import { NgIf, NgTemplateOutlet, NgFor, CommonModule } from '@angular/common';
|
|
4
4
|
import { autorun, reaction, computed as computed$1, observable as observable$1, action as action$1 } from 'mobx';
|
|
5
5
|
|
|
6
6
|
class TreeMobxAutorunDirective {
|
|
7
|
-
constructor(
|
|
8
|
-
this.templateRef =
|
|
9
|
-
this.viewContainer =
|
|
7
|
+
constructor() {
|
|
8
|
+
this.templateRef = inject(TemplateRef);
|
|
9
|
+
this.viewContainer = inject(ViewContainerRef);
|
|
10
10
|
this.templateBindings = {};
|
|
11
11
|
}
|
|
12
12
|
ngOnInit() {
|
|
@@ -30,13 +30,13 @@ class TreeMobxAutorunDirective {
|
|
|
30
30
|
this.dispose();
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
34
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
33
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeMobxAutorunDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
34
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.3", type: TreeMobxAutorunDirective, isStandalone: true, selector: "[treeMobxAutorun]", inputs: { treeMobxAutorun: "treeMobxAutorun" }, ngImport: i0 }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeMobxAutorunDirective, decorators: [{
|
|
37
37
|
type: Directive,
|
|
38
38
|
args: [{ selector: '[treeMobxAutorun]' }]
|
|
39
|
-
}],
|
|
39
|
+
}], propDecorators: { treeMobxAutorun: [{
|
|
40
40
|
type: Input
|
|
41
41
|
}] } });
|
|
42
42
|
|
|
@@ -1041,8 +1041,8 @@ class TreeModel {
|
|
|
1041
1041
|
_setActiveNodeMulti(node, value) {
|
|
1042
1042
|
this.activeNodeIds = Object.assign({}, this.activeNodeIds, { [node.id]: value });
|
|
1043
1043
|
}
|
|
1044
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1045
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1044
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeModel, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1045
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeModel }); }
|
|
1046
1046
|
}
|
|
1047
1047
|
__decorate$2([
|
|
1048
1048
|
observable$1
|
|
@@ -1143,7 +1143,7 @@ __decorate$2([
|
|
|
1143
1143
|
__decorate$2([
|
|
1144
1144
|
action$1
|
|
1145
1145
|
], TreeModel.prototype, "setState", null);
|
|
1146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1146
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeModel, decorators: [{
|
|
1147
1147
|
type: Injectable
|
|
1148
1148
|
}], propDecorators: { roots: [], expandedNodeIds: [], selectedLeafNodeIds: [], activeNodeIds: [], hiddenNodeIds: [], focusedNodeId: [], virtualRoot: [], focusedNode: [], expandedNodes: [], activeNodes: [], hiddenNodes: [], selectedLeafNodes: [], setData: [], update: [], setFocusedNode: [], setFocus: [], doForAll: [], focusNextNode: [], focusPreviousNode: [], focusDrillDown: [], focusDrillUp: [], setActiveNode: [], setSelectedNode: [], setExpandedNode: [], expandAll: [], collapseAll: [], setIsHidden: [], setHiddenNodeIds: [], filterNodes: [], clearFilter: [], moveNode: [], copyNode: [], setState: [] } });
|
|
1149
1149
|
|
|
@@ -1160,10 +1160,10 @@ class TreeDraggedElement {
|
|
|
1160
1160
|
isDragging() {
|
|
1161
1161
|
return !!this.get();
|
|
1162
1162
|
}
|
|
1163
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1164
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1163
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeDraggedElement, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1164
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeDraggedElement, providedIn: 'root' }); }
|
|
1165
1165
|
}
|
|
1166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeDraggedElement, decorators: [{
|
|
1167
1167
|
type: Injectable,
|
|
1168
1168
|
args: [{
|
|
1169
1169
|
providedIn: 'root'
|
|
@@ -1185,12 +1185,13 @@ class TreeVirtualScroll {
|
|
|
1185
1185
|
get totalHeight() {
|
|
1186
1186
|
return this.treeModel.virtualRoot ? this.treeModel.virtualRoot.height : 0;
|
|
1187
1187
|
}
|
|
1188
|
-
constructor(
|
|
1189
|
-
this.treeModel =
|
|
1188
|
+
constructor() {
|
|
1189
|
+
this.treeModel = inject(TreeModel);
|
|
1190
1190
|
this.yBlocks = 0;
|
|
1191
1191
|
this.x = 0;
|
|
1192
1192
|
this.viewportHeight = null;
|
|
1193
1193
|
this.viewport = null;
|
|
1194
|
+
const treeModel = this.treeModel;
|
|
1194
1195
|
treeModel.virtualScroll = this;
|
|
1195
1196
|
this._dispose = [autorun(() => this.fixScroll())];
|
|
1196
1197
|
}
|
|
@@ -1311,8 +1312,8 @@ class TreeVirtualScroll {
|
|
|
1311
1312
|
if (this.y > maxY)
|
|
1312
1313
|
this._setYBlocks(maxY / Y_EPSILON);
|
|
1313
1314
|
}
|
|
1314
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1315
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
1315
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1316
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeVirtualScroll }); }
|
|
1316
1317
|
}
|
|
1317
1318
|
__decorate$1([
|
|
1318
1319
|
observable$1
|
|
@@ -1341,9 +1342,9 @@ __decorate$1([
|
|
|
1341
1342
|
__decorate$1([
|
|
1342
1343
|
action$1
|
|
1343
1344
|
], TreeVirtualScroll.prototype, "scrollIntoView", null);
|
|
1344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1345
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeVirtualScroll, decorators: [{
|
|
1345
1346
|
type: Injectable
|
|
1346
|
-
}], ctorParameters: () => [
|
|
1347
|
+
}], ctorParameters: () => [], propDecorators: { yBlocks: [], x: [], viewportHeight: [], y: [], totalHeight: [], _setYBlocks: [], recalcPositions: [], setViewport: [], scrollIntoView: [] } });
|
|
1347
1348
|
function binarySearch(nodes, condition, firstIndex = 0) {
|
|
1348
1349
|
let index = firstIndex;
|
|
1349
1350
|
let toIndex = nodes.length - 1;
|
|
@@ -1363,8 +1364,8 @@ function binarySearch(nodes, condition, firstIndex = 0) {
|
|
|
1363
1364
|
}
|
|
1364
1365
|
|
|
1365
1366
|
class LoadingComponent {
|
|
1366
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1367
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1367
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1368
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: LoadingComponent, isStandalone: true, selector: "tree-loading-component", inputs: { template: "template", node: "node" }, ngImport: i0, template: `
|
|
1368
1369
|
<span *ngIf="!template">loading...</span>
|
|
1369
1370
|
<ng-container
|
|
1370
1371
|
[ngTemplateOutlet]="template"
|
|
@@ -1372,7 +1373,7 @@ class LoadingComponent {
|
|
|
1372
1373
|
</ng-container>
|
|
1373
1374
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1374
1375
|
}
|
|
1375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: LoadingComponent, decorators: [{
|
|
1376
1377
|
type: Component,
|
|
1377
1378
|
args: [{
|
|
1378
1379
|
encapsulation: ViewEncapsulation.None,
|
|
@@ -1393,9 +1394,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1393
1394
|
}] } });
|
|
1394
1395
|
|
|
1395
1396
|
class TreeViewportComponent {
|
|
1396
|
-
constructor(
|
|
1397
|
-
this.elementRef =
|
|
1398
|
-
this.virtualScroll =
|
|
1397
|
+
constructor() {
|
|
1398
|
+
this.elementRef = inject(ElementRef);
|
|
1399
|
+
this.virtualScroll = inject(TreeVirtualScroll);
|
|
1399
1400
|
this.setViewport = this.throttle(() => {
|
|
1400
1401
|
this.virtualScroll.setViewport(this.elementRef.nativeElement);
|
|
1401
1402
|
}, 17);
|
|
@@ -1432,8 +1433,8 @@ class TreeViewportComponent {
|
|
|
1432
1433
|
}
|
|
1433
1434
|
};
|
|
1434
1435
|
}
|
|
1435
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1436
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1436
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeViewportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1437
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeViewportComponent, isStandalone: true, selector: "tree-viewport", providers: [TreeVirtualScroll], ngImport: i0, template: `
|
|
1437
1438
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
1438
1439
|
<div [style.height]="getTotalHeight()">
|
|
1439
1440
|
<ng-content></ng-content>
|
|
@@ -1441,7 +1442,7 @@ class TreeViewportComponent {
|
|
|
1441
1442
|
</ng-container>
|
|
1442
1443
|
`, isInline: true, dependencies: [{ kind: "directive", type: TreeMobxAutorunDirective, selector: "[treeMobxAutorun]", inputs: ["treeMobxAutorun"] }] }); }
|
|
1443
1444
|
}
|
|
1444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeViewportComponent, decorators: [{
|
|
1445
1446
|
type: Component,
|
|
1446
1447
|
args: [{ selector: 'tree-viewport', providers: [TreeVirtualScroll], template: `
|
|
1447
1448
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
@@ -1450,7 +1451,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1450
1451
|
</div>
|
|
1451
1452
|
</ng-container>
|
|
1452
1453
|
`, imports: [TreeMobxAutorunDirective] }]
|
|
1453
|
-
}], ctorParameters: () => [
|
|
1454
|
+
}], ctorParameters: () => [] });
|
|
1454
1455
|
|
|
1455
1456
|
// Re-export mobx operators to be able to use inside components with AOT:
|
|
1456
1457
|
function actionInternal(...args) {
|
|
@@ -1479,11 +1480,11 @@ class TreeDropDirective {
|
|
|
1479
1480
|
allowDrop($event) {
|
|
1480
1481
|
return this._allowDrop(this.treeDraggedElement.get(), $event);
|
|
1481
1482
|
}
|
|
1482
|
-
constructor(
|
|
1483
|
-
this.el =
|
|
1484
|
-
this.renderer =
|
|
1485
|
-
this.treeDraggedElement =
|
|
1486
|
-
this.ngZone =
|
|
1483
|
+
constructor() {
|
|
1484
|
+
this.el = inject(ElementRef);
|
|
1485
|
+
this.renderer = inject(Renderer2);
|
|
1486
|
+
this.treeDraggedElement = inject(TreeDraggedElement);
|
|
1487
|
+
this.ngZone = inject(NgZone);
|
|
1487
1488
|
this.allowDragoverStyling = true;
|
|
1488
1489
|
this.onDropCallback = new EventEmitter();
|
|
1489
1490
|
this.onDragOverCallback = new EventEmitter();
|
|
@@ -1561,13 +1562,13 @@ class TreeDropDirective {
|
|
|
1561
1562
|
removeDisabledClass() {
|
|
1562
1563
|
this.renderer.removeClass(this.el.nativeElement, DRAG_DISABLED_CLASS);
|
|
1563
1564
|
}
|
|
1564
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1565
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1565
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1566
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.3", type: TreeDropDirective, isStandalone: true, selector: "[treeDrop]", inputs: { allowDragoverStyling: "allowDragoverStyling", treeAllowDrop: "treeAllowDrop" }, outputs: { onDropCallback: "treeDrop", onDragOverCallback: "treeDropDragOver", onDragLeaveCallback: "treeDropDragLeave", onDragEnterCallback: "treeDropDragEnter" }, host: { listeners: { "drop": "onDrop($event)" } }, ngImport: i0 }); }
|
|
1566
1567
|
}
|
|
1567
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1568
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeDropDirective, decorators: [{
|
|
1568
1569
|
type: Directive,
|
|
1569
1570
|
args: [{ selector: '[treeDrop]' }]
|
|
1570
|
-
}], ctorParameters: () => [
|
|
1571
|
+
}], ctorParameters: () => [], propDecorators: { allowDragoverStyling: [{
|
|
1571
1572
|
type: Input
|
|
1572
1573
|
}], onDropCallback: [{
|
|
1573
1574
|
type: Output,
|
|
@@ -1598,8 +1599,8 @@ class TreeNodeDropSlot {
|
|
|
1598
1599
|
allowDrop(element, $event) {
|
|
1599
1600
|
return this.node.options.allowDrop(element, { parent: this.node, index: this.dropIndex }, $event);
|
|
1600
1601
|
}
|
|
1601
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1602
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1602
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeDropSlot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1603
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeNodeDropSlot, isStandalone: true, selector: "TreeNodeDropSlot, tree-node-drop-slot", inputs: { node: "node", dropIndex: "dropIndex" }, ngImport: i0, template: `
|
|
1603
1604
|
<div
|
|
1604
1605
|
class="node-drop-slot"
|
|
1605
1606
|
(treeDrop)="onDrop($event)"
|
|
@@ -1608,7 +1609,7 @@ class TreeNodeDropSlot {
|
|
|
1608
1609
|
</div>
|
|
1609
1610
|
`, isInline: true, dependencies: [{ kind: "directive", type: TreeDropDirective, selector: "[treeDrop]", inputs: ["allowDragoverStyling", "treeAllowDrop"], outputs: ["treeDrop", "treeDropDragOver", "treeDropDragLeave", "treeDropDragEnter"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1610
1611
|
}
|
|
1611
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1612
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeDropSlot, decorators: [{
|
|
1612
1613
|
type: Component,
|
|
1613
1614
|
args: [{ selector: 'TreeNodeDropSlot, tree-node-drop-slot', encapsulation: ViewEncapsulation.None, template: `
|
|
1614
1615
|
<div
|
|
@@ -1625,8 +1626,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1625
1626
|
}] } });
|
|
1626
1627
|
|
|
1627
1628
|
class TreeNodeCheckboxComponent {
|
|
1628
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1629
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1629
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1630
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeNodeCheckboxComponent, isStandalone: true, selector: "tree-node-checkbox", inputs: { node: "node" }, ngImport: i0, template: `
|
|
1630
1631
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
1631
1632
|
<input
|
|
1632
1633
|
class="tree-node-checkbox"
|
|
@@ -1638,7 +1639,7 @@ class TreeNodeCheckboxComponent {
|
|
|
1638
1639
|
</ng-container>
|
|
1639
1640
|
`, isInline: true, dependencies: [{ kind: "directive", type: TreeMobxAutorunDirective, selector: "[treeMobxAutorun]", inputs: ["treeMobxAutorun"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1640
1641
|
}
|
|
1641
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1642
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeCheckboxComponent, decorators: [{
|
|
1642
1643
|
type: Component,
|
|
1643
1644
|
args: [{ selector: 'tree-node-checkbox', encapsulation: ViewEncapsulation.None, template: `
|
|
1644
1645
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
@@ -1656,8 +1657,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1656
1657
|
}] } });
|
|
1657
1658
|
|
|
1658
1659
|
class TreeNodeExpanderComponent {
|
|
1659
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1660
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1660
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1661
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeNodeExpanderComponent, isStandalone: true, selector: "tree-node-expander", inputs: { node: "node" }, ngImport: i0, template: `
|
|
1661
1662
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
1662
1663
|
<span
|
|
1663
1664
|
*ngIf="node.hasChildren"
|
|
@@ -1673,7 +1674,7 @@ class TreeNodeExpanderComponent {
|
|
|
1673
1674
|
</ng-container>
|
|
1674
1675
|
`, isInline: true, dependencies: [{ kind: "directive", type: TreeMobxAutorunDirective, selector: "[treeMobxAutorun]", inputs: ["treeMobxAutorun"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1675
1676
|
}
|
|
1676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeExpanderComponent, decorators: [{
|
|
1677
1678
|
type: Component,
|
|
1678
1679
|
args: [{ selector: 'tree-node-expander', encapsulation: ViewEncapsulation.None, template: `
|
|
1679
1680
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
@@ -1696,11 +1697,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1696
1697
|
|
|
1697
1698
|
const DRAG_OVER_CLASS = 'is-dragging-over';
|
|
1698
1699
|
class TreeDragDirective {
|
|
1699
|
-
constructor(
|
|
1700
|
-
this.el =
|
|
1701
|
-
this.renderer =
|
|
1702
|
-
this.treeDraggedElement =
|
|
1703
|
-
this.ngZone =
|
|
1700
|
+
constructor() {
|
|
1701
|
+
this.el = inject(ElementRef);
|
|
1702
|
+
this.renderer = inject(Renderer2);
|
|
1703
|
+
this.treeDraggedElement = inject(TreeDraggedElement);
|
|
1704
|
+
this.ngZone = inject(NgZone);
|
|
1704
1705
|
this.dragEventHandler = this.onDrag.bind(this);
|
|
1705
1706
|
}
|
|
1706
1707
|
ngAfterViewInit() {
|
|
@@ -1735,13 +1736,13 @@ class TreeDragDirective {
|
|
|
1735
1736
|
}
|
|
1736
1737
|
this.treeDraggedElement.set(null);
|
|
1737
1738
|
}
|
|
1738
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1739
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1739
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1740
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.3", type: TreeDragDirective, isStandalone: true, selector: "[treeDrag]", inputs: { draggedElement: ["treeDrag", "draggedElement"], treeDragEnabled: "treeDragEnabled" }, host: { listeners: { "dragstart": "onDragStart($event)", "dragend": "onDragEnd()" } }, ngImport: i0 }); }
|
|
1740
1741
|
}
|
|
1741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeDragDirective, decorators: [{
|
|
1742
1743
|
type: Directive,
|
|
1743
1744
|
args: [{ selector: '[treeDrag]' }]
|
|
1744
|
-
}], ctorParameters: () => [
|
|
1745
|
+
}], ctorParameters: () => [], propDecorators: { draggedElement: [{
|
|
1745
1746
|
type: Input,
|
|
1746
1747
|
args: ['treeDrag']
|
|
1747
1748
|
}], treeDragEnabled: [{
|
|
@@ -1755,15 +1756,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1755
1756
|
}] } });
|
|
1756
1757
|
|
|
1757
1758
|
class TreeNodeContent {
|
|
1758
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1759
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1759
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1760
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeNodeContent, isStandalone: true, selector: "tree-node-content", inputs: { node: "node", index: "index", template: "template" }, ngImport: i0, template: `
|
|
1760
1761
|
<span *ngIf="!template">{{ node.displayField }}</span>
|
|
1761
1762
|
<ng-container
|
|
1762
1763
|
[ngTemplateOutlet]="template"
|
|
1763
1764
|
[ngTemplateOutletContext]="{ $implicit: node, node: node, index: index }">
|
|
1764
1765
|
</ng-container>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1765
1766
|
}
|
|
1766
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeContent, decorators: [{
|
|
1767
1768
|
type: Component,
|
|
1768
1769
|
args: [{
|
|
1769
1770
|
selector: 'tree-node-content',
|
|
@@ -1785,8 +1786,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1785
1786
|
}] } });
|
|
1786
1787
|
|
|
1787
1788
|
class TreeNodeWrapperComponent {
|
|
1788
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1789
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1789
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1790
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeNodeWrapperComponent, isStandalone: true, selector: "tree-node-wrapper", inputs: { node: "node", index: "index", templates: "templates" }, ngImport: i0, template: `
|
|
1790
1791
|
<div *ngIf="!templates.treeNodeWrapperTemplate" class="node-wrapper" [style.padding-left]="node.getNodePadding()">
|
|
1791
1792
|
<tree-node-checkbox *ngIf="node.options.useCheckbox" [node]="node"></tree-node-checkbox>
|
|
1792
1793
|
<tree-node-expander [node]="node"></tree-node-expander>
|
|
@@ -1817,7 +1818,7 @@ class TreeNodeWrapperComponent {
|
|
|
1817
1818
|
</ng-container>
|
|
1818
1819
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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 }); }
|
|
1819
1820
|
}
|
|
1820
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeWrapperComponent, decorators: [{
|
|
1821
1822
|
type: Component,
|
|
1822
1823
|
args: [{ selector: 'tree-node-wrapper', encapsulation: ViewEncapsulation.None, template: `
|
|
1823
1824
|
<div *ngIf="!templates.treeNodeWrapperTemplate" class="node-wrapper" [style.padding-left]="node.getNodePadding()">
|
|
@@ -1859,6 +1860,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
1859
1860
|
|
|
1860
1861
|
const EASE_ACCELERATION = 1.005;
|
|
1861
1862
|
class TreeAnimateOpenDirective {
|
|
1863
|
+
constructor() {
|
|
1864
|
+
this.renderer = inject(Renderer2);
|
|
1865
|
+
this.templateRef = inject(TemplateRef);
|
|
1866
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
1867
|
+
}
|
|
1862
1868
|
set isOpen(value) {
|
|
1863
1869
|
if (value) {
|
|
1864
1870
|
this._show();
|
|
@@ -1872,11 +1878,6 @@ class TreeAnimateOpenDirective {
|
|
|
1872
1878
|
this._isOpen = !!value;
|
|
1873
1879
|
}
|
|
1874
1880
|
;
|
|
1875
|
-
constructor(renderer, templateRef, viewContainerRef) {
|
|
1876
|
-
this.renderer = renderer;
|
|
1877
|
-
this.templateRef = templateRef;
|
|
1878
|
-
this.viewContainerRef = viewContainerRef;
|
|
1879
|
-
}
|
|
1880
1881
|
_show() {
|
|
1881
1882
|
if (this.innerElement)
|
|
1882
1883
|
return;
|
|
@@ -1934,13 +1935,13 @@ class TreeAnimateOpenDirective {
|
|
|
1934
1935
|
}
|
|
1935
1936
|
}, 17);
|
|
1936
1937
|
}
|
|
1937
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1938
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1938
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeAnimateOpenDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1939
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.3", type: TreeAnimateOpenDirective, isStandalone: true, selector: "[treeAnimateOpen]", inputs: { animateSpeed: ["treeAnimateOpenSpeed", "animateSpeed"], animateAcceleration: ["treeAnimateOpenAcceleration", "animateAcceleration"], isEnabled: ["treeAnimateOpenEnabled", "isEnabled"], isOpen: ["treeAnimateOpen", "isOpen"] }, ngImport: i0 }); }
|
|
1939
1940
|
}
|
|
1940
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1941
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeAnimateOpenDirective, decorators: [{
|
|
1941
1942
|
type: Directive,
|
|
1942
1943
|
args: [{ selector: '[treeAnimateOpen]' }]
|
|
1943
|
-
}],
|
|
1944
|
+
}], propDecorators: { animateSpeed: [{
|
|
1944
1945
|
type: Input,
|
|
1945
1946
|
args: ['treeAnimateOpenSpeed']
|
|
1946
1947
|
}], animateAcceleration: [{
|
|
@@ -1961,8 +1962,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
1961
1962
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1962
1963
|
};
|
|
1963
1964
|
class TreeNodeChildrenComponent {
|
|
1964
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1965
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1965
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeChildrenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1966
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeNodeChildrenComponent, isStandalone: true, selector: "tree-node-children", inputs: { node: "node", templates: "templates" }, ngImport: i0, template: `
|
|
1966
1967
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
1967
1968
|
<div
|
|
1968
1969
|
[class.tree-children]="true"
|
|
@@ -1992,7 +1993,7 @@ class TreeNodeChildrenComponent {
|
|
|
1992
1993
|
</ng-container>
|
|
1993
1994
|
`, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => TreeMobxAutorunDirective), selector: "[treeMobxAutorun]", inputs: ["treeMobxAutorun"] }, { kind: "directive", type: i0.forwardRef(() => TreeAnimateOpenDirective), selector: "[treeAnimateOpen]", inputs: ["treeAnimateOpenSpeed", "treeAnimateOpenAcceleration", "treeAnimateOpenEnabled", "treeAnimateOpen"] }, { kind: "directive", type: i0.forwardRef(() => NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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 }); }
|
|
1994
1995
|
}
|
|
1995
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeChildrenComponent, decorators: [{
|
|
1996
1997
|
type: Component,
|
|
1997
1998
|
args: [{ selector: 'tree-node-children', encapsulation: ViewEncapsulation.None, template: `
|
|
1998
1999
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
@@ -2072,8 +2073,8 @@ class TreeNodeCollectionComponent {
|
|
|
2072
2073
|
trackNode(index, node) {
|
|
2073
2074
|
return node.id;
|
|
2074
2075
|
}
|
|
2075
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2076
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2076
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeCollectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2077
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeNodeCollectionComponent, isStandalone: true, selector: "tree-node-collection", inputs: { nodes: "nodes", treeModel: "treeModel", templates: "templates" }, ngImport: i0, template: `
|
|
2077
2078
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
2078
2079
|
<div [style.margin-top]="marginTop">
|
|
2079
2080
|
<tree-node
|
|
@@ -2099,7 +2100,7 @@ __decorate([
|
|
|
2099
2100
|
__decorate([
|
|
2100
2101
|
action
|
|
2101
2102
|
], TreeNodeCollectionComponent.prototype, "setNodes", null);
|
|
2102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2103
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeCollectionComponent, decorators: [{
|
|
2103
2104
|
type: Component,
|
|
2104
2105
|
args: [{
|
|
2105
2106
|
selector: 'tree-node-collection',
|
|
@@ -2127,8 +2128,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
2127
2128
|
type: Input
|
|
2128
2129
|
}], viewportNodes: [], marginTop: [], setNodes: [] } });
|
|
2129
2130
|
class TreeNodeComponent {
|
|
2130
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2131
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2131
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2132
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: TreeNodeComponent, isStandalone: true, selector: "TreeNode, tree-node", inputs: { node: "node", index: "index", templates: "templates" }, ngImport: i0, template: `
|
|
2132
2133
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
2133
2134
|
<div
|
|
2134
2135
|
*ngIf="!templates.treeNodeFullTemplate"
|
|
@@ -2174,7 +2175,7 @@ class TreeNodeComponent {
|
|
|
2174
2175
|
</ng-container>
|
|
2175
2176
|
`, isInline: true, dependencies: [{ kind: "directive", type: TreeMobxAutorunDirective, selector: "[treeMobxAutorun]", inputs: ["treeMobxAutorun"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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 }); }
|
|
2176
2177
|
}
|
|
2177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeNodeComponent, decorators: [{
|
|
2178
2179
|
type: Component,
|
|
2179
2180
|
args: [{ selector: 'TreeNode, tree-node', encapsulation: ViewEncapsulation.None, template: `
|
|
2180
2181
|
<ng-container *treeMobxAutorun="{ dontDetach: true }">
|
|
@@ -2243,9 +2244,10 @@ class TreeComponent {
|
|
|
2243
2244
|
set state(state) {
|
|
2244
2245
|
this.treeModel.setState(state);
|
|
2245
2246
|
}
|
|
2246
|
-
constructor(
|
|
2247
|
-
this.treeModel =
|
|
2248
|
-
this.treeDraggedElement =
|
|
2247
|
+
constructor() {
|
|
2248
|
+
this.treeModel = inject(TreeModel);
|
|
2249
|
+
this.treeDraggedElement = inject(TreeDraggedElement);
|
|
2250
|
+
const treeModel = this.treeModel;
|
|
2249
2251
|
treeModel.eventNames.forEach((name) => this[name] = new EventEmitter());
|
|
2250
2252
|
treeModel.subscribeToState((state) => this.stateChange.emit(state));
|
|
2251
2253
|
}
|
|
@@ -2285,8 +2287,8 @@ class TreeComponent {
|
|
|
2285
2287
|
return obj;
|
|
2286
2288
|
}, {});
|
|
2287
2289
|
}
|
|
2288
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2289
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2290
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2291
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.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: `
|
|
2290
2292
|
<tree-viewport #viewport>
|
|
2291
2293
|
<div
|
|
2292
2294
|
class="angular-tree-component"
|
|
@@ -2313,7 +2315,7 @@ class TreeComponent {
|
|
|
2313
2315
|
</tree-viewport>
|
|
2314
2316
|
`, isInline: true, dependencies: [{ kind: "component", type: TreeViewportComponent, selector: "tree-viewport" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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"] }] }); }
|
|
2315
2317
|
}
|
|
2316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeComponent, decorators: [{
|
|
2317
2319
|
type: Component,
|
|
2318
2320
|
args: [{ selector: 'Tree, tree-root', providers: [TreeModel], template: `
|
|
2319
2321
|
<tree-viewport #viewport>
|
|
@@ -2341,7 +2343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
2341
2343
|
</div>
|
|
2342
2344
|
</tree-viewport>
|
|
2343
2345
|
`, imports: [TreeViewportComponent, NgIf, TreeNodeCollectionComponent, TreeNodeDropSlot] }]
|
|
2344
|
-
}], ctorParameters: () => [
|
|
2346
|
+
}], ctorParameters: () => [], propDecorators: { loadingTemplate: [{
|
|
2345
2347
|
type: ContentChild,
|
|
2346
2348
|
args: ['loadingTemplate', { static: false }]
|
|
2347
2349
|
}], treeNodeTemplate: [{
|
|
@@ -2407,8 +2409,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
2407
2409
|
}] } });
|
|
2408
2410
|
|
|
2409
2411
|
class TreeModule {
|
|
2410
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2411
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2412
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2413
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.3", ngImport: i0, type: TreeModule, imports: [CommonModule, TreeComponent,
|
|
2412
2414
|
TreeNodeComponent,
|
|
2413
2415
|
TreeNodeContent,
|
|
2414
2416
|
LoadingComponent,
|
|
@@ -2437,9 +2439,9 @@ class TreeModule {
|
|
|
2437
2439
|
TreeNodeCheckboxComponent,
|
|
2438
2440
|
TreeAnimateOpenDirective,
|
|
2439
2441
|
TreeMobxAutorunDirective] }); }
|
|
2440
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2442
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeModule, imports: [CommonModule] }); }
|
|
2441
2443
|
}
|
|
2442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: TreeModule, decorators: [{
|
|
2443
2445
|
type: NgModule,
|
|
2444
2446
|
args: [{
|
|
2445
2447
|
declarations: [],
|