@ali-hm/angular-tree-component 20.1.6 → 20.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,44 +1,6 @@
1
1
  import * as i0 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
- import { NgIf, NgTemplateOutlet, NgFor, CommonModule } from '@angular/common';
4
- import { autorun, reaction, computed as computed$1, observable as observable$1, action as action$1 } from 'mobx';
5
-
6
- class TreeMobxAutorunDirective {
7
- constructor() {
8
- this.templateRef = inject(TemplateRef);
9
- this.viewContainer = inject(ViewContainerRef);
10
- this.templateBindings = {};
11
- }
12
- ngOnInit() {
13
- this.view = this.viewContainer.createEmbeddedView(this.templateRef);
14
- if (this.dispose) {
15
- this.dispose();
16
- }
17
- if (this.shouldDetach()) {
18
- this.view.detach();
19
- }
20
- this.autoDetect(this.view);
21
- }
22
- shouldDetach() {
23
- return this.treeMobxAutorun && this.treeMobxAutorun.detach;
24
- }
25
- autoDetect(view) {
26
- this.dispose = autorun(() => view.detectChanges());
27
- }
28
- ngOnDestroy() {
29
- if (this.dispose) {
30
- this.dispose();
31
- }
32
- }
33
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeMobxAutorunDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
34
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.6", type: TreeMobxAutorunDirective, isStandalone: true, selector: "[treeMobxAutorun]", inputs: { treeMobxAutorun: "treeMobxAutorun" }, ngImport: i0 }); }
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeMobxAutorunDirective, decorators: [{
37
- type: Directive,
38
- args: [{ selector: '[treeMobxAutorun]' }]
39
- }], propDecorators: { treeMobxAutorun: [{
40
- type: Input
41
- }] } });
2
+ import { signal, effect, Injectable, inject, input, ViewEncapsulation, Component, ElementRef, Injector, Renderer2, NgZone, output, HostListener, Directive, computed, TemplateRef, ViewContainerRef, forwardRef, EventEmitter, Output, Input, ViewChild, ContentChild, NgModule } from '@angular/core';
3
+ import { NgTemplateOutlet, NgIf, CommonModule } from '@angular/common';
42
4
 
