@acorex/cdk 21.0.0-next.9 → 21.0.0-next51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.d.ts +1 -0
- package/drag-drop/index.d.ts +57 -44
- package/drawer/index.d.ts +12 -9
- package/fesm2022/acorex-cdk-accordion.mjs +52 -67
- package/fesm2022/acorex-cdk-accordion.mjs.map +1 -1
- package/fesm2022/acorex-cdk-carousel.mjs +13 -10
- package/fesm2022/acorex-cdk-carousel.mjs.map +1 -1
- package/fesm2022/acorex-cdk-clipboard.mjs +6 -6
- package/fesm2022/acorex-cdk-clipboard.mjs.map +1 -1
- package/fesm2022/acorex-cdk-common.mjs +104 -104
- package/fesm2022/acorex-cdk-common.mjs.map +1 -1
- package/fesm2022/acorex-cdk-dom.mjs +3 -3
- package/fesm2022/acorex-cdk-dom.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drag-drop.mjs +278 -85
- package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drawer.mjs +44 -33
- package/fesm2022/acorex-cdk-drawer.mjs.map +1 -1
- package/fesm2022/acorex-cdk-focus-trap.mjs +3 -3
- package/fesm2022/acorex-cdk-focus-trap.mjs.map +1 -1
- package/fesm2022/acorex-cdk-input-mask.mjs +5 -3
- package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
- package/fesm2022/acorex-cdk-list-navigation.mjs +39 -21
- package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -1
- package/fesm2022/acorex-cdk-outline.mjs +6 -6
- package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +3 -3
- package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
- package/fesm2022/acorex-cdk-pan-view.mjs +3 -3
- package/fesm2022/acorex-cdk-pan-view.mjs.map +1 -1
- package/fesm2022/acorex-cdk-resizable.mjs +166 -118
- package/fesm2022/acorex-cdk-resizable.mjs.map +1 -1
- package/fesm2022/acorex-cdk-selection.mjs +10 -10
- package/fesm2022/acorex-cdk-selection.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sliding-item.mjs +3 -3
- package/fesm2022/acorex-cdk-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sticky.mjs +3 -3
- package/fesm2022/acorex-cdk-sticky.mjs.map +1 -1
- package/fesm2022/acorex-cdk-uploader.mjs +746 -0
- package/fesm2022/acorex-cdk-uploader.mjs.map +1 -0
- package/fesm2022/acorex-cdk-virtual-scroll.mjs +10 -10
- package/fesm2022/acorex-cdk-virtual-scroll.mjs.map +1 -1
- package/list-navigation/index.d.ts +1 -0
- package/package.json +6 -2
- package/resizable/index.d.ts +19 -7
- package/uploader/README.md +3 -0
- package/uploader/index.d.ts +378 -0
|
@@ -9,10 +9,10 @@ class AXDragHandleDirective {
|
|
|
9
9
|
this.el = inject(ElementRef);
|
|
10
10
|
this.element = signal(this.el.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : []));
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
13
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDragHandleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
13
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: AXDragHandleDirective, isStandalone: true, selector: "[axDragHandle]", ngImport: i0 }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDragHandleDirective, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
18
18
|
selector: '[axDragHandle]',
|
|
@@ -38,6 +38,8 @@ class AXDropListDirective extends NXComponent {
|
|
|
38
38
|
this._platformId = inject(PLATFORM_ID);
|
|
39
39
|
this._hostEl = inject(ElementRef);
|
|
40
40
|
// --- Public API: Inputs and Outputs ---
|
|
41
|
+
/** Boolean input matching the directive selector name for conditional application. */
|
|
42
|
+
this.axDropList = input(true, ...(ngDevMode ? [{ debugName: "axDropList", transform: (value) => value === '' || value === true }] : [{ transform: (value) => value === '' || value === true }]));
|
|
41
43
|
/** Whether sorting within this list is disabled. */
|
|
42
44
|
this.sortingDisabled = input(false, ...(ngDevMode ? [{ debugName: "sortingDisabled" }] : []));
|
|
43
45
|
/** The group this drop list belongs to. Dragging is only allowed between lists of the same group. */
|
|
@@ -63,16 +65,24 @@ class AXDropListDirective extends NXComponent {
|
|
|
63
65
|
this._listGap = signal(0, ...(ngDevMode ? [{ debugName: "_listGap" }] : []));
|
|
64
66
|
/** A signal-based alias for the orientation input for internal use. */
|
|
65
67
|
this._orientation = this.dropListOrientation;
|
|
68
|
+
/** DOM placeholder element for inter-list drags */
|
|
69
|
+
this._placeholderElement = null;
|
|
66
70
|
}
|
|
67
71
|
ngOnInit() {
|
|
68
72
|
if (isPlatformBrowser(this._platformId)) {
|
|
69
73
|
this.element.dataset['axDropList'] = 'true';
|
|
70
74
|
this.element.classList.add('ax-drop-list-sorting-transition');
|
|
75
|
+
// Store reference to this directive instance on the element for drag directive access
|
|
76
|
+
this.element['__axContext__'] = this;
|
|
71
77
|
}
|
|
72
78
|
}
|
|
73
79
|
ngAfterContentInit() {
|
|
74
80
|
this._cdr.detectChanges();
|
|
75
81
|
}
|
|
82
|
+
ngOnDestroy() {
|
|
83
|
+
// Clean up placeholder element if directive destroyed during drag
|
|
84
|
+
this._removePlaceholderElement();
|
|
85
|
+
}
|
|
76
86
|
// --- Public Methods (for internal library use) ---
|
|
77
87
|
/** Checks if the given drag item is the one currently active in this list. */
|
|
78
88
|
isDragActiveForThisList(dragItem) {
|
|
@@ -83,7 +93,7 @@ class AXDropListDirective extends NXComponent {
|
|
|
83
93
|
* @param dragItem The item that is being dragged.
|
|
84
94
|
*/
|
|
85
95
|
prepareSort(dragItem) {
|
|
86
|
-
if (this.sortingDisabled() || this._activeDragItem() || dragItem.dragDisabled())
|
|
96
|
+
if (!this.axDropList() || this.sortingDisabled() || this._activeDragItem() || dragItem.dragDisabled())
|
|
87
97
|
return;
|
|
88
98
|
this._activeDragItem.set(dragItem);
|
|
89
99
|
this.element.classList.add('ax-drop-list-sorting-active');
|
|
@@ -100,8 +110,10 @@ class AXDropListDirective extends NXComponent {
|
|
|
100
110
|
* @param dragItem The item entering this list.
|
|
101
111
|
*/
|
|
102
112
|
enter(dragItem) {
|
|
103
|
-
if (this.sortingDisabled() || this.isDragActiveForThisList(dragItem))
|
|
113
|
+
if (!this.axDropList() || this.sortingDisabled() || this.isDragActiveForThisList(dragItem))
|
|
104
114
|
return;
|
|
115
|
+
// Clean up any existing placeholder from previous list
|
|
116
|
+
this._removePlaceholderElement();
|
|
105
117
|
this._activeDragItem.set(dragItem);
|
|
106
118
|
this.element.classList.add('ax-drop-list-sorting-active');
|
|
107
119
|
requestAnimationFrame(() => this._zone.run(() => this._cacheGeometry()));
|
|
@@ -112,7 +124,10 @@ class AXDropListDirective extends NXComponent {
|
|
|
112
124
|
* @param dragItem The item being dragged.
|
|
113
125
|
*/
|
|
114
126
|
sort(event, dragItem) {
|
|
115
|
-
if (!this.
|
|
127
|
+
if (!this.axDropList() ||
|
|
128
|
+
!this.isDragActiveForThisList(dragItem) ||
|
|
129
|
+
this.sortingDisabled() ||
|
|
130
|
+
!this._listInitialRect())
|
|
116
131
|
return;
|
|
117
132
|
const pointerPosition = this._orientation() === 'vertical' ? event.clientY : event.clientX;
|
|
118
133
|
const newPlaceholderIndex = this._calculatePlaceholderIndex(pointerPosition);
|
|
@@ -128,7 +143,7 @@ class AXDropListDirective extends NXComponent {
|
|
|
128
143
|
* @param sourceList The list where the drag originated.
|
|
129
144
|
*/
|
|
130
145
|
finalizeSort(event, droppedItem, sourceList) {
|
|
131
|
-
if (!this.isDragActiveForThisList(droppedItem) || this.sortingDisabled()) {
|
|
146
|
+
if (!this.axDropList() || !this.isDragActiveForThisList(droppedItem) || this.sortingDisabled()) {
|
|
132
147
|
this.resetSortStateAndStyles(sourceList);
|
|
133
148
|
return;
|
|
134
149
|
}
|
|
@@ -262,38 +277,77 @@ class AXDropListDirective extends NXComponent {
|
|
|
262
277
|
}
|
|
263
278
|
return potentialPlaceholderIndex;
|
|
264
279
|
}
|
|
265
|
-
/** Applies
|
|
280
|
+
/** Applies visual shifts - uses placeholder for inter-list, transforms for intra-list. */
|
|
266
281
|
_applyVisualShifts() {
|
|
267
282
|
const activeItem = this._activeDragItem();
|
|
268
283
|
const originalIndex = this._cachedItems().findIndex((d) => d.item === activeItem);
|
|
269
284
|
const isIntraListDrag = originalIndex > -1;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
draggedItemSize = getItemSpace(this._cachedItems()[originalIndex]);
|
|
277
|
-
}
|
|
278
|
-
else if (activeItem) {
|
|
279
|
-
const rect = activeItem.elementRect();
|
|
280
|
-
if (rect) {
|
|
281
|
-
const style = window.getComputedStyle(activeItem.element());
|
|
282
|
-
draggedItemSize =
|
|
283
|
-
this._orientation() === 'vertical'
|
|
284
|
-
? rect.height + parseFloat(style.marginTop) + parseFloat(style.marginBottom)
|
|
285
|
-
: rect.width + parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
286
|
-
}
|
|
285
|
+
const placeholderIndex = this._placeholderIndex();
|
|
286
|
+
// Check if this is an "onto-node" drop list (no items, just a drop target)
|
|
287
|
+
const isOntoNodeList = this.element.dataset['dropType'] === 'onto-node';
|
|
288
|
+
if (!isIntraListDrag && activeItem && !isOntoNodeList && this._cachedItems().length > 0) {
|
|
289
|
+
// --- INTER-LIST DRAG: Use DOM placeholder for reorder lists with items ---
|
|
290
|
+
this._updatePlaceholderElement(activeItem, placeholderIndex);
|
|
287
291
|
}
|
|
288
|
-
|
|
289
|
-
// ---
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
else {
|
|
293
|
+
// --- INTRA-LIST DRAG: Use transforms (works well for same-list reordering) ---
|
|
294
|
+
this._removePlaceholderElement();
|
|
295
|
+
const getItemSpace = (itemData) => this._orientation() === 'vertical'
|
|
296
|
+
? itemData.height + itemData.margins.top + itemData.margins.bottom
|
|
297
|
+
: itemData.width + itemData.margins.left + itemData.margins.right;
|
|
298
|
+
const draggedItemSize = isIntraListDrag ? getItemSpace(this._cachedItems()[originalIndex]) : 0;
|
|
299
|
+
this._cachedItems().forEach((data, index) => {
|
|
300
|
+
if (data.item.dragDisabled()) {
|
|
301
|
+
this._renderer.removeStyle(data.element, 'transform');
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
const transform = this._calculateTransform(index, originalIndex, draggedItemSize, getItemSpace);
|
|
305
|
+
this._renderer.setStyle(data.element, 'transform', transform ? `${this._orientation() === 'vertical' ? 'translateY' : 'translateX'}(${transform}px)` : '');
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/** Creates or moves the placeholder element for inter-list drags */
|
|
310
|
+
_updatePlaceholderElement(activeItem, targetIndex) {
|
|
311
|
+
const rect = activeItem.elementRect();
|
|
312
|
+
if (!rect)
|
|
313
|
+
return;
|
|
314
|
+
// Create placeholder as a clone of the dragged element
|
|
315
|
+
if (!this._placeholderElement) {
|
|
316
|
+
// Clone the entire dragged element
|
|
317
|
+
const sourceElement = activeItem.element();
|
|
318
|
+
this._placeholderElement = sourceElement.cloneNode(true);
|
|
319
|
+
// Mark it as a placeholder
|
|
320
|
+
this._renderer.addClass(this._placeholderElement, 'ax-drop-placeholder');
|
|
321
|
+
this._renderer.addClass(this._placeholderElement, 'ax-drag-placeholder');
|
|
322
|
+
// Prevent interaction with cloned content
|
|
323
|
+
this._renderer.setStyle(this._placeholderElement, 'pointerEvents', 'none');
|
|
324
|
+
// Add faded styling to indicate it's a placeholder
|
|
325
|
+
this._renderer.setStyle(this._placeholderElement, 'opacity', '0.4');
|
|
326
|
+
this._renderer.setStyle(this._placeholderElement, 'transition', 'all 200ms ease');
|
|
327
|
+
}
|
|
328
|
+
// Insert/move placeholder at target index
|
|
329
|
+
const items = this._cachedItems();
|
|
330
|
+
if (targetIndex >= 0 && targetIndex < items.length) {
|
|
331
|
+
const targetItem = items[targetIndex];
|
|
332
|
+
if (targetItem && targetItem.element) {
|
|
333
|
+
this._renderer.insertBefore(this.element, this._placeholderElement, targetItem.element);
|
|
293
334
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
335
|
+
else {
|
|
336
|
+
// Fallback: append at end if target item invalid
|
|
337
|
+
this._renderer.appendChild(this.element, this._placeholderElement);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
else {
|
|
341
|
+
// Insert at end
|
|
342
|
+
this._renderer.appendChild(this.element, this._placeholderElement);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/** Removes the placeholder element if it exists */
|
|
346
|
+
_removePlaceholderElement() {
|
|
347
|
+
if (this._placeholderElement) {
|
|
348
|
+
this._renderer.removeChild(this.element, this._placeholderElement);
|
|
349
|
+
this._placeholderElement = null;
|
|
350
|
+
}
|
|
297
351
|
}
|
|
298
352
|
/**
|
|
299
353
|
* Calculates the required transform in pixels for a single item.
|
|
@@ -359,6 +413,7 @@ class AXDropListDirective extends NXComponent {
|
|
|
359
413
|
/** Removes all `transform` styles from the items in this list. */
|
|
360
414
|
_resetAllTransforms() {
|
|
361
415
|
this._cachedItems().forEach((data) => this._renderer.setStyle(data.element, 'transform', ''));
|
|
416
|
+
this._removePlaceholderElement(); // Clean up inter-list placeholder
|
|
362
417
|
}
|
|
363
418
|
/** Resets the internal state of the directive to its initial values. */
|
|
364
419
|
resetSortState() {
|
|
@@ -369,17 +424,21 @@ class AXDropListDirective extends NXComponent {
|
|
|
369
424
|
this._listInitialRect.set(null);
|
|
370
425
|
this._listGap.set(0);
|
|
371
426
|
}
|
|
372
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
373
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.
|
|
427
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDropListDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
428
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.9", type: AXDropListDirective, isStandalone: true, selector: "[axDropList]", inputs: { axDropList: { classPropertyName: "axDropList", publicName: "axDropList", isSignal: true, isRequired: false, transformFunction: null }, sortingDisabled: { classPropertyName: "sortingDisabled", publicName: "sortingDisabled", isSignal: true, isRequired: false, transformFunction: null }, dropListGroup: { classPropertyName: "dropListGroup", publicName: "dropListGroup", isSignal: true, isRequired: false, transformFunction: null }, dropListOrientation: { classPropertyName: "dropListOrientation", publicName: "dropListOrientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dropListDropped: "dropListDropped" }, queries: [{ propertyName: "_draggableItems", predicate: AXDragDirective, isSignal: true }], exportAs: ["axDropList"], usesInheritance: true, ngImport: i0 }); }
|
|
374
429
|
}
|
|
375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDropListDirective, decorators: [{
|
|
376
431
|
type: Directive,
|
|
377
432
|
args: [{
|
|
378
433
|
selector: '[axDropList]',
|
|
379
434
|
exportAs: 'axDropList',
|
|
380
435
|
}]
|
|
381
|
-
}], propDecorators: { sortingDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortingDisabled", required: false }] }], dropListGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropListGroup", required: false }] }], dropListOrientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropListOrientation", required: false }] }], dropListDropped: [{ type: i0.Output, args: ["dropListDropped"] }], _draggableItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AXDragDirective), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
436
|
+
}], propDecorators: { axDropList: [{ type: i0.Input, args: [{ isSignal: true, alias: "axDropList", required: false }] }], sortingDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortingDisabled", required: false }] }], dropListGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropListGroup", required: false }] }], dropListOrientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropListOrientation", required: false }] }], dropListDropped: [{ type: i0.Output, args: ["dropListDropped"] }], _draggableItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AXDragDirective), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
382
437
|
|
|
438
|
+
// Zone detection constants for nested drop lists (tree nodes)
|
|
439
|
+
const ZONE_TOP_THRESHOLD = 0.3; // Top 30% triggers reorder BEFORE
|
|
440
|
+
const ZONE_BOTTOM_THRESHOLD = 0.7; // Bottom 30% triggers reorder AFTER
|
|
441
|
+
// Middle 40% (between thresholds) triggers drop INTO
|
|
383
442
|
class AXDragDirective {
|
|
384
443
|
constructor() {
|
|
385
444
|
this.zone = inject(NgZone);
|
|
@@ -390,6 +449,7 @@ class AXDragDirective {
|
|
|
390
449
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
391
450
|
this.el = inject(ElementRef);
|
|
392
451
|
this.handleDirective = contentChild(AXDragHandleDirective, ...(ngDevMode ? [{ debugName: "handleDirective" }] : []));
|
|
452
|
+
this.axDrag = input(true, ...(ngDevMode ? [{ debugName: "axDrag", transform: (value) => value === '' || value === true }] : [{ transform: (value) => value === '' || value === true }]));
|
|
393
453
|
this.dragData = input(...(ngDevMode ? [undefined, { debugName: "dragData" }] : []));
|
|
394
454
|
this.dragDisabled = input(false, ...(ngDevMode ? [{ debugName: "dragDisabled" }] : []));
|
|
395
455
|
this.dragTransition = input(true, ...(ngDevMode ? [{ debugName: "dragTransition" }] : []));
|
|
@@ -412,13 +472,14 @@ class AXDragDirective {
|
|
|
412
472
|
this.dragStartTime = signal(0, ...(ngDevMode ? [{ debugName: "dragStartTime" }] : []));
|
|
413
473
|
this.isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
|
|
414
474
|
this.elementOpacity = signal('1', ...(ngDevMode ? [{ debugName: "elementOpacity" }] : []));
|
|
415
|
-
this.isDelayStarted = signal(false, ...(ngDevMode ? [{ debugName: "isDelayStarted" }] : []));
|
|
416
475
|
this.movedAfterDelay = signal(false, ...(ngDevMode ? [{ debugName: "movedAfterDelay" }] : []));
|
|
417
476
|
this.activePointerId = signal(null, ...(ngDevMode ? [{ debugName: "activePointerId" }] : []));
|
|
418
477
|
this.prevDropZone = signal(null, ...(ngDevMode ? [{ debugName: "prevDropZone" }] : []));
|
|
419
478
|
this.dragStartOffset = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "dragStartOffset" }] : []));
|
|
420
479
|
this.clonePointerOffset = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "clonePointerOffset" }] : []));
|
|
421
480
|
this.clonedElementViewRef = signal(null, ...(ngDevMode ? [{ debugName: "clonedElementViewRef" }] : []));
|
|
481
|
+
this.rafId = null;
|
|
482
|
+
this.pendingPointerEvent = null;
|
|
422
483
|
this._parentDropList = inject(AXDropListDirective, { optional: true, skipSelf: true, host: false });
|
|
423
484
|
this._currentDropList = signal(null, ...(ngDevMode ? [{ debugName: "_currentDropList" }] : []));
|
|
424
485
|
this.createCloneElement = computed(() => this.dragElementClone() || !!this._parentDropList, ...(ngDevMode ? [{ debugName: "createCloneElement" }] : []));
|
|
@@ -449,6 +510,7 @@ class AXDragDirective {
|
|
|
449
510
|
this.boundHandlePointerUp = this.handlePointerUp.bind(this);
|
|
450
511
|
this.boundHandlePointerDown = this.handlePointerDown.bind(this);
|
|
451
512
|
this.boundHandlePointerMove = this.handlePointerMove.bind(this);
|
|
513
|
+
this.listenersAttached = signal(null, ...(ngDevMode ? [{ debugName: "listenersAttached" }] : []));
|
|
452
514
|
this.#dragDisabledEffect = effect(() => {
|
|
453
515
|
if (this.dragCursor() === 'none') {
|
|
454
516
|
return;
|
|
@@ -462,14 +524,30 @@ class AXDragDirective {
|
|
|
462
524
|
this.renderer.removeStyle(this.handle(), 'touch-action');
|
|
463
525
|
}
|
|
464
526
|
}, ...(ngDevMode ? [{ debugName: "#dragDisabledEffect" }] : []));
|
|
527
|
+
this.#handleChangeEffect = effect(() => {
|
|
528
|
+
if (!isPlatformBrowser(this.platformId))
|
|
529
|
+
return;
|
|
530
|
+
const currentHandle = this.handle();
|
|
531
|
+
const previousHandle = this.listenersAttached();
|
|
532
|
+
// Remove listeners from previous handle if it changed
|
|
533
|
+
if (previousHandle && previousHandle !== currentHandle) {
|
|
534
|
+
previousHandle.removeEventListener('dblclick', this.boundHandleDblClick);
|
|
535
|
+
previousHandle.removeEventListener('pointerdown', this.boundHandlePointerDown);
|
|
536
|
+
}
|
|
537
|
+
// Attach listeners to new handle
|
|
538
|
+
if (currentHandle && currentHandle !== previousHandle) {
|
|
539
|
+
this.zone.runOutsideAngular(() => {
|
|
540
|
+
currentHandle.addEventListener('dblclick', this.boundHandleDblClick);
|
|
541
|
+
currentHandle.addEventListener('pointerdown', this.boundHandlePointerDown, { passive: false });
|
|
542
|
+
});
|
|
543
|
+
this.listenersAttached.set(currentHandle);
|
|
544
|
+
}
|
|
545
|
+
}, ...(ngDevMode ? [{ debugName: "#handleChangeEffect" }] : []));
|
|
465
546
|
}
|
|
466
547
|
#dragDisabledEffect;
|
|
548
|
+
#handleChangeEffect;
|
|
467
549
|
ngOnInit() {
|
|
468
550
|
if (isPlatformBrowser(this.platformId)) {
|
|
469
|
-
this.zone.runOutsideAngular(() => {
|
|
470
|
-
this.handle().addEventListener('dblclick', this.boundHandleDblClick);
|
|
471
|
-
this.handle().addEventListener('pointerdown', this.boundHandlePointerDown, { passive: false });
|
|
472
|
-
});
|
|
473
551
|
if (this._parentDropList) {
|
|
474
552
|
this.setElementTransition(this.element());
|
|
475
553
|
}
|
|
@@ -479,8 +557,11 @@ class AXDragDirective {
|
|
|
479
557
|
}
|
|
480
558
|
ngOnDestroy() {
|
|
481
559
|
if (isPlatformBrowser(this.platformId)) {
|
|
482
|
-
|
|
483
|
-
|
|
560
|
+
const handle = this.listenersAttached();
|
|
561
|
+
if (handle) {
|
|
562
|
+
handle.removeEventListener('dblclick', this.boundHandleDblClick);
|
|
563
|
+
handle.removeEventListener('pointerdown', this.boundHandlePointerDown);
|
|
564
|
+
}
|
|
484
565
|
this.removeDocumentListeners();
|
|
485
566
|
if (this.createCloneElement()) {
|
|
486
567
|
this.removeCloneElement();
|
|
@@ -501,7 +582,7 @@ class AXDragDirective {
|
|
|
501
582
|
handlePointerDown(e) {
|
|
502
583
|
if (!isPlatformBrowser(this.platformId))
|
|
503
584
|
return;
|
|
504
|
-
if (this.dragDisabled() || e.button !== 0 || this._parentDropList?.sortingDisabled())
|
|
585
|
+
if (!this.axDrag() || this.dragDisabled() || e.button !== 0 || this._parentDropList?.sortingDisabled())
|
|
505
586
|
return;
|
|
506
587
|
this.isDragging.set(true);
|
|
507
588
|
this.movedAfterDelay.set(false);
|
|
@@ -523,9 +604,7 @@ class AXDragDirective {
|
|
|
523
604
|
this.setPosition(0, 0);
|
|
524
605
|
}
|
|
525
606
|
handlePointerMove(e) {
|
|
526
|
-
if (this.
|
|
527
|
-
!this.isDragging() ||
|
|
528
|
-
this.isDelayStarted() ||
|
|
607
|
+
if (!this.isDragging() ||
|
|
529
608
|
!isPlatformBrowser(this.platformId) ||
|
|
530
609
|
e.pointerId !== this.activePointerId()) {
|
|
531
610
|
return;
|
|
@@ -533,32 +612,48 @@ class AXDragDirective {
|
|
|
533
612
|
e.preventDefault();
|
|
534
613
|
if (!this.isMoving()) {
|
|
535
614
|
const delay = this.dragStartDelay() ?? 0;
|
|
615
|
+
// FIX: Delay logic was inverted
|
|
536
616
|
if (Date.now() - this.dragStartTime() < delay) {
|
|
537
|
-
|
|
538
|
-
return;
|
|
617
|
+
return; // Still waiting for delay
|
|
539
618
|
}
|
|
540
619
|
this.isMoving.set(true);
|
|
541
620
|
this.handle().setPointerCapture(e.pointerId);
|
|
542
621
|
this.startDrag(e);
|
|
543
622
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
623
|
+
// Run position updates outside Angular zone for better performance
|
|
624
|
+
this.zone.runOutsideAngular(() => {
|
|
625
|
+
if (this.createCloneElement()) {
|
|
626
|
+
const newCloneX = e.clientX - this.clonePointerOffset().x;
|
|
627
|
+
const newCloneY = e.clientY - this.clonePointerOffset().y;
|
|
628
|
+
this.setClonePosition(newCloneX, newCloneY);
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
const newX = e.clientX - this.dragStartOffset().x;
|
|
632
|
+
const newY = e.clientY - this.dragStartOffset().y;
|
|
633
|
+
this.setPosition(newX, newY);
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
// Throttle drop list interactions using requestAnimationFrame
|
|
554
637
|
if (this._parentDropList) {
|
|
555
|
-
this.
|
|
638
|
+
this.pendingPointerEvent = e;
|
|
639
|
+
if (this.rafId === null) {
|
|
640
|
+
this.rafId = requestAnimationFrame(() => {
|
|
641
|
+
if (this.pendingPointerEvent) {
|
|
642
|
+
this.handleDropListInteractions(this.pendingPointerEvent);
|
|
643
|
+
this.pendingPointerEvent = null;
|
|
644
|
+
}
|
|
645
|
+
this.rafId = null;
|
|
646
|
+
});
|
|
647
|
+
}
|
|
556
648
|
}
|
|
557
649
|
else {
|
|
558
650
|
this.dropZoneHoverHandler(e);
|
|
559
651
|
}
|
|
560
652
|
}
|
|
561
653
|
startDrag(e) {
|
|
654
|
+
// Add CDK-style classes
|
|
655
|
+
this.renderer.addClass(this.element(), 'ax-dragging');
|
|
656
|
+
this.renderer.addClass(this.element(), 'ax-drag-placeholder');
|
|
562
657
|
if (this._parentDropList) {
|
|
563
658
|
this._currentDropList.set(this._parentDropList);
|
|
564
659
|
this._parentDropList.prepareSort(this);
|
|
@@ -572,7 +667,11 @@ class AXDragDirective {
|
|
|
572
667
|
x: e.clientX - elementRect.left,
|
|
573
668
|
y: e.clientY - elementRect.top,
|
|
574
669
|
});
|
|
575
|
-
this.createCloneElementHandler(this.element());
|
|
670
|
+
const clone = this.createCloneElementHandler(this.element());
|
|
671
|
+
if (clone) {
|
|
672
|
+
this.renderer.addClass(clone, 'ax-drag-preview');
|
|
673
|
+
this.renderer.addClass(clone, 'ax-dragging');
|
|
674
|
+
}
|
|
576
675
|
}
|
|
577
676
|
}
|
|
578
677
|
handlePointerUp(e) {
|
|
@@ -585,6 +684,9 @@ class AXDragDirective {
|
|
|
585
684
|
const wasMoving = this.isMoving();
|
|
586
685
|
this.isMoving.set(false);
|
|
587
686
|
this.isDragging.set(false);
|
|
687
|
+
// Remove CDK-style classes
|
|
688
|
+
this.renderer.removeClass(this.element(), 'ax-dragging');
|
|
689
|
+
this.renderer.removeClass(this.element(), 'ax-drag-placeholder');
|
|
588
690
|
if (!wasMoving) {
|
|
589
691
|
this.activePointerId.set(null);
|
|
590
692
|
this.removeDocumentListeners();
|
|
@@ -610,6 +712,12 @@ class AXDragDirective {
|
|
|
610
712
|
else {
|
|
611
713
|
this.dropZoneDropHandler(e);
|
|
612
714
|
}
|
|
715
|
+
// Cancel any pending RAF callbacks
|
|
716
|
+
if (this.rafId !== null) {
|
|
717
|
+
cancelAnimationFrame(this.rafId);
|
|
718
|
+
this.rafId = null;
|
|
719
|
+
}
|
|
720
|
+
this.pendingPointerEvent = null;
|
|
613
721
|
this.activePointerId.set(null);
|
|
614
722
|
this.removeDocumentListeners();
|
|
615
723
|
this._currentDropList.set(null);
|
|
@@ -633,9 +741,21 @@ class AXDragDirective {
|
|
|
633
741
|
const listUnderPointer = this.getDropListFromPoint(e.clientX, e.clientY);
|
|
634
742
|
const previousList = this._currentDropList();
|
|
635
743
|
let targetList = null;
|
|
636
|
-
|
|
744
|
+
const canDrop = listUnderPointer && this.canDropInList(listUnderPointer);
|
|
745
|
+
if (canDrop) {
|
|
637
746
|
targetList = listUnderPointer;
|
|
638
747
|
}
|
|
748
|
+
// Update cursor based on whether drop is allowed
|
|
749
|
+
if (listUnderPointer) {
|
|
750
|
+
const cloneEl = this.clonedElement();
|
|
751
|
+
const cursor = canDrop ? 'move' : 'not-allowed';
|
|
752
|
+
if (cloneEl) {
|
|
753
|
+
this.renderer.setStyle(cloneEl, 'cursor', cursor);
|
|
754
|
+
}
|
|
755
|
+
else {
|
|
756
|
+
this.renderer.setStyle(this.element(), 'cursor', cursor);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
639
759
|
if (targetList !== previousList) {
|
|
640
760
|
if (previousList) {
|
|
641
761
|
previousList.cancelSortPreview();
|
|
@@ -659,7 +779,40 @@ class AXDragDirective {
|
|
|
659
779
|
}
|
|
660
780
|
const dragGroup = this._parentDropList.dropListGroup();
|
|
661
781
|
const targetGroup = list.dropListGroup();
|
|
662
|
-
|
|
782
|
+
if (!dragGroup || dragGroup !== targetGroup) {
|
|
783
|
+
return false;
|
|
784
|
+
}
|
|
785
|
+
// Check for circular reference (tree-specific validation)
|
|
786
|
+
const draggedNode = this.dragData();
|
|
787
|
+
const targetNodeId = list.element.getAttribute('data-node-id');
|
|
788
|
+
if (draggedNode && this.isCircularReference(targetNodeId, draggedNode)) {
|
|
789
|
+
return false;
|
|
790
|
+
}
|
|
791
|
+
return true;
|
|
792
|
+
}
|
|
793
|
+
isCircularReference(targetNodeId, draggedNode) {
|
|
794
|
+
if (!draggedNode || typeof draggedNode !== 'object') {
|
|
795
|
+
return false;
|
|
796
|
+
}
|
|
797
|
+
const node = draggedNode;
|
|
798
|
+
// Check if dropping into itself
|
|
799
|
+
if (targetNodeId === node.id) {
|
|
800
|
+
return true;
|
|
801
|
+
}
|
|
802
|
+
// Check if targetNodeId is in draggedNode's descendants
|
|
803
|
+
if (!node.children || !Array.isArray(node.children)) {
|
|
804
|
+
return false;
|
|
805
|
+
}
|
|
806
|
+
for (const child of node.children) {
|
|
807
|
+
const childNode = child;
|
|
808
|
+
if (childNode.id === targetNodeId) {
|
|
809
|
+
return true;
|
|
810
|
+
}
|
|
811
|
+
if (this.isCircularReference(targetNodeId, child)) {
|
|
812
|
+
return true;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
return false;
|
|
663
816
|
}
|
|
664
817
|
dropZoneHoverHandler(e) {
|
|
665
818
|
const dropZones = this.getDropZonesFromPoint(e.clientX, e.clientY);
|
|
@@ -695,10 +848,37 @@ class AXDragDirective {
|
|
|
695
848
|
.map((el) => el['__axContext__']);
|
|
696
849
|
}
|
|
697
850
|
getDropListFromPoint(x, y) {
|
|
698
|
-
const
|
|
851
|
+
const dropListElements = this.document
|
|
699
852
|
.elementsFromPoint(x, y)
|
|
700
|
-
.
|
|
701
|
-
|
|
853
|
+
.filter((el) => el instanceof HTMLElement && el.dataset['axDropList'] === 'true');
|
|
854
|
+
if (dropListElements.length === 0) {
|
|
855
|
+
return null;
|
|
856
|
+
}
|
|
857
|
+
// If only one drop list, use it
|
|
858
|
+
if (dropListElements.length === 1) {
|
|
859
|
+
return dropListElements[0]['__axContext__'];
|
|
860
|
+
}
|
|
861
|
+
// Multiple drop lists detected (nested scenario like tree2)
|
|
862
|
+
// Prioritize based on pointer position and drop type
|
|
863
|
+
const ontoNodeList = dropListElements.find((el) => el.dataset['dropType'] === 'onto-node');
|
|
864
|
+
const reorderList = dropListElements.find((el) => el.dataset['dropType'] !== 'onto-node');
|
|
865
|
+
// If no special handling needed, return first
|
|
866
|
+
if (!ontoNodeList || !reorderList) {
|
|
867
|
+
return dropListElements[0]['__axContext__'];
|
|
868
|
+
}
|
|
869
|
+
// Calculate pointer position relative to the "onto-node" element
|
|
870
|
+
const ontoNodeRect = ontoNodeList.getBoundingClientRect();
|
|
871
|
+
const relativeY = y - ontoNodeRect.top;
|
|
872
|
+
const heightRatio = relativeY / ontoNodeRect.height;
|
|
873
|
+
// Smart zone detection based on pointer position
|
|
874
|
+
if (heightRatio < ZONE_TOP_THRESHOLD || heightRatio > ZONE_BOTTOM_THRESHOLD) {
|
|
875
|
+
// Top or bottom zone: reorder (drop BEFORE/AFTER node)
|
|
876
|
+
return reorderList['__axContext__'];
|
|
877
|
+
}
|
|
878
|
+
else {
|
|
879
|
+
// Center zone: onto-node (drop INTO node as child)
|
|
880
|
+
return ontoNodeList['__axContext__'];
|
|
881
|
+
}
|
|
702
882
|
}
|
|
703
883
|
dropZoneValidation(dropZone) {
|
|
704
884
|
if (!dropZone)
|
|
@@ -739,9 +919,14 @@ class AXDragDirective {
|
|
|
739
919
|
constrainedY = this.currentAxis().y;
|
|
740
920
|
if (this.dragLockAxis() === 'y')
|
|
741
921
|
constrainedX = this.currentAxis().x;
|
|
742
|
-
|
|
922
|
+
// Direct DOM manipulation without triggering change detection
|
|
743
923
|
this.renderer.setStyle(this.element(), 'translate', `${constrainedX}px ${constrainedY}px`);
|
|
744
|
-
|
|
924
|
+
// Only update signal and emit if position actually changed significantly (throttle)
|
|
925
|
+
const current = this.currentAxis();
|
|
926
|
+
if (Math.abs(current.x - constrainedX) > 0.5 || Math.abs(current.y - constrainedY) > 0.5) {
|
|
927
|
+
this.currentAxis.set({ x: constrainedX, y: constrainedY });
|
|
928
|
+
this.dragPositionChanged.emit({ x: constrainedX, y: constrainedY });
|
|
929
|
+
}
|
|
745
930
|
}
|
|
746
931
|
setClonePosition(x, y) {
|
|
747
932
|
let constrainedX = x;
|
|
@@ -758,9 +943,14 @@ class AXDragDirective {
|
|
|
758
943
|
constrainedY = this.currentCloneAxis().y;
|
|
759
944
|
if (this.dragLockAxis() === 'y')
|
|
760
945
|
constrainedX = this.currentCloneAxis().x;
|
|
761
|
-
|
|
946
|
+
// Direct DOM manipulation without triggering change detection
|
|
762
947
|
this.renderer.setStyle(cloneEl, 'translate', `${constrainedX}px ${constrainedY}px`);
|
|
763
|
-
|
|
948
|
+
// Only update signal and emit if position actually changed significantly (throttle)
|
|
949
|
+
const current = this.currentCloneAxis();
|
|
950
|
+
if (Math.abs(current.x - constrainedX) > 0.5 || Math.abs(current.y - constrainedY) > 0.5) {
|
|
951
|
+
this.currentCloneAxis.set({ x: constrainedX, y: constrainedY });
|
|
952
|
+
this.dragPositionChanged.emit({ x: constrainedX, y: constrainedY });
|
|
953
|
+
}
|
|
764
954
|
}
|
|
765
955
|
createCloneElementHandler(originalElement) {
|
|
766
956
|
if (!isPlatformBrowser(this.platformId)) {
|
|
@@ -819,8 +1009,8 @@ class AXDragDirective {
|
|
|
819
1009
|
try {
|
|
820
1010
|
target.style.setProperty(propName, computedStyles.getPropertyValue(propName), computedStyles.getPropertyPriority(propName));
|
|
821
1011
|
}
|
|
822
|
-
catch
|
|
823
|
-
|
|
1012
|
+
catch {
|
|
1013
|
+
// Some CSS properties cannot be set directly, skip silently
|
|
824
1014
|
}
|
|
825
1015
|
}
|
|
826
1016
|
}
|
|
@@ -950,6 +1140,9 @@ class AXDragDirective {
|
|
|
950
1140
|
return;
|
|
951
1141
|
const clone = this.clonedElement();
|
|
952
1142
|
if (clone?.parentNode) {
|
|
1143
|
+
// Remove classes before removing element
|
|
1144
|
+
this.renderer.removeClass(clone, 'ax-drag-preview');
|
|
1145
|
+
this.renderer.removeClass(clone, 'ax-dragging');
|
|
953
1146
|
this.renderer.removeChild(clone.parentNode, clone);
|
|
954
1147
|
}
|
|
955
1148
|
this.clonedElement.set(null);
|
|
@@ -977,15 +1170,15 @@ class AXDragDirective {
|
|
|
977
1170
|
this.document.removeEventListener('pointercancel', this.boundHandlePointerUp);
|
|
978
1171
|
});
|
|
979
1172
|
}
|
|
980
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
981
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.
|
|
1173
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1174
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "20.3.9", 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 }); }
|
|
982
1175
|
}
|
|
983
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDragDirective, decorators: [{
|
|
984
1177
|
type: Directive,
|
|
985
1178
|
args: [{
|
|
986
1179
|
selector: '[axDrag]',
|
|
987
1180
|
}]
|
|
988
|
-
}], propDecorators: { handleDirective: [{ type: i0.ContentChild, args: [i0.forwardRef(() => AXDragHandleDirective), { isSignal: true }] }], 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"] }] } });
|
|
1181
|
+
}], 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"] }] } });
|
|
989
1182
|
|
|
990
1183
|
class AXDropZoneDirective extends NXComponent {
|
|
991
1184
|
constructor() {
|
|
@@ -999,10 +1192,10 @@ class AXDropZoneDirective extends NXComponent {
|
|
|
999
1192
|
ngOnInit() {
|
|
1000
1193
|
this.element().dataset['axDropZone'] = 'true';
|
|
1001
1194
|
}
|
|
1002
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1003
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
1195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDropZoneDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1196
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: AXDropZoneDirective, isStandalone: true, selector: "[axDropZone]", inputs: { dropZoneGroup: { classPropertyName: "dropZoneGroup", publicName: "dropZoneGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onElementDrop: "onElementDrop", onElementHover: "onElementHover" }, exportAs: ["axDropZone"], usesInheritance: true, ngImport: i0 }); }
|
|
1004
1197
|
}
|
|
1005
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDropZoneDirective, decorators: [{
|
|
1006
1199
|
type: Directive,
|
|
1007
1200
|
args: [{
|
|
1008
1201
|
selector: '[axDropZone]',
|
|
@@ -1010,13 +1203,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
1010
1203
|
}]
|
|
1011
1204
|
}], propDecorators: { dropZoneGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropZoneGroup", required: false }] }], onElementDrop: [{ type: i0.Output, args: ["onElementDrop"] }], onElementHover: [{ type: i0.Output, args: ["onElementHover"] }] } });
|
|
1012
1205
|
|
|
1013
|
-
const COMPONENT = [AXDragDirective, AXDragHandleDirective, AXDropZoneDirective];
|
|
1206
|
+
const COMPONENT = [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective];
|
|
1014
1207
|
class AXDragDropModule {
|
|
1015
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1016
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
1017
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
1208
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1209
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.9", ngImport: i0, type: AXDragDropModule, imports: [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective], exports: [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective] }); }
|
|
1210
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDragDropModule }); }
|
|
1018
1211
|
}
|
|
1019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: AXDragDropModule, decorators: [{
|
|
1020
1213
|
type: NgModule,
|
|
1021
1214
|
args: [{
|
|
1022
1215
|
imports: [...COMPONENT],
|