@acorex/cdk 22.3.6 → 22.3.7

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,15 +1,24 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, signal, Directive, NgZone, Renderer2, ChangeDetectorRef, PLATFORM_ID, input, output, contentChildren, linkedSignal, DOCUMENT, ViewContainerRef, contentChild, computed, effect, RendererStyleFlags2, NgModule } from '@angular/core';
2
+ import { InjectionToken, inject, ElementRef, signal, DestroyRef, Directive, NgZone, Renderer2, ChangeDetectorRef, PLATFORM_ID, input, output, contentChildren, linkedSignal, DOCUMENT, ViewContainerRef, computed, effect, RendererStyleFlags2, NgModule } from '@angular/core';
3
3
  import { isPlatformBrowser } from '@angular/common';
4
4
  import { clamp } from 'lodash-es';
5
5
  import { NXComponent } from '@acorex/cdk/common';
6
6
  import { AXHtmlUtil } from '@acorex/core/utils';
7
7
 
8
+ /**
9
+ * Parent drag instance that nested `axDragHandle` directives register with.
10
+ * Provided by `AXDragDirective` so handles work inside dynamically created content.
11
+ */
12
+ const AX_DRAG_PARENT = new InjectionToken('AX_DRAG_PARENT');
13
+
8
14
  class AXDragHandleDirective {
9
15
  constructor() {
10
- this.el = inject(ElementRef);
16
+ this.el = inject((ElementRef));
17
+ this.parent = inject(AX_DRAG_PARENT, { optional: true });
11
18
  this.element = signal(this.el.nativeElement, /* @ts-ignore */
12
19
  ...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
20
+ this.parent?.registerHandle(this);
21
+ inject(DestroyRef).onDestroy(() => this.parent?.unregisterHandle(this));
13
22
  }
14
23
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragHandleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
15
24
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXDragHandleDirective, isStandalone: true, selector: "[axDragHandle]", ngImport: i0 }); }
@@ -19,7 +28,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImpor
19
28
  args: [{
20
29
  selector: '[axDragHandle]',
21
30
  }]
22
- }] });
31
+ }], ctorParameters: () => [] });
23
32
 
24
33
  /**
25
34
  * @Directive axDropList
@@ -483,8 +492,8 @@ class AXDragDirective {
483
492
  this.platformId = inject(PLATFORM_ID);
484
493
  this.viewContainerRef = inject(ViewContainerRef);
485
494
  this.el = inject(ElementRef);
486
- this.handleDirective = contentChild(AXDragHandleDirective, /* @ts-ignore */
487
- ...(ngDevMode ? [{ debugName: "handleDirective" }] : /* istanbul ignore next */ []));
495
+ this.registeredHandleElements = signal([], /* @ts-ignore */
496
+ ...(ngDevMode ? [{ debugName: "registeredHandleElements" }] : /* istanbul ignore next */ []));
488
497
  this.axDrag = input(true, { ...(ngDevMode ? { debugName: "axDrag" } : /* istanbul ignore next */ {}), transform: (value) => value === '' || value === true });
489
498
  this.dragData = input(/* @ts-ignore */
490
499
  ...(ngDevMode ? [undefined, { debugName: "dragData" }] : /* istanbul ignore next */ []));
@@ -591,59 +600,97 @@ class AXDragDirective {
591
600
  return this.boundaryElement()?.getBoundingClientRect();
592
601
  }, /* @ts-ignore */
593
602
  ...(ngDevMode ? [{ debugName: "boundaryRect" }] : /* istanbul ignore next */ []));
594
- this.handle = computed(() => this.handleDirective()?.element() ?? this.element(), /* @ts-ignore */
603
+ this.handleElements = computed(() => {
604
+ const registered = this.registeredHandleElements().filter(Boolean);
605
+ return registered.length ? registered : [this.element()];
606
+ }, /* @ts-ignore */
607
+ ...(ngDevMode ? [{ debugName: "handleElements" }] : /* istanbul ignore next */ []));
608
+ this.handle = computed(() => this.activeHandleElement() ?? this.handleElements()[0] ?? this.element(), /* @ts-ignore */
595
609
  ...(ngDevMode ? [{ debugName: "handle" }] : /* istanbul ignore next */ []));
596
610
  this.boundHandleDblClick = this.handleDblClick.bind(this);
597
611
  this.boundHandlePointerUp = this.handlePointerUp.bind(this);
598
612
  this.boundHandlePointerDown = this.handlePointerDown.bind(this);
599
613
  this.boundHandlePointerMove = this.handlePointerMove.bind(this);
600
- this.listenersAttached = signal(null, /* @ts-ignore */
601
- ...(ngDevMode ? [{ debugName: "listenersAttached" }] : /* istanbul ignore next */ []));
614
+ this.attachedHandleElements = [];
615
+ this.styledHandleElements = [];
616
+ this.activeHandleElement = signal(null, /* @ts-ignore */
617
+ ...(ngDevMode ? [{ debugName: "activeHandleElement" }] : /* istanbul ignore next */ []));
602
618
  this.#dragDisabledEffect = effect(() => {
603
619
  const cursor = this.dragCursorOverride();
604
620
  const disabled = this.isDragDisabled();
605
- const handle = this.handle();
606
- if (disabled || cursor === 'none' || cursor === 'grab-on-drag') {
607
- if (!this.isMoving() && !this.holdDelayReady()) {
608
- this.renderer.removeStyle(handle, 'cursor');
621
+ const handles = this.handleElements();
622
+ const moving = this.isMoving();
623
+ const holdReady = this.holdDelayReady();
624
+ for (const previous of this.styledHandleElements) {
625
+ if (!handles.includes(previous)) {
626
+ this.renderer.removeStyle(previous, 'cursor');
627
+ this.renderer.removeStyle(previous, 'touch-action');
609
628
  }
610
- if (disabled) {
611
- this.renderer.removeStyle(handle, 'touch-action');
629
+ }
630
+ this.styledHandleElements = handles;
631
+ for (const handle of handles) {
632
+ if (disabled || cursor === 'none' || cursor === 'grab-on-drag') {
633
+ if (!moving && !holdReady) {
634
+ this.renderer.removeStyle(handle, 'cursor');
635
+ }
636
+ if (disabled) {
637
+ this.renderer.removeStyle(handle, 'touch-action');
638
+ }
639
+ else {
640
+ this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());
641
+ }
642
+ continue;
612
643
  }
613
- else {
614
- this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());
644
+ if (!moving && !holdReady) {
645
+ this.renderer.setStyle(handle, 'cursor', cursor);
615
646
  }
616
- return;
617
- }
618
- if (!this.isMoving() && !this.holdDelayReady()) {
619
- this.renderer.setStyle(handle, 'cursor', cursor);
647
+ this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());
620
648
  }
621
- this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());
622
649
  }, /* @ts-ignore */
623
650
  ...(ngDevMode ? [{ debugName: "#dragDisabledEffect" }] : /* istanbul ignore next */ []));
624
651
  this.#handleChangeEffect = effect(() => {
625
652
  if (!isPlatformBrowser(this.platformId))
626
653
  return;
627
- const currentHandle = this.handle();
628
- const previousHandle = this.listenersAttached();
629
- // Remove listeners from previous handle if it changed
630
- if (previousHandle && previousHandle !== currentHandle) {
631
- previousHandle.removeEventListener('dblclick', this.boundHandleDblClick);
632
- previousHandle.removeEventListener('pointerdown', this.boundHandlePointerDown);
633
- }
634
- // Attach listeners to new handle
635
- if (currentHandle && currentHandle !== previousHandle) {
636
- this.zone.runOutsideAngular(() => {
637
- currentHandle.addEventListener('dblclick', this.boundHandleDblClick);
638
- currentHandle.addEventListener('pointerdown', this.boundHandlePointerDown, { passive: false });
639
- });
640
- this.listenersAttached.set(currentHandle);
654
+ const currentHandles = this.handleElements();
655
+ const previousHandles = this.attachedHandleElements;
656
+ for (const previous of previousHandles) {
657
+ if (!currentHandles.includes(previous)) {
658
+ previous.removeEventListener('dblclick', this.boundHandleDblClick);
659
+ previous.removeEventListener('pointerdown', this.boundHandlePointerDown);
660
+ }
641
661
  }
662
+ this.zone.runOutsideAngular(() => {
663
+ for (const current of currentHandles) {
664
+ if (!previousHandles.includes(current)) {
665
+ current.addEventListener('dblclick', this.boundHandleDblClick);
666
+ current.addEventListener('pointerdown', this.boundHandlePointerDown, { passive: false });
667
+ }
668
+ }
669
+ });
670
+ this.attachedHandleElements = currentHandles;
642
671
  }, /* @ts-ignore */
643
672
  ...(ngDevMode ? [{ debugName: "#handleChangeEffect" }] : /* istanbul ignore next */ []));
644
673
  }
645
674
  #dragDisabledEffect;
646
675
  #handleChangeEffect;
676
+ registerHandle(handle) {
677
+ const element = this.resolveHandleElement(handle);
678
+ if (!element)
679
+ return;
680
+ this.registeredHandleElements.update((handles) => (handles.includes(element) ? handles : [...handles, element]));
681
+ }
682
+ unregisterHandle(handle) {
683
+ const element = this.resolveHandleElement(handle);
684
+ if (!element)
685
+ return;
686
+ this.registeredHandleElements.update((handles) => handles.filter((item) => item !== element));
687
+ if (this.activeHandleElement() === element) {
688
+ this.activeHandleElement.set(null);
689
+ }
690
+ }
691
+ resolveHandleElement(handle) {
692
+ return handle instanceof HTMLElement ? handle : handle.element();
693
+ }
647
694
  ngOnInit() {
648
695
  if (isPlatformBrowser(this.platformId)) {
649
696
  if (this._parentDropList) {
@@ -654,11 +701,11 @@ class AXDragDirective {
654
701
  }
655
702
  ngOnDestroy() {
656
703
  if (isPlatformBrowser(this.platformId)) {
657
- const handle = this.listenersAttached();
658
- if (handle) {
704
+ for (const handle of this.attachedHandleElements) {
659
705
  handle.removeEventListener('dblclick', this.boundHandleDblClick);
660
706
  handle.removeEventListener('pointerdown', this.boundHandlePointerDown);
661
707
  }
708
+ this.attachedHandleElements = [];
662
709
  this.removeDocumentListeners();
663
710
  if (this.createCloneElement()) {
664
711
  this.removeCloneElement();
@@ -736,14 +783,16 @@ class AXDragDirective {
736
783
  return;
737
784
  if (!this.axDrag() || this.isDragDisabled() || e.button !== 0 || this._parentDropList?.isSortingDisabled())
738
785
  return;
786
+ const handle = e.currentTarget instanceof HTMLElement ? e.currentTarget : this.handle();
787
+ this.activeHandleElement.set(handle);
739
788
  this.isDragging.set(true);
740
789
  this.movedAfterDelay.set(false);
741
790
  if (this.dragCursorOverride() === 'move') {
742
- this.renderer.setStyle(this.handle(), 'cursor', 'move');
791
+ this.renderer.setStyle(handle, 'cursor', 'move');
743
792
  }
744
793
  this.dragStartOffset.set({ x: e.clientX - this.currentAxis().x, y: e.clientY - this.currentAxis().y });
745
794
  this.pointerDownPosition.set({ x: e.clientX, y: e.clientY });
746
- this.renderer.setStyle(this.handle(), 'userSelect', 'none');
795
+ this.renderer.setStyle(handle, 'userSelect', 'none');
747
796
  this.activePointerId.set(e.pointerId);
748
797
  this.addDocumentListeners();
749
798
  this.dragStartTime.set(Date.now());
@@ -817,6 +866,7 @@ class AXDragDirective {
817
866
  this.renderer.removeStyle(this.handle(), 'userSelect');
818
867
  this.resetHandleCursorAfterDrag();
819
868
  this.clearActiveDragCursor();
869
+ this.activeHandleElement.set(null);
820
870
  }
821
871
  resetHandleCursorAfterDrag() {
822
872
  const cursorMode = this.dragCursorOverride();
@@ -874,6 +924,7 @@ class AXDragDirective {
874
924
  this.removeDocumentListeners();
875
925
  this._currentDropList.set(null);
876
926
  this.renderer.removeStyle(this.handle(), 'userSelect');
927
+ this.activeHandleElement.set(null);
877
928
  return;
878
929
  }
879
930
  this.renderer.removeStyle(this.element(), 'z-index');
@@ -905,6 +956,7 @@ class AXDragDirective {
905
956
  this.removeDocumentListeners();
906
957
  this._currentDropList.set(null);
907
958
  this.renderer.removeStyle(this.handle(), 'userSelect');
959
+ this.activeHandleElement.set(null);
908
960
  if (this.createCloneElement()) {
909
961
  const listUnderPointer = this.getDropListFromPoint(e.clientX, e.clientY);
910
962
  this.removeCloneElementWithAnimation(x || 0, y || 0, listUnderPointer);
@@ -1357,14 +1409,15 @@ class AXDragDirective {
1357
1409
  });
1358
1410
  }
1359
1411
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1360
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.6", type: AXDragDirective, isStandalone: true, selector: "[axDrag]", inputs: { axDrag: { classPropertyName: "axDrag", publicName: "axDrag", isSignal: true, isRequired: false, transformFunction: null }, dragData: { classPropertyName: "dragData", publicName: "dragData", isSignal: true, isRequired: false, transformFunction: null }, dragDisabled: { classPropertyName: "dragDisabled", publicName: "dragDisabled", isSignal: true, isRequired: false, transformFunction: null }, dragTransition: { classPropertyName: "dragTransition", publicName: "dragTransition", isSignal: true, isRequired: false, transformFunction: null }, dragElementClone: { classPropertyName: "dragElementClone", publicName: "dragElementClone", isSignal: true, isRequired: false, transformFunction: null }, dropZoneGroup: { classPropertyName: "dropZoneGroup", publicName: "dropZoneGroup", isSignal: true, isRequired: false, transformFunction: null }, dragStartDelay: { classPropertyName: "dragStartDelay", publicName: "dragStartDelay", isSignal: true, isRequired: false, transformFunction: null }, dragResetOnDblClick: { classPropertyName: "dragResetOnDblClick", publicName: "dragResetOnDblClick", isSignal: true, isRequired: false, transformFunction: null }, dragLockAxis: { classPropertyName: "dragLockAxis", publicName: "dragLockAxis", isSignal: true, isRequired: false, transformFunction: null }, dragClonedTemplate: { classPropertyName: "dragClonedTemplate", publicName: "dragClonedTemplate", isSignal: true, isRequired: false, transformFunction: null }, dragCursor: { classPropertyName: "dragCursor", publicName: "dragCursor", isSignal: true, isRequired: false, transformFunction: null }, dragBoundary: { classPropertyName: "dragBoundary", publicName: "dragBoundary", isSignal: true, isRequired: false, transformFunction: null }, dragTransitionDuration: { classPropertyName: "dragTransitionDuration", publicName: "dragTransitionDuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dragPositionChanged: "dragPositionChanged" }, queries: [{ propertyName: "handleDirective", first: true, predicate: AXDragHandleDirective, descendants: true, isSignal: true }], ngImport: i0 }); }
1412
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: AXDragDirective, isStandalone: true, selector: "[axDrag]", inputs: { axDrag: { classPropertyName: "axDrag", publicName: "axDrag", isSignal: true, isRequired: false, transformFunction: null }, dragData: { classPropertyName: "dragData", publicName: "dragData", isSignal: true, isRequired: false, transformFunction: null }, dragDisabled: { classPropertyName: "dragDisabled", publicName: "dragDisabled", isSignal: true, isRequired: false, transformFunction: null }, dragTransition: { classPropertyName: "dragTransition", publicName: "dragTransition", isSignal: true, isRequired: false, transformFunction: null }, dragElementClone: { classPropertyName: "dragElementClone", publicName: "dragElementClone", isSignal: true, isRequired: false, transformFunction: null }, dropZoneGroup: { classPropertyName: "dropZoneGroup", publicName: "dropZoneGroup", isSignal: true, isRequired: false, transformFunction: null }, dragStartDelay: { classPropertyName: "dragStartDelay", publicName: "dragStartDelay", isSignal: true, isRequired: false, transformFunction: null }, dragResetOnDblClick: { classPropertyName: "dragResetOnDblClick", publicName: "dragResetOnDblClick", isSignal: true, isRequired: false, transformFunction: null }, dragLockAxis: { classPropertyName: "dragLockAxis", publicName: "dragLockAxis", isSignal: true, isRequired: false, transformFunction: null }, dragClonedTemplate: { classPropertyName: "dragClonedTemplate", publicName: "dragClonedTemplate", isSignal: true, isRequired: false, transformFunction: null }, dragCursor: { classPropertyName: "dragCursor", publicName: "dragCursor", isSignal: true, isRequired: false, transformFunction: null }, dragBoundary: { classPropertyName: "dragBoundary", publicName: "dragBoundary", isSignal: true, isRequired: false, transformFunction: null }, dragTransitionDuration: { classPropertyName: "dragTransitionDuration", publicName: "dragTransitionDuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dragPositionChanged: "dragPositionChanged" }, providers: [{ provide: AX_DRAG_PARENT, useExisting: AXDragDirective }], ngImport: i0 }); }
1361
1413
  }
1362
1414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragDirective, decorators: [{
1363
1415
  type: Directive,
1364
1416
  args: [{
1365
1417
  selector: '[axDrag]',
1418
+ providers: [{ provide: AX_DRAG_PARENT, useExisting: AXDragDirective }],
1366
1419
  }]
1367
- }], propDecorators: { handleDirective: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXDragHandleDirective), { isSignal: true }] }], axDrag: [{ type: i0.Input, args: [{ isSignal: true, alias: "axDrag", required: false }] }], dragData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragData", required: false }] }], dragDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragDisabled", required: false }] }], dragTransition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragTransition", required: false }] }], dragElementClone: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragElementClone", required: false }] }], dropZoneGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropZoneGroup", required: false }] }], dragStartDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragStartDelay", required: false }] }], dragResetOnDblClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragResetOnDblClick", required: false }] }], dragLockAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragLockAxis", required: false }] }], dragClonedTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragClonedTemplate", required: false }] }], dragCursor: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragCursor", required: false }] }], dragBoundary: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragBoundary", required: false }] }], dragTransitionDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragTransitionDuration", required: false }] }], dragPositionChanged: [{ type: i0.Output, args: ["dragPositionChanged"] }] } });
1420
+ }], propDecorators: { axDrag: [{ type: i0.Input, args: [{ isSignal: true, alias: "axDrag", required: false }] }], dragData: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragData", required: false }] }], dragDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragDisabled", required: false }] }], dragTransition: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragTransition", required: false }] }], dragElementClone: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragElementClone", required: false }] }], dropZoneGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropZoneGroup", required: false }] }], dragStartDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragStartDelay", required: false }] }], dragResetOnDblClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragResetOnDblClick", required: false }] }], dragLockAxis: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragLockAxis", required: false }] }], dragClonedTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragClonedTemplate", required: false }] }], dragCursor: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragCursor", required: false }] }], dragBoundary: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragBoundary", required: false }] }], dragTransitionDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragTransitionDuration", required: false }] }], dragPositionChanged: [{ type: i0.Output, args: ["dragPositionChanged"] }] } });
1368
1421
 