43
5
  const KEYS = {
44
6
  LEFT: 37,
@@ -219,39 +181,37 @@ const TREE_EVENTS = {
219
181
  stateChange: 'stateChange'
220
182
  };
221
183
 
222
- var __decorate$3 = (this && this.__decorate) || function (decorators, target, key, desc) {
223
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
224
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
225
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
226
- return c > 3 && r && Object.defineProperty(target, key, r), r;
227
- };
228
184
  class TreeNode {
185
+ // Public getters/setters for API compatibility
186
+ get children() { return this._children(); }
187
+ set children(value) { this._children.set(value); }
188
+ get index() { return this._index(); }
189
+ set index(value) { this._index.set(value); }
190
+ get position() { return this._position(); }
191
+ set position(value) { this._position.set(value); }
192
+ get height() { return this._height(); }
193
+ set height(value) { this._height.set(value); }
194
+ // Computed properties
229
195
  get isHidden() { return this.treeModel.isHidden(this); }
230
- ;
231
196
  get isExpanded() { return this.treeModel.isExpanded(this); }
232
- ;
233
197
  get isActive() { return this.treeModel.isActive(this); }
234
- ;
235
198
  get isFocused() { return this.treeModel.isNodeFocused(this); }
236
- ;
237
199
  get isSelected() {
238
200
  if (this.isSelectable()) {
239
201
  return this.treeModel.isSelected(this);
240
202
  }
241
203
  else {
242
- return this.children.some((node) => node.isSelected);
204
+ return this.children?.some((node) => node.isSelected);
243
205
  }
244
206
  }
245
- ;
246
207
  get isAllSelected() {
247
208
  if (this.isSelectable()) {
248
209
  return this.treeModel.isSelected(this);
249
210
  }
250
211
  else {
251
- return this.children.every((node) => node.isAllSelected);
212
+ return this.children?.every((node) => node.isAllSelected);
252
213
  }
253
214
  }
254
- ;
255
215
  get isPartiallySelected() {
256
216
  return this.isSelected && !this.isAllSelected;
257
217
  }
@@ -271,7 +231,12 @@ class TreeNode {
271
231
  this.data = data;
272
232
  this.parent = parent;
273
233
  this.treeModel = treeModel;
274
- this.position = 0;
234
+ this._isLoadingChildren = false;
235
+ // Private signals
236
+ this._children = signal(undefined, ...(ngDevMode ? [{ debugName: "_children" }] : []));
237
+ this._index = signal(undefined, ...(ngDevMode ? [{ debugName: "_index" }] : []));
238
+ this._position = signal(0, ...(ngDevMode ? [{ debugName: "_position" }] : []));
239
+ this._height = signal(undefined, ...(ngDevMode ? [{ debugName: "_height" }] : []));
275
240
  this.allowDrop = (element, $event) => {
276
241
  return this.options.allowDrop(element, { parent: this, index: 0 }, $event);
277
242
  };
@@ -452,25 +417,29 @@ class TreeNode {
452
417
  setIsExpanded(value) {
453
418
  if (this.hasChildren) {
454
419
  this.treeModel.setExpandedNode(this, value);
420
+ // Load children when expanding if they haven't been loaded yet
421
+ if (value && !this.children && this.hasChildren && !this._isLoadingChildren) {
422
+ this._isLoadingChildren = true;
423
+ this.loadNodeChildren().finally(() => {
424
+ this._isLoadingChildren = false;
425
+ });
426
+ }
455
427
  }
456
428
  return this;
457
429
  }
458
430
  ;
459
431
  autoLoadChildren() {
460
- this.handler =
461
- reaction(() => this.isExpanded, (isExpanded) => {
462
- if (!this.children && this.hasChildren && isExpanded) {
463
- this.loadNodeChildren();
464
- }
465
- }, { fireImmediately: true });
432
+ // Instead of using effect, we'll load children when the node is expanded
433
+ // This is handled by the toggleExpanded and setIsExpanded methods
434
+ // Check immediately if we should load
435
+ if (this.isExpanded && !this.children && this.hasChildren) {
436
+ this.loadNodeChildren();
437
+ }
466
438
  }
467
439
  dispose() {
468
440
  if (this.children) {
469
441
  this.children.forEach((child) => child.dispose());
470
442
  }
471
- if (this.handler) {
472
- this.handler();
473
- }
474
443
  this.parent = null;
475
444
  this.children = null;
476
445
  }
@@ -555,77 +524,62 @@ class TreeNode {
555
524
  .map((c, index) => new TreeNode(c, this, this.treeModel, index));
556
525
  }
557
526
  }
558
- __decorate$3([
559
- computed$1
560
- ], TreeNode.prototype, "isHidden", null);
561
- __decorate$3([
562
- computed$1
563
- ], TreeNode.prototype, "isExpanded", null);
564
- __decorate$3([
565
- computed$1
566
- ], TreeNode.prototype, "isActive", null);
567
- __decorate$3([
568
- computed$1
569
- ], TreeNode.prototype, "isFocused", null);
570
- __decorate$3([
571
- computed$1
572
- ], TreeNode.prototype, "isSelected", null);
573
- __decorate$3([
574
- computed$1
575
- ], TreeNode.prototype, "isAllSelected", null);
576
- __decorate$3([
577
- computed$1
578
- ], TreeNode.prototype, "isPartiallySelected", null);
579
- __decorate$3([
580
- observable$1
581
- ], TreeNode.prototype, "children", void 0);
582
- __decorate$3([
583
- observable$1
584
- ], TreeNode.prototype, "index", void 0);
585
- __decorate$3([
586
- observable$1
587
- ], TreeNode.prototype, "position", void 0);
588
- __decorate$3([
589
- observable$1
590
- ], TreeNode.prototype, "height", void 0);
591
- __decorate$3([
592
- computed$1
593
- ], TreeNode.prototype, "level", null);
594
- __decorate$3([
595
- computed$1
596
- ], TreeNode.prototype, "path", null);
597
- __decorate$3([
598
- computed$1
599
- ], TreeNode.prototype, "visibleChildren", null);
600
- __decorate$3([
601
- action$1
602
- ], TreeNode.prototype, "setIsSelected", null);
603
- __decorate$3([
604
- action$1
605
- ], TreeNode.prototype, "_initChildren", null);
606
527
  function uuid() {
607
528
  return Math.floor(Math.random() * 10000000000000);
608
529
  }
609
530
 
610
- var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) {
611
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
612
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
613
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
614
- return c > 3 && r && Object.defineProperty(target, key, r), r;
615
- };
616
531
  class TreeModel {
617
532
  constructor() {
618
533
  this.options = new TreeOptions();
619
534
  this.eventNames = Object.keys(TREE_EVENTS);
620
- this.expandedNodeIds = {};
621
- this.selectedLeafNodeIds = {};
622
- this.activeNodeIds = {};
623
- this.hiddenNodeIds = {};
624
- this.focusedNodeId = null;
535
+ // Private signals
536
+ this._roots = signal(undefined, ...(ngDevMode ? [{ debugName: "_roots" }] : []));
537
+ this._expandedNodeIds = signal({}, ...(ngDevMode ? [{ debugName: "_expandedNodeIds" }] : []));
538
+ this._selectedLeafNodeIds = signal({}, ...(ngDevMode ? [{ debugName: "_selectedLeafNodeIds" }] : []));
539
+ this._activeNodeIds = signal({}, ...(ngDevMode ? [{ debugName: "_activeNodeIds" }] : []));
540
+ this._hiddenNodeIds = signal({}, ...(ngDevMode ? [{ debugName: "_hiddenNodeIds" }] : []));
541
+ this._focusedNodeId = signal(null, ...(ngDevMode ? [{ debugName: "_focusedNodeId" }] : []));
542
+ this._virtualRoot = signal(undefined, ...(ngDevMode ? [{ debugName: "_virtualRoot" }] : []));
625
543
  this.firstUpdate = true;
626
544
  this.subscriptions = [];
627
545
  }
628
546
  static { this.focusedTree = null; }
547
+ // Public getters/setters to maintain API compatibility
548
+ get roots() { return this._roots(); }
549
+ set roots(value) { this._roots.set(value); }
550
+ get virtualRoot() { return this._virtualRoot(); }
551
+ get focusedNode() {
552
+ const id = this._focusedNodeId();
553
+ return id ? this.getNodeById(id) : null;
554
+ }
555
+ get expandedNodes() {
556
+ const ids = this._expandedNodeIds();
557
+ const nodes = Object.keys(ids)
558
+ .filter((id) => ids[id])
559
+ .map((id) => this.getNodeById(id));
560
+ return nodes.filter(Boolean);
561
+ }
562
+ get activeNodes() {
563
+ const ids = this._activeNodeIds();
564
+ const nodes = Object.keys(ids)
565
+ .filter((id) => ids[id])
566
+ .map((id) => this.getNodeById(id));
567
+ return nodes.filter(Boolean);
568
+ }
569
+ get hiddenNodes() {
570
+ const ids = this._hiddenNodeIds();
571
+ const nodes = Object.keys(ids)
572
+ .filter((id) => ids[id])
573
+ .map((id) => this.getNodeById(id));
574
+ return nodes.filter(Boolean);
575
+ }
576
+ get selectedLeafNodes() {
577
+ const ids = this._selectedLeafNodeIds();
578
+ const nodes = Object.keys(ids)
579
+ .filter((id) => ids[id])
580
+ .map((id) => this.getNodeById(id));
581
+ return nodes.filter(Boolean);
582
+ }
629
583
  // events
630
584
  fireEvent(event) {
631
585
  event.treeModel = this;
@@ -647,7 +601,7 @@ class TreeModel {
647
601
  return this.activeNodes;
648
602
  }
649
603
  getVisibleRoots() {
650
- return this.virtualRoot.visibleChildren;
604
+ return this._virtualRoot()?.visibleChildren;
651
605
  }
652
606
  getFirstRoot(skipHidden = false) {
653
607
  const root = skipHidden ? this.getVisibleRoots() : this.roots;
@@ -664,40 +618,14 @@ class TreeModel {
664
618
  return this.focusedNode === node;
665
619
  }
666
620
  isEmptyTree() {
667
- return this.roots && this.roots.length === 0;
668
- }
669
- get focusedNode() {
670
- return this.focusedNodeId ? this.getNodeById(this.focusedNodeId) : null;
671
- }
672
- get expandedNodes() {
673
- const nodes = Object.keys(this.expandedNodeIds)
674
- .filter((id) => this.expandedNodeIds[id])
675
- .map((id) => this.getNodeById(id));
676
- return nodes.filter(Boolean);
677
- }
678
- get activeNodes() {
679
- const nodes = Object.keys(this.activeNodeIds)
680
- .filter((id) => this.activeNodeIds[id])
681
- .map((id) => this.getNodeById(id));
682
- return nodes.filter(Boolean);
683
- }
684
- get hiddenNodes() {
685
- const nodes = Object.keys(this.hiddenNodeIds)
686
- .filter((id) => this.hiddenNodeIds[id])
687
- .map((id) => this.getNodeById(id));
688
- return nodes.filter(Boolean);
689
- }
690
- get selectedLeafNodes() {
691
- const nodes = Object.keys(this.selectedLeafNodeIds)
692
- .filter((id) => this.selectedLeafNodeIds[id])
693
- .map((id) => this.getNodeById(id));
694
- return nodes.filter(Boolean);
621
+ const rootNodes = this.roots;
622
+ return rootNodes && rootNodes.length === 0;
695
623
  }
696
624
  // locating nodes
697
625
  getNodeByPath(path, startNode = null) {
698
626
  if (!path)
699
627
  return null;
700
- startNode = startNode || this.virtualRoot;
628
+ startNode = startNode || this._virtualRoot();
701
629
  if (path.length === 0)
702
630
  return startNode;
703
631
  if (!startNode.children)
@@ -713,7 +641,7 @@ class TreeModel {
713
641
  return this.getNodeBy((node) => node.id.toString() === idStr);
714
642
  }
715
643
  getNodeBy(predicate, startNode = null) {
716
- startNode = startNode || this.virtualRoot;
644
+ startNode = startNode || this._virtualRoot();
717
645
  if (!startNode.children)
718
646
  return null;
719
647
  const found = startNode.children.find(predicate);
@@ -729,16 +657,16 @@ class TreeModel {
729
657
  }
730
658
  }
731
659
  isExpanded(node) {
732
- return this.expandedNodeIds[node.id];
660
+ return this._expandedNodeIds()[node.id];
733
661
  }
734
662
  isHidden(node) {
735
- return this.hiddenNodeIds[node.id];
663
+ return this._hiddenNodeIds()[node.id];
736
664
  }
737
665
  isActive(node) {
738
- return this.activeNodeIds[node.id];
666
+ return this._activeNodeIds()[node.id];
739
667
  }
740
668
  isSelected(node) {
741
- return this.selectedLeafNodeIds[node.id];
669
+ return this._selectedLeafNodeIds()[node.id];
742
670
  }
743
671
  ngOnDestroy() {
744
672
  this.dispose();
@@ -746,8 +674,9 @@ class TreeModel {
746
674
  }
747
675
  dispose() {
748
676
  // Dispose reactions of the replaced nodes
749
- if (this.virtualRoot) {
750
- this.virtualRoot.dispose();
677
+ const vRoot = this._virtualRoot();
678
+ if (vRoot) {
679
+ vRoot.dispose();
751
680
  }
752
681
  }
753
682
  unsubscribeAll() {
@@ -775,11 +704,13 @@ class TreeModel {
775
704
  [this.options.childrenField]: this.nodes
776
705
  };
777
706
  this.dispose();
778
- this.virtualRoot = new TreeNode(virtualRootConfig, null, this, 0);
779
- this.roots = this.virtualRoot.children;
707
+ const newVirtualRoot = new TreeNode(virtualRootConfig, null, this, 0);
708
+ this._virtualRoot.set(newVirtualRoot);
709
+ this.roots = newVirtualRoot.children;
780
710
  // Fire event:
711
+ const currentRoots = this.roots;
781
712
  if (this.firstUpdate) {
782
- if (this.roots) {
713
+ if (currentRoots) {
783
714
  this.firstUpdate = false;
784
715
  this._calculateExpandedNodes();
785
716
  }
@@ -789,7 +720,7 @@ class TreeModel {
789
720
  }
790
721
  }
791
722
  setFocusedNode(node) {
792
- this.focusedNodeId = node ? node.id : null;
723
+ this._focusedNodeId.set(node ? node.id : null);
793
724
  }
794
725
  setFocus(value) {
795
726
  TreeModel.focusedTree = value ? this : null;
@@ -851,7 +782,7 @@ class TreeModel {
851
782
  }
852
783
  }
853
784
  setSelectedNode(node, value) {
854
- this.selectedLeafNodeIds = Object.assign({}, this.selectedLeafNodeIds, { [node.id]: value });
785
+ this._selectedLeafNodeIds.update(ids => ({ ...ids, [node.id]: value }));
855
786
  if (value) {
856
787
  node.focus();
857
788
  this.fireEvent({ eventName: TREE_EVENTS.select, node });
@@ -861,7 +792,7 @@ class TreeModel {
861
792
  }
862
793
  }
863
794
  setExpandedNode(node, value) {
864
- this.expandedNodeIds = Object.assign({}, this.expandedNodeIds, { [node.id]: value });
795
+ this._expandedNodeIds.update(ids => ({ ...ids, [node.id]: value }));
865
796
  this.fireEvent({ eventName: TREE_EVENTS.toggleExpanded, node, isExpanded: value });
866
797
  }
867
798
  expandAll() {
@@ -871,12 +802,14 @@ class TreeModel {
871
802
  this.roots.forEach((root) => root.collapseAll());
872
803
  }
873
804
  setIsHidden(node, value) {
874
- this.hiddenNodeIds = Object.assign({}, this.hiddenNodeIds, { [node.id]: value });
805
+ this._hiddenNodeIds.update(ids => ({ ...ids, [node.id]: value }));
875
806
  }
876
807
  setHiddenNodeIds(nodeIds) {
877
- this.hiddenNodeIds = nodeIds.reduce((hiddenNodeIds, id) => Object.assign(hiddenNodeIds, {
808
+ const ids = nodeIds.reduce((hiddenNodeIds, id) => ({
809
+ ...hiddenNodeIds,
878
810
  [id]: true
879
811
  }), {});
812
+ this._hiddenNodeIds.set(ids);
880
813
  }
881
814
  performKeyAction(node, $event) {
882
815
  const keyAction = this.options.actionMapping.keys[$event.keyCode];
@@ -908,11 +841,11 @@ class TreeModel {
908
841
  }
909
842
  const ids = {};
910
843
  this.roots.forEach((node) => this._filterNode(ids, node, filterFn, autoShow));
911
- this.hiddenNodeIds = ids;
844
+ this._hiddenNodeIds.set(ids);
912
845
  this.fireEvent({ eventName: TREE_EVENTS.changeFilter });
913
846
  }
914
847
  clearFilter() {
915
- this.hiddenNodeIds = {};
848
+ this._hiddenNodeIds.set({});
916
849
  this.fireEvent({ eventName: TREE_EVENTS.changeFilter });
917
850
  }
918
851
  moveNode(node, to) {
@@ -960,26 +893,24 @@ class TreeModel {
960
893
  }
961
894
  getState() {
962
895
  return {
963
- expandedNodeIds: this.expandedNodeIds,
964
- selectedLeafNodeIds: this.selectedLeafNodeIds,
965
- activeNodeIds: this.activeNodeIds,
966
- hiddenNodeIds: this.hiddenNodeIds,
967
- focusedNodeId: this.focusedNodeId
896
+ expandedNodeIds: this._expandedNodeIds(),
897
+ selectedLeafNodeIds: this._selectedLeafNodeIds(),
898
+ activeNodeIds: this._activeNodeIds(),
899
+ hiddenNodeIds: this._hiddenNodeIds(),
900
+ focusedNodeId: this._focusedNodeId()
968
901
  };
969
902
  }
970
903
  setState(state) {
971
904
  if (!state)
972
905
  return;
973
- Object.assign(this, {
974
- expandedNodeIds: state.expandedNodeIds || {},
975
- selectedLeafNodeIds: state.selectedLeafNodeIds || {},
976
- activeNodeIds: state.activeNodeIds || {},
977
- hiddenNodeIds: state.hiddenNodeIds || {},
978
- focusedNodeId: state.focusedNodeId
979
- });
906
+ this._expandedNodeIds.set(state.expandedNodeIds || {});
907
+ this._selectedLeafNodeIds.set(state.selectedLeafNodeIds || {});
908
+ this._activeNodeIds.set(state.activeNodeIds || {});
909
+ this._hiddenNodeIds.set(state.hiddenNodeIds || {});
910
+ this._focusedNodeId.set(state.focusedNodeId);
980
911
  }
981
912
  subscribeToState(fn) {
982
- autorun(() => fn(this.getState()));
913
+ effect(() => fn(this.getState()));
983
914
  }
984
915
  canMoveNode(node, to, fromIndex = undefined) {
985
916
  const fromNodeIndex = fromIndex || node.getIndexInParent();
@@ -1015,9 +946,9 @@ class TreeModel {
1015
946
  return isVisible;
1016
947
  }
1017
948
  _calculateExpandedNodes(startNode = null) {
1018
- startNode = startNode || this.virtualRoot;
949
+ startNode = startNode || this._virtualRoot();
1019
950
  if (startNode.data[this.options.isExpandedField]) {
1020
- this.expandedNodeIds = Object.assign({}, this.expandedNodeIds, { [startNode.id]: true });
951
+ this._expandedNodeIds.update(ids => ({ ...ids, [startNode.id]: true }));
1021
952
  }
1022
953
  if (startNode.children) {
1023
954
  startNode.children.forEach((child) => this._calculateExpandedNodes(child));
@@ -1032,120 +963,21 @@ class TreeModel {
1032
963
  this.fireEvent({ eventName: TREE_EVENTS.nodeDeactivate, node: activeNode }); // For IE11
1033
964
  });
1034
965
  if (value) {
1035
- this.activeNodeIds = { [node.id]: true };
966
+ this._activeNodeIds.set({ [node.id]: true });
1036
967
  }
1037
968
  else {
1038
- this.activeNodeIds = {};
969
+ this._activeNodeIds.set({});
1039
970
  }
1040
971
  }
1041
972
  _setActiveNodeMulti(node, value) {
1042
- this.activeNodeIds = Object.assign({}, this.activeNodeIds, { [node.id]: value });
973
+ this._activeNodeIds.update(ids => ({ ...ids, [node.id]: value }));
1043
974
  }
1044
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeModel, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1045
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeModel }); }
975
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeModel, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
976
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeModel }); }
1046
977
  }
1047
- __decorate$2([
1048
- observable$1
1049
- ], TreeModel.prototype, "roots", void 0);
1050
- __decorate$2([
1051
- observable$1
1052
- ], TreeModel.prototype, "expandedNodeIds", void 0);
1053
- __decorate$2([
1054
- observable$1
1055
- ], TreeModel.prototype, "selectedLeafNodeIds", void 0);
1056
- __decorate$2([
1057
- observable$1
1058
- ], TreeModel.prototype, "activeNodeIds", void 0);
1059
- __decorate$2([
1060
- observable$1
1061
- ], TreeModel.prototype, "hiddenNodeIds", void 0);
1062
- __decorate$2([
1063
- observable$1
1064
- ], TreeModel.prototype, "focusedNodeId", void 0);
1065
- __decorate$2([
1066
- observable$1
1067
- ], TreeModel.prototype, "virtualRoot", void 0);
1068
- __decorate$2([
1069
- computed$1
1070
- ], TreeModel.prototype, "focusedNode", null);
1071
- __decorate$2([
1072
- computed$1
1073
- ], TreeModel.prototype, "expandedNodes", null);
1074
- __decorate$2([
1075
- computed$1
1076
- ], TreeModel.prototype, "activeNodes", null);
1077
- __decorate$2([
1078
- computed$1
1079
- ], TreeModel.prototype, "hiddenNodes", null);
1080
- __decorate$2([
1081
- computed$1
1082
- ], TreeModel.prototype, "selectedLeafNodes", null);
1083
- __decorate$2([
1084
- action$1
1085
- ], TreeModel.prototype, "setData", null);
1086
- __decorate$2([
1087
- action$1
1088
- ], TreeModel.prototype, "update", null);
1089
- __decorate$2([
1090
- action$1
1091
- ], TreeModel.prototype, "setFocusedNode", null);
1092
- __decorate$2([
1093
- action$1
1094
- ], TreeModel.prototype, "setFocus", null);
1095
- __decorate$2([
1096
- action$1
1097
- ], TreeModel.prototype, "doForAll", null);
1098
- __decorate$2([
1099
- action$1
1100
- ], TreeModel.prototype, "focusNextNode", null);
1101
- __decorate$2([
1102
- action$1
1103
- ], TreeModel.prototype, "focusPreviousNode", null);
1104
- __decorate$2([
1105
- action$1
1106
- ], TreeModel.prototype, "focusDrillDown", null);
1107
- __decorate$2([
1108
- action$1
1109
- ], TreeModel.prototype, "focusDrillUp", null);
1110
- __decorate$2([
1111
- action$1
1112
- ], TreeModel.prototype, "setActiveNode", null);
1113
- __decorate$2([
1114
- action$1
1115
- ], TreeModel.prototype, "setSelectedNode", null);
1116
- __decorate$2([
1117
- action$1
1118
- ], TreeModel.prototype, "setExpandedNode", null);
1119
- __decorate$2([
1120
- action$1
1121
- ], TreeModel.prototype, "expandAll", null);
1122
- __decorate$2([
1123
- action$1
1124
- ], TreeModel.prototype, "collapseAll", null);
1125
- __decorate$2([
1126
- action$1
1127
- ], TreeModel.prototype, "setIsHidden", null);
1128
- __decorate$2([
1129
- action$1
1130
- ], TreeModel.prototype, "setHiddenNodeIds", null);
1131
- __decorate$2([
1132
- action$1
1133
- ], TreeModel.prototype, "filterNodes", null);
1134
- __decorate$2([
1135
- action$1
1136
- ], TreeModel.prototype, "clearFilter", null);
1137
- __decorate$2([
1138
- action$1
1139
- ], TreeModel.prototype, "moveNode", null);
1140
- __decorate$2([
1141
- action$1
1142
- ], TreeModel.prototype, "copyNode", null);
1143
- __decorate$2([
1144
- action$1
1145
- ], TreeModel.prototype, "setState", null);
1146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeModel, decorators: [{
978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeModel, decorators: [{
1147
979
  type: Injectable
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: [] } });
980
+ }] });
1149
981
 
1150
982
  class TreeDraggedElement {
1151
983
  constructor() {
@@ -1160,40 +992,41 @@ class TreeDraggedElement {
1160
992
  isDragging() {
1161
993
  return !!this.get();
1162
994
  }
1163
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeDraggedElement, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1164
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeDraggedElement, providedIn: 'root' }); }
995
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeDraggedElement, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
996
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeDraggedElement, providedIn: 'root' }); }
1165
997
  }
1166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeDraggedElement, decorators: [{
998
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeDraggedElement, decorators: [{
1167
999
  type: Injectable,
1168
1000
  args: [{
1169
1001
  providedIn: 'root'
1170
1002
  }]
1171
1003
  }] });
1172
1004
 
1173
- var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) {
1174
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1175
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1176
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1177
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1178
- };
1179
1005
  const Y_OFFSET = 500; // Extra pixels outside the viewport, in each direction, to render nodes in
1180
1006
  const Y_EPSILON = 150; // Minimum pixel change required to recalculate the rendered nodes
1181
1007
  class TreeVirtualScroll {
1008
+ get yBlocks() { return this._yBlocks(); }
1009
+ set yBlocks(value) { this._yBlocks.set(value); }
1010
+ get x() { return this._x(); }
1011
+ set x(value) { this._x.set(value); }
1012
+ get viewportHeight() { return this._viewportHeight(); }
1013
+ set viewportHeight(value) { this._viewportHeight.set(value); }
1182
1014
  get y() {
1183
1015
  return this.yBlocks * Y_EPSILON;
1184
1016
  }
1185
1017
  get totalHeight() {
1186
- return this.treeModel.virtualRoot ? this.treeModel.virtualRoot.height : 0;
1018
+ const vRoot = this.treeModel['_virtualRoot']();
1019
+ return vRoot ? vRoot.height : 0;
1187
1020
  }
1188
1021
  constructor() {
1189
1022
  this.treeModel = inject(TreeModel);
1190
- this.yBlocks = 0;
1191
- this.x = 0;
1192
- this.viewportHeight = null;
1023
+ this._dispose = [];
1024
+ this._yBlocks = signal(0, ...(ngDevMode ? [{ debugName: "_yBlocks" }] : []));
1025
+ this._x = signal(0, ...(ngDevMode ? [{ debugName: "_x" }] : []));
1026
+ this._viewportHeight = signal(null, ...(ngDevMode ? [{ debugName: "_viewportHeight" }] : []));
1193
1027
  this.viewport = null;
1194
1028
  const treeModel = this.treeModel;
1195
1029
  treeModel.virtualScroll = this;
1196
- this._dispose = [autorun(() => this.fixScroll())];
1197
1030
  }
1198
1031
  fireEvent(event) {
1199
1032
  this.treeModel.fireEvent(event);
@@ -1201,13 +1034,34 @@ class TreeVirtualScroll {
1201
1034
  init() {
1202
1035
  const fn = this.recalcPositions.bind(this);
1203
1036
  fn();
1037
+ this.treeModel.subscribe(TREE_EVENTS.loadNodeChildren, fn);
1038
+ }
1039
+ setupWatchers(injector) {
1040
+ const fn = this.recalcPositions.bind(this);
1041
+ const fixScrollEffect = effect(() => {
1042
+ const yBlocks = this._yBlocks();
1043
+ const totalHeight = this.totalHeight;
1044
+ const viewportHeight = this._viewportHeight();
1045
+ this.fixScroll();
1046
+ }, ...(ngDevMode ? [{ debugName: "fixScrollEffect", injector }] : [{ injector }]));
1047
+ const rootsEffect = effect(() => {
1048
+ const roots = this.treeModel.roots;
1049
+ fn();
1050
+ }, ...(ngDevMode ? [{ debugName: "rootsEffect", injector }] : [{ injector }]));
1051
+ const expandedEffect = effect(() => {
1052
+ const expandedNodes = this.treeModel.expandedNodes;
1053
+ fn();
1054
+ }, ...(ngDevMode ? [{ debugName: "expandedEffect", injector }] : [{ injector }]));
1055
+ const hiddenEffect = effect(() => {
1056
+ const hiddenNodes = this.treeModel.hiddenNodes;
1057
+ fn();
1058
+ }, ...(ngDevMode ? [{ debugName: "hiddenEffect", injector }] : [{ injector }]));
1204
1059
  this._dispose = [
1205
- ...this._dispose,
1206
- reaction(() => this.treeModel.roots, fn),
1207
- reaction(() => this.treeModel.expandedNodeIds, fn),
1208
- reaction(() => this.treeModel.hiddenNodeIds, fn)
1060
+ () => fixScrollEffect.destroy(),
1061
+ () => rootsEffect.destroy(),
1062
+ () => expandedEffect.destroy(),
1063
+ () => hiddenEffect.destroy()
1209
1064
  ];
1210
- this.treeModel.subscribe(TREE_EVENTS.loadNodeChildren, fn);
1211
1065
  }
1212
1066
  isEnabled() {
1213
1067
  return this.treeModel.options.useVirtualScroll;
@@ -1216,7 +1070,10 @@ class TreeVirtualScroll {
1216
1070
  this.yBlocks = value;
1217
1071
  }
1218
1072
  recalcPositions() {
1219
- this.treeModel.virtualRoot.height = this._getPositionAfter(this.treeModel.getVisibleRoots(), 0);
1073
+ const vRoot = this.treeModel['_virtualRoot']();
1074
+ if (vRoot) {
1075
+ vRoot.height = this._getPositionAfter(this.treeModel.getVisibleRoots(), 0);
1076
+ }
1220
1077
  }
1221
1078
  _getPositionAfter(nodes, startPos) {
1222
1079
  let position = startPos;
@@ -1312,39 +1169,12 @@ class TreeVirtualScroll {
1312
1169
  if (this.y > maxY)
1313
1170
  this._setYBlocks(maxY / Y_EPSILON);
1314
1171
  }
1315
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1316
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeVirtualScroll }); }
1172
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeVirtualScroll, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1173
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeVirtualScroll }); }
1317
1174
  }
