@acorex/cdk 20.2.26 → 20.2.27

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.
@@ -16,6 +16,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
16
16
  private viewContainerRef;
17
17
  private el;
18
18
  private handleDirective;
19
+ axDrag: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
19
20
  dragData: _angular_core.InputSignal<unknown>;
20
21
  dragDisabled: _angular_core.InputSignal<boolean>;
21
22
  dragTransition: _angular_core.InputSignal<boolean>;
@@ -38,13 +39,14 @@ declare class AXDragDirective implements OnInit, OnDestroy {
38
39
  private dragStartTime;
39
40
  private isDragging;
40
41
  private elementOpacity;
41
- private isDelayStarted;
42
42
  private movedAfterDelay;
43
43
  private activePointerId;
44
44
  private prevDropZone;
45
45
  private dragStartOffset;
46
46
  private clonePointerOffset;
47
47
  private clonedElementViewRef;
48
+ private rafId;
49
+ private pendingPointerEvent;
48
50
  private _parentDropList;
49
51
  private _currentDropList;
50
52
  readonly createCloneElement: _angular_core.Signal<boolean>;
@@ -56,6 +58,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
56
58
  private boundHandlePointerUp;
57
59
  private boundHandlePointerDown;
58
60
  private boundHandlePointerMove;
61
+ private listenersAttached;
59
62
  ngOnInit(): void;
60
63
  ngOnDestroy(): void;
61
64
  private setElementTransition;
@@ -68,6 +71,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
68
71
  private preventClicking;
69
72
  private handleDropListInteractions;
70
73
  private canDropInList;
74
+ private isCircularReference;
71
75
  private dropZoneHoverHandler;
72
76
  private dropZoneDropHandler;
73
77
  private getDropZonesFromPoint;
@@ -83,7 +87,7 @@ declare class AXDragDirective implements OnInit, OnDestroy {
83
87
  private addDocumentListeners;
84
88
  private removeDocumentListeners;
85
89
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragDirective, never>;
86
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragDirective, "[axDrag]", never, { "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>;
90
+ 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>;
87
91
  }
88
92
 
89
93
  declare class AXDragHandleDirective {
@@ -93,45 +97,6 @@ declare class AXDragHandleDirective {
93
97
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDragHandleDirective, "[axDragHandle]", never, {}, {}, never, never, true, never>;
94
98
  }
95
99
 
96
- interface AXDropZoneDropEvent extends NXNativeEvent<AXDropZoneDirective, MouseEvent> {
97
- dropped: AXDragDirective;
98
- }
99
- type AXDropZoneHoverEvent = AXDropZoneDropEvent & {
100
- state: 'enter' | 'leave';
101
- };
102
- declare class AXDropZoneDirective extends NXComponent implements OnInit {
103
- dropZoneGroup: _angular_core.InputSignal<string>;
104
- isHovered: _angular_core.WritableSignal<boolean>;
105
- readonly element: _angular_core.WritableSignal<HTMLElement>;
106
- onElementDrop: _angular_core.OutputEmitterRef<AXDropZoneDropEvent>;
107
- onElementHover: _angular_core.OutputEmitterRef<AXDropZoneHoverEvent>;
108
- ngOnInit(): void;
109
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDropZoneDirective, never>;
110
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDropZoneDirective, "[axDropZone]", ["axDropZone"], { "dropZoneGroup": { "alias": "dropZoneGroup"; "required": false; "isSignal": true; }; }, { "onElementDrop": "onElementDrop"; "onElementHover": "onElementHover"; }, never, never, true, never>;
111
- }
112
-
113
- declare class AXDragDropModule {
114
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragDropModule, never>;
115
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXDragDropModule, never, [typeof AXDragDirective, typeof AXDragHandleDirective, typeof AXDropZoneDirective], [typeof AXDragDirective, typeof AXDragHandleDirective, typeof AXDropZoneDirective]>;
116
- static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXDragDropModule>;
117
- }
118
-
119
- /**
120
- * Moves an item one index in an array to another.
121
- * @param array Array in which to move the item.
122
- * @param fromIndex Starting index of the item.
123
- * @param toIndex Index to which the item should be moved.
124
- */
125
- declare function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void;
126
- /**
127
- * Moves an item from one array to another.
128
- * @param currentArray Array from which to transfer the item.
129
- * @param targetArray Array into which to put the item.
130
- * @param currentIndex Index of the item in its current array.
131
- * @param targetIndex Index at which to insert the item.
132
- */
133
- declare function transferArrayItem<T = any>(currentArray: T[], targetArray: T[], currentIndex: number, targetIndex: number): void;
134
-
135
100
  /** Event object emitted when an item is dropped into a drop list. */
136
101
  interface AXDropListDroppedEvent extends NXNativeEvent<AXDropListDirective, MouseEvent> {
137
102
  item: AXDragDirective;
@@ -150,12 +115,14 @@ interface AXDropListDroppedEvent extends NXNativeEvent<AXDropListDirective, Mous
150
115
  * This directive automatically detects `gap` from flexbox/grid layouts and handles
151
116
  * items with variable sizes and margins.
152
117
  */
153
- declare class AXDropListDirective extends NXComponent implements OnInit, AfterContentInit {
118
+ declare class AXDropListDirective extends NXComponent implements OnInit, AfterContentInit, OnDestroy {
154
119
  private readonly _zone;
155
120
  private readonly _renderer;
156
121
  private readonly _cdr;
157
122
  private readonly _platformId;
158
123
  private readonly _hostEl;
124
+ /** Boolean input matching the directive selector name for conditional application. */
125
+ axDropList: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
159
126
  /** Whether sorting within this list is disabled. */
160
127
  sortingDisabled: _angular_core.InputSignal<boolean>;
161
128
  /** The group this drop list belongs to. Dragging is only allowed between lists of the same group. */
@@ -180,8 +147,11 @@ declare class AXDropListDirective extends NXComponent implements OnInit, AfterCo
180
147
  private readonly _listGap;
181
148
  /** A signal-based alias for the orientation input for internal use. */
182
149
  private readonly _orientation;
150
+ /** DOM placeholder element for inter-list drags */
151
+ private _placeholderElement;
183
152
  ngOnInit(): void;
184
153
  ngAfterContentInit(): void;
154
+ ngOnDestroy(): void;
185
155
  /** Checks if the given drag item is the one currently active in this list. */
186
156
  isDragActiveForThisList(dragItem: AXDragDirective): boolean;
187
157
  /**
@@ -222,8 +192,12 @@ declare class AXDropListDirective extends NXComponent implements OnInit, AfterCo
222
192
  * @returns The calculated placeholder index.
223
193
  */
224
194
  private _calculatePlaceholderIndex;
225
- /** Applies `transform` styles to all items to create the visual sorting effect. */
195
+ /** Applies visual shifts - uses placeholder for inter-list, transforms for intra-list. */
226
196
  private _applyVisualShifts;
197
+ /** Creates or moves the placeholder element for inter-list drags */
198
+ private _updatePlaceholderElement;
199
+ /** Removes the placeholder element if it exists */
200
+ private _removePlaceholderElement;
227
201
  /**
228
202
  * Calculates the required transform in pixels for a single item.
229
203
  * @param index The index of the item to transform.
@@ -240,8 +214,47 @@ declare class AXDropListDirective extends NXComponent implements OnInit, AfterCo
240
214
  /** Resets the internal state of the directive to its initial values. */
241
215
  resetSortState(): void;
242
216
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDropListDirective, never>;
243
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDropListDirective, "[axDropList]", ["axDropList"], { "sortingDisabled": { "alias": "sortingDisabled"; "required": false; "isSignal": true; }; "dropListGroup": { "alias": "dropListGroup"; "required": false; "isSignal": true; }; "dropListOrientation": { "alias": "dropListOrientation"; "required": false; "isSignal": true; }; }, { "dropListDropped": "dropListDropped"; }, ["_draggableItems"], never, true, never>;
217
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDropListDirective, "[axDropList]", ["axDropList"], { "axDropList": { "alias": "axDropList"; "required": false; "isSignal": true; }; "sortingDisabled": { "alias": "sortingDisabled"; "required": false; "isSignal": true; }; "dropListGroup": { "alias": "dropListGroup"; "required": false; "isSignal": true; }; "dropListOrientation": { "alias": "dropListOrientation"; "required": false; "isSignal": true; }; }, { "dropListDropped": "dropListDropped"; }, ["_draggableItems"], never, true, never>;
244
218
  }
245
219
 
220
+ interface AXDropZoneDropEvent extends NXNativeEvent<AXDropZoneDirective, MouseEvent> {
221
+ dropped: AXDragDirective;
222
+ }
223
+ type AXDropZoneHoverEvent = AXDropZoneDropEvent & {
224
+ state: 'enter' | 'leave';
225
+ };
226
+ declare class AXDropZoneDirective extends NXComponent implements OnInit {
227
+ dropZoneGroup: _angular_core.InputSignal<string>;
228
+ isHovered: _angular_core.WritableSignal<boolean>;
229
+ readonly element: _angular_core.WritableSignal<HTMLElement>;
230
+ onElementDrop: _angular_core.OutputEmitterRef<AXDropZoneDropEvent>;
231
+ onElementHover: _angular_core.OutputEmitterRef<AXDropZoneHoverEvent>;
232
+ ngOnInit(): void;
233
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDropZoneDirective, never>;
234
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<AXDropZoneDirective, "[axDropZone]", ["axDropZone"], { "dropZoneGroup": { "alias": "dropZoneGroup"; "required": false; "isSignal": true; }; }, { "onElementDrop": "onElementDrop"; "onElementHover": "onElementHover"; }, never, never, true, never>;
235
+ }
236
+
237
+ declare class AXDragDropModule {
238
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXDragDropModule, never>;
239
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXDragDropModule, never, [typeof AXDragDirective, typeof AXDragHandleDirective, typeof AXDropListDirective, typeof AXDropZoneDirective], [typeof AXDragDirective, typeof AXDragHandleDirective, typeof AXDropListDirective, typeof AXDropZoneDirective]>;
240
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXDragDropModule>;
241
+ }
242
+
243
+ /**
244
+ * Moves an item one index in an array to another.
245
+ * @param array Array in which to move the item.
246
+ * @param fromIndex Starting index of the item.
247
+ * @param toIndex Index to which the item should be moved.
248
+ */
249
+ declare function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void;
250
+ /**
251
+ * Moves an item from one array to another.
252
+ * @param currentArray Array from which to transfer the item.
253
+ * @param targetArray Array into which to put the item.
254
+ * @param currentIndex Index of the item in its current array.
255
+ * @param targetIndex Index at which to insert the item.
256
+ */
257
+ declare function transferArrayItem<T = any>(currentArray: T[], targetArray: T[], currentIndex: number, targetIndex: number): void;
258
+
246
259
  export { AXDragDirective, AXDragDropModule, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective, moveItemInArray, transferArrayItem };
247
260
  export type { AXDropListDroppedEvent, AXDropZoneDropEvent, AXDropZoneHoverEvent };