@cluetec/ngcx-tree 19.2.0 → 19.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,7 +4,7 @@ import * as i1 from '@angular/cdk/tree';
|
|
|
4
4
|
import { CdkTreeModule, NestedTreeControl } from '@angular/cdk/tree';
|
|
5
5
|
import { NgTemplateOutlet, NgIf } from '@angular/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
|
-
import { EventEmitter, ViewContainerRef,
|
|
7
|
+
import { EventEmitter, ViewContainerRef, ViewChild, Output, Input, Component, HostListener } from '@angular/core';
|
|
8
8
|
import { DataSource } from '@angular/cdk/collections';
|
|
9
9
|
import { BehaviorSubject, Subject, takeUntil } from 'rxjs';
|
|
10
10
|
import 'zone.js';
|
|
@@ -43,12 +43,12 @@ class NgcxTreeNodeComponent {
|
|
|
43
43
|
this.ngUnsubscribe.next(undefined);
|
|
44
44
|
this.ngUnsubscribe.complete();
|
|
45
45
|
}
|
|
46
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
47
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
46
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: NgcxTreeNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
47
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: NgcxTreeNodeComponent, isStandalone: true, selector: "ngcx-tree-node", inputs: { nodeWrapper: "nodeWrapper", treeControl: "treeControl", treeConfig: "treeConfig", isSelected: "isSelected" }, outputs: { customEvent: "customEvent", clickEvent: "clickEvent" }, viewQueries: [{ propertyName: "vcRef", first: true, predicate: ["ref"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div\n class=\"tree-node-content-container\"\n [class.selected]=\"isSelected\"\n [class.first]=\"nodeWrapper.isFirstChild\"\n [class.last]=\"nodeWrapper.isLastChild\"\n [class.is-selectable]=\"nodeWrapper.isSelectable\"\n (click)=\"clickEvent.emit()\">\n <div class=\"tree-node-expand-container\">\n <button\n *ngIf=\"nodeWrapper.children.length > 0\"\n class=\"tree-node-expand\"\n cdkTreeNodeToggle\n [attr.aria-label]=\"'Toggle ' + nodeWrapper.data.title\"\n (click)=\"$event.preventDefault()\">\n <div class=\"chevron\" [class.rotate]=\"treeControl.isExpanded(nodeWrapper)\">\n <svg\n id=\"a\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 9 9\"\n height=\"10px\"\n width=\"10px\">\n <path\n d=\"m2.83.09l4.2,4.2c.05.05.09.14.09.21s-.04.15-.09.21l-4.2,4.2c-.05.05-.14.09-.21.09s-.15-.04-.21-.09l-.45-.45c-.05-.05-.09-.13-.09-.21,0-.07.04-.15.09-.21l3.54-3.54L1.97.96c-.05-.05-.09-.14-.09-.21s.04-.15.09-.21l.45-.45c.05-.05.14-.09.21-.09s.15.04.21.09Z\"\n style=\"fill: var(--icon-color, #333); stroke-width: 0px\" />\n </svg>\n </div>\n </button>\n </div>\n <div class=\"small-horizontal-tree-line\"></div>\n <div class=\"tree-node-icon-container\" *ngIf=\"nodeWrapper.data.faIcon\">\n <i class=\"fa\" [class]=\"nodeWrapper.data.faIcon\"></i>\n </div>\n <div class=\"tree-node-content\">\n <span\n *ngIf=\"\n !treeConfig?.treeNodeContentComponent &&\n !treeConfig?.treeNodeContentTemplate\n \">\n {{ nodeWrapper.data.title }}\n </span>\n <ng-container #ref></ng-container>\n <ng-container *ngIf=\"treeConfig?.treeNodeContentTemplate as template\">\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: {\n nodeWrapper: nodeWrapper,\n }\n \"></ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [".tree-node-content-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;width:100%}.tree-node-content-container.is-selectable{cursor:pointer}.tree-node-content-container .tree-node-expand-container{display:flex;flex-direction:row;justify-content:center;align-items:center;width:30px;height:30px;margin-right:5px;flex-shrink:0}.tree-node-content-container .tree-node-expand-container>.tree-node-expand{color:#2587be;background:none;border:none;font:inherit;cursor:pointer;outline:inherit;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.tree-node-content-container .tree-node-expand-container>.tree-node-expand .chevron{width:10px;transition:transform .1s ease-in-out}.tree-node-content-container .tree-node-expand-container>.tree-node-expand .chevron.rotate{transform:rotate(90deg)}.tree-node-content-container .tree-node-icon-container{margin-right:7px;color:#2587be}\n"], dependencies: [{ kind: "ngmodule", type: CdkTreeModule }, { kind: "directive", type: i1.CdkTreeNodeToggle, selector: "[cdkTreeNodeToggle]", inputs: ["cdkTreeNodeToggleRecursive"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: NgcxTreeNodeComponent, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
|
-
args: [{ selector: 'ngcx-tree-node', imports: [CdkTreeModule, NgTemplateOutlet, NgIf], template: "<div\n class=\"tree-node-content-container\"\n [class.selected]=\"isSelected\"\n [class.first]=\"nodeWrapper.isFirstChild\"\n [class.last]=\"nodeWrapper.isLastChild\"\n [class.is-selectable]=\"nodeWrapper.isSelectable\"\n (click)=\"clickEvent.emit()\">\n <div class=\"tree-node-expand-container\">\n <button\n *ngIf=\"nodeWrapper.children.length > 0\"\n class=\"tree-node-expand\"\n cdkTreeNodeToggle\n [attr.aria-label]=\"'Toggle ' + nodeWrapper.data.title\"\n (click)=\"$event.preventDefault()\">\n <div class=\"chevron\" [class.rotate]=\"treeControl.isExpanded(nodeWrapper)\">\n <svg
|
|
51
|
+
args: [{ selector: 'ngcx-tree-node', imports: [CdkTreeModule, NgTemplateOutlet, NgIf], template: "<div\n class=\"tree-node-content-container\"\n [class.selected]=\"isSelected\"\n [class.first]=\"nodeWrapper.isFirstChild\"\n [class.last]=\"nodeWrapper.isLastChild\"\n [class.is-selectable]=\"nodeWrapper.isSelectable\"\n (click)=\"clickEvent.emit()\">\n <div class=\"tree-node-expand-container\">\n <button\n *ngIf=\"nodeWrapper.children.length > 0\"\n class=\"tree-node-expand\"\n cdkTreeNodeToggle\n [attr.aria-label]=\"'Toggle ' + nodeWrapper.data.title\"\n (click)=\"$event.preventDefault()\">\n <div class=\"chevron\" [class.rotate]=\"treeControl.isExpanded(nodeWrapper)\">\n <svg\n id=\"a\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 9 9\"\n height=\"10px\"\n width=\"10px\">\n <path\n d=\"m2.83.09l4.2,4.2c.05.05.09.14.09.21s-.04.15-.09.21l-4.2,4.2c-.05.05-.14.09-.21.09s-.15-.04-.21-.09l-.45-.45c-.05-.05-.09-.13-.09-.21,0-.07.04-.15.09-.21l3.54-3.54L1.97.96c-.05-.05-.09-.14-.09-.21s.04-.15.09-.21l.45-.45c.05-.05.14-.09.21-.09s.15.04.21.09Z\"\n style=\"fill: var(--icon-color, #333); stroke-width: 0px\" />\n </svg>\n </div>\n </button>\n </div>\n <div class=\"small-horizontal-tree-line\"></div>\n <div class=\"tree-node-icon-container\" *ngIf=\"nodeWrapper.data.faIcon\">\n <i class=\"fa\" [class]=\"nodeWrapper.data.faIcon\"></i>\n </div>\n <div class=\"tree-node-content\">\n <span\n *ngIf=\"\n !treeConfig?.treeNodeContentComponent &&\n !treeConfig?.treeNodeContentTemplate\n \">\n {{ nodeWrapper.data.title }}\n </span>\n <ng-container #ref></ng-container>\n <ng-container *ngIf=\"treeConfig?.treeNodeContentTemplate as template\">\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: {\n nodeWrapper: nodeWrapper,\n }\n \"></ng-container>\n </ng-container>\n </div>\n</div>\n", styles: [".tree-node-content-container{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;width:100%}.tree-node-content-container.is-selectable{cursor:pointer}.tree-node-content-container .tree-node-expand-container{display:flex;flex-direction:row;justify-content:center;align-items:center;width:30px;height:30px;margin-right:5px;flex-shrink:0}.tree-node-content-container .tree-node-expand-container>.tree-node-expand{color:#2587be;background:none;border:none;font:inherit;cursor:pointer;outline:inherit;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.tree-node-content-container .tree-node-expand-container>.tree-node-expand .chevron{width:10px;transition:transform .1s ease-in-out}.tree-node-content-container .tree-node-expand-container>.tree-node-expand .chevron.rotate{transform:rotate(90deg)}.tree-node-content-container .tree-node-icon-container{margin-right:7px;color:#2587be}\n"] }]
|
|
52
52
|
}], propDecorators: { nodeWrapper: [{
|
|
53
53
|
type: Input
|
|
54
54
|
}], treeControl: [{
|
|
@@ -335,10 +335,10 @@ class NgcxTreeComponent {
|
|
|
335
335
|
this.selectEvent.emit(this.selectedNode);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
339
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.
|
|
338
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: NgcxTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
339
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: NgcxTreeComponent, isStandalone: true, selector: "ngcx-tree", inputs: { nodes: "nodes", config: "config" }, outputs: { nodeMoved: "nodeMoved", customEvent: "customEvent", clickEvent: "clickEvent", selectEvent: "selectEvent" }, host: { listeners: { "window:keydown.escape": "keyEscapeWhileDragging()" } }, usesOnChanges: true, ngImport: i0, template: "<cdk-tree\n #tree\n class=\"ngcx-tree\"\n *ngIf=\"dataSource\"\n [dataSource]=\"dataSource\"\n [treeControl]=\"treeControl\"\n cdkDropListGroup\n [class.dragging]=\"dragging\"\n (keyup.arrowup)=\"keyDownArrowUp($event)\"\n (keydown.arrowdown)=\"keyDownArrowDown($event)\"\n (keydown.arrowleft)=\"keyDownArrowLeft($event)\"\n (keydown.arrowright)=\"keyDownArrowRight($event)\"\n tabindex=\"0\">\n <cdk-nested-tree-node *cdkTreeNodeDef=\"let node\" class=\"tree-node\">\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_AFTER) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_AFTER\"\n class=\"tree-node-container-drop-zone after-expanded-node\"\n [class.hide]=\"dropControl.hideDrop || !treeControl.isExpanded(node)\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div class=\"tree-node-container\">\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_BEFORE) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_BEFORE\"\n class=\"tree-node-container-drop-zone before-node\"\n [class.hide]=\"!node.isFirstChild || dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_INTO) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_INTO\"\n class=\"tree-node-container-drop-zone into-node\"\n [class.hide]=\"dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_AFTER) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_AFTER\"\n class=\"tree-node-container-drop-zone after-node\"\n [class.last]=\"node.isLastChild\"\n [class.hide]=\"treeControl.isExpanded(node) || dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n cdkDropList\n [cdkDropListData]=\"node\"\n [cdkDropListEnterPredicate]=\"disable\"\n [cdkDropListSortPredicate]=\"disable\">\n <div\n cdkDrag\n [cdkDragDisabled]=\"disableDrag(node)\"\n [cdkDragData]=\"node\"\n (cdkDragStarted)=\"dragging = node\"\n (cdkDragReleased)=\"handleDragRelease($event)\">\n <div *cdkDragPlaceholder></div>\n <div\n class=\"tree-node-content-container\"\n [class.first]=\"node.isFirstChild\"\n [class.last]=\"node.isLastChild\"\n [class.expanded]=\"treeControl.isExpanded(node)\">\n <ngcx-tree-node\n style=\"width: 100%\"\n [nodeWrapper]=\"node\"\n [isSelected]=\"node.id === selectedNode?.id\"\n [treeControl]=\"treeControl\"\n [treeConfig]=\"config\"\n (customEvent)=\"customEvent.emit($event)\"\n (clickEvent)=\"nodeClicked(node)\"></ngcx-tree-node>\n </div>\n </div>\n <ngcx-tree-node\n *ngIf=\"node.id === dragging?.id\"\n [nodeWrapper]=\"node\"\n [treeControl]=\"treeControl\"\n [treeConfig]=\"config\"></ngcx-tree-node>\n </div>\n </div>\n <div\n *ngIf=\"treeControl.isExpanded(node)\"\n class=\"tree-node-children-container\"\n [class.first]=\"node.isFirstChild\"\n [class.last]=\"node.isLastChild\">\n <div cdkTreeNodeOutlet></div>\n </div>\n </cdk-nested-tree-node>\n</cdk-tree>\n", styles: [".ngcx-tree{height:auto}.ngcx-tree ul,.ngcx-tree li{margin-top:0;margin-bottom:0;list-style-type:none}.tree-node{display:flex;flex-direction:column;position:relative}.tree-node .tree-node{margin-left:20px}.tree-node-container{width:100%;min-height:30px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;position:relative;cursor:default}.tree-node-container .tree-node-content-container{width:100%}.tree-node-container .cdk-drag{width:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}.tree-node-container-drop-zone{height:100%;left:25px;right:5px;position:absolute;z-index:1001;display:flex;justify-content:center;flex-direction:column}.tree-node-container-drop-zone:hover.into-node,.tree-node-container-drop-zone.cdk-drop-list-dragging.into-node{border:1.5px dashed rgba(0,0,0,.5)}.tree-node-container-drop-zone:hover .drop-insert-line,.tree-node-container-drop-zone.cdk-drop-list-dragging .drop-insert-line{border-top:1.5px dashed rgba(0,0,0,.5)}.tree-node-container-drop-zone.hide{height:0!important}.tree-node-container-drop-zone.hide .drop-insert-line{border-top:solid transparent 0px!important}.tree-node-container-drop-zone.no-drop{cursor:no-drop;border-color:var(--ngcx-tree-color-no-drop, transparent)!important}.tree-node-container-drop-zone.no-drop .drop-insert-line{border-color:var(--ngcx-tree-color-no-drop, transparent)!important}.tree-node-container-drop-zone.before-node{height:20px;z-index:1002;top:-10px}.tree-node-container-drop-zone.after-node{height:20px;z-index:1003;top:calc(100% - 10px)}.tree-node-container-drop-zone.after-node.last{height:10px}.tree-node-container-drop-zone.after-expanded-node{position:absolute;height:20px;z-index:1003;bottom:-10px;display:flex;justify-content:center;flex-direction:column}.tree-node-container-drop-zone.cdk-drop-list-receiving:hover .tooltip,.tree-node-container-drop-zone.cdk-drop-list-dragging .tooltip{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CdkTreeModule }, { kind: "directive", type: i1.CdkNestedTreeNode, selector: "cdk-nested-tree-node", exportAs: ["cdkNestedTreeNode"] }, { kind: "directive", type: i1.CdkTreeNodeDef, selector: "[cdkTreeNodeDef]", inputs: ["cdkTreeNodeDefWhen"] }, { kind: "component", type: i1.CdkTree, selector: "cdk-tree", inputs: ["dataSource", "treeControl", "levelAccessor", "childrenAccessor", "trackBy", "expansionKey"], exportAs: ["cdkTree"] }, { kind: "directive", type: i1.CdkTreeNodeOutlet, selector: "[cdkTreeNodeOutlet]" }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2.CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "directive", type: i2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i2.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: NgcxTreeNodeComponent, selector: "ngcx-tree-node", inputs: ["nodeWrapper", "treeControl", "treeConfig", "isSelected"], outputs: ["customEvent", "clickEvent"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
340
340
|
}
|
|
341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: NgcxTreeComponent, decorators: [{
|
|
342
342
|
type: Component,
|
|
343
343
|
args: [{ selector: 'ngcx-tree', imports: [CdkTreeModule, DragDropModule, NgcxTreeNodeComponent, NgIf], template: "<cdk-tree\n #tree\n class=\"ngcx-tree\"\n *ngIf=\"dataSource\"\n [dataSource]=\"dataSource\"\n [treeControl]=\"treeControl\"\n cdkDropListGroup\n [class.dragging]=\"dragging\"\n (keyup.arrowup)=\"keyDownArrowUp($event)\"\n (keydown.arrowdown)=\"keyDownArrowDown($event)\"\n (keydown.arrowleft)=\"keyDownArrowLeft($event)\"\n (keydown.arrowright)=\"keyDownArrowRight($event)\"\n tabindex=\"0\">\n <cdk-nested-tree-node *cdkTreeNodeDef=\"let node\" class=\"tree-node\">\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_AFTER) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_AFTER\"\n class=\"tree-node-container-drop-zone after-expanded-node\"\n [class.hide]=\"dropControl.hideDrop || !treeControl.isExpanded(node)\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div class=\"tree-node-container\">\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_BEFORE) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_BEFORE\"\n class=\"tree-node-container-drop-zone before-node\"\n [class.hide]=\"!node.isFirstChild || dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_INTO) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_INTO\"\n class=\"tree-node-container-drop-zone into-node\"\n [class.hide]=\"dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_AFTER) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_AFTER\"\n class=\"tree-node-container-drop-zone after-node\"\n [class.last]=\"node.isLastChild\"\n [class.hide]=\"treeControl.isExpanded(node) || dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n cdkDropList\n [cdkDropListData]=\"node\"\n [cdkDropListEnterPredicate]=\"disable\"\n [cdkDropListSortPredicate]=\"disable\">\n <div\n cdkDrag\n [cdkDragDisabled]=\"disableDrag(node)\"\n [cdkDragData]=\"node\"\n (cdkDragStarted)=\"dragging = node\"\n (cdkDragReleased)=\"handleDragRelease($event)\">\n <div *cdkDragPlaceholder></div>\n <div\n class=\"tree-node-content-container\"\n [class.first]=\"node.isFirstChild\"\n [class.last]=\"node.isLastChild\"\n [class.expanded]=\"treeControl.isExpanded(node)\">\n <ngcx-tree-node\n style=\"width: 100%\"\n [nodeWrapper]=\"node\"\n [isSelected]=\"node.id === selectedNode?.id\"\n [treeControl]=\"treeControl\"\n [treeConfig]=\"config\"\n (customEvent)=\"customEvent.emit($event)\"\n (clickEvent)=\"nodeClicked(node)\"></ngcx-tree-node>\n </div>\n </div>\n <ngcx-tree-node\n *ngIf=\"node.id === dragging?.id\"\n [nodeWrapper]=\"node\"\n [treeControl]=\"treeControl\"\n [treeConfig]=\"config\"></ngcx-tree-node>\n </div>\n </div>\n <div\n *ngIf=\"treeControl.isExpanded(node)\"\n class=\"tree-node-children-container\"\n [class.first]=\"node.isFirstChild\"\n [class.last]=\"node.isLastChild\">\n <div cdkTreeNodeOutlet></div>\n </div>\n </cdk-nested-tree-node>\n</cdk-tree>\n", styles: [".ngcx-tree{height:auto}.ngcx-tree ul,.ngcx-tree li{margin-top:0;margin-bottom:0;list-style-type:none}.tree-node{display:flex;flex-direction:column;position:relative}.tree-node .tree-node{margin-left:20px}.tree-node-container{width:100%;min-height:30px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;position:relative;cursor:default}.tree-node-container .tree-node-content-container{width:100%}.tree-node-container .cdk-drag{width:100%;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}.tree-node-container-drop-zone{height:100%;left:25px;right:5px;position:absolute;z-index:1001;display:flex;justify-content:center;flex-direction:column}.tree-node-container-drop-zone:hover.into-node,.tree-node-container-drop-zone.cdk-drop-list-dragging.into-node{border:1.5px dashed rgba(0,0,0,.5)}.tree-node-container-drop-zone:hover .drop-insert-line,.tree-node-container-drop-zone.cdk-drop-list-dragging .drop-insert-line{border-top:1.5px dashed rgba(0,0,0,.5)}.tree-node-container-drop-zone.hide{height:0!important}.tree-node-container-drop-zone.hide .drop-insert-line{border-top:solid transparent 0px!important}.tree-node-container-drop-zone.no-drop{cursor:no-drop;border-color:var(--ngcx-tree-color-no-drop, transparent)!important}.tree-node-container-drop-zone.no-drop .drop-insert-line{border-color:var(--ngcx-tree-color-no-drop, transparent)!important}.tree-node-container-drop-zone.before-node{height:20px;z-index:1002;top:-10px}.tree-node-container-drop-zone.after-node{height:20px;z-index:1003;top:calc(100% - 10px)}.tree-node-container-drop-zone.after-node.last{height:10px}.tree-node-container-drop-zone.after-expanded-node{position:absolute;height:20px;z-index:1003;bottom:-10px;display:flex;justify-content:center;flex-direction:column}.tree-node-container-drop-zone.cdk-drop-list-receiving:hover .tooltip,.tree-node-container-drop-zone.cdk-drop-list-dragging .tooltip{display:block}\n"] }]
|
|
344
344
|
}], propDecorators: { nodes: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluetec-ngcx-tree.mjs","sources":["../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree-data.source.ts","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree-node/ngcx-tree-node.component.ts","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree-node/ngcx-tree-node.component.html","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree-utils.ts","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree.component.ts","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree.component.html","../../../projects/ngcx-tree/src/public-api.ts","../../../projects/ngcx-tree/src/cluetec-ngcx-tree.ts"],"sourcesContent":["import { DataSource } from '@angular/cdk/collections';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nexport class NgcxTreeDataSource<T> extends DataSource<T> {\n data$: BehaviorSubject<T[]>;\n\n constructor(data: T[]) {\n super();\n this.data$ = new BehaviorSubject(data);\n }\n\n connect(): Observable<readonly T[]> {\n return this.data$.asObservable();\n }\n disconnect(): void {}\n\n update(data: T[]) {\n this.data$.next([...data]);\n }\n}\n","import { CdkTreeModule, NestedTreeControl } from '@angular/cdk/tree';\nimport {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { NgcxTreeConfig, NgcxTreeNodeWrapper } from '../ngcx-tree-models';\n\nimport { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { Subject, takeUntil } from 'rxjs';\n\n@Component({\n selector: 'ngcx-tree-node',\n templateUrl: './ngcx-tree-node.component.html',\n styleUrls: ['./ngcx-tree-node.component.scss'],\n imports: [CdkTreeModule, NgTemplateOutlet, NgIf]\n})\nexport class NgcxTreeNodeComponent implements OnInit, OnDestroy {\n @Input() nodeWrapper!: NgcxTreeNodeWrapper<any>;\n @Input() treeControl!: NestedTreeControl<NgcxTreeNodeWrapper<any>, string>;\n @Input() treeConfig?: NgcxTreeConfig<any>;\n @Input() isSelected = false;\n\n @Output() customEvent = new EventEmitter<any>();\n @Output() clickEvent = new EventEmitter<void>();\n\n @ViewChild('ref', { read: ViewContainerRef, static: true })\n vcRef?: ViewContainerRef;\n\n ngUnsubscribe = new Subject();\n\n ngOnInit() {\n if (this.vcRef && this.treeConfig?.treeNodeContentComponent) {\n const nodeComponent = this.vcRef.createComponent(\n this.treeConfig.treeNodeContentComponent\n );\n nodeComponent.instance.nodeWrapper = this.nodeWrapper;\n\n nodeComponent.instance.customEvent\n ?.pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((value: any) => this.customEvent.emit(value));\n }\n }\n\n ngOnDestroy(): void {\n this.ngUnsubscribe.next(undefined);\n this.ngUnsubscribe.complete();\n }\n}\n","<div\n class=\"tree-node-content-container\"\n [class.selected]=\"isSelected\"\n [class.first]=\"nodeWrapper.isFirstChild\"\n [class.last]=\"nodeWrapper.isLastChild\"\n [class.is-selectable]=\"nodeWrapper.isSelectable\"\n (click)=\"clickEvent.emit()\">\n <div class=\"tree-node-expand-container\">\n <button\n *ngIf=\"nodeWrapper.children.length > 0\"\n class=\"tree-node-expand\"\n cdkTreeNodeToggle\n [attr.aria-label]=\"'Toggle ' + nodeWrapper.data.title\"\n (click)=\"$event.preventDefault()\">\n <div class=\"chevron\" [class.rotate]=\"treeControl.isExpanded(nodeWrapper)\">\n <svg id=\"a\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 9 9\">\n <path\n d=\"m2.83.09l4.2,4.2c.05.05.09.14.09.21s-.04.15-.09.21l-4.2,4.2c-.05.05-.14.09-.21.09s-.15-.04-.21-.09l-.45-.45c-.05-.05-.09-.13-.09-.21,0-.07.04-.15.09-.21l3.54-3.54L1.97.96c-.05-.05-.09-.14-.09-.21s.04-.15.09-.21l.45-.45c.05-.05.14-.09.21-.09s.15.04.21.09Z\"\n style=\"fill: var(--icon-color, #333); stroke-width: 0px\" />\n </svg>\n </div>\n </button>\n </div>\n <div class=\"small-horizontal-tree-line\"></div>\n <div class=\"tree-node-icon-container\" *ngIf=\"nodeWrapper.data.faIcon\">\n <i class=\"fa\" [class]=\"nodeWrapper.data.faIcon\"></i>\n </div>\n <div class=\"tree-node-content\">\n <span\n *ngIf=\"\n !treeConfig?.treeNodeContentComponent &&\n !treeConfig?.treeNodeContentTemplate\n \">\n {{ nodeWrapper.data.title }}\n </span>\n <ng-container #ref></ng-container>\n <ng-container *ngIf=\"treeConfig?.treeNodeContentTemplate as template\">\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: {\n nodeWrapper: nodeWrapper\n }\n \"></ng-container>\n </ng-container>\n </div>\n</div>\n","import { NgcxTreeNodeWrapper } from './ngcx-tree-models';\n\nexport const isParentOf = (\n parent: NgcxTreeNodeWrapper<any>,\n node: NgcxTreeNodeWrapper<any>\n): boolean => {\n if (!node.parent) {\n return false;\n }\n if (parent.id === node.parent.id) {\n return true;\n }\n return isParentOf(parent, node.parent);\n};\n","import {\n CdkDrag,\n CdkDragRelease,\n CdkDropList,\n DragDropModule,\n} from '@angular/cdk/drag-drop';\nimport {\n CdkTreeModule,\n NestedTreeControl,\n NestedTreeControlOptions,\n} from '@angular/cdk/tree';\nimport { NgIf } from '@angular/common';\nimport {\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n Output,\n} from '@angular/core';\nimport { NgcxTreeDataSource } from './ngcx-tree-data.source';\nimport {\n NgcxTreeConfig,\n NgcxTreeNode,\n NgcxTreeNodeMovedEvent,\n NgcxTreeNodeWrapper,\n} from './ngcx-tree-models';\nimport { NgcxTreeNodeComponent } from './ngcx-tree-node/ngcx-tree-node.component';\nimport { isParentOf } from './ngcx-tree-utils';\n\nimport 'zone.js';\n\n@Component({\n selector: 'ngcx-tree',\n templateUrl: 'ngcx-tree.component.html',\n styleUrls: ['ngcx-tree.component.scss'],\n imports: [CdkTreeModule, DragDropModule, NgcxTreeNodeComponent, NgIf],\n})\nexport class NgcxTreeComponent<T extends NgcxTreeNode> implements OnChanges {\n @Input() nodes?: NgcxTreeNode[];\n @Input() config?: NgcxTreeConfig<T>;\n\n @Output() nodeMoved = new EventEmitter<NgcxTreeNodeMovedEvent<T>>();\n @Output() customEvent = new EventEmitter<T>();\n @Output() clickEvent = new EventEmitter<NgcxTreeNodeWrapper<T>>();\n @Output() selectEvent = new EventEmitter<NgcxTreeNodeWrapper<T>>();\n\n /**\n * Api for finding and selecting node. Extends from the CDK treeControl for expanding/collapsing the tree\n */\n public readonly treeControl: NgcxTreeControl<T> = new NgcxTreeControl<T>(\n this,\n (node) => node.children,\n {\n trackBy: (node: NgcxTreeNodeWrapper<T>) => node.id,\n }\n );\n\n dataSource: NgcxTreeDataSource<NgcxTreeNodeWrapper<T>> =\n new NgcxTreeDataSource<NgcxTreeNodeWrapper<T>>([]);\n\n protected dragging?: NgcxTreeNodeWrapper<T>;\n\n protected selectedNode?: NgcxTreeNodeWrapper<T>;\n\n protected readonly DropType = DropType;\n\n protected readonly disable = () => false;\n\n private canceledByEsc?: boolean;\n\n ngOnChanges() {\n this.updateTree();\n }\n\n private updateTree() {\n const wrapperNodes = this.createWrapperNodes(this.nodes ?? []);\n this.dataSource = new NgcxTreeDataSource(wrapperNodes);\n this.treeControl.dataNodes = this.dataSource.data$.value;\n }\n\n private createWrapperNodes(\n nodes: NgcxTreeNode[],\n parent?: NgcxTreeNodeWrapper<T>,\n depth: number = 0\n ): NgcxTreeNodeWrapper<T>[] {\n const childCount = nodes.length;\n const wrapperNodes = nodes.map((node, idx) => {\n const nodeWrapper: NgcxTreeNodeWrapper<T> = {\n id: node.id,\n data: <T>node,\n isFirstChild: idx === 0,\n isLastChild: idx === childCount - 1,\n index: idx,\n parent: parent,\n depth: depth,\n children: [],\n };\n nodeWrapper.children = node.children\n ? this.createWrapperNodes(node.children, nodeWrapper, depth + 1)\n : [];\n\n return nodeWrapper;\n });\n wrapperNodes.forEach((wrapperNode) => {\n if (!wrapperNode.isLastChild) {\n wrapperNode.next = wrapperNodes[wrapperNode.index + 1];\n }\n if (!wrapperNode.isFirstChild) {\n wrapperNode.previous = wrapperNodes[wrapperNode.index - 1];\n }\n if (this.config?.allowSelection?.(wrapperNode)) {\n wrapperNode.isSelectable = true;\n }\n });\n return wrapperNodes;\n }\n\n protected hideDrop(\n dropNode: NgcxTreeNodeWrapper<T>,\n dropType: DropType\n ): boolean {\n if (\n !this.dragging ||\n this.dragging.id === dropNode.id ||\n isParentOf(this.dragging, dropNode)\n ) {\n return true;\n }\n if (\n dropType == DropType.DROP_INTO &&\n dropNode.id === this.dragging.parent?.id\n ) {\n return true;\n }\n if (\n dropType == DropType.DROP_AFTER &&\n dropNode.next?.id === this.dragging.id\n ) {\n return true;\n }\n if (\n dropType == DropType.DROP_BEFORE &&\n dropNode.previous?.id === this.dragging.id\n ) {\n return true;\n }\n return false;\n }\n\n protected allowDrop(\n dropNode: NgcxTreeNodeWrapper<T>,\n dropType: DropType\n ): DropControl {\n const hideDrop = this.hideDrop(dropNode, dropType);\n\n const intoNode =\n dropType == DropType.DROP_INTO ? dropNode : dropNode.parent;\n\n let preventDropReason;\n let allowDrop = true;\n if (this.config?.preventDropReason && this.dragging) {\n preventDropReason = this.config.preventDropReason(\n this.dragging,\n intoNode\n );\n }\n if (this.config?.allowDrop && this.dragging) {\n allowDrop = this.config.allowDrop(this.dragging, intoNode);\n }\n\n return new DropControl(\n hideDrop,\n !allowDrop || !!preventDropReason,\n preventDropReason\n );\n }\n\n // prevent drop directly after a node on same level, that is expanded\n protected sortPredicate(): (\n index: number,\n drag: CdkDrag,\n drop: CdkDropList\n ) => boolean {\n return (\n index: number,\n _drag: CdkDrag<NgcxTreeNodeWrapper<T>>,\n drop: CdkDropList<NgcxTreeNodeWrapper<T>>\n ) => {\n return index == 0 || !this.treeControl.isExpanded(drop.data);\n };\n }\n\n protected disableDrag(node: NgcxTreeNodeWrapper<T>) {\n return this.config?.allowDrag ? !this.config.allowDrag(node) : false;\n }\n\n protected keyDownArrowUp(event: Event) {\n if (this.selectedNode) {\n if (!this.selectedNode.isFirstChild) {\n this.selectNode(this.selectedNode.previous);\n } else if (this.selectedNode.parent) {\n this.selectNode(this.selectedNode.parent);\n }\n } else {\n const nodes = this.dataSource.data$.value;\n if (nodes.length > 0) {\n this.selectNode(nodes[nodes.length - 1]);\n }\n }\n event.preventDefault();\n }\n\n protected keyDownArrowDown(event: Event) {\n if (this.selectedNode) {\n if (!this.selectedNode.isLastChild) {\n this.selectNode(this.selectedNode.next);\n } else if (this.selectedNode.parent?.next) {\n this.selectNode(this.selectedNode.parent.next);\n }\n } else {\n const nodes = this.dataSource.data$.value;\n if (nodes.length > 0) {\n this.selectNode(nodes[0]);\n }\n }\n event.preventDefault();\n }\n\n protected keyDownArrowLeft(event: Event) {\n if (this.selectedNode) {\n if (this.treeControl.isExpanded(this.selectedNode)) {\n this.treeControl.collapse(this.selectedNode);\n } else if (this.selectedNode?.parent) {\n this.selectNode(this.selectedNode.parent);\n }\n } else {\n const nodes = this.dataSource.data$.value;\n if (nodes.length > 0) {\n this.selectNode(nodes[0]);\n }\n }\n event.preventDefault();\n }\n\n protected keyDownArrowRight(event: Event) {\n if (this.selectedNode && this.selectedNode.children.length > 0) {\n this.selectNode(this.selectedNode.children[0]);\n } else if (!this.selectedNode) {\n const nodes = this.dataSource.data$.value;\n if (nodes.length > 0) {\n this.selectNode(nodes[0]);\n }\n }\n event.preventDefault();\n }\n\n @HostListener('window:keydown.escape')\n protected keyEscapeWhileDragging() {\n if (this.dragging) {\n this.canceledByEsc = true;\n document.dispatchEvent(new Event('mouseup'));\n }\n }\n\n protected handleDragRelease(event: CdkDragRelease<NgcxTreeNodeWrapper<T>>) {\n this.handleDragReleaseInternal(event);\n this.dragging = undefined;\n }\n\n private handleDragReleaseInternal(\n event: CdkDragRelease<NgcxTreeNodeWrapper<T>>\n ) {\n const movedNode = event.source.data;\n const target = <HTMLDivElement>event.event.target;\n\n const dropZoneId = target.id ? target.id : target.parentElement?.id;\n if (!dropZoneId) {\n // no valid drop zone\n return;\n }\n\n const dropZoneInfo = new DropZoneInfo(dropZoneId);\n const toNode = this.treeControl.findNodeById(dropZoneInfo.nodeId);\n if (!toNode) {\n console.error(`node with id '${dropZoneInfo.nodeId}' could not be found`);\n return;\n }\n\n const dropControl = this.allowDrop(toNode, dropZoneInfo.dropType);\n if (dropControl.hideDrop || dropControl.preventDrop) {\n return;\n }\n\n // dropType undefined can happen if dropped directly without moving\n if (this.canceledByEsc || dropZoneInfo.dropType === undefined) {\n this.canceledByEsc = false;\n return;\n }\n\n const insertIntoNode =\n dropZoneInfo.dropType === DropType.DROP_INTO ? toNode : toNode.parent;\n const wrapperList = insertIntoNode?.children ?? this.dataSource.data$.value;\n const addAtNodeIdx = this.findAddIndex(\n dropZoneInfo,\n insertIntoNode,\n wrapperList\n );\n\n const removedFromIdx = this.removeElementFromPreviousPosition(movedNode);\n // add element to new Position, subtract one if inserted in same list after the remove position\n (insertIntoNode?.data.children ?? this.nodes!).splice(\n movedNode.parent?.id === insertIntoNode?.id &&\n removedFromIdx < addAtNodeIdx\n ? addAtNodeIdx - 1\n : addAtNodeIdx,\n 0,\n movedNode.data\n );\n\n const afterNodeIdx = addAtNodeIdx - 1;\n const afterNode =\n afterNodeIdx > -1 && wrapperList.length > afterNodeIdx\n ? wrapperList[afterNodeIdx]\n : undefined;\n\n const beforeNode =\n addAtNodeIdx > -1 && wrapperList.length > addAtNodeIdx\n ? wrapperList[addAtNodeIdx]\n : undefined;\n this.nodeMoved.emit({\n node: movedNode,\n parent:\n dropZoneInfo.dropType === DropType.DROP_INTO ? toNode : toNode.parent,\n afterNode: afterNode,\n beforeNode: beforeNode,\n });\n this.dataSource = new NgcxTreeDataSource(\n this.createWrapperNodes(this.nodes!)\n );\n this.treeControl.dataNodes = this.dataSource.data$.value;\n }\n\n private findAddIndex(\n dropZoneInfo: DropZoneInfo,\n insertIntoNode: NgcxTreeNodeWrapper<T> | undefined,\n insertIntoList: NgcxTreeNodeWrapper<T>[]\n ) {\n if (\n insertIntoNode &&\n dropZoneInfo.dropType === DropType.DROP_INTO &&\n !insertIntoNode.data.children\n ) {\n insertIntoNode.data.children = [];\n }\n let addAtNodeIdx = 0;\n if (\n dropZoneInfo.dropType === DropType.DROP_AFTER ||\n dropZoneInfo.dropType === DropType.DROP_BEFORE\n ) {\n addAtNodeIdx = insertIntoList.findIndex(\n (child) => child.id === dropZoneInfo.nodeId\n );\n if (dropZoneInfo.dropType === DropType.DROP_AFTER) {\n addAtNodeIdx++;\n }\n }\n return addAtNodeIdx;\n }\n\n private removeElementFromPreviousPosition(\n movedNode: NgcxTreeNodeWrapper<T>\n ): number {\n const removeFromList = movedNode.parent?.data.children ?? this.nodes!;\n const removeIndex = removeFromList.findIndex(\n (child: any) => child.id === movedNode.id\n );\n removeFromList.splice(removeIndex, 1);\n return removeIndex;\n }\n\n nodeClicked(nodeWrapper: NgcxTreeNodeWrapper<T>) {\n this.clickEvent.emit(nodeWrapper);\n if (nodeWrapper.isSelectable) {\n this.selectedNode =\n nodeWrapper.id === this.selectedNode?.id ? undefined : nodeWrapper;\n this.selectEvent.emit(this.selectedNode);\n }\n }\n\n selectNode(nodeWrapper: NgcxTreeNodeWrapper<T> | undefined) {\n if (!nodeWrapper || nodeWrapper.isSelectable) {\n this.selectedNode = nodeWrapper;\n let expandNode = this.selectedNode?.parent;\n while (expandNode) {\n this.treeControl.expand(expandNode);\n expandNode = expandNode.parent;\n }\n this.selectEvent.emit(this.selectedNode);\n }\n }\n}\n\nenum DropType {\n DROP_AFTER = 'DROP_AFTER',\n DROP_BEFORE = 'DROP_BEFORE',\n DROP_INTO = 'DROP_INTO',\n}\n\nexport class NgcxTreeControl<T extends NgcxTreeNode> extends NestedTreeControl<\n NgcxTreeNodeWrapper<T>,\n string\n> {\n constructor(\n private treeComponent: NgcxTreeComponent<T>,\n getChildren: (dataNode: NgcxTreeNodeWrapper<T>) => NgcxTreeNodeWrapper<T>[],\n options?: NestedTreeControlOptions<NgcxTreeNodeWrapper<T>, string>\n ) {\n super(getChildren, options);\n }\n\n /**\n * select a node by id. the selectEvent is fired afterwards.\n */\n selectNodeById(id: string) {\n this.treeComponent.selectNode(this.findNodeById(id));\n }\n\n /**\n * find a node by id.\n */\n findNodeById(id: string): NgcxTreeNodeWrapper<T> | undefined {\n return this.findNodeByIdInNodes(\n this.treeComponent.dataSource.data$.value,\n id\n );\n }\n\n private findNodeByIdInNodes(\n nodes: NgcxTreeNodeWrapper<T>[],\n id: string\n ): NgcxTreeNodeWrapper<T> | undefined {\n for (const node of nodes) {\n if (node.id === id) {\n return node;\n }\n if (node.children?.length > 0) {\n const foundNode = this.findNodeByIdInNodes(node.children, id);\n if (foundNode) {\n return foundNode;\n }\n }\n }\n\n return undefined;\n }\n}\n\nclass DropZoneInfo {\n dropType: DropType;\n nodeId: string;\n\n constructor(id: string) {\n const pos = id.indexOf('_');\n this.nodeId = id.substring(0, pos);\n this.dropType = <DropType>id.substring(pos + 1);\n }\n}\n\nclass DropControl {\n constructor(\n public hideDrop: boolean,\n public preventDrop: boolean,\n public preventDropReason: string = ''\n ) {}\n}\n","<cdk-tree\n #tree\n class=\"ngcx-tree\"\n *ngIf=\"dataSource\"\n [dataSource]=\"dataSource\"\n [treeControl]=\"treeControl\"\n cdkDropListGroup\n [class.dragging]=\"dragging\"\n (keyup.arrowup)=\"keyDownArrowUp($event)\"\n (keydown.arrowdown)=\"keyDownArrowDown($event)\"\n (keydown.arrowleft)=\"keyDownArrowLeft($event)\"\n (keydown.arrowright)=\"keyDownArrowRight($event)\"\n tabindex=\"0\">\n <cdk-nested-tree-node *cdkTreeNodeDef=\"let node\" class=\"tree-node\">\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_AFTER) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_AFTER\"\n class=\"tree-node-container-drop-zone after-expanded-node\"\n [class.hide]=\"dropControl.hideDrop || !treeControl.isExpanded(node)\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div class=\"tree-node-container\">\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_BEFORE) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_BEFORE\"\n class=\"tree-node-container-drop-zone before-node\"\n [class.hide]=\"!node.isFirstChild || dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_INTO) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_INTO\"\n class=\"tree-node-container-drop-zone into-node\"\n [class.hide]=\"dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_AFTER) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_AFTER\"\n class=\"tree-node-container-drop-zone after-node\"\n [class.last]=\"node.isLastChild\"\n [class.hide]=\"treeControl.isExpanded(node) || dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n cdkDropList\n [cdkDropListData]=\"node\"\n [cdkDropListEnterPredicate]=\"disable\"\n [cdkDropListSortPredicate]=\"disable\">\n <div\n cdkDrag\n [cdkDragDisabled]=\"disableDrag(node)\"\n [cdkDragData]=\"node\"\n (cdkDragStarted)=\"dragging = node\"\n (cdkDragReleased)=\"handleDragRelease($event)\">\n <div *cdkDragPlaceholder></div>\n <div\n class=\"tree-node-content-container\"\n [class.first]=\"node.isFirstChild\"\n [class.last]=\"node.isLastChild\"\n [class.expanded]=\"treeControl.isExpanded(node)\">\n <ngcx-tree-node\n style=\"width: 100%\"\n [nodeWrapper]=\"node\"\n [isSelected]=\"node.id === selectedNode?.id\"\n [treeControl]=\"treeControl\"\n [treeConfig]=\"config\"\n (customEvent)=\"customEvent.emit($event)\"\n (clickEvent)=\"nodeClicked(node)\"></ngcx-tree-node>\n </div>\n </div>\n <ngcx-tree-node\n *ngIf=\"node.id === dragging?.id\"\n [nodeWrapper]=\"node\"\n [treeControl]=\"treeControl\"\n [treeConfig]=\"config\"></ngcx-tree-node>\n </div>\n </div>\n <div\n *ngIf=\"treeControl.isExpanded(node)\"\n class=\"tree-node-children-container\"\n [class.first]=\"node.isFirstChild\"\n [class.last]=\"node.isLastChild\">\n <div cdkTreeNodeOutlet></div>\n </div>\n </cdk-nested-tree-node>\n</cdk-tree>\n","/*\n * Public API Surface of ngcx-tree\n */\n\nexport * from './lib/ngcx-tree/ngcx-tree-models';\nexport * from './lib/ngcx-tree/ngcx-tree.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAGM,MAAO,kBAAsB,SAAQ,UAAa,CAAA;AAGtD,IAAA,WAAA,CAAY,IAAS,EAAA;AACnB,QAAA,KAAK,EAAE;QACP,IAAI,CAAC,KAAK,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC;;IAGxC,OAAO,GAAA;AACL,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;;AAElC,IAAA,UAAU;AAEV,IAAA,MAAM,CAAC,IAAS,EAAA;QACd,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;;AAE7B;;MCGY,qBAAqB,CAAA;AANlC,IAAA,WAAA,GAAA;QAUW,IAAU,CAAA,UAAA,GAAG,KAAK;AAEj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A;AACf,IAAA,WAAA,CACS,QAAiB,EACjB,WAAoB,EACpB,oBAA4B,EAAE,EAAA;QAF9B,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB;;AAE3B;;AE3dD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cluetec-ngcx-tree.mjs","sources":["../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree-data.source.ts","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree-node/ngcx-tree-node.component.ts","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree-node/ngcx-tree-node.component.html","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree-utils.ts","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree.component.ts","../../../projects/ngcx-tree/src/lib/ngcx-tree/ngcx-tree.component.html","../../../projects/ngcx-tree/src/public-api.ts","../../../projects/ngcx-tree/src/cluetec-ngcx-tree.ts"],"sourcesContent":["import { DataSource } from '@angular/cdk/collections';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\nexport class NgcxTreeDataSource<T> extends DataSource<T> {\n data$: BehaviorSubject<T[]>;\n\n constructor(data: T[]) {\n super();\n this.data$ = new BehaviorSubject(data);\n }\n\n connect(): Observable<readonly T[]> {\n return this.data$.asObservable();\n }\n disconnect(): void {}\n\n update(data: T[]) {\n this.data$.next([...data]);\n }\n}\n","import { CdkTreeModule, NestedTreeControl } from '@angular/cdk/tree';\nimport {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { NgcxTreeConfig, NgcxTreeNodeWrapper } from '../ngcx-tree-models';\n\nimport { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { Subject, takeUntil } from 'rxjs';\n\n@Component({\n selector: 'ngcx-tree-node',\n templateUrl: './ngcx-tree-node.component.html',\n styleUrls: ['./ngcx-tree-node.component.scss'],\n imports: [CdkTreeModule, NgTemplateOutlet, NgIf]\n})\nexport class NgcxTreeNodeComponent implements OnInit, OnDestroy {\n @Input() nodeWrapper!: NgcxTreeNodeWrapper<any>;\n @Input() treeControl!: NestedTreeControl<NgcxTreeNodeWrapper<any>, string>;\n @Input() treeConfig?: NgcxTreeConfig<any>;\n @Input() isSelected = false;\n\n @Output() customEvent = new EventEmitter<any>();\n @Output() clickEvent = new EventEmitter<void>();\n\n @ViewChild('ref', { read: ViewContainerRef, static: true })\n vcRef?: ViewContainerRef;\n\n ngUnsubscribe = new Subject();\n\n ngOnInit() {\n if (this.vcRef && this.treeConfig?.treeNodeContentComponent) {\n const nodeComponent = this.vcRef.createComponent(\n this.treeConfig.treeNodeContentComponent\n );\n nodeComponent.instance.nodeWrapper = this.nodeWrapper;\n\n nodeComponent.instance.customEvent\n ?.pipe(takeUntil(this.ngUnsubscribe))\n .subscribe((value: any) => this.customEvent.emit(value));\n }\n }\n\n ngOnDestroy(): void {\n this.ngUnsubscribe.next(undefined);\n this.ngUnsubscribe.complete();\n }\n}\n","<div\n class=\"tree-node-content-container\"\n [class.selected]=\"isSelected\"\n [class.first]=\"nodeWrapper.isFirstChild\"\n [class.last]=\"nodeWrapper.isLastChild\"\n [class.is-selectable]=\"nodeWrapper.isSelectable\"\n (click)=\"clickEvent.emit()\">\n <div class=\"tree-node-expand-container\">\n <button\n *ngIf=\"nodeWrapper.children.length > 0\"\n class=\"tree-node-expand\"\n cdkTreeNodeToggle\n [attr.aria-label]=\"'Toggle ' + nodeWrapper.data.title\"\n (click)=\"$event.preventDefault()\">\n <div class=\"chevron\" [class.rotate]=\"treeControl.isExpanded(nodeWrapper)\">\n <svg\n id=\"a\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 9 9\"\n height=\"10px\"\n width=\"10px\">\n <path\n d=\"m2.83.09l4.2,4.2c.05.05.09.14.09.21s-.04.15-.09.21l-4.2,4.2c-.05.05-.14.09-.21.09s-.15-.04-.21-.09l-.45-.45c-.05-.05-.09-.13-.09-.21,0-.07.04-.15.09-.21l3.54-3.54L1.97.96c-.05-.05-.09-.14-.09-.21s.04-.15.09-.21l.45-.45c.05-.05.14-.09.21-.09s.15.04.21.09Z\"\n style=\"fill: var(--icon-color, #333); stroke-width: 0px\" />\n </svg>\n </div>\n </button>\n </div>\n <div class=\"small-horizontal-tree-line\"></div>\n <div class=\"tree-node-icon-container\" *ngIf=\"nodeWrapper.data.faIcon\">\n <i class=\"fa\" [class]=\"nodeWrapper.data.faIcon\"></i>\n </div>\n <div class=\"tree-node-content\">\n <span\n *ngIf=\"\n !treeConfig?.treeNodeContentComponent &&\n !treeConfig?.treeNodeContentTemplate\n \">\n {{ nodeWrapper.data.title }}\n </span>\n <ng-container #ref></ng-container>\n <ng-container *ngIf=\"treeConfig?.treeNodeContentTemplate as template\">\n <ng-container\n *ngTemplateOutlet=\"\n template;\n context: {\n nodeWrapper: nodeWrapper,\n }\n \"></ng-container>\n </ng-container>\n </div>\n</div>\n","import { NgcxTreeNodeWrapper } from './ngcx-tree-models';\n\nexport const isParentOf = (\n parent: NgcxTreeNodeWrapper<any>,\n node: NgcxTreeNodeWrapper<any>\n): boolean => {\n if (!node.parent) {\n return false;\n }\n if (parent.id === node.parent.id) {\n return true;\n }\n return isParentOf(parent, node.parent);\n};\n","import {\n CdkDrag,\n CdkDragRelease,\n CdkDropList,\n DragDropModule,\n} from '@angular/cdk/drag-drop';\nimport {\n CdkTreeModule,\n NestedTreeControl,\n NestedTreeControlOptions,\n} from '@angular/cdk/tree';\nimport { NgIf } from '@angular/common';\nimport {\n Component,\n EventEmitter,\n HostListener,\n Input,\n OnChanges,\n Output,\n} from '@angular/core';\nimport { NgcxTreeDataSource } from './ngcx-tree-data.source';\nimport {\n NgcxTreeConfig,\n NgcxTreeNode,\n NgcxTreeNodeMovedEvent,\n NgcxTreeNodeWrapper,\n} from './ngcx-tree-models';\nimport { NgcxTreeNodeComponent } from './ngcx-tree-node/ngcx-tree-node.component';\nimport { isParentOf } from './ngcx-tree-utils';\n\nimport 'zone.js';\n\n@Component({\n selector: 'ngcx-tree',\n templateUrl: 'ngcx-tree.component.html',\n styleUrls: ['ngcx-tree.component.scss'],\n imports: [CdkTreeModule, DragDropModule, NgcxTreeNodeComponent, NgIf],\n})\nexport class NgcxTreeComponent<T extends NgcxTreeNode> implements OnChanges {\n @Input() nodes?: NgcxTreeNode[];\n @Input() config?: NgcxTreeConfig<T>;\n\n @Output() nodeMoved = new EventEmitter<NgcxTreeNodeMovedEvent<T>>();\n @Output() customEvent = new EventEmitter<T>();\n @Output() clickEvent = new EventEmitter<NgcxTreeNodeWrapper<T>>();\n @Output() selectEvent = new EventEmitter<NgcxTreeNodeWrapper<T>>();\n\n /**\n * Api for finding and selecting node. Extends from the CDK treeControl for expanding/collapsing the tree\n */\n public readonly treeControl: NgcxTreeControl<T> = new NgcxTreeControl<T>(\n this,\n (node) => node.children,\n {\n trackBy: (node: NgcxTreeNodeWrapper<T>) => node.id,\n }\n );\n\n dataSource: NgcxTreeDataSource<NgcxTreeNodeWrapper<T>> =\n new NgcxTreeDataSource<NgcxTreeNodeWrapper<T>>([]);\n\n protected dragging?: NgcxTreeNodeWrapper<T>;\n\n protected selectedNode?: NgcxTreeNodeWrapper<T>;\n\n protected readonly DropType = DropType;\n\n protected readonly disable = () => false;\n\n private canceledByEsc?: boolean;\n\n ngOnChanges() {\n this.updateTree();\n }\n\n private updateTree() {\n const wrapperNodes = this.createWrapperNodes(this.nodes ?? []);\n this.dataSource = new NgcxTreeDataSource(wrapperNodes);\n this.treeControl.dataNodes = this.dataSource.data$.value;\n }\n\n private createWrapperNodes(\n nodes: NgcxTreeNode[],\n parent?: NgcxTreeNodeWrapper<T>,\n depth: number = 0\n ): NgcxTreeNodeWrapper<T>[] {\n const childCount = nodes.length;\n const wrapperNodes = nodes.map((node, idx) => {\n const nodeWrapper: NgcxTreeNodeWrapper<T> = {\n id: node.id,\n data: <T>node,\n isFirstChild: idx === 0,\n isLastChild: idx === childCount - 1,\n index: idx,\n parent: parent,\n depth: depth,\n children: [],\n };\n nodeWrapper.children = node.children\n ? this.createWrapperNodes(node.children, nodeWrapper, depth + 1)\n : [];\n\n return nodeWrapper;\n });\n wrapperNodes.forEach((wrapperNode) => {\n if (!wrapperNode.isLastChild) {\n wrapperNode.next = wrapperNodes[wrapperNode.index + 1];\n }\n if (!wrapperNode.isFirstChild) {\n wrapperNode.previous = wrapperNodes[wrapperNode.index - 1];\n }\n if (this.config?.allowSelection?.(wrapperNode)) {\n wrapperNode.isSelectable = true;\n }\n });\n return wrapperNodes;\n }\n\n protected hideDrop(\n dropNode: NgcxTreeNodeWrapper<T>,\n dropType: DropType\n ): boolean {\n if (\n !this.dragging ||\n this.dragging.id === dropNode.id ||\n isParentOf(this.dragging, dropNode)\n ) {\n return true;\n }\n if (\n dropType == DropType.DROP_INTO &&\n dropNode.id === this.dragging.parent?.id\n ) {\n return true;\n }\n if (\n dropType == DropType.DROP_AFTER &&\n dropNode.next?.id === this.dragging.id\n ) {\n return true;\n }\n if (\n dropType == DropType.DROP_BEFORE &&\n dropNode.previous?.id === this.dragging.id\n ) {\n return true;\n }\n return false;\n }\n\n protected allowDrop(\n dropNode: NgcxTreeNodeWrapper<T>,\n dropType: DropType\n ): DropControl {\n const hideDrop = this.hideDrop(dropNode, dropType);\n\n const intoNode =\n dropType == DropType.DROP_INTO ? dropNode : dropNode.parent;\n\n let preventDropReason;\n let allowDrop = true;\n if (this.config?.preventDropReason && this.dragging) {\n preventDropReason = this.config.preventDropReason(\n this.dragging,\n intoNode\n );\n }\n if (this.config?.allowDrop && this.dragging) {\n allowDrop = this.config.allowDrop(this.dragging, intoNode);\n }\n\n return new DropControl(\n hideDrop,\n !allowDrop || !!preventDropReason,\n preventDropReason\n );\n }\n\n // prevent drop directly after a node on same level, that is expanded\n protected sortPredicate(): (\n index: number,\n drag: CdkDrag,\n drop: CdkDropList\n ) => boolean {\n return (\n index: number,\n _drag: CdkDrag<NgcxTreeNodeWrapper<T>>,\n drop: CdkDropList<NgcxTreeNodeWrapper<T>>\n ) => {\n return index == 0 || !this.treeControl.isExpanded(drop.data);\n };\n }\n\n protected disableDrag(node: NgcxTreeNodeWrapper<T>) {\n return this.config?.allowDrag ? !this.config.allowDrag(node) : false;\n }\n\n protected keyDownArrowUp(event: Event) {\n if (this.selectedNode) {\n if (!this.selectedNode.isFirstChild) {\n this.selectNode(this.selectedNode.previous);\n } else if (this.selectedNode.parent) {\n this.selectNode(this.selectedNode.parent);\n }\n } else {\n const nodes = this.dataSource.data$.value;\n if (nodes.length > 0) {\n this.selectNode(nodes[nodes.length - 1]);\n }\n }\n event.preventDefault();\n }\n\n protected keyDownArrowDown(event: Event) {\n if (this.selectedNode) {\n if (!this.selectedNode.isLastChild) {\n this.selectNode(this.selectedNode.next);\n } else if (this.selectedNode.parent?.next) {\n this.selectNode(this.selectedNode.parent.next);\n }\n } else {\n const nodes = this.dataSource.data$.value;\n if (nodes.length > 0) {\n this.selectNode(nodes[0]);\n }\n }\n event.preventDefault();\n }\n\n protected keyDownArrowLeft(event: Event) {\n if (this.selectedNode) {\n if (this.treeControl.isExpanded(this.selectedNode)) {\n this.treeControl.collapse(this.selectedNode);\n } else if (this.selectedNode?.parent) {\n this.selectNode(this.selectedNode.parent);\n }\n } else {\n const nodes = this.dataSource.data$.value;\n if (nodes.length > 0) {\n this.selectNode(nodes[0]);\n }\n }\n event.preventDefault();\n }\n\n protected keyDownArrowRight(event: Event) {\n if (this.selectedNode && this.selectedNode.children.length > 0) {\n this.selectNode(this.selectedNode.children[0]);\n } else if (!this.selectedNode) {\n const nodes = this.dataSource.data$.value;\n if (nodes.length > 0) {\n this.selectNode(nodes[0]);\n }\n }\n event.preventDefault();\n }\n\n @HostListener('window:keydown.escape')\n protected keyEscapeWhileDragging() {\n if (this.dragging) {\n this.canceledByEsc = true;\n document.dispatchEvent(new Event('mouseup'));\n }\n }\n\n protected handleDragRelease(event: CdkDragRelease<NgcxTreeNodeWrapper<T>>) {\n this.handleDragReleaseInternal(event);\n this.dragging = undefined;\n }\n\n private handleDragReleaseInternal(\n event: CdkDragRelease<NgcxTreeNodeWrapper<T>>\n ) {\n const movedNode = event.source.data;\n const target = <HTMLDivElement>event.event.target;\n\n const dropZoneId = target.id ? target.id : target.parentElement?.id;\n if (!dropZoneId) {\n // no valid drop zone\n return;\n }\n\n const dropZoneInfo = new DropZoneInfo(dropZoneId);\n const toNode = this.treeControl.findNodeById(dropZoneInfo.nodeId);\n if (!toNode) {\n console.error(`node with id '${dropZoneInfo.nodeId}' could not be found`);\n return;\n }\n\n const dropControl = this.allowDrop(toNode, dropZoneInfo.dropType);\n if (dropControl.hideDrop || dropControl.preventDrop) {\n return;\n }\n\n // dropType undefined can happen if dropped directly without moving\n if (this.canceledByEsc || dropZoneInfo.dropType === undefined) {\n this.canceledByEsc = false;\n return;\n }\n\n const insertIntoNode =\n dropZoneInfo.dropType === DropType.DROP_INTO ? toNode : toNode.parent;\n const wrapperList = insertIntoNode?.children ?? this.dataSource.data$.value;\n const addAtNodeIdx = this.findAddIndex(\n dropZoneInfo,\n insertIntoNode,\n wrapperList\n );\n\n const removedFromIdx = this.removeElementFromPreviousPosition(movedNode);\n // add element to new Position, subtract one if inserted in same list after the remove position\n (insertIntoNode?.data.children ?? this.nodes!).splice(\n movedNode.parent?.id === insertIntoNode?.id &&\n removedFromIdx < addAtNodeIdx\n ? addAtNodeIdx - 1\n : addAtNodeIdx,\n 0,\n movedNode.data\n );\n\n const afterNodeIdx = addAtNodeIdx - 1;\n const afterNode =\n afterNodeIdx > -1 && wrapperList.length > afterNodeIdx\n ? wrapperList[afterNodeIdx]\n : undefined;\n\n const beforeNode =\n addAtNodeIdx > -1 && wrapperList.length > addAtNodeIdx\n ? wrapperList[addAtNodeIdx]\n : undefined;\n this.nodeMoved.emit({\n node: movedNode,\n parent:\n dropZoneInfo.dropType === DropType.DROP_INTO ? toNode : toNode.parent,\n afterNode: afterNode,\n beforeNode: beforeNode,\n });\n this.dataSource = new NgcxTreeDataSource(\n this.createWrapperNodes(this.nodes!)\n );\n this.treeControl.dataNodes = this.dataSource.data$.value;\n }\n\n private findAddIndex(\n dropZoneInfo: DropZoneInfo,\n insertIntoNode: NgcxTreeNodeWrapper<T> | undefined,\n insertIntoList: NgcxTreeNodeWrapper<T>[]\n ) {\n if (\n insertIntoNode &&\n dropZoneInfo.dropType === DropType.DROP_INTO &&\n !insertIntoNode.data.children\n ) {\n insertIntoNode.data.children = [];\n }\n let addAtNodeIdx = 0;\n if (\n dropZoneInfo.dropType === DropType.DROP_AFTER ||\n dropZoneInfo.dropType === DropType.DROP_BEFORE\n ) {\n addAtNodeIdx = insertIntoList.findIndex(\n (child) => child.id === dropZoneInfo.nodeId\n );\n if (dropZoneInfo.dropType === DropType.DROP_AFTER) {\n addAtNodeIdx++;\n }\n }\n return addAtNodeIdx;\n }\n\n private removeElementFromPreviousPosition(\n movedNode: NgcxTreeNodeWrapper<T>\n ): number {\n const removeFromList = movedNode.parent?.data.children ?? this.nodes!;\n const removeIndex = removeFromList.findIndex(\n (child: any) => child.id === movedNode.id\n );\n removeFromList.splice(removeIndex, 1);\n return removeIndex;\n }\n\n nodeClicked(nodeWrapper: NgcxTreeNodeWrapper<T>) {\n this.clickEvent.emit(nodeWrapper);\n if (nodeWrapper.isSelectable) {\n this.selectedNode =\n nodeWrapper.id === this.selectedNode?.id ? undefined : nodeWrapper;\n this.selectEvent.emit(this.selectedNode);\n }\n }\n\n selectNode(nodeWrapper: NgcxTreeNodeWrapper<T> | undefined) {\n if (!nodeWrapper || nodeWrapper.isSelectable) {\n this.selectedNode = nodeWrapper;\n let expandNode = this.selectedNode?.parent;\n while (expandNode) {\n this.treeControl.expand(expandNode);\n expandNode = expandNode.parent;\n }\n this.selectEvent.emit(this.selectedNode);\n }\n }\n}\n\nenum DropType {\n DROP_AFTER = 'DROP_AFTER',\n DROP_BEFORE = 'DROP_BEFORE',\n DROP_INTO = 'DROP_INTO',\n}\n\nexport class NgcxTreeControl<T extends NgcxTreeNode> extends NestedTreeControl<\n NgcxTreeNodeWrapper<T>,\n string\n> {\n constructor(\n private treeComponent: NgcxTreeComponent<T>,\n getChildren: (dataNode: NgcxTreeNodeWrapper<T>) => NgcxTreeNodeWrapper<T>[],\n options?: NestedTreeControlOptions<NgcxTreeNodeWrapper<T>, string>\n ) {\n super(getChildren, options);\n }\n\n /**\n * select a node by id. the selectEvent is fired afterwards.\n */\n selectNodeById(id: string) {\n this.treeComponent.selectNode(this.findNodeById(id));\n }\n\n /**\n * find a node by id.\n */\n findNodeById(id: string): NgcxTreeNodeWrapper<T> | undefined {\n return this.findNodeByIdInNodes(\n this.treeComponent.dataSource.data$.value,\n id\n );\n }\n\n private findNodeByIdInNodes(\n nodes: NgcxTreeNodeWrapper<T>[],\n id: string\n ): NgcxTreeNodeWrapper<T> | undefined {\n for (const node of nodes) {\n if (node.id === id) {\n return node;\n }\n if (node.children?.length > 0) {\n const foundNode = this.findNodeByIdInNodes(node.children, id);\n if (foundNode) {\n return foundNode;\n }\n }\n }\n\n return undefined;\n }\n}\n\nclass DropZoneInfo {\n dropType: DropType;\n nodeId: string;\n\n constructor(id: string) {\n const pos = id.indexOf('_');\n this.nodeId = id.substring(0, pos);\n this.dropType = <DropType>id.substring(pos + 1);\n }\n}\n\nclass DropControl {\n constructor(\n public hideDrop: boolean,\n public preventDrop: boolean,\n public preventDropReason: string = ''\n ) {}\n}\n","<cdk-tree\n #tree\n class=\"ngcx-tree\"\n *ngIf=\"dataSource\"\n [dataSource]=\"dataSource\"\n [treeControl]=\"treeControl\"\n cdkDropListGroup\n [class.dragging]=\"dragging\"\n (keyup.arrowup)=\"keyDownArrowUp($event)\"\n (keydown.arrowdown)=\"keyDownArrowDown($event)\"\n (keydown.arrowleft)=\"keyDownArrowLeft($event)\"\n (keydown.arrowright)=\"keyDownArrowRight($event)\"\n tabindex=\"0\">\n <cdk-nested-tree-node *cdkTreeNodeDef=\"let node\" class=\"tree-node\">\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_AFTER) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_AFTER\"\n class=\"tree-node-container-drop-zone after-expanded-node\"\n [class.hide]=\"dropControl.hideDrop || !treeControl.isExpanded(node)\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div class=\"tree-node-container\">\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_BEFORE) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_BEFORE\"\n class=\"tree-node-container-drop-zone before-node\"\n [class.hide]=\"!node.isFirstChild || dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_INTO) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_INTO\"\n class=\"tree-node-container-drop-zone into-node\"\n [class.hide]=\"dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n *ngIf=\"allowDrop(node, DropType.DROP_AFTER) as dropControl\"\n cdkDropList\n [id]=\"node.id + '_' + DropType.DROP_AFTER\"\n class=\"tree-node-container-drop-zone after-node\"\n [class.last]=\"node.isLastChild\"\n [class.hide]=\"treeControl.isExpanded(node) || dropControl.hideDrop\"\n [class.no-drop]=\"dropControl.preventDrop\">\n <div class=\"drop-insert-line\"></div>\n <div *ngIf=\"dropControl.preventDropReason\" class=\"tooltip\">\n {{ dropControl.preventDropReason }}\n </div>\n </div>\n <div\n cdkDropList\n [cdkDropListData]=\"node\"\n [cdkDropListEnterPredicate]=\"disable\"\n [cdkDropListSortPredicate]=\"disable\">\n <div\n cdkDrag\n [cdkDragDisabled]=\"disableDrag(node)\"\n [cdkDragData]=\"node\"\n (cdkDragStarted)=\"dragging = node\"\n (cdkDragReleased)=\"handleDragRelease($event)\">\n <div *cdkDragPlaceholder></div>\n <div\n class=\"tree-node-content-container\"\n [class.first]=\"node.isFirstChild\"\n [class.last]=\"node.isLastChild\"\n [class.expanded]=\"treeControl.isExpanded(node)\">\n <ngcx-tree-node\n style=\"width: 100%\"\n [nodeWrapper]=\"node\"\n [isSelected]=\"node.id === selectedNode?.id\"\n [treeControl]=\"treeControl\"\n [treeConfig]=\"config\"\n (customEvent)=\"customEvent.emit($event)\"\n (clickEvent)=\"nodeClicked(node)\"></ngcx-tree-node>\n </div>\n </div>\n <ngcx-tree-node\n *ngIf=\"node.id === dragging?.id\"\n [nodeWrapper]=\"node\"\n [treeControl]=\"treeControl\"\n [treeConfig]=\"config\"></ngcx-tree-node>\n </div>\n </div>\n <div\n *ngIf=\"treeControl.isExpanded(node)\"\n class=\"tree-node-children-container\"\n [class.first]=\"node.isFirstChild\"\n [class.last]=\"node.isLastChild\">\n <div cdkTreeNodeOutlet></div>\n </div>\n </cdk-nested-tree-node>\n</cdk-tree>\n","/*\n * Public API Surface of ngcx-tree\n */\n\nexport * from './lib/ngcx-tree/ngcx-tree-models';\nexport * from './lib/ngcx-tree/ngcx-tree.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAGM,MAAO,kBAAsB,SAAQ,UAAa,CAAA;AAGtD,IAAA,WAAA,CAAY,IAAS,EAAA;AACnB,QAAA,KAAK,EAAE;QACP,IAAI,CAAC,KAAK,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC;;IAGxC,OAAO,GAAA;AACL,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,E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