1318
- __decorate$1([
1319
- observable$1
1320
- ], TreeVirtualScroll.prototype, "yBlocks", void 0);
1321
- __decorate$1([
1322
- observable$1
1323
- ], TreeVirtualScroll.prototype, "x", void 0);
1324
- __decorate$1([
1325
- observable$1
1326
- ], TreeVirtualScroll.prototype, "viewportHeight", void 0);
1327
- __decorate$1([
1328
- computed$1
1329
- ], TreeVirtualScroll.prototype, "y", null);
1330
- __decorate$1([
1331
- computed$1
1332
- ], TreeVirtualScroll.prototype, "totalHeight", null);
1333
- __decorate$1([
1334
- action$1
1335
- ], TreeVirtualScroll.prototype, "_setYBlocks", null);
1336
- __decorate$1([
1337
- action$1
1338
- ], TreeVirtualScroll.prototype, "recalcPositions", null);
1339
- __decorate$1([
1340
- action$1
1341
- ], TreeVirtualScroll.prototype, "setViewport", null);
1342
- __decorate$1([
1343
- action$1
1344
- ], TreeVirtualScroll.prototype, "scrollIntoView", null);
1345
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeVirtualScroll, decorators: [{
1175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeVirtualScroll, decorators: [{
1346
1176
  type: Injectable
1347
- }], ctorParameters: () => [], propDecorators: { yBlocks: [], x: [], viewportHeight: [], y: [], totalHeight: [], _setYBlocks: [], recalcPositions: [], setViewport: [], scrollIntoView: [] } });
1177
+ }], ctorParameters: () => [] });
1348
1178
  function binarySearch(nodes, condition, firstIndex = 0) {
1349
1179
  let index = firstIndex;
1350
1180
  let toIndex = nodes.length - 1;
@@ -1364,39 +1194,46 @@ function binarySearch(nodes, condition, firstIndex = 0) {
1364
1194
  }
1365
1195
 
1366
1196
  class LoadingComponent {
1367
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1368
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: LoadingComponent, isStandalone: true, selector: "tree-loading-component", inputs: { template: "template", node: "node" }, ngImport: i0, template: `
1369
- <span *ngIf="!template">loading...</span>
1197
+ constructor() {
1198
+ this.template = input(undefined, ...(ngDevMode ? [{ debugName: "template" }] : []));
1199
+ this.node = input(undefined, ...(ngDevMode ? [{ debugName: "node" }] : []));
1200
+ }
1201
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: LoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1202
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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
+ @if (!template()) {
1204
+ <span>loading...</span>
1205
+ }
1370
1206
  <ng-container
1371
- [ngTemplateOutlet]="template"
1372
- [ngTemplateOutletContext]="{ $implicit: node }">
1207
+ [ngTemplateOutlet]="template()"
1208
+ [ngTemplateOutletContext]="{ $implicit: node() }"
1209
+ >
1373
1210
  </ng-container>
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 }); }
1211
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
1375
1212
  }
1376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: LoadingComponent, decorators: [{
1213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: LoadingComponent, decorators: [{
1377
1214
  type: Component,
1378
1215
  args: [{
1379
1216
  encapsulation: ViewEncapsulation.None,
1380
1217
  selector: 'tree-loading-component',
1381
1218
  template: `
1382
- <span *ngIf="!template">loading...</span>
1219
+ @if (!template()) {
1220
+ <span>loading...</span>
1221
+ }
1383
1222
  <ng-container
1384
- [ngTemplateOutlet]="template"
1385
- [ngTemplateOutletContext]="{ $implicit: node }">
1223
+ [ngTemplateOutlet]="template()"
1224
+ [ngTemplateOutletContext]="{ $implicit: node() }"
1225
+ >
1386
1226
  </ng-container>
1387
1227
  `,
1388
- imports: [NgIf, NgTemplateOutlet]
1228
+ imports: [NgTemplateOutlet]
1389
1229
  }]
1390
- }], propDecorators: { template: [{
1391
- type: Input
1392
- }], node: [{
1393
- type: Input
1394
- }] } });
1230
+ }] });
1395
1231
 
1396
1232
  class TreeViewportComponent {
1397
1233
  constructor() {
1398
1234
  this.elementRef = inject(ElementRef);
1399
1235
  this.virtualScroll = inject(TreeVirtualScroll);
1236
+ this.injector = inject(Injector);
1400
1237
  this.setViewport = this.throttle(() => {
1401
1238
  this.virtualScroll.setViewport(this.elementRef.nativeElement);
1402
1239
  }, 17);
@@ -1404,6 +1241,7 @@ class TreeViewportComponent {
1404
1241
  }
1405
1242
  ngOnInit() {
1406
1243
  this.virtualScroll.init();
1244
+ this.virtualScroll.setupWatchers(this.injector);
1407
1245
  }
1408
1246
  ngAfterViewInit() {
1409
1247
  setTimeout(() => {
@@ -1433,50 +1271,25 @@ class TreeViewportComponent {
1433
1271
  }
1434
1272
  };
1435
1273
  }
1436
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeViewportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1437
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeViewportComponent, isStandalone: true, selector: "tree-viewport", providers: [TreeVirtualScroll], ngImport: i0, template: `
1438
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
1439
- <div [style.height]="getTotalHeight()">
1440
- <ng-content></ng-content>
1441
- </div>
1442
- </ng-container>
1443
- `, isInline: true, dependencies: [{ kind: "directive", type: TreeMobxAutorunDirective, selector: "[treeMobxAutorun]", inputs: ["treeMobxAutorun"] }] }); }
1274
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeViewportComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1275
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.3", type: TreeViewportComponent, isStandalone: true, selector: "tree-viewport", providers: [TreeVirtualScroll], ngImport: i0, template: `
1276
+ <div [style.height]="getTotalHeight()">
1277
+ <ng-content></ng-content>
1278
+ </div>
1279
+ `, isInline: true }); }
1444
1280
  }
1445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeViewportComponent, decorators: [{
1281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeViewportComponent, decorators: [{
1446
1282
  type: Component,
1447
1283
  args: [{ selector: 'tree-viewport', providers: [TreeVirtualScroll], template: `
1448
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
1449
- <div [style.height]="getTotalHeight()">
1450
- <ng-content></ng-content>
1451
- </div>
1452
- </ng-container>
1453
- `, imports: [TreeMobxAutorunDirective] }]
1284
+ <div [style.height]="getTotalHeight()">
1285
+ <ng-content></ng-content>
1286
+ </div>
1287
+ `, imports: [] }]
1454
1288
  }], ctorParameters: () => [] });
1455
1289
 
1456
- // Re-export mobx operators to be able to use inside components with AOT:
1457
- function actionInternal(...args) {
1458
- return action$1(...args);
1459
- }
1460
- const action = Object.assign(actionInternal, action$1);
1461
- function computedInternal(...args) {
1462
- return computed$1(...args);
1463
- }
1464
- const computed = Object.assign(computedInternal, computed$1);
1465
- function observableInternal(...args) {
1466
- return observable$1(...args);
1467
- }
1468
- const observable = Object.assign(observableInternal, observable$1);
1469
-
1470
1290
  const DRAG_OVER_CLASS$1 = 'is-dragging-over';
1471
1291
  const DRAG_DISABLED_CLASS = 'is-dragging-over-disabled';