1369
1422
  class AXDropZoneDirective extends NXComponent {
1370
1423
  constructor() {
@@ -1445,5 +1498,5 @@ function transferArrayItem(currentArray, targetArray, currentIndex, targetIndex)
1445
1498
  * Generated bundle index. Do not edit.
1446
1499
  */
1447
1500
 
1448
- export { AXDragDirective, AXDragDropModule, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective, moveItemInArray, transferArrayItem };
1501
+ export { AXDragDirective, AXDragDropModule, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective, AX_DRAG_PARENT, moveItemInArray, transferArrayItem };
1449
1502
  //# sourceMappingURL=acorex-cdk-drag-drop.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-cdk-drag-drop.mjs","sources":["../../../../packages/cdk/drag-drop/src/lib/drag-handle.directive.ts","../../../../packages/cdk/drag-drop/src/lib/drop-list.directive.ts","../../../../packages/cdk/drag-drop/src/lib/drag.directive.ts","../../../../packages/cdk/drag-drop/src/lib/drop-zone.directive.ts","../../../../packages/cdk/drag-drop/src/lib/drag-drop.module.ts","../../../../packages/cdk/drag-drop/src/lib/drag-drop.utils.ts","../../../../packages/cdk/drag-drop/src/acorex-cdk-drag-drop.ts"],"sourcesContent":["import { Directive, ElementRef, inject, signal } from '@angular/core';\n\n@Directive({\n selector: '[axDragHandle]',\n})\nexport class AXDragHandleDirective {\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly element = signal(this.el.nativeElement);\n}\n","import { NXComponent, NXNativeEvent } from '@acorex/cdk/common';\nimport { AXHtmlUtil } from '@acorex/core/utils';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectorRef,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n linkedSignal,\n NgZone,\n OnDestroy,\n OnInit,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n} from '@angular/core';\nimport { AXDragDirective } from './drag.directive';\n\n/** Describes the cached geometric data of a draggable item within the list. */\ninterface DropListItemData {\n item: AXDragDirective;\n element: HTMLElement;\n initialRect: DOMRect;\n width: number;\n height: number;\n margins: { top: number; bottom: number; left: number; right: number };\n}\n\n/** Event object emitted when an item is dropped into a drop list. */\nexport interface AXDropListDroppedEvent extends NXNativeEvent<AXDropListDirective, MouseEvent> {\n item: AXDragDirective;\n currentIndex: number;\n previousIndex: number;\n container: AXDropListDirective;\n previousContainer: AXDropListDirective;\n}\n\n/**\n * @Directive axDropList\n *\n * Manages a list of draggable items (`axDrag`), enabling sorting within the list\n * and transferring items between compatible lists. It handles the visual shifting\n * of items during a drag operation to provide a clear preview of the drop location.\n *\n * This directive automatically detects `gap` from flexbox/grid layouts and handles\n * items with variable sizes and margins.\n */\n@Directive({\n selector: '[axDropList]',\n exportAs: 'axDropList',\n})\nexport class AXDropListDirective extends NXComponent implements OnInit, AfterContentInit, OnDestroy {\n private readonly _zone = inject(NgZone);\n private readonly _renderer = inject(Renderer2);\n private readonly _cdr = inject(ChangeDetectorRef);\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _hostEl = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // --- Public API: Inputs and Outputs ---\n\n /** Boolean input matching the directive selector name for conditional application. */\n axDropList = input(true, { transform: (value: boolean | string) => value === '' || value === true });\n /** Whether sorting within this list is disabled. */\n sortingDisabled = input(false);\n /** The group this drop list belongs to. Dragging is only allowed between lists of the same group. */\n dropListGroup = input<string>();\n /** The layout orientation of the list. */\n dropListOrientation = input<'horizontal' | 'vertical'>('vertical');\n /** Emits when an item is dropped into the list. */\n dropListDropped = output<AXDropListDroppedEvent>();\n /** Emits when the sort preview transforms change during an active drag. */\n sortPreviewChanged = output<void>();\n\n /** The `axDrag` directives that are direct children of this list. */\n readonly _draggableItems = contentChildren(AXDragDirective, { descendants: false });\n\n // --- Internal State Management ---\n\n /** The native element of the drop list. */\n readonly element = this._hostEl.nativeElement;\n\n /** The draggable item currently being moved over this list. */\n private readonly _activeDragItem = signal<AXDragDirective | null>(null);\n /** The calculated index where the placeholder/item should be. */\n private readonly _placeholderIndex = signal(-1);\n /** A snapshot of the items' data and geometry at the start of the drag. */\n private readonly _cachedItems = signal<readonly DropListItemData[]>([]);\n /** The list's initial bounding box, used to calculate scroll delta. */\n private readonly _listInitialRect = signal<DOMRect | null>(null);\n /** The detected `gap` of the list for the current orientation. */\n private readonly _listGap = signal(0);\n /** Whether the list is in RTL direction (cached at drag start). */\n private readonly _isRtl = signal(false);\n\n /** Internal orientation state; can be overridden programmatically by host components. */\n readonly orientation = linkedSignal(() => this.dropListOrientation());\n /** Internal sorting-disabled state; can be overridden programmatically by host components. */\n readonly isSortingDisabled = linkedSignal(() => this.sortingDisabled());\n\n /** DOM placeholder element for inter-list drags */\n private _placeholderElement: HTMLElement | null = null;\n\n ngOnInit(): void {\n if (isPlatformBrowser(this._platformId)) {\n this.element.dataset['axDropList'] = 'true';\n this.element.classList.add('ax-drop-list-sorting-transition');\n // Store reference to this directive instance on the element for drag directive access\n (this.element as HTMLElement & { __axContext__?: AXDropListDirective })['__axContext__'] = this;\n }\n }\n\n ngAfterContentInit(): void {\n this._cdr.detectChanges();\n }\n\n ngOnDestroy(): void {\n // Clean up placeholder element if directive destroyed during drag\n this._removePlaceholderElement();\n }\n\n // --- Public Methods (for internal library use) ---\n\n /** Checks if the given drag item is the one currently active in this list. */\n isDragActiveForThisList(dragItem: AXDragDirective): boolean {\n return this._activeDragItem() === dragItem;\n }\n\n /** Whether the list is horizontal and in RTL direction. */\n private isHorizontalRtl(): boolean {\n return this.orientation() === 'horizontal' && this._isRtl();\n }\n\n /**\n * Prepares the list for sorting when a drag operation starts from within this list.\n * @param dragItem The item that is being dragged.\n */\n prepareSort(dragItem: AXDragDirective): void {\n if (!this.axDropList() || this.isSortingDisabled() || this._activeDragItem() || dragItem.isDragDisabled()) return;\n\n this._activeDragItem.set(dragItem);\n this.element.classList.add('ax-drop-list-sorting-active');\n\n requestAnimationFrame(() => {\n this._zone.run(() => {\n this._cacheGeometry();\n const placeholderIdx = this._cachedItems().findIndex((data) => data.item === dragItem);\n this._placeholderIndex.set(placeholderIdx);\n });\n });\n }\n\n /**\n * Prepares the list for receiving an item that started dragging from another list.\n * @param dragItem The item entering this list.\n */\n enter(dragItem: AXDragDirective): void {\n if (!this.axDropList() || this.isSortingDisabled() || this.isDragActiveForThisList(dragItem)) return;\n\n // Clean up any existing placeholder from previous list\n this._removePlaceholderElement();\n\n this._activeDragItem.set(dragItem);\n this.element.classList.add('ax-drop-list-sorting-active');\n requestAnimationFrame(() => this._zone.run(() => this._cacheGeometry()));\n }\n\n /**\n * Calculates the new placeholder index based on the pointer's position and applies visual shifts.\n * @param event The pointer move event.\n * @param dragItem The item being dragged.\n */\n sort(event: PointerEvent, dragItem: AXDragDirective): void {\n if (\n !this.axDropList() ||\n !this.isDragActiveForThisList(dragItem) ||\n this.isSortingDisabled() ||\n !this._listInitialRect()\n )\n return;\n\n const pointerPosition = this.orientation() === 'vertical' ? event.clientY : event.clientX;\n const newPlaceholderIndex = this._calculatePlaceholderIndex(pointerPosition);\n\n if (this._placeholderIndex() !== newPlaceholderIndex) {\n this._placeholderIndex.set(newPlaceholderIndex);\n this._applyVisualShifts();\n }\n }\n\n /**\n * Finalizes the drop, emits the drop event, and resets the list's state.\n * @param event The pointer up event.\n * @param droppedItem The item that was dropped.\n * @param sourceList The list where the drag originated.\n */\n finalizeSort(event: PointerEvent, droppedItem: AXDragDirective, sourceList: AXDropListDirective): void {\n if (!this.axDropList() || !this.isDragActiveForThisList(droppedItem) || this.isSortingDisabled()) {\n this.resetSortStateAndStyles(sourceList);\n return;\n }\n\n const activeItem = this._activeDragItem();\n const targetSlotIndex = this._placeholderIndex();\n if (!activeItem || targetSlotIndex === -1) {\n this.resetSortStateAndStyles(sourceList);\n return;\n }\n\n const previousIndex = sourceList._cachedItems().findIndex((d) => d.item === activeItem);\n // Adjust the index for array mutation if moving an item to a later position in the same list.\n const currentIndex =\n sourceList === this && previousIndex !== -1 && targetSlotIndex > previousIndex\n ? targetSlotIndex - 1\n : targetSlotIndex;\n\n this.dropListDropped.emit({\n nativeEvent: event,\n sender: this,\n item: activeItem,\n previousIndex,\n currentIndex,\n container: this,\n previousContainer: sourceList,\n });\n\n this.resetSortStateAndStyles(sourceList);\n }\n\n /** Resets the transforms on all items and cancels the current sort operation. */\n cancelSort(dragItem?: AXDragDirective): void {\n if (dragItem && !this.isDragActiveForThisList(dragItem)) return;\n this._resetAllTransforms();\n this.resetSortState();\n }\n\n /** Resets transforms but keeps the active state, used when moving between lists. */\n cancelSortPreview(): void {\n if (!this._activeDragItem()) return;\n this._resetAllTransforms();\n const originalIndex = this._cachedItems().findIndex((d) => d.item === this._activeDragItem());\n this._placeholderIndex.set(originalIndex > -1 ? originalIndex : -1);\n }\n\n // --- Private Helper Methods ---\n\n /** Caches the geometry of the list and its items at the start of a drag. */\n private _cacheGeometry(): void {\n this._listInitialRect.set(this.element.getBoundingClientRect());\n this._isRtl.set(AXHtmlUtil.isRtl(this.element));\n this._detectAndCacheListGap();\n\n const items = [...this._draggableItems()]\n .sort((a, b) =>\n a.element().compareDocumentPosition(b.element()) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1,\n )\n .map((itemDraggable) => {\n const el = itemDraggable.element();\n const style = window.getComputedStyle(el);\n const rect = el.getBoundingClientRect();\n return {\n item: itemDraggable,\n element: el,\n initialRect: rect,\n width: rect.width,\n height: rect.height,\n margins: {\n top: parseFloat(style.marginTop),\n bottom: parseFloat(style.marginBottom),\n left: parseFloat(style.marginLeft),\n right: parseFloat(style.marginRight),\n },\n };\n });\n this._cachedItems.set(items);\n }\n\n /** Detects and caches the `gap` property from the list's computed styles. */\n private _detectAndCacheListGap(): void {\n const listStyle = window.getComputedStyle(this.element);\n const gapValue = listStyle.getPropertyValue('gap');\n if (gapValue && gapValue !== 'normal') {\n const gapParts = gapValue.split(' ');\n const rowGap = parseFloat(gapParts[0]);\n const columnGap = parseFloat(gapParts[1] || gapParts[0]);\n this._listGap.set(this.orientation() === 'vertical' ? rowGap : columnGap);\n } else {\n this._listGap.set(0);\n }\n }\n\n /**\n * Determines the new placeholder index by comparing the pointer position against the\n * midpoints of the other items in the list.\n * @param pointerPosition The clientX or clientY of the pointer.\n * @returns The calculated placeholder index.\n */\n private _calculatePlaceholderIndex(pointerPosition: number): number {\n const activeItem = this._activeDragItem();\n const listRect = this._listInitialRect();\n if (!activeItem || !listRect) return -1;\n\n const cachedItems = this._cachedItems();\n const originalIndex = cachedItems.findIndex((d) => d.item === activeItem);\n const siblings = cachedItems.filter((d) => d.item !== activeItem);\n const scrollDelta =\n this.orientation() === 'vertical'\n ? this.element.getBoundingClientRect().top - listRect.top\n : this.element.getBoundingClientRect().left - listRect.left;\n\n let newIndexInSiblings = -1;\n for (let i = 0; i < siblings.length; i++) {\n const sibling = siblings[i];\n const itemMidPoint =\n (this.orientation() === 'vertical' ? sibling.initialRect.top : sibling.initialRect.left) +\n scrollDelta +\n (this.orientation() === 'vertical' ? sibling.height : sibling.width) / 2;\n\n const isBeforeSibling = this.isHorizontalRtl()\n ? pointerPosition > itemMidPoint\n : pointerPosition < itemMidPoint;\n if (isBeforeSibling) {\n newIndexInSiblings = i;\n break;\n }\n }\n\n if (newIndexInSiblings === -1) {\n newIndexInSiblings = siblings.length;\n }\n\n // Map the index from the 'siblings' array back to the original `_cachedItems` array.\n const potentialPlaceholderIndex =\n originalIndex > -1 && newIndexInSiblings >= originalIndex ? newIndexInSiblings + 1 : newIndexInSiblings;\n\n // A drag starting from outside the list doesn't have an original index.\n if (originalIndex === -1) {\n return potentialPlaceholderIndex;\n }\n\n // --- New logic: Prevent crossing disabled items ---\n const start = Math.min(originalIndex, potentialPlaceholderIndex);\n const end = Math.max(originalIndex, potentialPlaceholderIndex);\n\n for (let i = start; i < end; i++) {\n const itemData = cachedItems[i];\n if (itemData.item !== activeItem && itemData.item.isDragDisabled()) {\n // We've hit a disabled \"wall\". Stop the placeholder at the boundary.\n if (potentialPlaceholderIndex > originalIndex) {\n return i; // Dragging down/right: stop *before* the wall.\n } else {\n return i + 1; // Dragging up/left: stop *after* the wall.\n }\n }\n }\n return potentialPlaceholderIndex;\n }\n\n /** Applies visual shifts - uses placeholder for inter-list, transforms for intra-list. */\n private _applyVisualShifts(): void {\n const activeItem = this._activeDragItem();\n const originalIndex = this._cachedItems().findIndex((d) => d.item === activeItem);\n const isIntraListDrag = originalIndex > -1;\n const placeholderIndex = this._placeholderIndex();\n\n // Check if this is an \"onto-node\" drop list (no items, just a drop target)\n const isOntoNodeList = this.element.dataset['dropType'] === 'onto-node';\n\n if (!isIntraListDrag && activeItem && !isOntoNodeList && this._cachedItems().length > 0) {\n // --- INTER-LIST DRAG: Use DOM placeholder for reorder lists with items ---\n this._updatePlaceholderElement(activeItem, placeholderIndex);\n } else {\n // --- INTRA-LIST DRAG: Use transforms (works well for same-list reordering) ---\n this._removePlaceholderElement();\n\n const getItemSpace = (itemData: DropListItemData) =>\n this.orientation() === 'vertical'\n ? itemData.height + itemData.margins.top + itemData.margins.bottom\n : itemData.width + itemData.margins.left + itemData.margins.right;\n\n const draggedItemSize = isIntraListDrag ? getItemSpace(this._cachedItems()[originalIndex]) : 0;\n\n const axisSign = this.isHorizontalRtl() ? -1 : 1;\n\n this._cachedItems().forEach((data, index) => {\n if (data.item.isDragDisabled()) {\n this._renderer.removeStyle(data.element, 'transform');\n return;\n }\n const transform = this._calculateTransform(index, originalIndex, draggedItemSize, getItemSpace);\n const signedTransform = transform * axisSign;\n this._renderer.setStyle(\n data.element,\n 'transform',\n transform\n ? `${this.orientation() === 'vertical' ? 'translateY' : 'translateX'}(${signedTransform}px)`\n : '',\n );\n });\n }\n\n this.sortPreviewChanged.emit();\n }\n\n /** Creates or moves the placeholder element for inter-list drags */\n private _updatePlaceholderElement(activeItem: AXDragDirective, targetIndex: number): void {\n const rect = activeItem.elementRect();\n if (!rect) return;\n\n // Create placeholder as a clone of the dragged element\n if (!this._placeholderElement) {\n // Clone the entire dragged element\n const sourceElement = activeItem.element();\n this._placeholderElement = sourceElement.cloneNode(true) as HTMLElement;\n \n // Mark it as a placeholder\n this._renderer.addClass(this._placeholderElement, 'ax-drop-placeholder');\n this._renderer.addClass(this._placeholderElement, 'ax-drag-placeholder');\n \n // Prevent interaction with cloned content\n this._renderer.setStyle(this._placeholderElement, 'pointerEvents', 'none');\n \n // Add faded styling to indicate it's a placeholder\n this._renderer.setStyle(this._placeholderElement, 'opacity', '0.4');\n this._renderer.setStyle(this._placeholderElement, 'transition', 'all 200ms ease');\n }\n\n // Insert/move placeholder at target index\n const items = this._cachedItems();\n if (targetIndex >= 0 && targetIndex < items.length) {\n const targetItem = items[targetIndex];\n if (targetItem && targetItem.element) {\n this._renderer.insertBefore(this.element, this._placeholderElement, targetItem.element);\n } else {\n // Fallback: append at end if target item invalid\n this._renderer.appendChild(this.element, this._placeholderElement);\n }\n } else {\n // Insert at end\n this._renderer.appendChild(this.element, this._placeholderElement);\n }\n }\n\n /** Removes the placeholder element if it exists */\n private _removePlaceholderElement(): void {\n if (this._placeholderElement) {\n this._renderer.removeChild(this.element, this._placeholderElement);\n this._placeholderElement = null;\n }\n }\n\n /**\n * Calculates the required transform in pixels for a single item.\n * @param index The index of the item to transform.\n * @param originalIndex The original index of the dragged item (-1 if from another list).\n * @param draggedItemSize The size (including margins) of the item being dragged.\n * @param getItemSpace A helper function to get an item's size including margins.\n * @returns The transform value in pixels.\n */\n private _calculateTransform(\n index: number,\n originalIndex: number,\n draggedItemSize: number,\n getItemSpace: (item: DropListItemData) => number,\n ): number {\n const targetIndex = this._placeholderIndex();\n const listGap = this._listGap();\n\n if (originalIndex > -1) {\n // --- Intra-list Drag ---\n if (index === originalIndex) {\n // The dragged item moves by the sum of the sizes of the items it passes over, PLUS the gaps between them.\n let offset = 0;\n if (targetIndex > originalIndex) {\n // Dragging down/right\n for (let i = originalIndex + 1; i < targetIndex; i++) {\n offset += getItemSpace(this._cachedItems()[i]) + listGap;\n }\n } else {\n // Dragging up/left\n for (let i = targetIndex; i < originalIndex; i++) {\n offset -= getItemSpace(this._cachedItems()[i]) + listGap;\n }\n }\n return offset;\n } else {\n // It's a sibling item that needs to make space.\n // It moves by the size of the dragged item, plus ONE gap to fill the void.\n const shift = draggedItemSize + listGap;\n if (originalIndex < targetIndex && index > originalIndex && index < targetIndex) {\n return -shift;\n } else if (originalIndex > targetIndex && index >= targetIndex && index < originalIndex) {\n return shift;\n }\n }\n } else {\n // --- Inter-list Drag (from another list) ---\n if (index >= targetIndex) {\n // An item from another list enters. Siblings shift by its size plus ONE gap.\n return draggedItemSize + listGap;\n }\n }\n return 0;\n }\n\n /** Resets the state of this list and the source list after a drop. */\n private resetSortStateAndStyles(sourceList: AXDropListDirective): void {\n const listsToReset = new Set([this, sourceList]);\n listsToReset.forEach((list) => {\n if (list) {\n list._resetAllTransforms();\n list.resetSortState();\n }\n });\n }\n\n /** Removes all `transform` styles from the items in this list. */\n private _resetAllTransforms(): void {\n this._cachedItems().forEach((data) => this._renderer.setStyle(data.element, 'transform', ''));\n this._removePlaceholderElement(); // Clean up inter-list placeholder\n this.sortPreviewChanged.emit();\n }\n\n /** Resets the internal state of the directive to its initial values. */\n resetSortState(): void {\n this.element.classList.remove('ax-drop-list-sorting-active');\n this._activeDragItem.set(null);\n this._cachedItems.set([]);\n this._placeholderIndex.set(-1);\n this._listInitialRect.set(null);\n this._listGap.set(0);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectorRef,\n DOCUMENT,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n NgZone,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n RendererStyleFlags2,\n TemplateRef,\n ViewContainerRef,\n computed,\n contentChild,\n effect,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n} from '@angular/core';\nimport { clamp } from 'lodash-es';\nimport { AXDragHandleDirective } from './drag-handle.directive';\nimport { AXDropListDirective } from './drop-list.directive';\nimport { AXDropZoneDirective } from './drop-zone.directive';\n\ntype AXPositionType = { x: number; y: number };\n\n// Zone detection constants for nested drop lists (tree nodes)\nconst ZONE_TOP_THRESHOLD = 0.3; // Top 30% triggers reorder BEFORE\nconst ZONE_BOTTOM_THRESHOLD = 0.7; // Bottom 30% triggers reorder AFTER\n// Middle 40% (between thresholds) triggers drop INTO\n\n@Directive({\n selector: '[axDrag]',\n})\nexport class AXDragDirective implements OnInit, OnDestroy {\n private zone = inject(NgZone);\n private document = inject(DOCUMENT);\n private renderer = inject(Renderer2);\n private cdr = inject(ChangeDetectorRef);\n private platformId = inject(PLATFORM_ID);\n private viewContainerRef = inject(ViewContainerRef);\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private handleDirective = contentChild(AXDragHandleDirective);\n\n axDrag = input(true, { transform: (value: boolean | string) => value === '' || value === true });\n dragData = input();\n dragDisabled = input(false);\n dragTransition = input(true);\n dragElementClone = input(false);\n dropZoneGroup = input<string>();\n dragStartDelay = input<number>();\n dragResetOnDblClick = input(true);\n dragLockAxis = input<'x' | 'y' | null>(null);\n dragClonedTemplate = input<TemplateRef<unknown>>();\n dragCursor = input<'move' | 'grab' | 'grab-on-drag' | 'none'>('move');\n dragBoundary = input<string | ElementRef<HTMLElement> | HTMLElement>();\n dragTransitionDuration = input<number>(150);\n\n readonly isDragDisabled = linkedSignal(() => this.dragDisabled());\n readonly lockAxis = linkedSignal(() => this.dragLockAxis());\n readonly dragBoundaryOverride = linkedSignal<\n string | ElementRef<HTMLElement> | HTMLElement | null | undefined\n >(() => this.dragBoundary());\n readonly startDelay = linkedSignal(() => this.dragStartDelay() ?? 0);\n readonly dragTouchAction = linkedSignal<'none' | 'pan-x' | 'pan-y'>(() => 'none');\n readonly dragCursorOverride = linkedSignal<'move' | 'grab' | 'grab-on-drag' | 'none'>(() => this.dragCursor());\n\n dragPositionChanged = output<AXPositionType>();\n\n isMoving = signal<boolean>(false);\n clonedElement = signal<HTMLElement | null>(null);\n currentAxis = signal<AXPositionType>({ x: 0, y: 0 });\n currentCloneAxis = signal<AXPositionType>({ x: 0, y: 0 });\n transitionDuration = linkedSignal(() => this.dragTransitionDuration());\n readonly element = signal<HTMLElement>(this.el.nativeElement);\n private dragStartTime = signal<number>(0);\n private isDragging = signal<boolean>(false);\n private elementOpacity = signal<string>('1');\n private movedAfterDelay = signal<boolean>(false);\n private activePointerId = signal<number | null>(null);\n private prevDropZone = signal<AXDropZoneDirective | null>(null);\n private dragStartOffset = signal<AXPositionType>({ x: 0, y: 0 });\n private pointerDownPosition = signal<AXPositionType>({ x: 0, y: 0 });\n private clonePointerOffset = signal<AXPositionType>({ x: 0, y: 0 });\n private clonedElementViewRef = signal<EmbeddedViewRef<unknown> | null>(null);\n private rafId: number | null = null;\n private pendingPointerEvent: PointerEvent | null = null;\n private savedBodyCursor: string | null = null;\n private holdDelayTimer: ReturnType<typeof setTimeout> | null = null;\n private holdDelayReady = signal(false);\n\n private _parentDropList = inject(AXDropListDirective, { optional: true, skipSelf: true, host: false });\n private _currentDropList = signal<AXDropListDirective | null>(null);\n readonly createCloneElement = computed<boolean>(() => this.dragElementClone() || !!this._parentDropList);\n\n private boundaryElement = computed<HTMLElement | null>(() => {\n const boundary = this.dragBoundaryOverride();\n if (!boundary) {\n return null;\n }\n if (typeof boundary === 'string') {\n return this.document.querySelector<HTMLElement>(boundary);\n }\n return boundary instanceof ElementRef ? boundary.nativeElement : boundary;\n });\n\n readonly elementRect = computed(() => {\n if (!isPlatformBrowser(this.platformId)) {\n return null;\n }\n return this.element().getBoundingClientRect();\n });\n\n private boundaryRect = computed(() => {\n if (!isPlatformBrowser(this.platformId)) {\n return null;\n }\n return this.boundaryElement()?.getBoundingClientRect();\n });\n\n private handle = computed(() => this.handleDirective()?.element() ?? this.element());\n\n private boundHandleDblClick = this.handleDblClick.bind(this);\n private boundHandlePointerUp = this.handlePointerUp.bind(this);\n private boundHandlePointerDown = this.handlePointerDown.bind(this);\n private boundHandlePointerMove = this.handlePointerMove.bind(this);\n private listenersAttached = signal<HTMLElement | null>(null);\n\n #dragDisabledEffect = effect(() => {\n const cursor = this.dragCursorOverride();\n const disabled = this.isDragDisabled();\n const handle = this.handle();\n\n if (disabled || cursor === 'none' || cursor === 'grab-on-drag') {\n if (!this.isMoving() && !this.holdDelayReady()) {\n this.renderer.removeStyle(handle, 'cursor');\n }\n if (disabled) {\n this.renderer.removeStyle(handle, 'touch-action');\n } else {\n this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());\n }\n return;\n }\n\n if (!this.isMoving() && !this.holdDelayReady()) {\n this.renderer.setStyle(handle, 'cursor', cursor);\n }\n this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());\n });\n\n #handleChangeEffect = effect(() => {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const currentHandle = this.handle();\n const previousHandle = this.listenersAttached();\n\n // Remove listeners from previous handle if it changed\n if (previousHandle && previousHandle !== currentHandle) {\n previousHandle.removeEventListener('dblclick', this.boundHandleDblClick);\n previousHandle.removeEventListener('pointerdown', this.boundHandlePointerDown);\n }\n\n // Attach listeners to new handle\n if (currentHandle && currentHandle !== previousHandle) {\n this.zone.runOutsideAngular(() => {\n currentHandle.addEventListener('dblclick', this.boundHandleDblClick);\n currentHandle.addEventListener('pointerdown', this.boundHandlePointerDown, { passive: false });\n });\n this.listenersAttached.set(currentHandle);\n }\n });\n\n ngOnInit() {\n if (isPlatformBrowser(this.platformId)) {\n if (this._parentDropList) {\n this.setElementTransition(this.element());\n }\n this.elementOpacity.set(getComputedStyle(this.element()).opacity);\n }\n }\n\n ngOnDestroy() {\n if (isPlatformBrowser(this.platformId)) {\n const handle = this.listenersAttached();\n if (handle) {\n handle.removeEventListener('dblclick', this.boundHandleDblClick);\n handle.removeEventListener('pointerdown', this.boundHandlePointerDown);\n }\n this.removeDocumentListeners();\n if (this.createCloneElement()) {\n this.removeCloneElement();\n }\n if (this._parentDropList && this.isDragging()) {\n this._parentDropList.cancelSort();\n }\n this.clearActiveDragCursor();\n this.clearHoldDelayTimer();\n this.renderer.removeStyle(this.element(), 'z-index');\n }\n }\n\n private usesGrabDragCursor(): boolean {\n const cursor = this.dragCursorOverride();\n return cursor === 'grab' || cursor === 'grab-on-drag';\n }\n\n private resolveDropCursor(canDrop: boolean): string {\n if (this.usesGrabDragCursor()) {\n return canDrop ? 'grabbing' : 'not-allowed';\n }\n return canDrop ? 'move' : 'not-allowed';\n }\n\n private setActiveDragCursor(cursor: string): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n if (this.savedBodyCursor === null) {\n this.savedBodyCursor = this.document.body.style.cursor;\n }\n this.document.body.style.cursor = cursor;\n }\n\n private clearActiveDragCursor(): void {\n if (!isPlatformBrowser(this.platformId) || this.savedBodyCursor === null) return;\n\n this.document.body.style.cursor = this.savedBodyCursor;\n this.savedBodyCursor = null;\n }\n\n private clearHoldDelayTimer(): void {\n if (this.holdDelayTimer !== null) {\n clearTimeout(this.holdDelayTimer);\n this.holdDelayTimer = null;\n }\n this.holdDelayReady.set(false);\n }\n\n private scheduleHoldDelayFeedback(): void {\n this.clearHoldDelayTimer();\n const delay = this.startDelay();\n const cursorMode = this.dragCursorOverride();\n if (delay <= 0 || (cursorMode !== 'grab' && cursorMode !== 'grab-on-drag')) {\n return;\n }\n\n const readyCursor = cursorMode === 'grab-on-drag' ? 'grab' : 'grabbing';\n\n this.holdDelayTimer = setTimeout(() => {\n this.holdDelayTimer = null;\n if (!this.isDragging() || this.isMoving() || this.isDragDisabled()) {\n return;\n }\n\n this.holdDelayReady.set(true);\n this.renderer.setStyle(this.handle(), 'cursor', readyCursor);\n this.setActiveDragCursor(readyCursor);\n }, delay);\n }\n\n private setElementDropCursor(element: HTMLElement, cursor: string): void {\n this.renderer.setStyle(element, 'cursor', cursor);\n }\n\n private setElementTransition(element: HTMLElement) {\n this.renderer.setStyle(element, 'transition-property', 'transform, opacity, translate');\n this.renderer.setStyle(\n element,\n 'transition-duration',\n `var(--ax-sys-transition-duration,${this.transitionDuration()}ms)`,\n );\n this.renderer.setStyle(element, 'transition-timing-function', 'var(--ax-sys-transition-timing-function)');\n }\n\n private removeElementTransition(element: HTMLElement) {\n this.renderer.setStyle(element, 'transition-property', 'opacity');\n }\n\n private handlePointerDown(e: PointerEvent) {\n if (!isPlatformBrowser(this.platformId)) return;\n if (!this.axDrag() || this.isDragDisabled() || e.button !== 0 || this._parentDropList?.isSortingDisabled()) return;\n\n this.isDragging.set(true);\n this.movedAfterDelay.set(false);\n\n if (this.dragCursorOverride() === 'move') {\n this.renderer.setStyle(this.handle(), 'cursor', 'move');\n }\n\n this.dragStartOffset.set({ x: e.clientX - this.currentAxis().x, y: e.clientY - this.currentAxis().y });\n this.pointerDownPosition.set({ x: e.clientX, y: e.clientY });\n this.renderer.setStyle(this.handle(), 'userSelect', 'none');\n this.activePointerId.set(e.pointerId);\n this.addDocumentListeners();\n\n this.dragStartTime.set(Date.now());\n this.scheduleHoldDelayFeedback();\n }\n\n private handleDblClick() {\n if (!this.dragResetOnDblClick() || this.isDragDisabled()) return;\n this.setPosition(0, 0);\n }\n\n private handlePointerMove(e: PointerEvent) {\n if (!this.isDragging() || !isPlatformBrowser(this.platformId) || e.pointerId !== this.activePointerId()) {\n return;\n }\n\n if (!this.isMoving()) {\n const delay = this.startDelay();\n const down = this.pointerDownPosition();\n const movedX = e.clientX - down.x;\n const movedY = e.clientY - down.y;\n const movedDistance = Math.sqrt(movedX * movedX + movedY * movedY);\n\n if (delay > 0 && !this.holdDelayReady() && Date.now() - this.dragStartTime() < delay) {\n if (movedDistance > 8) {\n this.abortDragSequence();\n }\n return;\n }\n\n e.preventDefault();\n this.isMoving.set(true);\n this.handle().setPointerCapture(e.pointerId);\n this.startDrag(e);\n } else {\n e.preventDefault();\n }\n\n // Run position updates outside Angular zone for better performance\n this.zone.runOutsideAngular(() => {\n if (this.createCloneElement()) {\n const newCloneX = e.clientX - this.clonePointerOffset().x;\n const newCloneY = e.clientY - this.clonePointerOffset().y;\n this.setClonePosition(newCloneX, newCloneY);\n } else {\n const newX = e.clientX - this.dragStartOffset().x;\n const newY = e.clientY - this.dragStartOffset().y;\n this.setPosition(newX, newY);\n }\n });\n\n // Throttle drop list interactions using requestAnimationFrame\n if (this._parentDropList) {\n this.pendingPointerEvent = e;\n if (this.rafId === null) {\n this.rafId = requestAnimationFrame(() => {\n if (this.pendingPointerEvent) {\n this.handleDropListInteractions(this.pendingPointerEvent);\n this.pendingPointerEvent = null;\n }\n this.rafId = null;\n });\n }\n } else {\n this.dropZoneHoverHandler(e);\n }\n }\n\n private abortDragSequence(): void {\n this.clearHoldDelayTimer();\n this.isDragging.set(false);\n this.isMoving.set(false);\n this.activePointerId.set(null);\n this.removeDocumentListeners();\n this.renderer.removeStyle(this.handle(), 'userSelect');\n this.resetHandleCursorAfterDrag();\n this.clearActiveDragCursor();\n }\n\n private resetHandleCursorAfterDrag(): void {\n const cursorMode = this.dragCursorOverride();\n if (cursorMode === 'grab') {\n this.renderer.setStyle(this.handle(), 'cursor', 'grab');\n } else if (cursorMode === 'grab-on-drag') {\n this.renderer.removeStyle(this.handle(), 'cursor');\n }\n }\n\n private startDrag(e: PointerEvent) {\n if (this.usesGrabDragCursor()) {\n this.renderer.setStyle(this.handle(), 'cursor', 'grabbing');\n this.setActiveDragCursor('grabbing');\n }\n\n this.renderer.setStyle(this.element(), 'z-index', '1');\n\n // Add CDK-style classes\n this.renderer.addClass(this.element(), 'ax-dragging');\n this.renderer.addClass(this.element(), 'ax-drag-placeholder');\n\n if (this._parentDropList) {\n this._currentDropList.set(this._parentDropList);\n this._parentDropList.prepareSort(this);\n } else {\n this.dropZoneHoverHandler(e);\n }\n\n if (this.createCloneElement()) {\n const elementRect = this.element().getBoundingClientRect();\n this.clonePointerOffset.set({\n x: e.clientX - elementRect.left,\n y: e.clientY - elementRect.top,\n });\n const clone = this.createCloneElementHandler(this.element());\n if (clone) {\n this.renderer.addClass(clone, 'ax-drag-preview');\n this.renderer.addClass(clone, 'ax-dragging');\n }\n }\n }\n\n private handlePointerUp(e: PointerEvent) {\n if (e.pointerId !== this.activePointerId() || !isPlatformBrowser(this.platformId) || !this.isDragging()) {\n return;\n }\n\n this.clearHoldDelayTimer();\n\n this.resetHandleCursorAfterDrag();\n this.clearActiveDragCursor();\n\n const wasMoving = this.isMoving();\n this.isMoving.set(false);\n this.isDragging.set(false);\n\n // Remove CDK-style classes\n this.renderer.removeClass(this.element(), 'ax-dragging');\n this.renderer.removeClass(this.element(), 'ax-drag-placeholder');\n\n if (!wasMoving) {\n this.activePointerId.set(null);\n this.removeDocumentListeners();\n this._currentDropList.set(null);\n this.renderer.removeStyle(this.handle(), 'userSelect');\n return;\n }\n\n this.renderer.removeStyle(this.element(), 'z-index');\n this.preventClicking();\n\n const transform = this.element().style.transform;\n let x = 0;\n let y = 0;\n if (transform) {\n x = Number(transform.split('translateX(')[1]?.split('px)')[0]);\n y = Number(transform.split('translateY(')[1]?.split('px)')[0]);\n }\n\n const droppedIntoList = this._currentDropList();\n if (droppedIntoList && this._parentDropList) {\n droppedIntoList.finalizeSort(e, this, this._parentDropList);\n } else if (this._parentDropList) {\n this._parentDropList.cancelSort(this);\n } else {\n this.dropZoneDropHandler(e);\n }\n\n // Cancel any pending RAF callbacks\n if (this.rafId !== null) {\n cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n this.pendingPointerEvent = null;\n\n this.activePointerId.set(null);\n this.removeDocumentListeners();\n this._currentDropList.set(null);\n this.renderer.removeStyle(this.handle(), 'userSelect');\n\n if (this.createCloneElement()) {\n const listUnderPointer = this.getDropListFromPoint(e.clientX, e.clientY);\n this.removeCloneElementWithAnimation(x || 0, y || 0, listUnderPointer);\n } else {\n this.renderer.setStyle(this.element(), 'opacity', this.elementOpacity());\n }\n }\n\n private preventClicking() {\n const blockClick = (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n };\n this.document.addEventListener('click', blockClick, { capture: true, once: true });\n }\n\n private handleDropListInteractions(e: PointerEvent) {\n const listUnderPointer = this.getDropListFromPoint(e.clientX, e.clientY);\n const previousList = this._currentDropList();\n let targetList: AXDropListDirective | null = null;\n const canDrop = listUnderPointer && this.canDropInList(listUnderPointer);\n\n if (canDrop) {\n targetList = listUnderPointer;\n }\n\n // Update cursor based on whether drop is allowed\n if (listUnderPointer) {\n const cloneEl = this.clonedElement();\n const cursor = this.resolveDropCursor(!!canDrop);\n if (this.usesGrabDragCursor()) {\n this.setActiveDragCursor(cursor);\n } else if (cloneEl) {\n this.setElementDropCursor(cloneEl, cursor);\n } else {\n this.setElementDropCursor(this.element(), cursor);\n }\n }\n\n if (targetList !== previousList) {\n if (previousList) {\n previousList.cancelSortPreview();\n if (previousList !== this._parentDropList) {\n previousList.resetSortState();\n }\n }\n if (targetList) {\n targetList.enter(this);\n }\n this._currentDropList.set(targetList);\n }\n\n this._currentDropList()?.sort(e, this);\n }\n\n private canDropInList(list: AXDropListDirective): boolean {\n if (!list || list.isSortingDisabled() || !this._parentDropList) {\n return false;\n }\n if (list === this._parentDropList) {\n return true;\n }\n const dragGroup = this._parentDropList.dropListGroup();\n const targetGroup = list.dropListGroup();\n\n if (!dragGroup || dragGroup !== targetGroup) {\n return false;\n }\n\n // Check for circular reference (tree-specific validation)\n const draggedNode = this.dragData();\n const targetNodeId = list.element.getAttribute('data-node-id');\n\n if (draggedNode && this.isCircularReference(targetNodeId, draggedNode)) {\n return false;\n }\n\n return true;\n }\n\n private isCircularReference(targetNodeId: string | null, draggedNode: unknown): boolean {\n if (!draggedNode || typeof draggedNode !== 'object') {\n return false;\n }\n\n const node = draggedNode as { id?: string; children?: unknown[] };\n\n // Check if dropping into itself\n if (targetNodeId === node.id) {\n return true;\n }\n\n // Check if targetNodeId is in draggedNode's descendants\n if (!node.children || !Array.isArray(node.children)) {\n return false;\n }\n\n for (const child of node.children) {\n const childNode = child as { id?: string };\n if (childNode.id === targetNodeId) {\n return true;\n }\n if (this.isCircularReference(targetNodeId, child)) {\n return true;\n }\n }\n\n return false;\n }\n\n private dropZoneHoverHandler(e: PointerEvent) {\n const dropZones = this.getDropZonesFromPoint(e.clientX, e.clientY);\n const dropZone = dropZones[0];\n\n if (!dropZone) {\n if (this.prevDropZone()) {\n this.leavePrevDropZone(e);\n }\n return;\n }\n\n if (this.prevDropZone() && this.prevDropZone() !== dropZone) {\n this.leavePrevDropZone(e);\n }\n\n if (this.dropZoneValidation(dropZone) && !dropZone.isHovered()) {\n this.prevDropZone.set(dropZone);\n dropZone.onElementHover.emit({ sender: dropZone, dropped: this, nativeEvent: e, state: 'enter' });\n dropZone.isHovered.set(true);\n }\n }\n\n private dropZoneDropHandler(e: PointerEvent) {\n const dropZones = this.getDropZonesFromPoint(e.clientX, e.clientY);\n const dropZone = dropZones[0];\n if (!this.dropZoneValidation(dropZone)) {\n return;\n }\n dropZone.isHovered.set(false);\n dropZone.onElementDrop.emit({ sender: dropZone, dropped: this, nativeEvent: e });\n }\n\n private getDropZonesFromPoint(x: number, y: number): AXDropZoneDirective[] {\n const elements = this.document.elementsFromPoint(x, y);\n\n return elements\n .filter((el): el is HTMLElement => el instanceof HTMLElement && el.dataset['axDropZone'] === 'true')\n .map((el) => el['__axContext__'] as AXDropZoneDirective);\n }\n\n private getDropListFromPoint(x: number, y: number): AXDropListDirective | null {\n const dropListElements = this.document\n .elementsFromPoint(x, y)\n .filter((el): el is HTMLElement => el instanceof HTMLElement && el.dataset['axDropList'] === 'true');\n\n if (dropListElements.length === 0) {\n return null;\n }\n\n // If only one drop list, use it\n if (dropListElements.length === 1) {\n return dropListElements[0]['__axContext__'] as AXDropListDirective;\n }\n\n // Multiple drop lists detected (nested scenario like tree2)\n // Prioritize based on pointer position and drop type\n const ontoNodeList = dropListElements.find((el) => el.dataset['dropType'] === 'onto-node');\n const reorderList = dropListElements.find((el) => el.dataset['dropType'] !== 'onto-node');\n\n // If no special handling needed, return first\n if (!ontoNodeList || !reorderList) {\n return dropListElements[0]['__axContext__'] as AXDropListDirective;\n }\n\n // Calculate pointer position relative to the \"onto-node\" element\n const ontoNodeRect = ontoNodeList.getBoundingClientRect();\n const relativeY = y - ontoNodeRect.top;\n const heightRatio = relativeY / ontoNodeRect.height;\n\n // Smart zone detection based on pointer position\n if (heightRatio < ZONE_TOP_THRESHOLD || heightRatio > ZONE_BOTTOM_THRESHOLD) {\n // Top or bottom zone: reorder (drop BEFORE/AFTER node)\n return reorderList['__axContext__'] as AXDropListDirective;\n } else {\n // Center zone: onto-node (drop INTO node as child)\n return ontoNodeList['__axContext__'] as AXDropListDirective;\n }\n }\n\n private dropZoneValidation(dropZone: AXDropZoneDirective): boolean {\n if (!dropZone) return false;\n const dragGroup = this.dropZoneGroup();\n const dropGroup = dropZone.dropZoneGroup();\n if (dropGroup && dragGroup !== dropGroup) {\n return false;\n }\n return true;\n }\n\n private leavePrevDropZone(e: PointerEvent) {\n if (this.prevDropZone()) {\n this.prevDropZone().onElementHover.emit({\n dropped: this,\n state: 'leave',\n nativeEvent: e,\n sender: this.prevDropZone(),\n });\n this.prevDropZone().isHovered.set(false);\n this.prevDropZone.set(null);\n }\n }\n\n setPosition(x: number, y: number) {\n let constrainedX = x;\n let constrainedY = y;\n\n const elementRect = this.elementRect();\n const boundaryRect = this.boundaryRect();\n\n if (boundaryRect && elementRect) {\n const minX = boundaryRect.left - elementRect.left;\n const minY = boundaryRect.top - elementRect.top;\n const maxX = minX + boundaryRect.width - elementRect.width;\n const maxY = minY + boundaryRect.height - elementRect.height;\n constrainedX = clamp(x, minX, maxX);\n constrainedY = clamp(y, minY, maxY);\n }\n\n if (this.lockAxis() === 'x') constrainedY = this.currentAxis().y;\n if (this.lockAxis() === 'y') constrainedX = this.currentAxis().x;\n\n // Direct DOM manipulation without triggering change detection\n this.renderer.setStyle(this.element(), 'translate', `${constrainedX}px ${constrainedY}px`);\n\n // Only update signal and emit if position actually changed significantly (throttle)\n const current = this.currentAxis();\n if (Math.abs(current.x - constrainedX) > 0.5 || Math.abs(current.y - constrainedY) > 0.5) {\n this.currentAxis.set({ x: constrainedX, y: constrainedY });\n this.dragPositionChanged.emit({ x: constrainedX, y: constrainedY });\n }\n }\n\n setClonePosition(x: number, y: number) {\n let constrainedX = x;\n let constrainedY = y;\n\n const cloneEl = this.clonedElement();\n const boundaryRect = this.boundaryRect();\n\n if (boundaryRect && cloneEl) {\n const cloneWidth = cloneEl.offsetWidth;\n const cloneHeight = cloneEl.offsetHeight;\n\n constrainedX = clamp(x, boundaryRect.left, boundaryRect.right - cloneWidth);\n constrainedY = clamp(y, boundaryRect.top, boundaryRect.bottom - cloneHeight);\n }\n\n if (this.lockAxis() === 'x') constrainedY = this.currentCloneAxis().y;\n if (this.lockAxis() === 'y') constrainedX = this.currentCloneAxis().x;\n\n // Direct DOM manipulation without triggering change detection\n this.renderer.setStyle(cloneEl, 'translate', `${constrainedX}px ${constrainedY}px`);\n\n // Only update signal and emit if position actually changed significantly (throttle)\n const current = this.currentCloneAxis();\n if (Math.abs(current.x - constrainedX) > 0.5 || Math.abs(current.y - constrainedY) > 0.5) {\n this.currentCloneAxis.set({ x: constrainedX, y: constrainedY });\n this.dragPositionChanged.emit({ x: constrainedX, y: constrainedY });\n }\n }\n\n private createCloneElementHandler(originalElement: HTMLElement): HTMLElement | null {\n if (!isPlatformBrowser(this.platformId)) {\n this.clonedElement.set(null);\n return null;\n }\n\n let clonedElement: HTMLElement;\n const customTemplate = this.dragClonedTemplate();\n\n const applyComputedStylesRecursive = (source: HTMLElement, target: HTMLElement) => {\n if (!isPlatformBrowser(this.platformId)) return;\n const computedStyles = window.getComputedStyle(source);\n\n if (computedStyles.cssText && target.style.cssText !== undefined) {\n let tempCssText = computedStyles.cssText;\n if (target === clonedElement) {\n tempCssText = tempCssText\n .replace(/position:[^;]+;/gi, '')\n .replace(/top:[^;]+;/gi, '')\n .replace(/left:[^;]+;/gi, '')\n .replace(/right:[^;]+;/gi, '')\n .replace(/bottom:[^;]+;/gi, '')\n .replace(/width:[^;]+;/gi, '')\n .replace(/height:[^;]+;/gi, '')\n .replace(/margin[^;]*:[^;]+;/gi, '')\n .replace(/transition[^;]*:[^;]+;/gi, '')\n .replace(/transform:[^;]+;/gi, '')\n .replace(/translate:[^;]+;/gi, '')\n .replace(/z-index:[^;]+;/gi, '')\n .replace(/opacity:[^;]+;/gi, '');\n }\n tempCssText = tempCssText.replace(/pointer-events:[^;]+;/gi, '');\n target.style.cssText = tempCssText;\n } else {\n for (let i = 0; i < computedStyles.length; i++) {\n const propName = computedStyles[i];\n if (propName === 'pointer-events') {\n continue;\n }\n if (\n target === clonedElement &&\n (propName === 'position' ||\n propName === 'top' ||\n propName === 'left' ||\n propName === 'right' ||\n propName === 'bottom' ||\n propName === 'width' ||\n propName === 'height' ||\n propName.startsWith('margin') ||\n propName.startsWith('transition') ||\n propName === 'transform' ||\n propName === 'translate' ||\n propName === 'z-index' ||\n propName === 'opacity')\n ) {\n continue;\n }\n try {\n target.style.setProperty(\n propName,\n computedStyles.getPropertyValue(propName),\n computedStyles.getPropertyPriority(propName),\n );\n } catch {\n // Some CSS properties cannot be set directly, skip silently\n }\n }\n }\n const sourceChildren = Array.from(source.children);\n const targetChildren = Array.from(target.children);\n for (let i = 0; i < sourceChildren.length; i++) {\n if (sourceChildren[i] instanceof HTMLElement && targetChildren[i] instanceof HTMLElement) {\n applyComputedStylesRecursive(sourceChildren[i] as HTMLElement, targetChildren[i] as HTMLElement);\n }\n }\n };\n\n if (customTemplate) {\n const viewRef = this.viewContainerRef.createEmbeddedView(customTemplate);\n this.clonedElementViewRef.set(viewRef);\n\n if (viewRef.rootNodes.length > 0 && viewRef.rootNodes[0] instanceof HTMLElement) {\n clonedElement = viewRef.rootNodes[0] as HTMLElement;\n\n const viewIndex = this.viewContainerRef.indexOf(viewRef);\n if (viewIndex !== -1) {\n this.viewContainerRef.detach(viewIndex);\n }\n } else {\n if (this.clonedElementViewRef()) {\n this.clonedElementViewRef().destroy();\n this.clonedElementViewRef.set(null);\n }\n console.warn(\n 'AXDragDirective: dragClonedTemplate did not produce a valid HTMLElement root node. Falling back to default cloning.',\n );\n clonedElement = originalElement.cloneNode(true) as HTMLElement;\n applyComputedStylesRecursive(originalElement, clonedElement);\n }\n } else {\n clonedElement = originalElement.cloneNode(true) as HTMLElement;\n applyComputedStylesRecursive(originalElement, clonedElement);\n }\n\n if (clonedElement.id) {\n this.renderer.removeAttribute(clonedElement, 'id');\n }\n this.renderer.setStyle(originalElement, 'opacity', '0.5');\n\n const originalRect = originalElement.getBoundingClientRect();\n this.renderer.setStyle(clonedElement, 'position', 'fixed', RendererStyleFlags2.Important);\n this.renderer.setStyle(clonedElement, 'left', '0px');\n this.renderer.setStyle(clonedElement, 'top', '0px');\n if (!customTemplate) {\n this.renderer.setStyle(clonedElement, 'width', `${originalRect.width}px`);\n this.renderer.setStyle(clonedElement, 'height', `${originalRect.height}px`);\n }\n this.renderer.setStyle(clonedElement, 'margin', '0');\n this.renderer.setStyle(clonedElement, 'box-sizing', 'border-box');\n this.renderer.setStyle(clonedElement, 'opacity', '0.75');\n this.renderer.setStyle(clonedElement, 'z-index', '9999');\n this.renderer.setStyle(clonedElement, 'pointer-events', 'none', RendererStyleFlags2.Important);\n this.renderer.setStyle(clonedElement, 'user-select', 'none');\n this.renderer.setStyle(clonedElement, 'touch-action', 'none');\n\n this.renderer.setStyle(clonedElement, 'translate', `${originalRect.left}px ${originalRect.top}px`);\n this.renderer.removeStyle(clonedElement, 'transition');\n this.renderer.removeStyle(clonedElement, 'transition-property');\n\n this.copyPseudoElementStyles(originalElement, clonedElement, '::before');\n this.copyPseudoElementStyles(originalElement, clonedElement, '::after');\n\n this.renderer.appendChild(this.document.body, clonedElement);\n this.clonedElement.set(clonedElement);\n this.setClonePosition(originalRect.left, originalRect.top);\n\n return clonedElement;\n }\n\n private copyPseudoElementStyles(source: HTMLElement, target: HTMLElement, pseudo: '::before' | '::after'): void {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const pseudoStyles = window.getComputedStyle(source, pseudo);\n const content = pseudoStyles.getPropertyValue('content');\n const display = pseudoStyles.getPropertyValue('display');\n if (!content || content === 'none' || display === 'none') {\n return;\n }\n const pseudoElement = this.renderer.createElement('span');\n for (let i = 0; i < pseudoStyles.length; i++) {\n const propName = pseudoStyles[i];\n try {\n pseudoElement.style.setProperty(\n propName,\n pseudoStyles.getPropertyValue(propName),\n pseudoStyles.getPropertyPriority(propName),\n );\n } catch (e) {\n // Some properties might fail to set, which is usually fine.\n }\n }\n if (content.startsWith('\"') && content.endsWith('\"')) {\n this.renderer.setProperty(pseudoElement, 'textContent', content.slice(1, -1));\n } else {\n this.renderer.setProperty(pseudoElement, 'textContent', content);\n }\n this.renderer.setStyle(pseudoElement, 'pointer-events', 'none');\n if (pseudo === '::before') {\n this.renderer.insertBefore(target, pseudoElement, target.firstChild);\n } else {\n this.renderer.appendChild(target, pseudoElement);\n }\n }\n\n private removeCloneElementWithAnimation(x: number, y: number, dropList?: AXDropListDirective) {\n dropList?._draggableItems().forEach((item) => {\n this.removeElementTransition(item.element());\n });\n const clone = this.clonedElement();\n if (!clone) return;\n\n this.renderer.setStyle(this.element(), 'opacity', this.elementOpacity());\n\n const elementRect = this.element().getBoundingClientRect();\n if (elementRect) {\n this.setElementTransition(clone);\n this.renderer.setStyle(clone, 'opacity', '0');\n this.setClonePosition(elementRect.left + x, elementRect.top + y);\n }\n\n if (!this.dragTransition()) {\n this.removeCloneElement();\n } else {\n setTimeout(() => {\n this.removeCloneElement();\n dropList?._draggableItems().forEach((item) => {\n this.setElementTransition(item.element());\n });\n }, this.transitionDuration());\n }\n }\n\n private removeCloneElement() {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const clone = this.clonedElement();\n if (clone?.parentNode) {\n // Remove classes before removing element\n this.renderer.removeClass(clone, 'ax-drag-preview');\n this.renderer.removeClass(clone, 'ax-dragging');\n this.renderer.removeChild(clone.parentNode, clone);\n }\n this.clonedElement.set(null);\n\n if (this.clonedElementViewRef()) {\n this.clonedElementViewRef().destroy();\n this.clonedElementViewRef.set(null);\n }\n this.cdr.markForCheck();\n }\n\n private addDocumentListeners(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n this.zone.runOutsideAngular(() => {\n this.document.addEventListener('pointermove', this.boundHandlePointerMove, { passive: false });\n this.document.addEventListener('pointerup', this.boundHandlePointerUp);\n this.document.addEventListener('pointercancel', this.boundHandlePointerUp);\n });\n }\n\n private removeDocumentListeners(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n this.zone.runOutsideAngular(() => {\n this.document.removeEventListener('pointermove', this.boundHandlePointerMove);\n this.document.removeEventListener('pointerup', this.boundHandlePointerUp);\n this.document.removeEventListener('pointercancel', this.boundHandlePointerUp);\n });\n }\n}\n","import { NXComponent, NXNativeEvent } from '@acorex/cdk/common';\nimport { Directive, OnInit, input, output, signal } from '@angular/core';\nimport { AXDragDirective } from './drag.directive';\n\nexport interface AXDropZoneDropEvent extends NXNativeEvent<AXDropZoneDirective, MouseEvent> {\n dropped: AXDragDirective;\n}\nexport type AXDropZoneHoverEvent = AXDropZoneDropEvent & { state: 'enter' | 'leave' };\n\n@Directive({\n selector: '[axDropZone]',\n exportAs: 'axDropZone',\n})\nexport class AXDropZoneDirective extends NXComponent implements OnInit {\n dropZoneGroup = input<string>();\n\n isHovered = signal(false);\n readonly element = signal(this.nativeElement);\n\n onElementDrop = output<AXDropZoneDropEvent>();\n onElementHover = output<AXDropZoneHoverEvent>();\n\n ngOnInit(): void {\n this.element().dataset['axDropZone'] = 'true';\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AXDragHandleDirective } from './drag-handle.directive';\nimport { AXDragDirective } from './drag.directive';\nimport { AXDropListDirective } from './drop-list.directive';\nimport { AXDropZoneDirective } from './drop-zone.directive';\n\nconst COMPONENT = [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective];\n\n@NgModule({\n imports: [...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDragDropModule {}\n","import { clamp } from 'lodash-es';\n\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nexport function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n\n if (from === to) {\n return;\n }\n\n const target = array[from];\n const delta = to < from ? -1 : 1;\n\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n\n array[to] = target;\n}\n\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nexport function transferArrayItem<T = any>(\n currentArray: T[],\n targetArray: T[],\n currentIndex: number,\n targetIndex: number,\n): void {\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAKa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC;AAC/C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa;oFAAC;AACjD,IAAA;8GAHY,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CA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AAe,EAAA;AACrF,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAC/C,IAAA,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AAE3C,IAAA,IAAI,IAAI,KAAK,EAAE,EAAE;QACf;IACF;AAEA,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC;AAC1B,IAAA,MAAM,KAAK,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC;AAEhC,IAAA,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE;QACvC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC;IAC7B;AAEA,IAAA,KAAK,CAAC,EAAE,CAAC,GAAG,MAAM;AACpB;AAEA;;;;;;AAMG;AACG,SAAU,iBAAiB,CAC/B,YAAiB,EACjB,WAAgB,EAChB,YAAoB,EACpB,WAAmB,EAAA;AAEnB,IAAA,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;IACzD,MAAM,EAAE,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC;AAEjD,IAAA,IAAI,YAAY,CAAC,MAAM,EAAE;AACvB,QAAA,WAAW,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5D;AACF;;AC7CA;;AAEG;;"}
1
+ {"version":3,"file":"acorex-cdk-drag-drop.mjs","sources":["../../../../packages/cdk/drag-drop/src/lib/drag-parent.ts","../../../../packages/cdk/drag-drop/src/lib/drag-handle.directive.ts","../../../../packages/cdk/drag-drop/src/lib/drop-list.directive.ts","../../../../packages/cdk/drag-drop/src/lib/drag.directive.ts","../../../../packages/cdk/drag-drop/src/lib/drop-zone.directive.ts","../../../../packages/cdk/drag-drop/src/lib/drag-drop.module.ts","../../../../packages/cdk/drag-drop/src/lib/drag-drop.utils.ts","../../../../packages/cdk/drag-drop/src/acorex-cdk-drag-drop.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { AXDragHandleDirective } from './drag-handle.directive';\n\n/**\n * Parent drag instance that nested `axDragHandle` directives register with.\n * Provided by `AXDragDirective` so handles work inside dynamically created content.\n */\nexport const AX_DRAG_PARENT = new InjectionToken<AXDragParent>('AX_DRAG_PARENT');\n\nexport interface AXDragParent {\n registerHandle(handle: AXDragHandleDirective | HTMLElement): void;\n unregisterHandle(handle: AXDragHandleDirective | HTMLElement): void;\n}\n","import { DestroyRef, Directive, ElementRef, inject, signal } from '@angular/core';\nimport { AX_DRAG_PARENT } from './drag-parent';\n\n@Directive({\n selector: '[axDragHandle]',\n})\nexport class AXDragHandleDirective {\n private el = inject(ElementRef<HTMLElement>);\n private parent = inject(AX_DRAG_PARENT, { optional: true });\n readonly element = signal(this.el.nativeElement);\n\n constructor() {\n this.parent?.registerHandle(this);\n inject(DestroyRef).onDestroy(() => this.parent?.unregisterHandle(this));\n }\n}\n","import { NXComponent, NXNativeEvent } from '@acorex/cdk/common';\nimport { AXHtmlUtil } from '@acorex/core/utils';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n AfterContentInit,\n ChangeDetectorRef,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n linkedSignal,\n NgZone,\n OnDestroy,\n OnInit,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n} from '@angular/core';\nimport { AXDragDirective } from './drag.directive';\n\n/** Describes the cached geometric data of a draggable item within the list. */\ninterface DropListItemData {\n item: AXDragDirective;\n element: HTMLElement;\n initialRect: DOMRect;\n width: number;\n height: number;\n margins: { top: number; bottom: number; left: number; right: number };\n}\n\n/** Event object emitted when an item is dropped into a drop list. */\nexport interface AXDropListDroppedEvent extends NXNativeEvent<AXDropListDirective, MouseEvent> {\n item: AXDragDirective;\n currentIndex: number;\n previousIndex: number;\n container: AXDropListDirective;\n previousContainer: AXDropListDirective;\n}\n\n/**\n * @Directive axDropList\n *\n * Manages a list of draggable items (`axDrag`), enabling sorting within the list\n * and transferring items between compatible lists. It handles the visual shifting\n * of items during a drag operation to provide a clear preview of the drop location.\n *\n * This directive automatically detects `gap` from flexbox/grid layouts and handles\n * items with variable sizes and margins.\n */\n@Directive({\n selector: '[axDropList]',\n exportAs: 'axDropList',\n})\nexport class AXDropListDirective extends NXComponent implements OnInit, AfterContentInit, OnDestroy {\n private readonly _zone = inject(NgZone);\n private readonly _renderer = inject(Renderer2);\n private readonly _cdr = inject(ChangeDetectorRef);\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _hostEl = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // --- Public API: Inputs and Outputs ---\n\n /** Boolean input matching the directive selector name for conditional application. */\n axDropList = input(true, { transform: (value: boolean | string) => value === '' || value === true });\n /** Whether sorting within this list is disabled. */\n sortingDisabled = input(false);\n /** The group this drop list belongs to. Dragging is only allowed between lists of the same group. */\n dropListGroup = input<string>();\n /** The layout orientation of the list. */\n dropListOrientation = input<'horizontal' | 'vertical'>('vertical');\n /** Emits when an item is dropped into the list. */\n dropListDropped = output<AXDropListDroppedEvent>();\n /** Emits when the sort preview transforms change during an active drag. */\n sortPreviewChanged = output<void>();\n\n /** The `axDrag` directives that are direct children of this list. */\n readonly _draggableItems = contentChildren(AXDragDirective, { descendants: false });\n\n // --- Internal State Management ---\n\n /** The native element of the drop list. */\n readonly element = this._hostEl.nativeElement;\n\n /** The draggable item currently being moved over this list. */\n private readonly _activeDragItem = signal<AXDragDirective | null>(null);\n /** The calculated index where the placeholder/item should be. */\n private readonly _placeholderIndex = signal(-1);\n /** A snapshot of the items' data and geometry at the start of the drag. */\n private readonly _cachedItems = signal<readonly DropListItemData[]>([]);\n /** The list's initial bounding box, used to calculate scroll delta. */\n private readonly _listInitialRect = signal<DOMRect | null>(null);\n /** The detected `gap` of the list for the current orientation. */\n private readonly _listGap = signal(0);\n /** Whether the list is in RTL direction (cached at drag start). */\n private readonly _isRtl = signal(false);\n\n /** Internal orientation state; can be overridden programmatically by host components. */\n readonly orientation = linkedSignal(() => this.dropListOrientation());\n /** Internal sorting-disabled state; can be overridden programmatically by host components. */\n readonly isSortingDisabled = linkedSignal(() => this.sortingDisabled());\n\n /** DOM placeholder element for inter-list drags */\n private _placeholderElement: HTMLElement | null = null;\n\n ngOnInit(): void {\n if (isPlatformBrowser(this._platformId)) {\n this.element.dataset['axDropList'] = 'true';\n this.element.classList.add('ax-drop-list-sorting-transition');\n // Store reference to this directive instance on the element for drag directive access\n (this.element as HTMLElement & { __axContext__?: AXDropListDirective })['__axContext__'] = this;\n }\n }\n\n ngAfterContentInit(): void {\n this._cdr.detectChanges();\n }\n\n ngOnDestroy(): void {\n // Clean up placeholder element if directive destroyed during drag\n this._removePlaceholderElement();\n }\n\n // --- Public Methods (for internal library use) ---\n\n /** Checks if the given drag item is the one currently active in this list. */\n isDragActiveForThisList(dragItem: AXDragDirective): boolean {\n return this._activeDragItem() === dragItem;\n }\n\n /** Whether the list is horizontal and in RTL direction. */\n private isHorizontalRtl(): boolean {\n return this.orientation() === 'horizontal' && this._isRtl();\n }\n\n /**\n * Prepares the list for sorting when a drag operation starts from within this list.\n * @param dragItem The item that is being dragged.\n */\n prepareSort(dragItem: AXDragDirective): void {\n if (!this.axDropList() || this.isSortingDisabled() || this._activeDragItem() || dragItem.isDragDisabled()) return;\n\n this._activeDragItem.set(dragItem);\n this.element.classList.add('ax-drop-list-sorting-active');\n\n requestAnimationFrame(() => {\n this._zone.run(() => {\n this._cacheGeometry();\n const placeholderIdx = this._cachedItems().findIndex((data) => data.item === dragItem);\n this._placeholderIndex.set(placeholderIdx);\n });\n });\n }\n\n /**\n * Prepares the list for receiving an item that started dragging from another list.\n * @param dragItem The item entering this list.\n */\n enter(dragItem: AXDragDirective): void {\n if (!this.axDropList() || this.isSortingDisabled() || this.isDragActiveForThisList(dragItem)) return;\n\n // Clean up any existing placeholder from previous list\n this._removePlaceholderElement();\n\n this._activeDragItem.set(dragItem);\n this.element.classList.add('ax-drop-list-sorting-active');\n requestAnimationFrame(() => this._zone.run(() => this._cacheGeometry()));\n }\n\n /**\n * Calculates the new placeholder index based on the pointer's position and applies visual shifts.\n * @param event The pointer move event.\n * @param dragItem The item being dragged.\n */\n sort(event: PointerEvent, dragItem: AXDragDirective): void {\n if (\n !this.axDropList() ||\n !this.isDragActiveForThisList(dragItem) ||\n this.isSortingDisabled() ||\n !this._listInitialRect()\n )\n return;\n\n const pointerPosition = this.orientation() === 'vertical' ? event.clientY : event.clientX;\n const newPlaceholderIndex = this._calculatePlaceholderIndex(pointerPosition);\n\n if (this._placeholderIndex() !== newPlaceholderIndex) {\n this._placeholderIndex.set(newPlaceholderIndex);\n this._applyVisualShifts();\n }\n }\n\n /**\n * Finalizes the drop, emits the drop event, and resets the list's state.\n * @param event The pointer up event.\n * @param droppedItem The item that was dropped.\n * @param sourceList The list where the drag originated.\n */\n finalizeSort(event: PointerEvent, droppedItem: AXDragDirective, sourceList: AXDropListDirective): void {\n if (!this.axDropList() || !this.isDragActiveForThisList(droppedItem) || this.isSortingDisabled()) {\n this.resetSortStateAndStyles(sourceList);\n return;\n }\n\n const activeItem = this._activeDragItem();\n const targetSlotIndex = this._placeholderIndex();\n if (!activeItem || targetSlotIndex === -1) {\n this.resetSortStateAndStyles(sourceList);\n return;\n }\n\n const previousIndex = sourceList._cachedItems().findIndex((d) => d.item === activeItem);\n // Adjust the index for array mutation if moving an item to a later position in the same list.\n const currentIndex =\n sourceList === this && previousIndex !== -1 && targetSlotIndex > previousIndex\n ? targetSlotIndex - 1\n : targetSlotIndex;\n\n this.dropListDropped.emit({\n nativeEvent: event,\n sender: this,\n item: activeItem,\n previousIndex,\n currentIndex,\n container: this,\n previousContainer: sourceList,\n });\n\n this.resetSortStateAndStyles(sourceList);\n }\n\n /** Resets the transforms on all items and cancels the current sort operation. */\n cancelSort(dragItem?: AXDragDirective): void {\n if (dragItem && !this.isDragActiveForThisList(dragItem)) return;\n this._resetAllTransforms();\n this.resetSortState();\n }\n\n /** Resets transforms but keeps the active state, used when moving between lists. */\n cancelSortPreview(): void {\n if (!this._activeDragItem()) return;\n this._resetAllTransforms();\n const originalIndex = this._cachedItems().findIndex((d) => d.item === this._activeDragItem());\n this._placeholderIndex.set(originalIndex > -1 ? originalIndex : -1);\n }\n\n // --- Private Helper Methods ---\n\n /** Caches the geometry of the list and its items at the start of a drag. */\n private _cacheGeometry(): void {\n this._listInitialRect.set(this.element.getBoundingClientRect());\n this._isRtl.set(AXHtmlUtil.isRtl(this.element));\n this._detectAndCacheListGap();\n\n const items = [...this._draggableItems()]\n .sort((a, b) =>\n a.element().compareDocumentPosition(b.element()) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1,\n )\n .map((itemDraggable) => {\n const el = itemDraggable.element();\n const style = window.getComputedStyle(el);\n const rect = el.getBoundingClientRect();\n return {\n item: itemDraggable,\n element: el,\n initialRect: rect,\n width: rect.width,\n height: rect.height,\n margins: {\n top: parseFloat(style.marginTop),\n bottom: parseFloat(style.marginBottom),\n left: parseFloat(style.marginLeft),\n right: parseFloat(style.marginRight),\n },\n };\n });\n this._cachedItems.set(items);\n }\n\n /** Detects and caches the `gap` property from the list's computed styles. */\n private _detectAndCacheListGap(): void {\n const listStyle = window.getComputedStyle(this.element);\n const gapValue = listStyle.getPropertyValue('gap');\n if (gapValue && gapValue !== 'normal') {\n const gapParts = gapValue.split(' ');\n const rowGap = parseFloat(gapParts[0]);\n const columnGap = parseFloat(gapParts[1] || gapParts[0]);\n this._listGap.set(this.orientation() === 'vertical' ? rowGap : columnGap);\n } else {\n this._listGap.set(0);\n }\n }\n\n /**\n * Determines the new placeholder index by comparing the pointer position against the\n * midpoints of the other items in the list.\n * @param pointerPosition The clientX or clientY of the pointer.\n * @returns The calculated placeholder index.\n */\n private _calculatePlaceholderIndex(pointerPosition: number): number {\n const activeItem = this._activeDragItem();\n const listRect = this._listInitialRect();\n if (!activeItem || !listRect) return -1;\n\n const cachedItems = this._cachedItems();\n const originalIndex = cachedItems.findIndex((d) => d.item === activeItem);\n const siblings = cachedItems.filter((d) => d.item !== activeItem);\n const scrollDelta =\n this.orientation() === 'vertical'\n ? this.element.getBoundingClientRect().top - listRect.top\n : this.element.getBoundingClientRect().left - listRect.left;\n\n let newIndexInSiblings = -1;\n for (let i = 0; i < siblings.length; i++) {\n const sibling = siblings[i];\n const itemMidPoint =\n (this.orientation() === 'vertical' ? sibling.initialRect.top : sibling.initialRect.left) +\n scrollDelta +\n (this.orientation() === 'vertical' ? sibling.height : sibling.width) / 2;\n\n const isBeforeSibling = this.isHorizontalRtl()\n ? pointerPosition > itemMidPoint\n : pointerPosition < itemMidPoint;\n if (isBeforeSibling) {\n newIndexInSiblings = i;\n break;\n }\n }\n\n if (newIndexInSiblings === -1) {\n newIndexInSiblings = siblings.length;\n }\n\n // Map the index from the 'siblings' array back to the original `_cachedItems` array.\n const potentialPlaceholderIndex =\n originalIndex > -1 && newIndexInSiblings >= originalIndex ? newIndexInSiblings + 1 : newIndexInSiblings;\n\n // A drag starting from outside the list doesn't have an original index.\n if (originalIndex === -1) {\n return potentialPlaceholderIndex;\n }\n\n // --- New logic: Prevent crossing disabled items ---\n const start = Math.min(originalIndex, potentialPlaceholderIndex);\n const end = Math.max(originalIndex, potentialPlaceholderIndex);\n\n for (let i = start; i < end; i++) {\n const itemData = cachedItems[i];\n if (itemData.item !== activeItem && itemData.item.isDragDisabled()) {\n // We've hit a disabled \"wall\". Stop the placeholder at the boundary.\n if (potentialPlaceholderIndex > originalIndex) {\n return i; // Dragging down/right: stop *before* the wall.\n } else {\n return i + 1; // Dragging up/left: stop *after* the wall.\n }\n }\n }\n return potentialPlaceholderIndex;\n }\n\n /** Applies visual shifts - uses placeholder for inter-list, transforms for intra-list. */\n private _applyVisualShifts(): void {\n const activeItem = this._activeDragItem();\n const originalIndex = this._cachedItems().findIndex((d) => d.item === activeItem);\n const isIntraListDrag = originalIndex > -1;\n const placeholderIndex = this._placeholderIndex();\n\n // Check if this is an \"onto-node\" drop list (no items, just a drop target)\n const isOntoNodeList = this.element.dataset['dropType'] === 'onto-node';\n\n if (!isIntraListDrag && activeItem && !isOntoNodeList && this._cachedItems().length > 0) {\n // --- INTER-LIST DRAG: Use DOM placeholder for reorder lists with items ---\n this._updatePlaceholderElement(activeItem, placeholderIndex);\n } else {\n // --- INTRA-LIST DRAG: Use transforms (works well for same-list reordering) ---\n this._removePlaceholderElement();\n\n const getItemSpace = (itemData: DropListItemData) =>\n this.orientation() === 'vertical'\n ? itemData.height + itemData.margins.top + itemData.margins.bottom\n : itemData.width + itemData.margins.left + itemData.margins.right;\n\n const draggedItemSize = isIntraListDrag ? getItemSpace(this._cachedItems()[originalIndex]) : 0;\n\n const axisSign = this.isHorizontalRtl() ? -1 : 1;\n\n this._cachedItems().forEach((data, index) => {\n if (data.item.isDragDisabled()) {\n this._renderer.removeStyle(data.element, 'transform');\n return;\n }\n const transform = this._calculateTransform(index, originalIndex, draggedItemSize, getItemSpace);\n const signedTransform = transform * axisSign;\n this._renderer.setStyle(\n data.element,\n 'transform',\n transform\n ? `${this.orientation() === 'vertical' ? 'translateY' : 'translateX'}(${signedTransform}px)`\n : '',\n );\n });\n }\n\n this.sortPreviewChanged.emit();\n }\n\n /** Creates or moves the placeholder element for inter-list drags */\n private _updatePlaceholderElement(activeItem: AXDragDirective, targetIndex: number): void {\n const rect = activeItem.elementRect();\n if (!rect) return;\n\n // Create placeholder as a clone of the dragged element\n if (!this._placeholderElement) {\n // Clone the entire dragged element\n const sourceElement = activeItem.element();\n this._placeholderElement = sourceElement.cloneNode(true) as HTMLElement;\n \n // Mark it as a placeholder\n this._renderer.addClass(this._placeholderElement, 'ax-drop-placeholder');\n this._renderer.addClass(this._placeholderElement, 'ax-drag-placeholder');\n \n // Prevent interaction with cloned content\n this._renderer.setStyle(this._placeholderElement, 'pointerEvents', 'none');\n \n // Add faded styling to indicate it's a placeholder\n this._renderer.setStyle(this._placeholderElement, 'opacity', '0.4');\n this._renderer.setStyle(this._placeholderElement, 'transition', 'all 200ms ease');\n }\n\n // Insert/move placeholder at target index\n const items = this._cachedItems();\n if (targetIndex >= 0 && targetIndex < items.length) {\n const targetItem = items[targetIndex];\n if (targetItem && targetItem.element) {\n this._renderer.insertBefore(this.element, this._placeholderElement, targetItem.element);\n } else {\n // Fallback: append at end if target item invalid\n this._renderer.appendChild(this.element, this._placeholderElement);\n }\n } else {\n // Insert at end\n this._renderer.appendChild(this.element, this._placeholderElement);\n }\n }\n\n /** Removes the placeholder element if it exists */\n private _removePlaceholderElement(): void {\n if (this._placeholderElement) {\n this._renderer.removeChild(this.element, this._placeholderElement);\n this._placeholderElement = null;\n }\n }\n\n /**\n * Calculates the required transform in pixels for a single item.\n * @param index The index of the item to transform.\n * @param originalIndex The original index of the dragged item (-1 if from another list).\n * @param draggedItemSize The size (including margins) of the item being dragged.\n * @param getItemSpace A helper function to get an item's size including margins.\n * @returns The transform value in pixels.\n */\n private _calculateTransform(\n index: number,\n originalIndex: number,\n draggedItemSize: number,\n getItemSpace: (item: DropListItemData) => number,\n ): number {\n const targetIndex = this._placeholderIndex();\n const listGap = this._listGap();\n\n if (originalIndex > -1) {\n // --- Intra-list Drag ---\n if (index === originalIndex) {\n // The dragged item moves by the sum of the sizes of the items it passes over, PLUS the gaps between them.\n let offset = 0;\n if (targetIndex > originalIndex) {\n // Dragging down/right\n for (let i = originalIndex + 1; i < targetIndex; i++) {\n offset += getItemSpace(this._cachedItems()[i]) + listGap;\n }\n } else {\n // Dragging up/left\n for (let i = targetIndex; i < originalIndex; i++) {\n offset -= getItemSpace(this._cachedItems()[i]) + listGap;\n }\n }\n return offset;\n } else {\n // It's a sibling item that needs to make space.\n // It moves by the size of the dragged item, plus ONE gap to fill the void.\n const shift = draggedItemSize + listGap;\n if (originalIndex < targetIndex && index > originalIndex && index < targetIndex) {\n return -shift;\n } else if (originalIndex > targetIndex && index >= targetIndex && index < originalIndex) {\n return shift;\n }\n }\n } else {\n // --- Inter-list Drag (from another list) ---\n if (index >= targetIndex) {\n // An item from another list enters. Siblings shift by its size plus ONE gap.\n return draggedItemSize + listGap;\n }\n }\n return 0;\n }\n\n /** Resets the state of this list and the source list after a drop. */\n private resetSortStateAndStyles(sourceList: AXDropListDirective): void {\n const listsToReset = new Set([this, sourceList]);\n listsToReset.forEach((list) => {\n if (list) {\n list._resetAllTransforms();\n list.resetSortState();\n }\n });\n }\n\n /** Removes all `transform` styles from the items in this list. */\n private _resetAllTransforms(): void {\n this._cachedItems().forEach((data) => this._renderer.setStyle(data.element, 'transform', ''));\n this._removePlaceholderElement(); // Clean up inter-list placeholder\n this.sortPreviewChanged.emit();\n }\n\n /** Resets the internal state of the directive to its initial values. */\n resetSortState(): void {\n this.element.classList.remove('ax-drop-list-sorting-active');\n this._activeDragItem.set(null);\n this._cachedItems.set([]);\n this._placeholderIndex.set(-1);\n this._listInitialRect.set(null);\n this._listGap.set(0);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectorRef,\n DOCUMENT,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n NgZone,\n OnDestroy,\n OnInit,\n PLATFORM_ID,\n Renderer2,\n RendererStyleFlags2,\n TemplateRef,\n ViewContainerRef,\n computed,\n effect,\n inject,\n input,\n linkedSignal,\n output,\n signal,\n} from '@angular/core';\nimport { clamp } from 'lodash-es';\nimport { AXDragHandleDirective } from './drag-handle.directive';\nimport { AX_DRAG_PARENT, AXDragParent } from './drag-parent';\nimport { AXDropListDirective } from './drop-list.directive';\nimport { AXDropZoneDirective } from './drop-zone.directive';\n\ntype AXPositionType = { x: number; y: number };\n\n// Zone detection constants for nested drop lists (tree nodes)\nconst ZONE_TOP_THRESHOLD = 0.3; // Top 30% triggers reorder BEFORE\nconst ZONE_BOTTOM_THRESHOLD = 0.7; // Bottom 30% triggers reorder AFTER\n// Middle 40% (between thresholds) triggers drop INTO\n\n@Directive({\n selector: '[axDrag]',\n providers: [{ provide: AX_DRAG_PARENT, useExisting: AXDragDirective }],\n})\nexport class AXDragDirective implements OnInit, OnDestroy, AXDragParent {\n private zone = inject(NgZone);\n private document = inject(DOCUMENT);\n private renderer = inject(Renderer2);\n private cdr = inject(ChangeDetectorRef);\n private platformId = inject(PLATFORM_ID);\n private viewContainerRef = inject(ViewContainerRef);\n private el = inject<ElementRef<HTMLElement>>(ElementRef);\n private registeredHandleElements = signal<HTMLElement[]>([]);\n\n axDrag = input(true, { transform: (value: boolean | string) => value === '' || value === true });\n dragData = input();\n dragDisabled = input(false);\n dragTransition = input(true);\n dragElementClone = input(false);\n dropZoneGroup = input<string>();\n dragStartDelay = input<number>();\n dragResetOnDblClick = input(true);\n dragLockAxis = input<'x' | 'y' | null>(null);\n dragClonedTemplate = input<TemplateRef<unknown>>();\n dragCursor = input<'move' | 'grab' | 'grab-on-drag' | 'none'>('move');\n dragBoundary = input<string | ElementRef<HTMLElement> | HTMLElement>();\n dragTransitionDuration = input<number>(150);\n\n readonly isDragDisabled = linkedSignal(() => this.dragDisabled());\n readonly lockAxis = linkedSignal(() => this.dragLockAxis());\n readonly dragBoundaryOverride = linkedSignal<\n string | ElementRef<HTMLElement> | HTMLElement | null | undefined\n >(() => this.dragBoundary());\n readonly startDelay = linkedSignal(() => this.dragStartDelay() ?? 0);\n readonly dragTouchAction = linkedSignal<'none' | 'pan-x' | 'pan-y'>(() => 'none');\n readonly dragCursorOverride = linkedSignal<'move' | 'grab' | 'grab-on-drag' | 'none'>(() => this.dragCursor());\n\n dragPositionChanged = output<AXPositionType>();\n\n isMoving = signal<boolean>(false);\n clonedElement = signal<HTMLElement | null>(null);\n currentAxis = signal<AXPositionType>({ x: 0, y: 0 });\n currentCloneAxis = signal<AXPositionType>({ x: 0, y: 0 });\n transitionDuration = linkedSignal(() => this.dragTransitionDuration());\n readonly element = signal<HTMLElement>(this.el.nativeElement);\n private dragStartTime = signal<number>(0);\n private isDragging = signal<boolean>(false);\n private elementOpacity = signal<string>('1');\n private movedAfterDelay = signal<boolean>(false);\n private activePointerId = signal<number | null>(null);\n private prevDropZone = signal<AXDropZoneDirective | null>(null);\n private dragStartOffset = signal<AXPositionType>({ x: 0, y: 0 });\n private pointerDownPosition = signal<AXPositionType>({ x: 0, y: 0 });\n private clonePointerOffset = signal<AXPositionType>({ x: 0, y: 0 });\n private clonedElementViewRef = signal<EmbeddedViewRef<unknown> | null>(null);\n private rafId: number | null = null;\n private pendingPointerEvent: PointerEvent | null = null;\n private savedBodyCursor: string | null = null;\n private holdDelayTimer: ReturnType<typeof setTimeout> | null = null;\n private holdDelayReady = signal(false);\n\n private _parentDropList = inject(AXDropListDirective, { optional: true, skipSelf: true, host: false });\n private _currentDropList = signal<AXDropListDirective | null>(null);\n readonly createCloneElement = computed<boolean>(() => this.dragElementClone() || !!this._parentDropList);\n\n private boundaryElement = computed<HTMLElement | null>(() => {\n const boundary = this.dragBoundaryOverride();\n if (!boundary) {\n return null;\n }\n if (typeof boundary === 'string') {\n return this.document.querySelector<HTMLElement>(boundary);\n }\n return boundary instanceof ElementRef ? boundary.nativeElement : boundary;\n });\n\n readonly elementRect = computed(() => {\n if (!isPlatformBrowser(this.platformId)) {\n return null;\n }\n return this.element().getBoundingClientRect();\n });\n\n private boundaryRect = computed(() => {\n if (!isPlatformBrowser(this.platformId)) {\n return null;\n }\n return this.boundaryElement()?.getBoundingClientRect();\n });\n\n private handleElements = computed(() => {\n const registered = this.registeredHandleElements().filter(Boolean);\n return registered.length ? registered : [this.element()];\n });\n\n private handle = computed(() => this.activeHandleElement() ?? this.handleElements()[0] ?? this.element());\n\n private boundHandleDblClick = this.handleDblClick.bind(this);\n private boundHandlePointerUp = this.handlePointerUp.bind(this);\n private boundHandlePointerDown = this.handlePointerDown.bind(this);\n private boundHandlePointerMove = this.handlePointerMove.bind(this);\n private attachedHandleElements: HTMLElement[] = [];\n private styledHandleElements: HTMLElement[] = [];\n private activeHandleElement = signal<HTMLElement | null>(null);\n\n #dragDisabledEffect = effect(() => {\n const cursor = this.dragCursorOverride();\n const disabled = this.isDragDisabled();\n const handles = this.handleElements();\n const moving = this.isMoving();\n const holdReady = this.holdDelayReady();\n\n for (const previous of this.styledHandleElements) {\n if (!handles.includes(previous)) {\n this.renderer.removeStyle(previous, 'cursor');\n this.renderer.removeStyle(previous, 'touch-action');\n }\n }\n this.styledHandleElements = handles;\n\n for (const handle of handles) {\n if (disabled || cursor === 'none' || cursor === 'grab-on-drag') {\n if (!moving && !holdReady) {\n this.renderer.removeStyle(handle, 'cursor');\n }\n if (disabled) {\n this.renderer.removeStyle(handle, 'touch-action');\n } else {\n this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());\n }\n continue;\n }\n\n if (!moving && !holdReady) {\n this.renderer.setStyle(handle, 'cursor', cursor);\n }\n this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());\n }\n });\n\n #handleChangeEffect = effect(() => {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const currentHandles = this.handleElements();\n const previousHandles = this.attachedHandleElements;\n\n for (const previous of previousHandles) {\n if (!currentHandles.includes(previous)) {\n previous.removeEventListener('dblclick', this.boundHandleDblClick);\n previous.removeEventListener('pointerdown', this.boundHandlePointerDown);\n }\n }\n\n this.zone.runOutsideAngular(() => {\n for (const current of currentHandles) {\n if (!previousHandles.includes(current)) {\n current.addEventListener('dblclick', this.boundHandleDblClick);\n current.addEventListener('pointerdown', this.boundHandlePointerDown, { passive: false });\n }\n }\n });\n\n this.attachedHandleElements = currentHandles;\n });\n\n registerHandle(handle: AXDragHandleDirective | HTMLElement): void {\n const element = this.resolveHandleElement(handle);\n if (!element) return;\n this.registeredHandleElements.update((handles) => (handles.includes(element) ? handles : [...handles, element]));\n }\n\n unregisterHandle(handle: AXDragHandleDirective | HTMLElement): void {\n const element = this.resolveHandleElement(handle);\n if (!element) return;\n this.registeredHandleElements.update((handles) => handles.filter((item) => item !== element));\n if (this.activeHandleElement() === element) {\n this.activeHandleElement.set(null);\n }\n }\n\n private resolveHandleElement(handle: AXDragHandleDirective | HTMLElement): HTMLElement | null {\n return handle instanceof HTMLElement ? handle : handle.element();\n }\n\n ngOnInit() {\n if (isPlatformBrowser(this.platformId)) {\n if (this._parentDropList) {\n this.setElementTransition(this.element());\n }\n this.elementOpacity.set(getComputedStyle(this.element()).opacity);\n }\n }\n\n ngOnDestroy() {\n if (isPlatformBrowser(this.platformId)) {\n for (const handle of this.attachedHandleElements) {\n handle.removeEventListener('dblclick', this.boundHandleDblClick);\n handle.removeEventListener('pointerdown', this.boundHandlePointerDown);\n }\n this.attachedHandleElements = [];\n this.removeDocumentListeners();\n if (this.createCloneElement()) {\n this.removeCloneElement();\n }\n if (this._parentDropList && this.isDragging()) {\n this._parentDropList.cancelSort();\n }\n this.clearActiveDragCursor();\n this.clearHoldDelayTimer();\n this.renderer.removeStyle(this.element(), 'z-index');\n }\n }\n\n private usesGrabDragCursor(): boolean {\n const cursor = this.dragCursorOverride();\n return cursor === 'grab' || cursor === 'grab-on-drag';\n }\n\n private resolveDropCursor(canDrop: boolean): string {\n if (this.usesGrabDragCursor()) {\n return canDrop ? 'grabbing' : 'not-allowed';\n }\n return canDrop ? 'move' : 'not-allowed';\n }\n\n private setActiveDragCursor(cursor: string): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n if (this.savedBodyCursor === null) {\n this.savedBodyCursor = this.document.body.style.cursor;\n }\n this.document.body.style.cursor = cursor;\n }\n\n private clearActiveDragCursor(): void {\n if (!isPlatformBrowser(this.platformId) || this.savedBodyCursor === null) return;\n\n this.document.body.style.cursor = this.savedBodyCursor;\n this.savedBodyCursor = null;\n }\n\n private clearHoldDelayTimer(): void {\n if (this.holdDelayTimer !== null) {\n clearTimeout(this.holdDelayTimer);\n this.holdDelayTimer = null;\n }\n this.holdDelayReady.set(false);\n }\n\n private scheduleHoldDelayFeedback(): void {\n this.clearHoldDelayTimer();\n const delay = this.startDelay();\n const cursorMode = this.dragCursorOverride();\n if (delay <= 0 || (cursorMode !== 'grab' && cursorMode !== 'grab-on-drag')) {\n return;\n }\n\n const readyCursor = cursorMode === 'grab-on-drag' ? 'grab' : 'grabbing';\n\n this.holdDelayTimer = setTimeout(() => {\n this.holdDelayTimer = null;\n if (!this.isDragging() || this.isMoving() || this.isDragDisabled()) {\n return;\n }\n\n this.holdDelayReady.set(true);\n this.renderer.setStyle(this.handle(), 'cursor', readyCursor);\n this.setActiveDragCursor(readyCursor);\n }, delay);\n }\n\n private setElementDropCursor(element: HTMLElement, cursor: string): void {\n this.renderer.setStyle(element, 'cursor', cursor);\n }\n\n private setElementTransition(element: HTMLElement) {\n this.renderer.setStyle(element, 'transition-property', 'transform, opacity, translate');\n this.renderer.setStyle(\n element,\n 'transition-duration',\n `var(--ax-sys-transition-duration,${this.transitionDuration()}ms)`,\n );\n this.renderer.setStyle(element, 'transition-timing-function', 'var(--ax-sys-transition-timing-function)');\n }\n\n private removeElementTransition(element: HTMLElement) {\n this.renderer.setStyle(element, 'transition-property', 'opacity');\n }\n\n private handlePointerDown(e: PointerEvent) {\n if (!isPlatformBrowser(this.platformId)) return;\n if (!this.axDrag() || this.isDragDisabled() || e.button !== 0 || this._parentDropList?.isSortingDisabled()) return;\n\n const handle = e.currentTarget instanceof HTMLElement ? e.currentTarget : this.handle();\n this.activeHandleElement.set(handle);\n\n this.isDragging.set(true);\n this.movedAfterDelay.set(false);\n\n if (this.dragCursorOverride() === 'move') {\n this.renderer.setStyle(handle, 'cursor', 'move');\n }\n\n this.dragStartOffset.set({ x: e.clientX - this.currentAxis().x, y: e.clientY - this.currentAxis().y });\n this.pointerDownPosition.set({ x: e.clientX, y: e.clientY });\n this.renderer.setStyle(handle, 'userSelect', 'none');\n this.activePointerId.set(e.pointerId);\n this.addDocumentListeners();\n\n this.dragStartTime.set(Date.now());\n this.scheduleHoldDelayFeedback();\n }\n\n private handleDblClick() {\n if (!this.dragResetOnDblClick() || this.isDragDisabled()) return;\n this.setPosition(0, 0);\n }\n\n private handlePointerMove(e: PointerEvent) {\n if (!this.isDragging() || !isPlatformBrowser(this.platformId) || e.pointerId !== this.activePointerId()) {\n return;\n }\n\n if (!this.isMoving()) {\n const delay = this.startDelay();\n const down = this.pointerDownPosition();\n const movedX = e.clientX - down.x;\n const movedY = e.clientY - down.y;\n const movedDistance = Math.sqrt(movedX * movedX + movedY * movedY);\n\n if (delay > 0 && !this.holdDelayReady() && Date.now() - this.dragStartTime() < delay) {\n if (movedDistance > 8) {\n this.abortDragSequence();\n }\n return;\n }\n\n e.preventDefault();\n this.isMoving.set(true);\n this.handle().setPointerCapture(e.pointerId);\n this.startDrag(e);\n } else {\n e.preventDefault();\n }\n\n // Run position updates outside Angular zone for better performance\n this.zone.runOutsideAngular(() => {\n if (this.createCloneElement()) {\n const newCloneX = e.clientX - this.clonePointerOffset().x;\n const newCloneY = e.clientY - this.clonePointerOffset().y;\n this.setClonePosition(newCloneX, newCloneY);\n } else {\n const newX = e.clientX - this.dragStartOffset().x;\n const newY = e.clientY - this.dragStartOffset().y;\n this.setPosition(newX, newY);\n }\n });\n\n // Throttle drop list interactions using requestAnimationFrame\n if (this._parentDropList) {\n this.pendingPointerEvent = e;\n if (this.rafId === null) {\n this.rafId = requestAnimationFrame(() => {\n if (this.pendingPointerEvent) {\n this.handleDropListInteractions(this.pendingPointerEvent);\n this.pendingPointerEvent = null;\n }\n this.rafId = null;\n });\n }\n } else {\n this.dropZoneHoverHandler(e);\n }\n }\n\n private abortDragSequence(): void {\n this.clearHoldDelayTimer();\n this.isDragging.set(false);\n this.isMoving.set(false);\n this.activePointerId.set(null);\n this.removeDocumentListeners();\n this.renderer.removeStyle(this.handle(), 'userSelect');\n this.resetHandleCursorAfterDrag();\n this.clearActiveDragCursor();\n this.activeHandleElement.set(null);\n }\n\n private resetHandleCursorAfterDrag(): void {\n const cursorMode = this.dragCursorOverride();\n if (cursorMode === 'grab') {\n this.renderer.setStyle(this.handle(), 'cursor', 'grab');\n } else if (cursorMode === 'grab-on-drag') {\n this.renderer.removeStyle(this.handle(), 'cursor');\n }\n }\n\n private startDrag(e: PointerEvent) {\n if (this.usesGrabDragCursor()) {\n this.renderer.setStyle(this.handle(), 'cursor', 'grabbing');\n this.setActiveDragCursor('grabbing');\n }\n\n this.renderer.setStyle(this.element(), 'z-index', '1');\n\n // Add CDK-style classes\n this.renderer.addClass(this.element(), 'ax-dragging');\n this.renderer.addClass(this.element(), 'ax-drag-placeholder');\n\n if (this._parentDropList) {\n this._currentDropList.set(this._parentDropList);\n this._parentDropList.prepareSort(this);\n } else {\n this.dropZoneHoverHandler(e);\n }\n\n if (this.createCloneElement()) {\n const elementRect = this.element().getBoundingClientRect();\n this.clonePointerOffset.set({\n x: e.clientX - elementRect.left,\n y: e.clientY - elementRect.top,\n });\n const clone = this.createCloneElementHandler(this.element());\n if (clone) {\n this.renderer.addClass(clone, 'ax-drag-preview');\n this.renderer.addClass(clone, 'ax-dragging');\n }\n }\n }\n\n private handlePointerUp(e: PointerEvent) {\n if (e.pointerId !== this.activePointerId() || !isPlatformBrowser(this.platformId) || !this.isDragging()) {\n return;\n }\n\n this.clearHoldDelayTimer();\n\n this.resetHandleCursorAfterDrag();\n this.clearActiveDragCursor();\n\n const wasMoving = this.isMoving();\n this.isMoving.set(false);\n this.isDragging.set(false);\n\n // Remove CDK-style classes\n this.renderer.removeClass(this.element(), 'ax-dragging');\n this.renderer.removeClass(this.element(), 'ax-drag-placeholder');\n\n if (!wasMoving) {\n this.activePointerId.set(null);\n this.removeDocumentListeners();\n this._currentDropList.set(null);\n this.renderer.removeStyle(this.handle(), 'userSelect');\n this.activeHandleElement.set(null);\n return;\n }\n\n this.renderer.removeStyle(this.element(), 'z-index');\n this.preventClicking();\n\n const transform = this.element().style.transform;\n let x = 0;\n let y = 0;\n if (transform) {\n x = Number(transform.split('translateX(')[1]?.split('px)')[0]);\n y = Number(transform.split('translateY(')[1]?.split('px)')[0]);\n }\n\n const droppedIntoList = this._currentDropList();\n if (droppedIntoList && this._parentDropList) {\n droppedIntoList.finalizeSort(e, this, this._parentDropList);\n } else if (this._parentDropList) {\n this._parentDropList.cancelSort(this);\n } else {\n this.dropZoneDropHandler(e);\n }\n\n // Cancel any pending RAF callbacks\n if (this.rafId !== null) {\n cancelAnimationFrame(this.rafId);\n this.rafId = null;\n }\n this.pendingPointerEvent = null;\n\n this.activePointerId.set(null);\n this.removeDocumentListeners();\n this._currentDropList.set(null);\n this.renderer.removeStyle(this.handle(), 'userSelect');\n this.activeHandleElement.set(null);\n\n if (this.createCloneElement()) {\n const listUnderPointer = this.getDropListFromPoint(e.clientX, e.clientY);\n this.removeCloneElementWithAnimation(x || 0, y || 0, listUnderPointer);\n } else {\n this.renderer.setStyle(this.element(), 'opacity', this.elementOpacity());\n }\n }\n\n private preventClicking() {\n const blockClick = (event: MouseEvent) => {\n event.preventDefault();\n event.stopPropagation();\n };\n this.document.addEventListener('click', blockClick, { capture: true, once: true });\n }\n\n private handleDropListInteractions(e: PointerEvent) {\n const listUnderPointer = this.getDropListFromPoint(e.clientX, e.clientY);\n const previousList = this._currentDropList();\n let targetList: AXDropListDirective | null = null;\n const canDrop = listUnderPointer && this.canDropInList(listUnderPointer);\n\n if (canDrop) {\n targetList = listUnderPointer;\n }\n\n // Update cursor based on whether drop is allowed\n if (listUnderPointer) {\n const cloneEl = this.clonedElement();\n const cursor = this.resolveDropCursor(!!canDrop);\n if (this.usesGrabDragCursor()) {\n this.setActiveDragCursor(cursor);\n } else if (cloneEl) {\n this.setElementDropCursor(cloneEl, cursor);\n } else {\n this.setElementDropCursor(this.element(), cursor);\n }\n }\n\n if (targetList !== previousList) {\n if (previousList) {\n previousList.cancelSortPreview();\n if (previousList !== this._parentDropList) {\n previousList.resetSortState();\n }\n }\n if (targetList) {\n targetList.enter(this);\n }\n this._currentDropList.set(targetList);\n }\n\n this._currentDropList()?.sort(e, this);\n }\n\n private canDropInList(list: AXDropListDirective): boolean {\n if (!list || list.isSortingDisabled() || !this._parentDropList) {\n return false;\n }\n if (list === this._parentDropList) {\n return true;\n }\n const dragGroup = this._parentDropList.dropListGroup();\n const targetGroup = list.dropListGroup();\n\n if (!dragGroup || dragGroup !== targetGroup) {\n return false;\n }\n\n // Check for circular reference (tree-specific validation)\n const draggedNode = this.dragData();\n const targetNodeId = list.element.getAttribute('data-node-id');\n\n if (draggedNode && this.isCircularReference(targetNodeId, draggedNode)) {\n return false;\n }\n\n return true;\n }\n\n private isCircularReference(targetNodeId: string | null, draggedNode: unknown): boolean {\n if (!draggedNode || typeof draggedNode !== 'object') {\n return false;\n }\n\n const node = draggedNode as { id?: string; children?: unknown[] };\n\n // Check if dropping into itself\n if (targetNodeId === node.id) {\n return true;\n }\n\n // Check if targetNodeId is in draggedNode's descendants\n if (!node.children || !Array.isArray(node.children)) {\n return false;\n }\n\n for (const child of node.children) {\n const childNode = child as { id?: string };\n if (childNode.id === targetNodeId) {\n return true;\n }\n if (this.isCircularReference(targetNodeId, child)) {\n return true;\n }\n }\n\n return false;\n }\n\n private dropZoneHoverHandler(e: PointerEvent) {\n const dropZones = this.getDropZonesFromPoint(e.clientX, e.clientY);\n const dropZone = dropZones[0];\n\n if (!dropZone) {\n if (this.prevDropZone()) {\n this.leavePrevDropZone(e);\n }\n return;\n }\n\n if (this.prevDropZone() && this.prevDropZone() !== dropZone) {\n this.leavePrevDropZone(e);\n }\n\n if (this.dropZoneValidation(dropZone) && !dropZone.isHovered()) {\n this.prevDropZone.set(dropZone);\n dropZone.onElementHover.emit({ sender: dropZone, dropped: this, nativeEvent: e, state: 'enter' });\n dropZone.isHovered.set(true);\n }\n }\n\n private dropZoneDropHandler(e: PointerEvent) {\n const dropZones = this.getDropZonesFromPoint(e.clientX, e.clientY);\n const dropZone = dropZones[0];\n if (!this.dropZoneValidation(dropZone)) {\n return;\n }\n dropZone.isHovered.set(false);\n dropZone.onElementDrop.emit({ sender: dropZone, dropped: this, nativeEvent: e });\n }\n\n private getDropZonesFromPoint(x: number, y: number): AXDropZoneDirective[] {\n const elements = this.document.elementsFromPoint(x, y);\n\n return elements\n .filter((el): el is HTMLElement => el instanceof HTMLElement && el.dataset['axDropZone'] === 'true')\n .map((el) => el['__axContext__'] as AXDropZoneDirective);\n }\n\n private getDropListFromPoint(x: number, y: number): AXDropListDirective | null {\n const dropListElements = this.document\n .elementsFromPoint(x, y)\n .filter((el): el is HTMLElement => el instanceof HTMLElement && el.dataset['axDropList'] === 'true');\n\n if (dropListElements.length === 0) {\n return null;\n }\n\n // If only one drop list, use it\n if (dropListElements.length === 1) {\n return dropListElements[0]['__axContext__'] as AXDropListDirective;\n }\n\n // Multiple drop lists detected (nested scenario like tree2)\n // Prioritize based on pointer position and drop type\n const ontoNodeList = dropListElements.find((el) => el.dataset['dropType'] === 'onto-node');\n const reorderList = dropListElements.find((el) => el.dataset['dropType'] !== 'onto-node');\n\n // If no special handling needed, return first\n if (!ontoNodeList || !reorderList) {\n return dropListElements[0]['__axContext__'] as AXDropListDirective;\n }\n\n // Calculate pointer position relative to the \"onto-node\" element\n const ontoNodeRect = ontoNodeList.getBoundingClientRect();\n const relativeY = y - ontoNodeRect.top;\n const heightRatio = relativeY / ontoNodeRect.height;\n\n // Smart zone detection based on pointer position\n if (heightRatio < ZONE_TOP_THRESHOLD || heightRatio > ZONE_BOTTOM_THRESHOLD) {\n // Top or bottom zone: reorder (drop BEFORE/AFTER node)\n return reorderList['__axContext__'] as AXDropListDirective;\n } else {\n // Center zone: onto-node (drop INTO node as child)\n return ontoNodeList['__axContext__'] as AXDropListDirective;\n }\n }\n\n private dropZoneValidation(dropZone: AXDropZoneDirective): boolean {\n if (!dropZone) return false;\n const dragGroup = this.dropZoneGroup();\n const dropGroup = dropZone.dropZoneGroup();\n if (dropGroup && dragGroup !== dropGroup) {\n return false;\n }\n return true;\n }\n\n private leavePrevDropZone(e: PointerEvent) {\n if (this.prevDropZone()) {\n this.prevDropZone().onElementHover.emit({\n dropped: this,\n state: 'leave',\n nativeEvent: e,\n sender: this.prevDropZone(),\n });\n this.prevDropZone().isHovered.set(false);\n this.prevDropZone.set(null);\n }\n }\n\n setPosition(x: number, y: number) {\n let constrainedX = x;\n let constrainedY = y;\n\n const elementRect = this.elementRect();\n const boundaryRect = this.boundaryRect();\n\n if (boundaryRect && elementRect) {\n const minX = boundaryRect.left - elementRect.left;\n const minY = boundaryRect.top - elementRect.top;\n const maxX = minX + boundaryRect.width - elementRect.width;\n const maxY = minY + boundaryRect.height - elementRect.height;\n constrainedX = clamp(x, minX, maxX);\n constrainedY = clamp(y, minY, maxY);\n }\n\n if (this.lockAxis() === 'x') constrainedY = this.currentAxis().y;\n if (this.lockAxis() === 'y') constrainedX = this.currentAxis().x;\n\n // Direct DOM manipulation without triggering change detection\n this.renderer.setStyle(this.element(), 'translate', `${constrainedX}px ${constrainedY}px`);\n\n // Only update signal and emit if position actually changed significantly (throttle)\n const current = this.currentAxis();\n if (Math.abs(current.x - constrainedX) > 0.5 || Math.abs(current.y - constrainedY) > 0.5) {\n this.currentAxis.set({ x: constrainedX, y: constrainedY });\n this.dragPositionChanged.emit({ x: constrainedX, y: constrainedY });\n }\n }\n\n setClonePosition(x: number, y: number) {\n let constrainedX = x;\n let constrainedY = y;\n\n const cloneEl = this.clonedElement();\n const boundaryRect = this.boundaryRect();\n\n if (boundaryRect && cloneEl) {\n const cloneWidth = cloneEl.offsetWidth;\n const cloneHeight = cloneEl.offsetHeight;\n\n constrainedX = clamp(x, boundaryRect.left, boundaryRect.right - cloneWidth);\n constrainedY = clamp(y, boundaryRect.top, boundaryRect.bottom - cloneHeight);\n }\n\n if (this.lockAxis() === 'x') constrainedY = this.currentCloneAxis().y;\n if (this.lockAxis() === 'y') constrainedX = this.currentCloneAxis().x;\n\n // Direct DOM manipulation without triggering change detection\n this.renderer.setStyle(cloneEl, 'translate', `${constrainedX}px ${constrainedY}px`);\n\n // Only update signal and emit if position actually changed significantly (throttle)\n const current = this.currentCloneAxis();\n if (Math.abs(current.x - constrainedX) > 0.5 || Math.abs(current.y - constrainedY) > 0.5) {\n this.currentCloneAxis.set({ x: constrainedX, y: constrainedY });\n this.dragPositionChanged.emit({ x: constrainedX, y: constrainedY });\n }\n }\n\n private createCloneElementHandler(originalElement: HTMLElement): HTMLElement | null {\n if (!isPlatformBrowser(this.platformId)) {\n this.clonedElement.set(null);\n return null;\n }\n\n let clonedElement: HTMLElement;\n const customTemplate = this.dragClonedTemplate();\n\n const applyComputedStylesRecursive = (source: HTMLElement, target: HTMLElement) => {\n if (!isPlatformBrowser(this.platformId)) return;\n const computedStyles = window.getComputedStyle(source);\n\n if (computedStyles.cssText && target.style.cssText !== undefined) {\n let tempCssText = computedStyles.cssText;\n if (target === clonedElement) {\n tempCssText = tempCssText\n .replace(/position:[^;]+;/gi, '')\n .replace(/top:[^;]+;/gi, '')\n .replace(/left:[^;]+;/gi, '')\n .replace(/right:[^;]+;/gi, '')\n .replace(/bottom:[^;]+;/gi, '')\n .replace(/width:[^;]+;/gi, '')\n .replace(/height:[^;]+;/gi, '')\n .replace(/margin[^;]*:[^;]+;/gi, '')\n .replace(/transition[^;]*:[^;]+;/gi, '')\n .replace(/transform:[^;]+;/gi, '')\n .replace(/translate:[^;]+;/gi, '')\n .replace(/z-index:[^;]+;/gi, '')\n .replace(/opacity:[^;]+;/gi, '');\n }\n tempCssText = tempCssText.replace(/pointer-events:[^;]+;/gi, '');\n target.style.cssText = tempCssText;\n } else {\n for (let i = 0; i < computedStyles.length; i++) {\n const propName = computedStyles[i];\n if (propName === 'pointer-events') {\n continue;\n }\n if (\n target === clonedElement &&\n (propName === 'position' ||\n propName === 'top' ||\n propName === 'left' ||\n propName === 'right' ||\n propName === 'bottom' ||\n propName === 'width' ||\n propName === 'height' ||\n propName.startsWith('margin') ||\n propName.startsWith('transition') ||\n propName === 'transform' ||\n propName === 'translate' ||\n propName === 'z-index' ||\n propName === 'opacity')\n ) {\n continue;\n }\n try {\n target.style.setProperty(\n propName,\n computedStyles.getPropertyValue(propName),\n computedStyles.getPropertyPriority(propName),\n );\n } catch {\n // Some CSS properties cannot be set directly, skip silently\n }\n }\n }\n const sourceChildren = Array.from(source.children);\n const targetChildren = Array.from(target.children);\n for (let i = 0; i < sourceChildren.length; i++) {\n if (sourceChildren[i] instanceof HTMLElement && targetChildren[i] instanceof HTMLElement) {\n applyComputedStylesRecursive(sourceChildren[i] as HTMLElement, targetChildren[i] as HTMLElement);\n }\n }\n };\n\n if (customTemplate) {\n const viewRef = this.viewContainerRef.createEmbeddedView(customTemplate);\n this.clonedElementViewRef.set(viewRef);\n\n if (viewRef.rootNodes.length > 0 && viewRef.rootNodes[0] instanceof HTMLElement) {\n clonedElement = viewRef.rootNodes[0] as HTMLElement;\n\n const viewIndex = this.viewContainerRef.indexOf(viewRef);\n if (viewIndex !== -1) {\n this.viewContainerRef.detach(viewIndex);\n }\n } else {\n if (this.clonedElementViewRef()) {\n this.clonedElementViewRef().destroy();\n this.clonedElementViewRef.set(null);\n }\n console.warn(\n 'AXDragDirective: dragClonedTemplate did not produce a valid HTMLElement root node. Falling back to default cloning.',\n );\n clonedElement = originalElement.cloneNode(true) as HTMLElement;\n applyComputedStylesRecursive(originalElement, clonedElement);\n }\n } else {\n clonedElement = originalElement.cloneNode(true) as HTMLElement;\n applyComputedStylesRecursive(originalElement, clonedElement);\n }\n\n if (clonedElement.id) {\n this.renderer.removeAttribute(clonedElement, 'id');\n }\n this.renderer.setStyle(originalElement, 'opacity', '0.5');\n\n const originalRect = originalElement.getBoundingClientRect();\n this.renderer.setStyle(clonedElement, 'position', 'fixed', RendererStyleFlags2.Important);\n this.renderer.setStyle(clonedElement, 'left', '0px');\n this.renderer.setStyle(clonedElement, 'top', '0px');\n if (!customTemplate) {\n this.renderer.setStyle(clonedElement, 'width', `${originalRect.width}px`);\n this.renderer.setStyle(clonedElement, 'height', `${originalRect.height}px`);\n }\n this.renderer.setStyle(clonedElement, 'margin', '0');\n this.renderer.setStyle(clonedElement, 'box-sizing', 'border-box');\n this.renderer.setStyle(clonedElement, 'opacity', '0.75');\n this.renderer.setStyle(clonedElement, 'z-index', '9999');\n this.renderer.setStyle(clonedElement, 'pointer-events', 'none', RendererStyleFlags2.Important);\n this.renderer.setStyle(clonedElement, 'user-select', 'none');\n this.renderer.setStyle(clonedElement, 'touch-action', 'none');\n\n this.renderer.setStyle(clonedElement, 'translate', `${originalRect.left}px ${originalRect.top}px`);\n this.renderer.removeStyle(clonedElement, 'transition');\n this.renderer.removeStyle(clonedElement, 'transition-property');\n\n this.copyPseudoElementStyles(originalElement, clonedElement, '::before');\n this.copyPseudoElementStyles(originalElement, clonedElement, '::after');\n\n this.renderer.appendChild(this.document.body, clonedElement);\n this.clonedElement.set(clonedElement);\n this.setClonePosition(originalRect.left, originalRect.top);\n\n return clonedElement;\n }\n\n private copyPseudoElementStyles(source: HTMLElement, target: HTMLElement, pseudo: '::before' | '::after'): void {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n const pseudoStyles = window.getComputedStyle(source, pseudo);\n const content = pseudoStyles.getPropertyValue('content');\n const display = pseudoStyles.getPropertyValue('display');\n if (!content || content === 'none' || display === 'none') {\n return;\n }\n const pseudoElement = this.renderer.createElement('span');\n for (let i = 0; i < pseudoStyles.length; i++) {\n const propName = pseudoStyles[i];\n try {\n pseudoElement.style.setProperty(\n propName,\n pseudoStyles.getPropertyValue(propName),\n pseudoStyles.getPropertyPriority(propName),\n );\n } catch (e) {\n // Some properties might fail to set, which is usually fine.\n }\n }\n if (content.startsWith('\"') && content.endsWith('\"')) {\n this.renderer.setProperty(pseudoElement, 'textContent', content.slice(1, -1));\n } else {\n this.renderer.setProperty(pseudoElement, 'textContent', content);\n }\n this.renderer.setStyle(pseudoElement, 'pointer-events', 'none');\n if (pseudo === '::before') {\n this.renderer.insertBefore(target, pseudoElement, target.firstChild);\n } else {\n this.renderer.appendChild(target, pseudoElement);\n }\n }\n\n private removeCloneElementWithAnimation(x: number, y: number, dropList?: AXDropListDirective) {\n dropList?._draggableItems().forEach((item) => {\n this.removeElementTransition(item.element());\n });\n const clone = this.clonedElement();\n if (!clone) return;\n\n this.renderer.setStyle(this.element(), 'opacity', this.elementOpacity());\n\n const elementRect = this.element().getBoundingClientRect();\n if (elementRect) {\n this.setElementTransition(clone);\n this.renderer.setStyle(clone, 'opacity', '0');\n this.setClonePosition(elementRect.left + x, elementRect.top + y);\n }\n\n if (!this.dragTransition()) {\n this.removeCloneElement();\n } else {\n setTimeout(() => {\n this.removeCloneElement();\n dropList?._draggableItems().forEach((item) => {\n this.setElementTransition(item.element());\n });\n }, this.transitionDuration());\n }\n }\n\n private removeCloneElement() {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const clone = this.clonedElement();\n if (clone?.parentNode) {\n // Remove classes before removing element\n this.renderer.removeClass(clone, 'ax-drag-preview');\n this.renderer.removeClass(clone, 'ax-dragging');\n this.renderer.removeChild(clone.parentNode, clone);\n }\n this.clonedElement.set(null);\n\n if (this.clonedElementViewRef()) {\n this.clonedElementViewRef().destroy();\n this.clonedElementViewRef.set(null);\n }\n this.cdr.markForCheck();\n }\n\n private addDocumentListeners(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n this.zone.runOutsideAngular(() => {\n this.document.addEventListener('pointermove', this.boundHandlePointerMove, { passive: false });\n this.document.addEventListener('pointerup', this.boundHandlePointerUp);\n this.document.addEventListener('pointercancel', this.boundHandlePointerUp);\n });\n }\n\n private removeDocumentListeners(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n this.zone.runOutsideAngular(() => {\n this.document.removeEventListener('pointermove', this.boundHandlePointerMove);\n this.document.removeEventListener('pointerup', this.boundHandlePointerUp);\n this.document.removeEventListener('pointercancel', this.boundHandlePointerUp);\n });\n }\n}\n","import { NXComponent, NXNativeEvent } from '@acorex/cdk/common';\nimport { Directive, OnInit, input, output, signal } from '@angular/core';\nimport { AXDragDirective } from './drag.directive';\n\nexport interface AXDropZoneDropEvent extends NXNativeEvent<AXDropZoneDirective, MouseEvent> {\n dropped: AXDragDirective;\n}\nexport type AXDropZoneHoverEvent = AXDropZoneDropEvent & { state: 'enter' | 'leave' };\n\n@Directive({\n selector: '[axDropZone]',\n exportAs: 'axDropZone',\n})\nexport class AXDropZoneDirective extends NXComponent implements OnInit {\n dropZoneGroup = input<string>();\n\n isHovered = signal(false);\n readonly element = signal(this.nativeElement);\n\n onElementDrop = output<AXDropZoneDropEvent>();\n onElementHover = output<AXDropZoneHoverEvent>();\n\n ngOnInit(): void {\n this.element().dataset['axDropZone'] = 'true';\n }\n}\n","import { NgModule } from '@angular/core';\nimport { AXDragHandleDirective } from './drag-handle.directive';\nimport { AXDragDirective } from './drag.directive';\nimport { AXDropListDirective } from './drop-list.directive';\nimport { AXDropZoneDirective } from './drop-zone.directive';\n\nconst COMPONENT = [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective];\n\n@NgModule({\n imports: [...COMPONENT],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXDragDropModule {}\n","import { clamp } from 'lodash-es';\n\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nexport function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n\n if (from === to) {\n return;\n }\n\n const target = array[from];\n const delta = to < from ? -1 : 1;\n\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n\n array[to] = target;\n}\n\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nexport function transferArrayItem<T = any>(\n currentArray: T[],\n targetArray: T[],\n currentIndex: number,\n targetIndex: number,\n): void {\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGA;;;AAGG;MACU,cAAc,GAAG,IAAI,cAAc,CAAe,gBAAgB;;MCDlE,qBAAqB,CAAA;AAKhC,IAAA,WAAA,GAAA;AAJQ,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,EAAC,UAAuB,EAAC;QACpC,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAClD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa;oFAAC;AAG9C,QAAA,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,IAAI,CAAC;AACjC,QAAA,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACzE;8GARW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC3B,iBAAA;;;ACoCD;;;;;;;;;AASG;AAKG,MAAO,mBAAoB,SAAQ,WAAW,CAAA;AAJpD,IAAA,WAAA,GAAA;;AAKmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC;AACtB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,QAAA,I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2.0.2",
7
7
  "qrcode": ">=1.5.4",
8
8
  "swiper": ">=11.1.15",
@@ -1,12 +1,31 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, OnDestroy, TemplateRef, ElementRef, AfterContentInit } from '@angular/core';
2
+ import { InjectionToken, OnInit, OnDestroy, TemplateRef, ElementRef, AfterContentInit } from '@angular/core';
3
3
  import { NXComponent, NXNativeEvent } from '@acorex/cdk/common';
4
4
 
5
+ declare class AXDragHandleDirective {
6
+ private el;
7
+ private parent;
8
+ readonly element: _angular_core.WritableSignal<any>;
9
+ constructor();
10
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragHandleDirective, never>;
11
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragHandleDirective, "[axDragHandle]", never, {}, {}, never, never, true, never>;
12
+ }
13
+
14
+ /**
15
+ * Parent drag instance that nested `axDragHandle` directives register with.
16
+ * Provided by `AXDragDirective` so handles work inside dynamically created content.
17
+ */
18
+ declare const AX_DRAG_PARENT: InjectionToken<AXDragParent>;
19
+ interface AXDragParent {
20
+ registerHandle(handle: AXDragHandleDirective | HTMLElement): void;
21
+ unregisterHandle(handle: AXDragHandleDirective | HTMLElement): void;
22
+ }
23
+
5
24
  type AXPositionType = {
6
25
  x: number;
7
26
  y: number;
8
27
  };
9
- declare class AXDragDirective implements OnInit, OnDestroy {
28
+ declare class AXDragDirective implements OnInit, OnDestroy, AXDragParent {
10
29
  #private;
11
30
  private zone;
12
31
  private document;
@@ -15,7 +34,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
15
34
  private platformId;
16
35
  private viewContainerRef;
17
36
  private el;
18
- private handleDirective;
37
+ private registeredHandleElements;
19
38
  axDrag: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
20
39
  dragData: _angular_core.InputSignal<unknown>;
21
40
  dragDisabled: _angular_core.InputSignal<boolean>;
@@ -63,12 +82,18 @@ declare class AXDragDirective implements OnInit, OnDestroy {
63
82
  private boundaryElement;
64
83
  readonly elementRect: _angular_core.Signal<DOMRect>;
65
84
  private boundaryRect;
85
+ private handleElements;
66
86
  private handle;
67
87
  private boundHandleDblClick;
68
88
  private boundHandlePointerUp;
69
89
  private boundHandlePointerDown;
70
90
  private boundHandlePointerMove;
71
- private listenersAttached;
91
+ private attachedHandleElements;
92
+ private styledHandleElements;
93
+ private activeHandleElement;
94
+ registerHandle(handle: AXDragHandleDirective | HTMLElement): void;
95
+ unregisterHandle(handle: AXDragHandleDirective | HTMLElement): void;
96
+ private resolveHandleElement;
72
97
  ngOnInit(): void;
73
98
  ngOnDestroy(): void;
74
99
  private usesGrabDragCursor;
@@ -106,14 +131,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
106
131
  private addDocumentListeners;
107
132
  private removeDocumentListeners;
108
133
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragDirective, never>;
109
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragDirective, "[axDrag]", never, { "axDrag": { "alias": "axDrag"; "required": false; "isSignal": true; }; "dragData": { "alias": "dragData"; "required": false; "isSignal": true; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; "isSignal": true; }; "dragTransition": { "alias": "dragTransition"; "required": false; "isSignal": true; }; "dragElementClone": { "alias": "dragElementClone"; "required": false; "isSignal": true; }; "dropZoneGroup": { "alias": "dropZoneGroup"; "required": false; "isSignal": true; }; "dragStartDelay": { "alias": "dragStartDelay"; "required": false; "isSignal": true; }; "dragResetOnDblClick": { "alias": "dragResetOnDblClick"; "required": false; "isSignal": true; }; "dragLockAxis": { "alias": "dragLockAxis"; "required": false; "isSignal": true; }; "dragClonedTemplate": { "alias": "dragClonedTemplate"; "required": false; "isSignal": true; }; "dragCursor": { "alias": "dragCursor"; "required": false; "isSignal": true; }; "dragBoundary": { "alias": "dragBoundary"; "required": false; "isSignal": true; }; "dragTransitionDuration": { "alias": "dragTransitionDuration"; "required": false; "isSignal": true; }; }, { "dragPositionChanged": "dragPositionChanged"; }, ["handleDirective"], never, true, never>;
110
- }
111
-
112
- declare class AXDragHandleDirective {
113
- private el;
114
- readonly element: _angular_core.WritableSignal<HTMLElement>;
115
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragHandleDirective, never>;
116
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragHandleDirective, "[axDragHandle]", never, {}, {}, never, never, true, never>;
134
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragDirective, "[axDrag]", never, { "axDrag": { "alias": "axDrag"; "required": false; "isSignal": true; }; "dragData": { "alias": "dragData"; "required": false; "isSignal": true; }; "dragDisabled": { "alias": "dragDisabled"; "required": false; "isSignal": true; }; "dragTransition": { "alias": "dragTransition"; "required": false; "isSignal": true; }; "dragElementClone": { "alias": "dragElementClone"; "required": false; "isSignal": true; }; "dropZoneGroup": { "alias": "dropZoneGroup"; "required": false; "isSignal": true; }; "dragStartDelay": { "alias": "dragStartDelay"; "required": false; "isSignal": true; }; "dragResetOnDblClick": { "alias": "dragResetOnDblClick"; "required": false; "isSignal": true; }; "dragLockAxis": { "alias": "dragLockAxis"; "required": false; "isSignal": true; }; "dragClonedTemplate": { "alias": "dragClonedTemplate"; "required": false; "isSignal": true; }; "dragCursor": { "alias": "dragCursor"; "required": false; "isSignal": true; }; "dragBoundary": { "alias": "dragBoundary"; "required": false; "isSignal": true; }; "dragTransitionDuration": { "alias": "dragTransitionDuration"; "required": false; "isSignal": true; }; }, { "dragPositionChanged": "dragPositionChanged"; }, never, never, true, never>;
117
135
  }
118
136
 
119
137
  /** Event object emitted when an item is dropped into a drop list. */
@@ -283,5 +301,5 @@ declare function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex
283
301
  */
284
302
  declare function transferArrayItem<T = any>(currentArray: T[], targetArray: T[], currentIndex: number, targetIndex: number): void;
285
303
 
286
- export { AXDragDirective, AXDragDropModule, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective, moveItemInArray, transferArrayItem };
287
- export type { AXDropListDroppedEvent, AXDropZoneDropEvent, AXDropZoneHoverEvent };
304
+ export { AXDragDirective, AXDragDropModule, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective, AX_DRAG_PARENT, moveItemInArray, transferArrayItem };
305
+ export type { AXDragParent, AXDropListDroppedEvent, AXDropZoneDropEvent, AXDropZoneHoverEvent };