1472
1292
  class TreeDropDirective {
1473
- set treeAllowDrop(allowDrop) {
1474
- if (allowDrop instanceof Function) {
1475
- this._allowDrop = allowDrop;
1476
- }
1477
- else
1478
- this._allowDrop = (element, $event) => allowDrop;
1479
- }
1480
1293
  allowDrop($event) {
1481
1294
  return this._allowDrop(this.treeDraggedElement.get(), $event);
1482
1295
  }
@@ -1485,15 +1298,25 @@ class TreeDropDirective {
1485
1298
  this.renderer = inject(Renderer2);
1486
1299
  this.treeDraggedElement = inject(TreeDraggedElement);
1487
1300
  this.ngZone = inject(NgZone);
1488
- this.allowDragoverStyling = true;
1489
- this.onDropCallback = new EventEmitter();
1490
- this.onDragOverCallback = new EventEmitter();
1491
- this.onDragLeaveCallback = new EventEmitter();
1492
- this.onDragEnterCallback = new EventEmitter();
1301
+ this.allowDragoverStyling = input(true, ...(ngDevMode ? [{ debugName: "allowDragoverStyling" }] : []));
1302
+ this.treeAllowDrop = input(undefined, ...(ngDevMode ? [{ debugName: "treeAllowDrop" }] : []));
1303
+ this.onDropCallback = output({ alias: 'treeDrop' });
1304
+ this.onDragOverCallback = output({ alias: 'treeDropDragOver' });
1305
+ this.onDragLeaveCallback = output({ alias: 'treeDropDragLeave' });
1306
+ this.onDragEnterCallback = output({ alias: 'treeDropDragEnter' });
1493
1307
  this._allowDrop = (element, $event) => true;
1494
1308
  this.dragOverEventHandler = this.onDragOver.bind(this);
1495
1309
  this.dragEnterEventHandler = this.onDragEnter.bind(this);
1496
1310
  this.dragLeaveEventHandler = this.onDragLeave.bind(this);
1311
+ effect(() => {
1312
+ const allowDrop = this.treeAllowDrop();
1313
+ if (allowDrop instanceof Function) {
1314
+ this._allowDrop = allowDrop;
1315
+ }
1316
+ else if (allowDrop !== undefined) {
1317
+ this._allowDrop = (element, $event) => allowDrop;
1318
+ }
1319
+ });
1497
1320
  }
1498
1321
  ngAfterViewInit() {
1499
1322
  let el = this.el.nativeElement;
@@ -1511,14 +1334,14 @@ class TreeDropDirective {
1511
1334
  }
1512
1335
  onDragOver($event) {
1513
1336
  if (!this.allowDrop($event)) {
1514
- if (this.allowDragoverStyling) {
1337
+ if (this.allowDragoverStyling()) {
1515
1338
  return this.addDisabledClass();
1516
1339
  }
1517
1340
  return;
1518
1341
  }
1519
1342
  this.onDragOverCallback.emit({ event: $event, element: this.treeDraggedElement.get() });
1520
1343
  $event.preventDefault();
1521
- if (this.allowDragoverStyling) {
1344
+ if (this.allowDragoverStyling()) {
1522
1345
  this.addClass();
1523
1346
  }
1524
1347
  }
@@ -1530,13 +1353,13 @@ class TreeDropDirective {
1530
1353
  }
1531
1354
  onDragLeave($event) {
1532
1355
  if (!this.allowDrop($event)) {
1533
- if (this.allowDragoverStyling) {
1356
+ if (this.allowDragoverStyling()) {
1534
1357
  return this.removeDisabledClass();
1535
1358
  }
1536
1359
  return;
1537
1360
  }
1538
1361
  this.onDragLeaveCallback.emit({ event: $event, element: this.treeDraggedElement.get() });
1539
- if (this.allowDragoverStyling) {
1362
+ if (this.allowDragoverStyling()) {
1540
1363
  this.removeClass();
1541
1364
  }
1542
1365
  }
@@ -1545,7 +1368,7 @@ class TreeDropDirective {
1545
1368
  return;
1546
1369
  $event.preventDefault();
1547
1370
  this.onDropCallback.emit({ event: $event, element: this.treeDraggedElement.get() });
1548
- if (this.allowDragoverStyling) {
1371
+ if (this.allowDragoverStyling()) {
1549
1372
  this.removeClass();
1550
1373
  }
1551
1374
  this.treeDraggedElement.set(null);
@@ -1562,138 +1385,119 @@ class TreeDropDirective {
1562
1385
  removeDisabledClass() {
1563
1386
  this.renderer.removeClass(this.el.nativeElement, DRAG_DISABLED_CLASS);
1564
1387
  }
1565
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1566
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.6", 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 }); }
1388
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1389
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.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 }); }
1567
1390
  }
1568
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeDropDirective, decorators: [{
1391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeDropDirective, decorators: [{
1569
1392
  type: Directive,
1570
1393
  args: [{ selector: '[treeDrop]' }]
1571
- }], ctorParameters: () => [], propDecorators: { allowDragoverStyling: [{
1572
- type: Input
1573
- }], onDropCallback: [{
1574
- type: Output,
1575
- args: ['treeDrop']
1576
- }], onDragOverCallback: [{
1577
- type: Output,
1578
- args: ['treeDropDragOver']
1579
- }], onDragLeaveCallback: [{
1580
- type: Output,
1581
- args: ['treeDropDragLeave']
1582
- }], onDragEnterCallback: [{
1583
- type: Output,
1584
- args: ['treeDropDragEnter']
1585
- }], treeAllowDrop: [{
1586
- type: Input
1587
- }], onDrop: [{
1394
+ }], ctorParameters: () => [], propDecorators: { onDrop: [{
1588
1395
  type: HostListener,
1589
1396
  args: ['drop', ['$event']]
1590
1397
  }] } });
1591
1398
 
1592
1399
  class TreeNodeDropSlot {
1400
+ constructor() {
1401
+ this.node = input(undefined, ...(ngDevMode ? [{ debugName: "node" }] : []));
1402
+ this.dropIndex = input(undefined, ...(ngDevMode ? [{ debugName: "dropIndex" }] : []));
1403
+ }
1593
1404
  onDrop($event) {
1594
- this.node.mouseAction('drop', $event.event, {
1405
+ this.node().mouseAction('drop', $event.event, {
1595
1406
  from: $event.element,
1596
- to: { parent: this.node, index: this.dropIndex }
1407
+ to: { parent: this.node(), index: this.dropIndex() }
1597
1408
  });
1598
1409
  }
1599
1410
  allowDrop(element, $event) {
1600
- return this.node.options.allowDrop(element, { parent: this.node, index: this.dropIndex }, $event);
1411
+ return this.node().options.allowDrop(element, { parent: this.node(), index: this.dropIndex() }, $event);
1601
1412
  }
1602
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeDropSlot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1603
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeNodeDropSlot, isStandalone: true, selector: "TreeNodeDropSlot, tree-node-drop-slot", inputs: { node: "node", dropIndex: "dropIndex" }, ngImport: i0, template: `
1413
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeDropSlot, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1414
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.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: `
1604
1415
  <div
1605
1416
  class="node-drop-slot"
1606
1417
  (treeDrop)="onDrop($event)"
1607
1418
  [treeAllowDrop]="allowDrop.bind(this)"
1608
- [allowDragoverStyling]="true">
1609
- </div>
1419
+ [allowDragoverStyling]="true"
1420
+ ></div>
1610
1421
  `, isInline: true, dependencies: [{ kind: "directive", type: TreeDropDirective, selector: "[treeDrop]", inputs: ["allowDragoverStyling", "treeAllowDrop"], outputs: ["treeDrop", "treeDropDragOver", "treeDropDragLeave", "treeDropDragEnter"] }], encapsulation: i0.ViewEncapsulation.None }); }
1611
1422
  }
1612
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeDropSlot, decorators: [{
1423
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeDropSlot, decorators: [{
1613
1424
  type: Component,
1614
1425
  args: [{ selector: 'TreeNodeDropSlot, tree-node-drop-slot', encapsulation: ViewEncapsulation.None, template: `
1615
1426
  <div
1616
1427
  class="node-drop-slot"
1617
1428
  (treeDrop)="onDrop($event)"
1618
1429
  [treeAllowDrop]="allowDrop.bind(this)"
1619
- [allowDragoverStyling]="true">
1620
- </div>
1430
+ [allowDragoverStyling]="true"
1431
+ ></div>
1621
1432
  `, imports: [TreeDropDirective] }]
1622
- }], propDecorators: { node: [{
1623
- type: Input
1624
- }], dropIndex: [{
1625
- type: Input
1626
- }] } });
1433
+ }] });
1627
1434
 
1628
1435
  class TreeNodeCheckboxComponent {
1629
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1630
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeNodeCheckboxComponent, isStandalone: true, selector: "tree-node-checkbox", inputs: { node: "node" }, ngImport: i0, template: `
1631
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
1632
- <input
1633
- class="tree-node-checkbox"
1634
- type="checkbox"
1635
- (click)="node.mouseAction('checkboxClick', $event)"
1636
- [checked]="node.isSelected"
1637
- [indeterminate]="node.isPartiallySelected"
1638
- />
1639
- </ng-container>
1640
- `, isInline: true, dependencies: [{ kind: "directive", type: TreeMobxAutorunDirective, selector: "[treeMobxAutorun]", inputs: ["treeMobxAutorun"] }], encapsulation: i0.ViewEncapsulation.None }); }
1436
+ constructor() {
1437
+ this.node = input(undefined, ...(ngDevMode ? [{ debugName: "node" }] : []));
1438
+ }
1439
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1440
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.3", type: TreeNodeCheckboxComponent, isStandalone: true, selector: "tree-node-checkbox", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1441
+ <input
1442
+ class="tree-node-checkbox"
1443
+ type="checkbox"
1444
+ (click)="node().mouseAction('checkboxClick', $event)"
1445
+ [checked]="node().isSelected"
1446
+ [indeterminate]="node().isPartiallySelected"
1447
+ />
1448
+ `, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
1641
1449
  }
1642
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeCheckboxComponent, decorators: [{
1450
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeCheckboxComponent, decorators: [{
1643
1451
  type: Component,
1644
1452
  args: [{ selector: 'tree-node-checkbox', encapsulation: ViewEncapsulation.None, template: `
1645
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
1646
- <input
1647
- class="tree-node-checkbox"
1648
- type="checkbox"
1649
- (click)="node.mouseAction('checkboxClick', $event)"
1650
- [checked]="node.isSelected"
1651
- [indeterminate]="node.isPartiallySelected"
1652
- />
1653
- </ng-container>
1654
- `, imports: [TreeMobxAutorunDirective] }]
1655
- }], propDecorators: { node: [{
1656
- type: Input
1657
- }] } });
1453
+ <input
1454
+ class="tree-node-checkbox"
1455
+ type="checkbox"
1456
+ (click)="node().mouseAction('checkboxClick', $event)"
1457
+ [checked]="node().isSelected"
1458
+ [indeterminate]="node().isPartiallySelected"
1459
+ />
1460
+ `, imports: [] }]
1461
+ }] });
1658
1462
 
1659
1463
  class TreeNodeExpanderComponent {
1660
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1661
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeNodeExpanderComponent, isStandalone: true, selector: "tree-node-expander", inputs: { node: "node" }, ngImport: i0, template: `
1662
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
1663
- <span
1664
- *ngIf="node.hasChildren"
1665
- [class.toggle-children-wrapper-expanded]="node.isExpanded"
1666
- [class.toggle-children-wrapper-collapsed]="node.isCollapsed"
1667
- class="toggle-children-wrapper"
1668
- (click)="node.mouseAction('expanderClick', $event)"
1669
- >
1670
- <span class="toggle-children"></span>
1671
- </span>
1672
- <span *ngIf="!node.hasChildren" class="toggle-children-placeholder">
1673
- </span>
1674
- </ng-container>
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 }); }
1464
+ constructor() {
1465
+ this.node = input(...(ngDevMode ? [undefined, { debugName: "node" }] : []));
1466
+ this.hasChildren = computed(() => this.node().hasChildren, ...(ngDevMode ? [{ debugName: "hasChildren" }] : []));
1467
+ }
1468
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeExpanderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1469
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.3", type: TreeNodeExpanderComponent, isStandalone: true, selector: "tree-node-expander", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
1470
+ @if (hasChildren()) {
1471
+ <span
1472
+ [class.toggle-children-wrapper-expanded]="node().isExpanded"
1473
+ [class.toggle-children-wrapper-collapsed]="node().isCollapsed"
1474
+ class="toggle-children-wrapper"
1475
+ (click)="node().mouseAction('expanderClick', $event)"
1476
+ >
1477
+ <span class="toggle-children"></span>
1478
+ </span>
1479
+ } @if (!hasChildren()) {
1480
+ <span class="toggle-children-placeholder"></span>
1481
+ }
1482
+ `, isInline: true, encapsulation: i0.ViewEncapsulation.None }); }
1676
1483
  }
1677
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeExpanderComponent, decorators: [{
1484
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeExpanderComponent, decorators: [{
1678
1485
  type: Component,
1679
1486
  args: [{ selector: 'tree-node-expander', encapsulation: ViewEncapsulation.None, template: `
1680
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
1681
- <span
1682
- *ngIf="node.hasChildren"
1683
- [class.toggle-children-wrapper-expanded]="node.isExpanded"
1684
- [class.toggle-children-wrapper-collapsed]="node.isCollapsed"
1685
- class="toggle-children-wrapper"
1686
- (click)="node.mouseAction('expanderClick', $event)"
1687
- >
1688
- <span class="toggle-children"></span>
1689
- </span>
1690
- <span *ngIf="!node.hasChildren" class="toggle-children-placeholder">
1691
- </span>
1692
- </ng-container>
1693
- `, imports: [TreeMobxAutorunDirective, NgIf] }]
1694
- }], propDecorators: { node: [{
1695
- type: Input
1696
- }] } });
1487
+ @if (hasChildren()) {
1488
+ <span
1489
+ [class.toggle-children-wrapper-expanded]="node().isExpanded"
1490
+ [class.toggle-children-wrapper-collapsed]="node().isCollapsed"
1491
+ class="toggle-children-wrapper"
1492
+ (click)="node().mouseAction('expanderClick', $event)"
1493
+ >
1494
+ <span class="toggle-children"></span>
1495
+ </span>
1496
+ } @if (!hasChildren()) {
1497
+ <span class="toggle-children-placeholder"></span>
1498
+ }
1499
+ `, imports: [] }]
1500
+ }] });
1697
1501
 
1698
1502
  const DRAG_OVER_CLASS = 'is-dragging-over';
1699
1503
  class TreeDragDirective {
@@ -1702,6 +1506,8 @@ class TreeDragDirective {
1702
1506
  this.renderer = inject(Renderer2);
1703
1507
  this.treeDraggedElement = inject(TreeDraggedElement);
1704
1508
  this.ngZone = inject(NgZone);
1509
+ this.draggedElement = input(undefined, ...(ngDevMode ? [{ debugName: "draggedElement", alias: "treeDrag" }] : [{ alias: "treeDrag" }]));
1510
+ this.treeDragEnabled = input(undefined, ...(ngDevMode ? [{ debugName: "treeDragEnabled" }] : []));
1705
1511
  this.dragEventHandler = this.onDrag.bind(this);
1706
1512
  }
1707
1513
  ngAfterViewInit() {
@@ -1711,7 +1517,7 @@ class TreeDragDirective {
1711
1517
  });
1712
1518
  }
1713
1519
  ngDoCheck() {
1714
- this.renderer.setAttribute(this.el.nativeElement, 'draggable', this.treeDragEnabled ? 'true' : 'false');
1520
+ this.renderer.setAttribute(this.el.nativeElement, 'draggable', this.treeDragEnabled() ? 'true' : 'false');
1715
1521
  }
1716
1522
  ngOnDestroy() {
1717
1523
  let el = this.el.nativeElement;
@@ -1720,34 +1526,32 @@ class TreeDragDirective {
1720
1526
  onDragStart(ev) {
1721
1527
  // setting the data is required by firefox
1722
1528
  ev.dataTransfer.setData('text', ev.target.id);
1723
- this.treeDraggedElement.set(this.draggedElement);
1724
- if (this.draggedElement.mouseAction) {
1725
- this.draggedElement.mouseAction('dragStart', ev);
1529
+ const draggedElement = this.draggedElement();
1530
+ this.treeDraggedElement.set(draggedElement);
1531
+ if (draggedElement.mouseAction) {
1532
+ draggedElement.mouseAction('dragStart', ev);
1726
1533
  }
1727
1534
  }
1728
1535
  onDrag(ev) {
1729
- if (this.draggedElement.mouseAction) {
1730
- this.draggedElement.mouseAction('drag', ev);
1536
+ const draggedElement = this.draggedElement();
1537
+ if (draggedElement.mouseAction) {
1538
+ draggedElement.mouseAction('drag', ev);
1731
1539
  }
1732
1540
  }
1733
1541
  onDragEnd() {
1734
- if (this.draggedElement.mouseAction) {
1735
- this.draggedElement.mouseAction('dragEnd');
1542
+ const draggedElement = this.draggedElement();
1543
+ if (draggedElement.mouseAction) {
1544
+ draggedElement.mouseAction('dragEnd');
1736
1545
  }
1737
1546
  this.treeDraggedElement.set(null);
1738
1547
  }
1739
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1740
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.6", type: TreeDragDirective, isStandalone: true, selector: "[treeDrag]", inputs: { draggedElement: ["treeDrag", "draggedElement"], treeDragEnabled: "treeDragEnabled" }, host: { listeners: { "dragstart": "onDragStart($event)", "dragend": "onDragEnd()" } }, ngImport: i0 }); }
1548
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1549
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.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 }); }
1741
1550
  }
1742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeDragDirective, decorators: [{
1551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeDragDirective, decorators: [{
1743
1552
  type: Directive,
1744
1553
  args: [{ selector: '[treeDrag]' }]
1745
- }], ctorParameters: () => [], propDecorators: { draggedElement: [{
1746
- type: Input,
1747
- args: ['treeDrag']
1748
- }], treeDragEnabled: [{
1749
- type: Input
1750
- }], onDragStart: [{
1554
+ }], ctorParameters: () => [], propDecorators: { onDragStart: [{
1751
1555
  type: HostListener,
1752
1556
  args: ['dragstart', ['$event']]
1753
1557
  }], onDragEnd: [{
@@ -1756,107 +1560,159 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
1756
1560
  }] } });
1757
1561
 
1758
1562
  class TreeNodeContent {
1759
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1760
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeNodeContent, isStandalone: true, selector: "tree-node-content", inputs: { node: "node", index: "index", template: "template" }, ngImport: i0, template: `
1761
- <span *ngIf="!template">{{ node.displayField }}</span>
1762
- <ng-container
1763
- [ngTemplateOutlet]="template"
1764
- [ngTemplateOutletContext]="{ $implicit: node, node: node, index: index }">
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 }); }
1563
+ constructor() {
1564
+ this.node = input(undefined, ...(ngDevMode ? [{ debugName: "node" }] : []));
1565
+ this.index = input(undefined, ...(ngDevMode ? [{ debugName: "index" }] : []));
1566
+ this.template = input(undefined, ...(ngDevMode ? [{ debugName: "template" }] : []));
1567
+ }
1568
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeContent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1569
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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: `
1570
+ @if (!template()) {
1571
+ <span>{{ node().displayField }}</span>
1572
+ }
1573
+ <ng-container
1574
+ [ngTemplateOutlet]="template()"
1575
+ [ngTemplateOutletContext]="{
1576
+ $implicit: node(),
1577
+ node: node(),
1578
+ index: index()
1579
+ }"
1580
+ >
1581
+ </ng-container>
1582
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
1766
1583
  }
1767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeContent, decorators: [{
1584
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeContent, decorators: [{
1768
1585
  type: Component,
1769
1586
  args: [{
1770
1587
  selector: 'tree-node-content',
1771
1588
  encapsulation: ViewEncapsulation.None,
1772
1589
  template: `
1773
- <span *ngIf="!template">{{ node.displayField }}</span>
1774
- <ng-container
1775
- [ngTemplateOutlet]="template"
1776
- [ngTemplateOutletContext]="{ $implicit: node, node: node, index: index }">
1777
- </ng-container>`,
1778
- imports: [NgIf, NgTemplateOutlet]
1590
+ @if (!template()) {
1591
+ <span>{{ node().displayField }}</span>
1592
+ }
1593
+ <ng-container
1594
+ [ngTemplateOutlet]="template()"
1595
+ [ngTemplateOutletContext]="{
1596
+ $implicit: node(),
1597
+ node: node(),
1598
+ index: index()
1599
+ }"
1600
+ >
1601
+ </ng-container>
1602
+ `,
1603
+ imports: [NgTemplateOutlet]
1779
1604
  }]
1780
- }], propDecorators: { node: [{
1781
- type: Input
1782
- }], index: [{
1783
- type: Input
1784
- }], template: [{
1785
- type: Input
1786
- }] } });
1605
+ }] });
1787
1606
 
1788
1607
  class TreeNodeWrapperComponent {
1789
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1790
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeNodeWrapperComponent, isStandalone: true, selector: "tree-node-wrapper", inputs: { node: "node", index: "index", templates: "templates" }, ngImport: i0, template: `
1791
- <div *ngIf="!templates.treeNodeWrapperTemplate" class="node-wrapper" [style.padding-left]="node.getNodePadding()">
1792
- <tree-node-checkbox *ngIf="node.options.useCheckbox" [node]="node"></tree-node-checkbox>
1793
- <tree-node-expander [node]="node"></tree-node-expander>
1794
- <div class="node-content-wrapper"
1795
- [class.node-content-wrapper-active]="node.isActive"
1796
- [class.node-content-wrapper-focused]="node.isFocused"
1797
- (click)="node.mouseAction('click', $event)"
1798
- (dblclick)="node.mouseAction('dblClick', $event)"
1799
- (mouseover)="node.mouseAction('mouseOver', $event)"
1800
- (mouseout)="node.mouseAction('mouseOut', $event)"
1801
- (contextmenu)="node.mouseAction('contextMenu', $event)"
1802
- (treeDrop)="node.onDrop($event)"
1803
- (treeDropDragOver)="node.mouseAction('dragOver', $event)"
1804
- (treeDropDragLeave)="node.mouseAction('dragLeave', $event)"
1805
- (treeDropDragEnter)="node.mouseAction('dragEnter', $event)"
1806
- [treeAllowDrop]="node.allowDrop"
1807
- [allowDragoverStyling]="node.allowDragoverStyling()"
1808
- [treeDrag]="node"
1809
- [treeDragEnabled]="node.allowDrag()">
1810
-
1811
- <tree-node-content [node]="node" [index]="index" [template]="templates.treeNodeTemplate">
1812
- </tree-node-content>
1813
- </div>
1608
+ constructor() {
1609
+ this.node = input(...(ngDevMode ? [undefined, { debugName: "node" }] : []));
1610
+ this.index = input(undefined, ...(ngDevMode ? [{ debugName: "index" }] : []));
1611
+ this.templates = input(...(ngDevMode ? [undefined, { debugName: "templates" }] : []));
1612
+ this.treeNodeWrapperTemplate = computed(() => this.templates().treeNodeWrapperTemplate, ...(ngDevMode ? [{ debugName: "treeNodeWrapperTemplate" }] : []));
1613
+ }
1614
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1615
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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: `
1616
+ @if (!treeNodeWrapperTemplate()) {
1617
+ <div class="node-wrapper" [style.padding-left]="node().getNodePadding()">
1618
+ @if (node().options.useCheckbox) {
1619
+ <tree-node-checkbox [node]="node()"></tree-node-checkbox>
1620
+ }
1621
+ <tree-node-expander [node]="node()"></tree-node-expander>
1622
+ <div
1623
+ class="node-content-wrapper"
1624
+ [class.node-content-wrapper-active]="node().isActive"
1625
+ [class.node-content-wrapper-focused]="node().isFocused"
1626
+ (click)="node().mouseAction('click', $event)"
1627
+ (dblclick)="node().mouseAction('dblClick', $event)"
1628
+ (mouseover)="node().mouseAction('mouseOver', $event)"
1629
+ (mouseout)="node().mouseAction('mouseOut', $event)"
1630
+ (contextmenu)="node().mouseAction('contextMenu', $event)"
1631
+ (treeDrop)="node().onDrop($event)"
1632
+ (treeDropDragOver)="node().mouseAction('dragOver', $event)"
1633
+ (treeDropDragLeave)="node().mouseAction('dragLeave', $event)"
1634
+ (treeDropDragEnter)="node().mouseAction('dragEnter', $event)"
1635
+ [treeAllowDrop]="node().allowDrop"
1636
+ [allowDragoverStyling]="node().allowDragoverStyling()"
1637
+ [treeDrag]="node()"
1638
+ [treeDragEnabled]="node().allowDrag()"
1639
+ >
1640
+ <tree-node-content
1641
+ [node]="node()"
1642
+ [index]="index()"
1643
+ [template]="templates().treeNodeTemplate"
1644
+ >
1645
+ </tree-node-content>
1814
1646
  </div>
1815
- <ng-container
1816
- [ngTemplateOutlet]="templates.treeNodeWrapperTemplate"
1817
- [ngTemplateOutletContext]="{ $implicit: node, node: node, index: index, templates: templates }">
1818
- </ng-container>
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 }); }
1647
+ </div>
1648
+ }
1649
+ <ng-container
1650
+ [ngTemplateOutlet]="treeNodeWrapperTemplate()"
1651
+ [ngTemplateOutletContext]="{
1652
+ $implicit: node(),
1653
+ node: node(),
1654
+ index: index(),
1655
+ templates: templates()
1656
+ }"
1657
+ >
1658
+ </ng-container>
1659
+ `, 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 }); }
1820
1660
  }
1821
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeWrapperComponent, decorators: [{
1661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeWrapperComponent, decorators: [{
1822
1662
  type: Component,
1823
1663
  args: [{ selector: 'tree-node-wrapper', encapsulation: ViewEncapsulation.None, template: `
1824
- <div *ngIf="!templates.treeNodeWrapperTemplate" class="node-wrapper" [style.padding-left]="node.getNodePadding()">
1825
- <tree-node-checkbox *ngIf="node.options.useCheckbox" [node]="node"></tree-node-checkbox>
1826
- <tree-node-expander [node]="node"></tree-node-expander>
1827
- <div class="node-content-wrapper"
1828
- [class.node-content-wrapper-active]="node.isActive"
1829
- [class.node-content-wrapper-focused]="node.isFocused"
1830
- (click)="node.mouseAction('click', $event)"
1831
- (dblclick)="node.mouseAction('dblClick', $event)"
1832
- (mouseover)="node.mouseAction('mouseOver', $event)"
1833
- (mouseout)="node.mouseAction('mouseOut', $event)"
1834
- (contextmenu)="node.mouseAction('contextMenu', $event)"
1835
- (treeDrop)="node.onDrop($event)"
1836
- (treeDropDragOver)="node.mouseAction('dragOver', $event)"
1837
- (treeDropDragLeave)="node.mouseAction('dragLeave', $event)"
1838
- (treeDropDragEnter)="node.mouseAction('dragEnter', $event)"
1839
- [treeAllowDrop]="node.allowDrop"
1840
- [allowDragoverStyling]="node.allowDragoverStyling()"
1841
- [treeDrag]="node"
1842
- [treeDragEnabled]="node.allowDrag()">
1843
-
1844
- <tree-node-content [node]="node" [index]="index" [template]="templates.treeNodeTemplate">
1845
- </tree-node-content>
1846
- </div>
1664
+ @if (!treeNodeWrapperTemplate()) {
1665
+ <div class="node-wrapper" [style.padding-left]="node().getNodePadding()">
1666
+ @if (node().options.useCheckbox) {
1667
+ <tree-node-checkbox [node]="node()"></tree-node-checkbox>
1668
+ }
1669
+ <tree-node-expander [node]="node()"></tree-node-expander>
1670
+ <div
1671
+ class="node-content-wrapper"
1672
+ [class.node-content-wrapper-active]="node().isActive"
1673
+ [class.node-content-wrapper-focused]="node().isFocused"
1674
+ (click)="node().mouseAction('click', $event)"
1675
+ (dblclick)="node().mouseAction('dblClick', $event)"
1676
+ (mouseover)="node().mouseAction('mouseOver', $event)"
1677
+ (mouseout)="node().mouseAction('mouseOut', $event)"
1678
+ (contextmenu)="node().mouseAction('contextMenu', $event)"
1679
+ (treeDrop)="node().onDrop($event)"
1680
+ (treeDropDragOver)="node().mouseAction('dragOver', $event)"
1681
+ (treeDropDragLeave)="node().mouseAction('dragLeave', $event)"
1682
+ (treeDropDragEnter)="node().mouseAction('dragEnter', $event)"
1683
+ [treeAllowDrop]="node().allowDrop"
1684
+ [allowDragoverStyling]="node().allowDragoverStyling()"
1685
+ [treeDrag]="node()"
1686
+ [treeDragEnabled]="node().allowDrag()"
1687
+ >
1688
+ <tree-node-content
1689
+ [node]="node()"
1690
+ [index]="index()"
1691
+ [template]="templates().treeNodeTemplate"
1692
+ >
1693
+ </tree-node-content>
1847
1694
  </div>
1848
- <ng-container
1849
- [ngTemplateOutlet]="templates.treeNodeWrapperTemplate"
1850
- [ngTemplateOutletContext]="{ $implicit: node, node: node, index: index, templates: templates }">
1851
- </ng-container>
1852
- `, imports: [NgIf, TreeNodeCheckboxComponent, TreeNodeExpanderComponent, TreeDragDirective, TreeDropDirective, TreeNodeContent, NgTemplateOutlet] }]
1853
- }], propDecorators: { node: [{
1854
- type: Input
1855
- }], index: [{
1856
- type: Input
1857
- }], templates: [{
1858
- type: Input
1859
- }] } });
1695
+ </div>
1696
+ }
1697
+ <ng-container
1698
+ [ngTemplateOutlet]="treeNodeWrapperTemplate()"
1699
+ [ngTemplateOutletContext]="{
1700
+ $implicit: node(),
1701
+ node: node(),
1702
+ index: index(),
1703
+ templates: templates()
1704
+ }"
1705
+ >
1706
+ </ng-container>
1707
+ `, imports: [
1708
+ TreeNodeCheckboxComponent,
1709
+ TreeNodeExpanderComponent,
1710
+ TreeDragDirective,
1711
+ TreeDropDirective,
1712
+ TreeNodeContent,
1713
+ NgTemplateOutlet
1714
+ ] }]
1715
+ }] });
1860
1716
 
1861
1717
  const EASE_ACCELERATION = 1.005;
1862
1718
  class TreeAnimateOpenDirective {
@@ -1864,20 +1720,30 @@ class TreeAnimateOpenDirective {
1864
1720
  this.renderer = inject(Renderer2);
1865
1721
  this.templateRef = inject(TemplateRef);
1866
1722
  this.viewContainerRef = inject(ViewContainerRef);
1867
- }
1868
- set isOpen(value) {
1869
- if (value) {
1870
- this._show();
1871
- if (this.isEnabled && this._isOpen === false) {
1872
- this._animateOpen();
1723
+ this.isOpen = input(undefined, ...(ngDevMode ? [{ debugName: "isOpen", alias: 'treeAnimateOpen' }] : [{ alias: 'treeAnimateOpen' }]));
1724
+ this.animateSpeed = input(undefined, ...(ngDevMode ? [{ debugName: "animateSpeed", alias: 'treeAnimateOpenSpeed' }] : [{
1725
+ alias: 'treeAnimateOpenSpeed'
1726
+ }]));
1727
+ this.animateAcceleration = input(undefined, ...(ngDevMode ? [{ debugName: "animateAcceleration", alias: 'treeAnimateOpenAcceleration' }] : [{
1728
+ alias: 'treeAnimateOpenAcceleration'
1729
+ }]));
1730
+ this.isEnabled = input(undefined, ...(ngDevMode ? [{ debugName: "isEnabled", alias: 'treeAnimateOpenEnabled' }] : [{
1731
+ alias: 'treeAnimateOpenEnabled'
1732
+ }]));
1733
+ effect(() => {
1734
+ const value = this.isOpen();
1735
+ if (value) {
1736
+ this._show();
1737
+ if (this.isEnabled() && this.previousIsOpen === false) {
1738
+ this._animateOpen();
1739
+ }
1873
1740
  }
1874
- }
1875
- else {
1876
- this.isEnabled ? this._animateClose() : this._hide();
1877
- }
1878
- this._isOpen = !!value;
1741
+ else {
1742
+ this.isEnabled() ? this._animateClose() : this._hide();
1743
+ }
1744
+ this.previousIsOpen = !!value;
1745
+ });
1879
1746
  }
1880
- ;
1881
1747
  _show() {
1882
1748
  if (this.innerElement)
1883
1749
  return;
@@ -1889,20 +1755,23 @@ class TreeAnimateOpenDirective {
1889
1755
  this.innerElement = null;
1890
1756
  }
1891
1757
  _animateOpen() {
1892
- let delta = this.animateSpeed;
1893
- let ease = this.animateAcceleration;
1758
+ let delta = this.animateSpeed();
1759
+ let ease = this.animateAcceleration();
1894
1760
  let maxHeight = 0;
1895
1761
  // set height to 0
1896
1762
  this.renderer.setStyle(this.innerElement, 'max-height', `0`);
1897
1763
  // increase maxHeight until height doesn't change
1898
1764
  setTimeout(() => {
1765
+ // Allow inner element to create its content
1899
1766
  const i = setInterval(() => {
1900
- if (!this._isOpen || !this.innerElement)
1767
+ if (!this.isOpen() || !this.innerElement)
1901
1768
  return clearInterval(i);
1902
1769
  maxHeight += delta;
1903
1770
  const roundedMaxHeight = Math.round(maxHeight);
1904
1771
  this.renderer.setStyle(this.innerElement, 'max-height', `${roundedMaxHeight}px`);
1905
- const height = this.innerElement.getBoundingClientRect ? this.innerElement.getBoundingClientRect().height : 0; // TBD use renderer
1772
+ const height = this.innerElement.getBoundingClientRect
1773
+ ? this.innerElement.getBoundingClientRect().height
1774
+ : 0; // TBD use renderer
1906
1775
  delta *= ease;
1907
1776
  ease *= EASE_ACCELERATION;
1908
1777
  if (height < roundedMaxHeight) {
@@ -1916,12 +1785,12 @@ class TreeAnimateOpenDirective {
1916
1785
  _animateClose() {
1917
1786
  if (!this.innerElement)
1918
1787
  return;
1919
- let delta = this.animateSpeed;
1920
- let ease = this.animateAcceleration;
1788
+ let delta = this.animateSpeed();
1789
+ let ease = this.animateAcceleration();
1921
1790
  let height = this.innerElement.getBoundingClientRect().height; // TBD use renderer
1922
1791
  // slowly decrease maxHeight to 0, starting from current height
1923
1792
  const i = setInterval(() => {
1924
- if (this._isOpen || !this.innerElement)
1793
+ if (this.isOpen() || !this.innerElement)
1925
1794
  return clearInterval(i);
1926
1795
  height -= delta;
1927
1796
  this.renderer.setStyle(this.innerElement, 'max-height', `${height}px`);
@@ -1935,309 +1804,259 @@ class TreeAnimateOpenDirective {
1935
1804
  }
1936
1805
  }, 17);
1937
1806
  }
1938
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeAnimateOpenDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1939
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.6", type: TreeAnimateOpenDirective, isStandalone: true, selector: "[treeAnimateOpen]", inputs: { animateSpeed: ["treeAnimateOpenSpeed", "animateSpeed"], animateAcceleration: ["treeAnimateOpenAcceleration", "animateAcceleration"], isEnabled: ["treeAnimateOpenEnabled", "isEnabled"], isOpen: ["treeAnimateOpen", "isOpen"] }, ngImport: i0 }); }
1807
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeAnimateOpenDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1808
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.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 }); }
1940
1809
  }
1941
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeAnimateOpenDirective, decorators: [{
1810
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeAnimateOpenDirective, decorators: [{
1942
1811
  type: Directive,
1943
1812
  args: [{ selector: '[treeAnimateOpen]' }]
1944
- }], propDecorators: { animateSpeed: [{
1945
- type: Input,
1946
- args: ['treeAnimateOpenSpeed']
1947
- }], animateAcceleration: [{
1948
- type: Input,
1949
- args: ['treeAnimateOpenAcceleration']
1950
- }], isEnabled: [{
1951
- type: Input,
1952
- args: ['treeAnimateOpenEnabled']
1953
- }], isOpen: [{
1954
- type: Input,
1955
- args: ['treeAnimateOpen']
1956
- }] } });
1813
+ }], ctorParameters: () => [] });
1957
1814
 
1958
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
1959
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1960
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1961
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1962
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1963
- };
1964
1815
  class TreeNodeChildrenComponent {
1965
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeChildrenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1966
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeNodeChildrenComponent, isStandalone: true, selector: "tree-node-children", inputs: { node: "node", templates: "templates" }, ngImport: i0, template: `
1967
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
1968
- <div
1969
- [class.tree-children]="true"
1970
- [class.tree-children-no-padding]="node.options.levelPadding"
1971
- *treeAnimateOpen="
1972
- node.isExpanded;
1973
- speed: node.options.animateSpeed;
1974
- acceleration: node.options.animateAcceleration;
1975
- enabled: node.options.animateExpand
1976
- "
1816
+ constructor() {
1817
+ this.node = input(...(ngDevMode ? [undefined, { debugName: "node" }] : []));
1818
+ this.templates = input(undefined, ...(ngDevMode ? [{ debugName: "templates" }] : []));
1819
+ this.children = computed(() => this.node().children, ...(ngDevMode ? [{ debugName: "children" }] : []));
1820
+ }
1821
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeChildrenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1822
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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: `
1823
+ <div
1824
+ [class.tree-children]="true"
1825
+ [class.tree-children-no-padding]="node().options.levelPadding"
1826
+ *treeAnimateOpen="
1827
+ node().isExpanded;
1828
+ speed: node().options.animateSpeed;
1829
+ acceleration: node().options.animateAcceleration;
1830
+ enabled: node().options.animateExpand
1831
+ "
1832
+ >
1833
+ @if (children()) {
1834
+ <tree-node-collection
1835
+ [nodes]="children()"
1836
+ [templates]="templates()"
1837
+ [treeModel]="node().treeModel"
1977
1838
  >
1978
- <tree-node-collection
1979
- *ngIf="node.children"
1980
- [nodes]="node.children"
1981
- [templates]="templates"
1982
- [treeModel]="node.treeModel"
1983
- >
1984
- </tree-node-collection>
1985
- <tree-loading-component
1986
- [style.padding-left]="node.getNodePadding()"
1987
- class="tree-node-loading"
1988
- *ngIf="!node.children"
1989
- [template]="templates.loadingTemplate"
1990
- [node]="node"
1991
- ></tree-loading-component>
1992
- </div>
1993
- </ng-container>
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 }); }
1839
+ </tree-node-collection>
1840
+ } @if (!children()) {
1841
+ <tree-loading-component
1842
+ [style.padding-left]="node().getNodePadding()"
1843
+ class="tree-node-loading"
1844
+ [template]="templates().loadingTemplate"
1845
+ [node]="node()"
1846
+ ></tree-loading-component>
1847
+ }
1848
+ </div>
1849
+ `, 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 }); }
1995
1850
  }
1996
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeChildrenComponent, decorators: [{
1851
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeChildrenComponent, decorators: [{
1997
1852
  type: Component,
1998
1853
  args: [{ selector: 'tree-node-children', encapsulation: ViewEncapsulation.None, template: `
1999
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
2000
- <div
2001
- [class.tree-children]="true"
2002
- [class.tree-children-no-padding]="node.options.levelPadding"
2003
- *treeAnimateOpen="
2004
- node.isExpanded;
2005
- speed: node.options.animateSpeed;
2006
- acceleration: node.options.animateAcceleration;
2007
- enabled: node.options.animateExpand
2008
- "
1854
+ <div
1855
+ [class.tree-children]="true"
1856
+ [class.tree-children-no-padding]="node().options.levelPadding"
1857
+ *treeAnimateOpen="
1858
+ node().isExpanded;
1859
+ speed: node().options.animateSpeed;
1860
+ acceleration: node().options.animateAcceleration;
1861
+ enabled: node().options.animateExpand
1862
+ "
1863
+ >
1864
+ @if (children()) {
1865
+ <tree-node-collection
1866
+ [nodes]="children()"
1867
+ [templates]="templates()"
1868
+ [treeModel]="node().treeModel"
2009
1869
  >
2010
- <tree-node-collection
2011
- *ngIf="node.children"
2012
- [nodes]="node.children"
2013
- [templates]="templates"
2014
- [treeModel]="node.treeModel"
2015
- >
2016
- </tree-node-collection>
2017
- <tree-loading-component
2018
- [style.padding-left]="node.getNodePadding()"
2019
- class="tree-node-loading"
2020
- *ngIf="!node.children"
2021
- [template]="templates.loadingTemplate"
2022
- [node]="node"
2023
- ></tree-loading-component>
2024
- </div>
2025
- </ng-container>
2026
- `, imports: [TreeMobxAutorunDirective, TreeAnimateOpenDirective, NgIf, forwardRef((() => TreeNodeCollectionComponent)), LoadingComponent] }]
2027
- }], propDecorators: { node: [{
2028
- type: Input
2029
- }], templates: [{
2030
- type: Input
2031
- }] } });
1870
+ </tree-node-collection>
1871
+ } @if (!children()) {
1872
+ <tree-loading-component
1873
+ [style.padding-left]="node().getNodePadding()"
1874
+ class="tree-node-loading"
1875
+ [template]="templates().loadingTemplate"
1876
+ [node]="node()"
1877
+ ></tree-loading-component>
1878
+ }
1879
+ </div>
1880
+ `, imports: [
1881
+ TreeAnimateOpenDirective,
1882
+ forwardRef((() => TreeNodeCollectionComponent)),
1883
+ LoadingComponent
1884
+ ] }]
1885
+ }] });
2032
1886
  class TreeNodeCollectionComponent {
2033
1887
  constructor() {
2034
- this._dispose = [];
2035
- }
2036
- get nodes() {
2037
- return this._nodes;
2038
- }
2039
- set nodes(nodes) {
2040
- this.setNodes(nodes);
2041
- }
2042
- get marginTop() {
2043
- const firstNode = this.viewportNodes && this.viewportNodes.length && this.viewportNodes[0];
2044
- const relativePosition = firstNode && firstNode.parent
2045
- ? firstNode.position -
2046
- firstNode.parent.position -
2047
- firstNode.parent.getSelfHeight()
2048
- : 0;
2049
- return `${relativePosition}px`;
2050
- }
2051
- setNodes(nodes) {
2052
- this._nodes = nodes;
1888
+ this.nodes = input(undefined, ...(ngDevMode ? [{ debugName: "nodes" }] : []));
1889
+ this.treeModel = input(undefined, ...(ngDevMode ? [{ debugName: "treeModel" }] : []));
1890
+ this.injector = inject(Injector);
1891
+ this.templates = input(undefined, ...(ngDevMode ? [{ debugName: "templates" }] : []));
1892
+ this.viewportNodes = signal([], ...(ngDevMode ? [{ debugName: "viewportNodes" }] : []));
1893
+ this.marginTop = computed(() => {
1894
+ const nodes = this.viewportNodes();
1895
+ const firstNode = nodes && nodes.length && nodes[0];
1896
+ const relativePosition = firstNode && firstNode.parent
1897
+ ? firstNode.position -
1898
+ firstNode.parent.position -
1899
+ firstNode.parent.getSelfHeight()
1900
+ : 0;
1901
+ return `${relativePosition}px`;
1902
+ }, ...(ngDevMode ? [{ debugName: "marginTop" }] : []));
1903
+ this._disposeEffects = [];
2053
1904
  }
2054
1905
  ngOnInit() {
2055
- this.virtualScroll = this.treeModel.virtualScroll;
2056
- this._dispose = [
2057
- // return node indexes so we can compare structurally,
2058
- reaction(() => {
2059
- return this.virtualScroll
2060
- .getViewportNodes(this.nodes)
2061
- .map(n => n.index);
2062
- }, nodeIndexes => {
2063
- this.viewportNodes = nodeIndexes.map(i => this.nodes[i]);
2064
- }, { compareStructural: true, fireImmediately: true }),
2065
- reaction(() => this.nodes, nodes => {
2066
- this.viewportNodes = this.virtualScroll.getViewportNodes(nodes);
2067
- })
2068
- ];
1906
+ this.virtualScroll = this.treeModel().virtualScroll;
1907
+ const viewportEffect = effect(() => {
1908
+ const nodes = this.nodes();
1909
+ if (nodes && this.virtualScroll) {
1910
+ const viewportNodes = this.virtualScroll.getViewportNodes(nodes);
1911
+ this.viewportNodes.set(viewportNodes);
1912
+ }
1913
+ }, ...(ngDevMode ? [{ debugName: "viewportEffect", injector: this.injector }] : [{ injector: this.injector }]));
1914
+ this._disposeEffects = [() => viewportEffect.destroy()];
2069
1915
  }
2070
1916
  ngOnDestroy() {
2071
- this._dispose.forEach(d => d());
1917
+ this._disposeEffects.forEach(d => d());
2072
1918
  }
2073
1919
  trackNode(index, node) {
2074
1920
  return node.id;
2075
1921
  }
2076
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeCollectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2077
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeNodeCollectionComponent, isStandalone: true, selector: "tree-node-collection", inputs: { nodes: "nodes", treeModel: "treeModel", templates: "templates" }, ngImport: i0, template: `
2078
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
2079
- <div [style.margin-top]="marginTop">
2080
- <tree-node
2081
- *ngFor="let node of viewportNodes; let i = index; trackBy: trackNode"
2082
- [node]="node"
2083
- [index]="i"
2084
- [templates]="templates"
2085
- >
2086
- </tree-node>
2087
- </div>
2088
- </ng-container>
2089
- `, isInline: true, dependencies: [{ kind: "directive", type: i0.forwardRef(() => TreeMobxAutorunDirective), selector: "[treeMobxAutorun]", inputs: ["treeMobxAutorun"] }, { kind: "directive", type: i0.forwardRef(() => NgFor), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i0.forwardRef(() => TreeNodeComponent), selector: "TreeNode, tree-node", inputs: ["node", "index", "templates"] }], encapsulation: i0.ViewEncapsulation.None }); }
1922
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeCollectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1923
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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: `
1924
+ <div [style.margin-top]="marginTop()">
1925
+ @for (node of viewportNodes(); track trackNode(i, node); let i = $index) {
1926
+ <tree-node [node]="node" [index]="i" [templates]="templates()">
1927
+ </tree-node>
1928
+ }
1929
+ </div>
1930
+ `, isInline: true, dependencies: [{ kind: "component", type: i0.forwardRef(() => TreeNodeComponent), selector: "TreeNode, tree-node", inputs: ["node", "index", "templates"] }], encapsulation: i0.ViewEncapsulation.None }); }
2090
1931
  }
2091
- __decorate([
2092
- observable
2093
- ], TreeNodeCollectionComponent.prototype, "_nodes", void 0);
2094
- __decorate([
2095
- observable
2096
- ], TreeNodeCollectionComponent.prototype, "viewportNodes", void 0);
2097
- __decorate([
2098
- computed
2099
- ], TreeNodeCollectionComponent.prototype, "marginTop", null);
2100
- __decorate([
2101
- action
2102
- ], TreeNodeCollectionComponent.prototype, "setNodes", null);
2103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeCollectionComponent, decorators: [{
1932
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeCollectionComponent, decorators: [{
2104
1933
  type: Component,
2105
1934
  args: [{
2106
1935
  selector: 'tree-node-collection',
2107
1936
  encapsulation: ViewEncapsulation.None,
2108
1937
  template: `
2109
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
2110
- <div [style.margin-top]="marginTop">
2111
- <tree-node
2112
- *ngFor="let node of viewportNodes; let i = index; trackBy: trackNode"
2113
- [node]="node"
2114
- [index]="i"
2115
- [templates]="templates"
2116
- >
2117
- </tree-node>
2118
- </div>
2119
- </ng-container>
1938
+ <div [style.margin-top]="marginTop()">
1939
+ @for (node of viewportNodes(); track trackNode(i, node); let i = $index) {
1940
+ <tree-node [node]="node" [index]="i" [templates]="templates()">
1941
+ </tree-node>
1942
+ }
1943
+ </div>
2120
1944
  `,
2121
- imports: [TreeMobxAutorunDirective, NgFor, forwardRef((() => TreeNodeComponent))]
1945
+ imports: [forwardRef((() => TreeNodeComponent))]
2122
1946
  }]
2123
- }], propDecorators: { nodes: [{
2124
- type: Input
2125
- }], treeModel: [{
2126
- type: Input
2127
- }], _nodes: [], templates: [{
2128
- type: Input
2129
- }], viewportNodes: [], marginTop: [], setNodes: [] } });
1947
+ }] });
2130
1948
  class TreeNodeComponent {
2131
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2132
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: TreeNodeComponent, isStandalone: true, selector: "TreeNode, tree-node", inputs: { node: "node", index: "index", templates: "templates" }, ngImport: i0, template: `
2133
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
2134
- <div
2135
- *ngIf="!templates.treeNodeFullTemplate"
2136
- [class]="node.getClass()"
2137
- [class.tree-node]="true"
2138
- [class.tree-node-expanded]="node.isExpanded && node.hasChildren"
2139
- [class.tree-node-collapsed]="node.isCollapsed && node.hasChildren"
2140
- [class.tree-node-leaf]="node.isLeaf"
2141
- [class.tree-node-active]="node.isActive"
2142
- [class.tree-node-focused]="node.isFocused"
2143
- >
2144
- <tree-node-drop-slot
2145
- *ngIf="index === 0"
2146
- [dropIndex]="node.index"
2147
- [node]="node.parent"
2148
- ></tree-node-drop-slot>
1949
+ constructor() {
1950
+ this.node = input(undefined, ...(ngDevMode ? [{ debugName: "node" }] : []));
1951
+ this.index = input(undefined, ...(ngDevMode ? [{ debugName: "index" }] : []));
1952
+ this.templates = input(...(ngDevMode ? [undefined, { debugName: "templates" }] : []));
1953
+ this.treeNodeFullTemplate = computed(() => this.templates().treeNodeFullTemplate, ...(ngDevMode ? [{ debugName: "treeNodeFullTemplate" }] : []));
1954
+ }
1955
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1956
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.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: `
1957
+ @if (!treeNodeFullTemplate()) {
1958
+ <div
1959
+ [class]="node().getClass()"
1960
+ [class.tree-node]="true"
1961
+ [class.tree-node-expanded]="node().isExpanded && node().hasChildren"
1962
+ [class.tree-node-collapsed]="node().isCollapsed && node().hasChildren"
1963
+ [class.tree-node-leaf]="node().isLeaf"
1964
+ [class.tree-node-active]="node().isActive"
1965
+ [class.tree-node-focused]="node().isFocused"
1966
+ >
1967
+ @if (index() === 0) {
1968
+ <tree-node-drop-slot
1969
+ [dropIndex]="node().index"
1970
+ [node]="node().parent"
1971
+ ></tree-node-drop-slot>
1972
+ }
2149
1973
 
2150
- <tree-node-wrapper
2151
- [node]="node"
2152
- [index]="index"
2153
- [templates]="templates"
2154
- ></tree-node-wrapper>
1974
+ <tree-node-wrapper
1975
+ [node]="node()"
1976
+ [index]="index()"
1977
+ [templates]="templates()"
1978
+ ></tree-node-wrapper>
2155
1979
 
2156
- <tree-node-children
2157
- [node]="node"
2158
- [templates]="templates"
2159
- ></tree-node-children>
2160
- <tree-node-drop-slot
2161
- [dropIndex]="node.index + 1"
2162
- [node]="node.parent"
2163
- ></tree-node-drop-slot>
2164
- </div>
2165
- <ng-container
2166
- [ngTemplateOutlet]="templates.treeNodeFullTemplate"
2167
- [ngTemplateOutletContext]="{
2168
- $implicit: node,
2169
- node: node,
2170
- index: index,
2171
- templates: templates
2172
- }"
2173
- >
2174
- </ng-container>
1980
+ <tree-node-children
1981
+ [node]="node()"
1982
+ [templates]="templates()"
1983
+ ></tree-node-children>
1984
+ <tree-node-drop-slot
1985
+ [dropIndex]="node().index + 1"
1986
+ [node]="node().parent"
1987
+ ></tree-node-drop-slot>
1988
+ </div>
1989
+ }
1990
+ <ng-container
1991
+ [ngTemplateOutlet]="treeNodeFullTemplate()"
1992
+ [ngTemplateOutletContext]="{
1993
+ $implicit: node(),
1994
+ node: node(),
1995
+ index: index(),
1996
+ templates: templates()
1997
+ }"
1998
+ >
2175
1999
  </ng-container>
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 }); }
2000
+ `, 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 }); }
2177
2001
  }
2178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeNodeComponent, decorators: [{
2002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeNodeComponent, decorators: [{
2179
2003
  type: Component,
2180
2004
  args: [{ selector: 'TreeNode, tree-node', encapsulation: ViewEncapsulation.None, template: `
2181
- <ng-container *treeMobxAutorun="{ dontDetach: true }">
2182
- <div
2183
- *ngIf="!templates.treeNodeFullTemplate"
2184
- [class]="node.getClass()"
2185
- [class.tree-node]="true"
2186
- [class.tree-node-expanded]="node.isExpanded && node.hasChildren"
2187
- [class.tree-node-collapsed]="node.isCollapsed && node.hasChildren"
2188
- [class.tree-node-leaf]="node.isLeaf"
2189
- [class.tree-node-active]="node.isActive"
2190
- [class.tree-node-focused]="node.isFocused"
2191
- >
2192
- <tree-node-drop-slot
2193
- *ngIf="index === 0"
2194
- [dropIndex]="node.index"
2195
- [node]="node.parent"
2196
- ></tree-node-drop-slot>
2005
+ @if (!treeNodeFullTemplate()) {
2006
+ <div
2007
+ [class]="node().getClass()"
2008
+ [class.tree-node]="true"
2009
+ [class.tree-node-expanded]="node().isExpanded && node().hasChildren"
2010
+ [class.tree-node-collapsed]="node().isCollapsed && node().hasChildren"
2011
+ [class.tree-node-leaf]="node().isLeaf"
2012
+ [class.tree-node-active]="node().isActive"
2013
+ [class.tree-node-focused]="node().isFocused"
2014
+ >
2015
+ @if (index() === 0) {
2016
+ <tree-node-drop-slot
2017
+ [dropIndex]="node().index"
2018
+ [node]="node().parent"
2019
+ ></tree-node-drop-slot>
2020
+ }
2197
2021
 
2198
- <tree-node-wrapper
2199
- [node]="node"
2200
- [index]="index"
2201
- [templates]="templates"
2202
- ></tree-node-wrapper>
2022
+ <tree-node-wrapper
2023
+ [node]="node()"
2024
+ [index]="index()"
2025
+ [templates]="templates()"
2026
+ ></tree-node-wrapper>
2203
2027
 
2204
- <tree-node-children
2205
- [node]="node"
2206
- [templates]="templates"
2207
- ></tree-node-children>
2208
- <tree-node-drop-slot
2209
- [dropIndex]="node.index + 1"
2210
- [node]="node.parent"
2211
- ></tree-node-drop-slot>
2212
- </div>
2213
- <ng-container
2214
- [ngTemplateOutlet]="templates.treeNodeFullTemplate"
2215
- [ngTemplateOutletContext]="{
2216
- $implicit: node,
2217
- node: node,
2218
- index: index,
2219
- templates: templates
2220
- }"
2221
- >
2222
- </ng-container>
2028
+ <tree-node-children
2029
+ [node]="node()"
2030
+ [templates]="templates()"
2031
+ ></tree-node-children>
2032
+ <tree-node-drop-slot
2033
+ [dropIndex]="node().index + 1"
2034
+ [node]="node().parent"
2035
+ ></tree-node-drop-slot>
2036
+ </div>
2037
+ }
2038
+ <ng-container
2039
+ [ngTemplateOutlet]="treeNodeFullTemplate()"
2040
+ [ngTemplateOutletContext]="{
2041
+ $implicit: node(),
2042
+ node: node(),
2043
+ index: index(),
2044
+ templates: templates()
2045
+ }"
2046
+ >
2223
2047
  </ng-container>
2224
- `, imports: [TreeMobxAutorunDirective, NgIf, TreeNodeDropSlot, TreeNodeWrapperComponent, TreeNodeChildrenComponent, NgTemplateOutlet] }]
2225
- }], propDecorators: { node: [{
2226
- type: Input
2227
- }], index: [{
2228
- type: Input
2229
- }], templates: [{
2230
- type: Input
2231
- }] } });
2048
+ `, imports: [
2049
+ TreeNodeDropSlot,
2050
+ TreeNodeWrapperComponent,
2051
+ TreeNodeChildrenComponent,
2052
+ NgTemplateOutlet
2053
+ ] }]
2054
+ }] });
2232
2055
 
2233
2056
  class TreeComponent {
2234
2057
  // Will be handled in ngOnChanges
2235
- set nodes(nodes) {
2236
- }
2237
- ;
2238
- set options(options) {
2239
- }
2240
- ;
2058
+ set nodes(nodes) { }
2059
+ set options(options) { }
2241
2060
  set focused(value) {
2242
2061
  this.treeModel.setFocus(value);
2243
2062
  }
@@ -2248,8 +2067,8 @@ class TreeComponent {
2248
2067
  this.treeModel = inject(TreeModel);
2249
2068
  this.treeDraggedElement = inject(TreeDraggedElement);
2250
2069
  const treeModel = this.treeModel;
2251
- treeModel.eventNames.forEach((name) => this[name] = new EventEmitter());
2252
- treeModel.subscribeToState((state) => this.stateChange.emit(state));
2070
+ treeModel.eventNames.forEach(name => (this[name] = new EventEmitter()));
2071
+ treeModel.subscribeToState(state => this.stateChange.emit(state));
2253
2072
  }
2254
2073
  onKeydown($event) {
2255
2074
  if (!this.treeModel.isFocused)
@@ -2261,7 +2080,11 @@ class TreeComponent {
2261
2080
  }
2262
2081
  onMousedown($event) {
2263
2082
  function isOutsideClick(startElement, nodeName) {
2264
- return !startElement ? true : startElement.localName === nodeName ? false : isOutsideClick(startElement.parentElement, nodeName);
2083
+ return !startElement
2084
+ ? true
2085
+ : startElement.localName === nodeName
2086
+ ? false
2087
+ : isOutsideClick(startElement.parentElement, nodeName);
2265
2088
  }
2266
2089
  if (isOutsideClick($event.target, 'tree-root')) {
2267
2090
  this.treeModel.setFocus(false);
@@ -2287,62 +2110,73 @@ class TreeComponent {
2287
2110
  return obj;
2288
2111
  }, {});
2289
2112
  }
2290
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2291
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", 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: `
2292
- <tree-viewport #viewport>
2293
- <div
2294
- class="angular-tree-component"
2295
- [class.node-dragging]="treeDraggedElement.isDragging()"
2296
- [class.angular-tree-component-rtl]="treeModel.options.rtl">
2297
- <tree-node-collection
2298
- *ngIf="treeModel.roots"
2299
- [nodes]="treeModel.roots"
2300
- [treeModel]="treeModel"
2301
- [templates]="{
2113
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2114
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.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: `
2115
+ <tree-viewport #viewport>
2116
+ <div
2117
+ class="angular-tree-component"
2118
+ [class.node-dragging]="treeDraggedElement.isDragging()"
2119
+ [class.angular-tree-component-rtl]="treeModel.options.rtl"
2120
+ >
2121
+ <tree-node-collection
2122
+ *ngIf="treeModel.roots"
2123
+ [nodes]="treeModel.roots"
2124
+ [treeModel]="treeModel"
2125
+ [templates]="{
2302
2126
  loadingTemplate: loadingTemplate,
2303
2127
  treeNodeTemplate: treeNodeTemplate,
2304
2128
  treeNodeWrapperTemplate: treeNodeWrapperTemplate,
2305
2129
  treeNodeFullTemplate: treeNodeFullTemplate
2306
- }">
2307
- </tree-node-collection>
2308
- <tree-node-drop-slot
2309
- class="empty-tree-drop-slot"
2310
- *ngIf="treeModel.isEmptyTree()"
2311
- [dropIndex]="0"
2312
- [node]="treeModel.virtualRoot">
2313
- </tree-node-drop-slot>
2314
- </div>
2315
- </tree-viewport>
2130
+ }"
2131
+ >
2132
+ </tree-node-collection>
2133
+ <tree-node-drop-slot
2134
+ class="empty-tree-drop-slot"
2135
+ *ngIf="treeModel.isEmptyTree()"
2136
+ [dropIndex]="0"
2137
+ [node]="treeModel.virtualRoot"
2138
+ >
2139
+ </tree-node-drop-slot>
2140
+ </div>
2141
+ </tree-viewport>
2316
2142
  `, 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"] }] }); }
2317
2143
  }
2318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeComponent, decorators: [{
2144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeComponent, decorators: [{
2319
2145
  type: Component,
2320
2146
  args: [{ selector: 'Tree, tree-root', providers: [TreeModel], template: `
2321
- <tree-viewport #viewport>
2322
- <div
2323
- class="angular-tree-component"
2324
- [class.node-dragging]="treeDraggedElement.isDragging()"
2325
- [class.angular-tree-component-rtl]="treeModel.options.rtl">
2326
- <tree-node-collection
2327
- *ngIf="treeModel.roots"
2328
- [nodes]="treeModel.roots"
2329
- [treeModel]="treeModel"
2330
- [templates]="{
2147
+ <tree-viewport #viewport>
2148
+ <div
2149
+ class="angular-tree-component"
2150
+ [class.node-dragging]="treeDraggedElement.isDragging()"
2151
+ [class.angular-tree-component-rtl]="treeModel.options.rtl"
2152
+ >
2153
+ <tree-node-collection
2154
+ *ngIf="treeModel.roots"
2155
+ [nodes]="treeModel.roots"
2156
+ [treeModel]="treeModel"
2157
+ [templates]="{
2331
2158
  loadingTemplate: loadingTemplate,
2332
2159
  treeNodeTemplate: treeNodeTemplate,
2333
2160
  treeNodeWrapperTemplate: treeNodeWrapperTemplate,
2334
2161
  treeNodeFullTemplate: treeNodeFullTemplate
2335
- }">
2336
- </tree-node-collection>
2337
- <tree-node-drop-slot
2338
- class="empty-tree-drop-slot"
2339
- *ngIf="treeModel.isEmptyTree()"
2340
- [dropIndex]="0"
2341
- [node]="treeModel.virtualRoot">
2342
- </tree-node-drop-slot>
2343
- </div>
2344
- </tree-viewport>
2345
- `, imports: [TreeViewportComponent, NgIf, TreeNodeCollectionComponent, TreeNodeDropSlot] }]
2162
+ }"
2163
+ >
2164
+ </tree-node-collection>
2165
+ <tree-node-drop-slot
2166
+ class="empty-tree-drop-slot"
2167
+ *ngIf="treeModel.isEmptyTree()"
2168
+ [dropIndex]="0"
2169
+ [node]="treeModel.virtualRoot"
2170
+ >
2171
+ </tree-node-drop-slot>
2172
+ </div>
2173
+ </tree-viewport>
2174
+ `, imports: [
2175
+ TreeViewportComponent,
2176
+ NgIf,
2177
+ TreeNodeCollectionComponent,
2178
+ TreeNodeDropSlot
2179
+ ] }]
2346
2180
  }], ctorParameters: () => [], propDecorators: { loadingTemplate: [{
2347
2181
  type: ContentChild,
2348
2182
  args: ['loadingTemplate', { static: false }]
@@ -2409,8 +2243,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
2409
2243
  }] } });
2410
2244
 
2411
2245
  class TreeModule {
2412
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2413
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.6", ngImport: i0, type: TreeModule, imports: [CommonModule, TreeComponent,
2246
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2247
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.3", ngImport: i0, type: TreeModule, imports: [CommonModule, TreeComponent,
2414
2248
  TreeNodeComponent,
2415
2249
  TreeNodeContent,
2416
2250
  LoadingComponent,
@@ -2423,8 +2257,7 @@ class TreeModule {
2423
2257
  TreeViewportComponent,
2424
2258
  TreeNodeWrapperComponent,
2425
2259
  TreeNodeCheckboxComponent,
2426
- TreeAnimateOpenDirective,
2427
- TreeMobxAutorunDirective], exports: [TreeComponent,
2260
+ TreeAnimateOpenDirective], exports: [TreeComponent,
2428
2261
  TreeNodeComponent,
2429
2262
  TreeNodeContent,
2430
2263
  LoadingComponent,
@@ -2437,11 +2270,10 @@ class TreeModule {
2437
2270
  TreeViewportComponent,
2438
2271
  TreeNodeWrapperComponent,
2439
2272
  TreeNodeCheckboxComponent,
2440
- TreeAnimateOpenDirective,
2441
- TreeMobxAutorunDirective] }); }
2442
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeModule, imports: [CommonModule] }); }
2273
+ TreeAnimateOpenDirective] }); }
2274
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeModule, imports: [CommonModule] }); }
2443
2275
  }
2444
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: TreeModule, decorators: [{
2276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: TreeModule, decorators: [{
2445
2277
  type: NgModule,
2446
2278
  args: [{
2447
2279
  declarations: [],
@@ -2459,8 +2291,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
2459
2291
  TreeViewportComponent,
2460
2292
  TreeNodeWrapperComponent,
2461
2293
  TreeNodeCheckboxComponent,
2462
- TreeAnimateOpenDirective,
2463
- TreeMobxAutorunDirective
2294
+ TreeAnimateOpenDirective
2464
2295
  ],
2465
2296
  imports: [CommonModule, TreeComponent,
2466
2297
  TreeNodeComponent,
@@ -2475,8 +2306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
2475
2306
  TreeViewportComponent,
2476
2307
  TreeNodeWrapperComponent,
2477
2308
  TreeNodeCheckboxComponent,
2478
- TreeAnimateOpenDirective,
2479
- TreeMobxAutorunDirective],
2309
+ TreeAnimateOpenDirective],
2480
2310
  providers: []
2481
2311
  }]
2482
2312
  }] });
@@ -2489,5 +2319,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
2489
2319
  * Generated bundle index. Do not edit.
2490
2320
  */
2491
2321
 
2492
- export { KEYS, LoadingComponent, TREE_ACTIONS, TreeAnimateOpenDirective, TreeComponent, TreeDragDirective, TreeDraggedElement, TreeDropDirective, TreeMobxAutorunDirective, TreeModel, TreeModule, TreeNode, TreeNodeCheckboxComponent, TreeNodeChildrenComponent, TreeNodeCollectionComponent, TreeNodeComponent, TreeNodeContent, TreeNodeDropSlot, TreeNodeExpanderComponent, TreeNodeWrapperComponent, TreeViewportComponent, TreeVirtualScroll };
2322
+ export { KEYS, LoadingComponent, TREE_ACTIONS, TreeAnimateOpenDirective, TreeComponent, TreeDragDirective, TreeDraggedElement, TreeDropDirective, TreeModel, TreeModule, TreeNode, TreeNodeCheckboxComponent, TreeNodeChildrenComponent, TreeNodeCollectionComponent, TreeNodeComponent, TreeNodeContent, TreeNodeDropSlot, TreeNodeExpanderComponent, TreeNodeWrapperComponent, TreeViewportComponent, TreeVirtualScroll };
2493
2323
  //# sourceMappingURL=ali-hm-angular-tree-component.mjs.map