@acorex/cdk 22.1.8 → 22.2.0-next.0
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/auto-follow-scroll/README.md +9 -0
- package/fesm2022/acorex-cdk-accordion.mjs +19 -19
- package/fesm2022/acorex-cdk-accordion.mjs.map +1 -1
- package/fesm2022/acorex-cdk-auto-follow-scroll.mjs +187 -0
- package/fesm2022/acorex-cdk-auto-follow-scroll.mjs.map +1 -0
- package/fesm2022/acorex-cdk-carousel.mjs +25 -7
- 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 +146 -92
- 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 +158 -68
- package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drawer.mjs +11 -11
- 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-full-screen.mjs +26 -147
- package/fesm2022/acorex-cdk-full-screen.mjs.map +1 -1
- package/fesm2022/acorex-cdk-gesture.mjs +30 -4
- package/fesm2022/acorex-cdk-gesture.mjs.map +1 -1
- package/fesm2022/acorex-cdk-highlight.mjs +8 -78
- package/fesm2022/acorex-cdk-highlight.mjs.map +1 -1
- package/fesm2022/acorex-cdk-horizontal-scroll.mjs +27 -10
- package/fesm2022/acorex-cdk-horizontal-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-input-mask.mjs +3 -3
- package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
- package/fesm2022/acorex-cdk-list-navigation.mjs +10 -10
- package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -1
- package/fesm2022/acorex-cdk-outline.mjs +277 -74
- package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +224 -21
- 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-qrcode.mjs.map +1 -1
- package/fesm2022/acorex-cdk-resizable.mjs +483 -200
- 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-shimmer.mjs +220 -0
- package/fesm2022/acorex-cdk-shimmer.mjs.map +1 -0
- 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 +9 -9
- package/fesm2022/acorex-cdk-uploader.mjs.map +1 -1
- package/fesm2022/acorex-cdk-viewport-guard.mjs +616 -0
- package/fesm2022/acorex-cdk-viewport-guard.mjs.map +1 -0
- package/fesm2022/acorex-cdk-virtual-scroll.mjs +10 -10
- package/fesm2022/acorex-cdk-virtual-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-wysiwyg.mjs +689 -37
- package/fesm2022/acorex-cdk-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-cdk-z-index.mjs +3 -3
- package/fesm2022/acorex-cdk-z-index.mjs.map +1 -1
- package/fesm2022/acorex-cdk.mjs.map +1 -1
- package/package.json +23 -7
- package/shimmer/README.md +11 -0
- package/types/acorex-cdk-auto-follow-scroll.d.ts +72 -0
- package/types/acorex-cdk-carousel.d.ts +2 -0
- package/types/acorex-cdk-clipboard.d.ts +1 -1
- package/types/acorex-cdk-common.d.ts +36 -19
- package/types/acorex-cdk-drag-drop.d.ts +43 -17
- package/types/acorex-cdk-full-screen.d.ts +18 -43
- package/types/acorex-cdk-gesture.d.ts +11 -1
- package/types/acorex-cdk-highlight.d.ts +1 -28
- package/types/acorex-cdk-horizontal-scroll.d.ts +3 -0
- package/types/acorex-cdk-outline.d.ts +20 -0
- package/types/acorex-cdk-overlay.d.ts +60 -4
- package/types/acorex-cdk-resizable.d.ts +80 -38
- package/types/acorex-cdk-shimmer.d.ts +68 -0
- package/types/acorex-cdk-uploader.d.ts +1 -1
- package/types/acorex-cdk-viewport-guard.d.ts +99 -0
- package/types/acorex-cdk-wysiwyg.d.ts +118 -14
- package/wysiwyg/README.md +3 -1
- package/fesm2022/acorex-cdk-double-click.mjs +0 -178
- package/fesm2022/acorex-cdk-double-click.mjs.map +0 -1
- package/types/acorex-cdk-double-click.d.ts +0 -66
|
@@ -23,10 +23,10 @@ class AXDomChangeDirective {
|
|
|
23
23
|
this.mutationObserver.disconnect();
|
|
24
24
|
this.resizeObserver.disconnect();
|
|
25
25
|
}
|
|
26
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
27
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDomChangeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
27
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXDomChangeDirective, isStandalone: true, selector: "[axDomChange]", outputs: { axMutationObserver: "axMutationObserver", axResizeObserver: "axResizeObserver" }, ngImport: i0 }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDomChangeDirective, decorators: [{
|
|
30
30
|
type: Directive,
|
|
31
31
|
args: [{
|
|
32
32
|
selector: '[axDomChange]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-cdk-dom.mjs","sources":["../../../../packages/cdk/dom/src/lib/dom-change.directive.ts","../../../../packages/cdk/dom/src/acorex-cdk-dom.ts"],"sourcesContent":["import { Directive, ElementRef, inject, OnDestroy, output } from '@angular/core';\n\n@Directive({\n selector: '[axDomChange]',\n})\nexport class AXDomChangeDirective implements OnDestroy {\n private mutationObserver: MutationObserver;\n private resizeObserver: ResizeObserver;\n private elementRef = inject(ElementRef);\n public axMutationObserver = output<MutationRecord[]>();\n public axResizeObserver = output<ResizeObserverEntry[]>();\n\n constructor() {\n this.mutationObserver = new MutationObserver((mutations: MutationRecord[]) => {\n this.axMutationObserver.emit(mutations);\n });\n\n this.resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => {\n this.axResizeObserver.emit(entries);\n });\n\n this.mutationObserver.observe(this.elementRef.nativeElement, {\n attributes: true,\n });\n\n this.resizeObserver.observe(this.elementRef.nativeElement, {\n box: 'border-box',\n });\n }\n\n ngOnDestroy(): void {\n this.mutationObserver.disconnect();\n this.resizeObserver.disconnect();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,oBAAoB,CAAA;AAO/B,IAAA,WAAA,GAAA;AAJQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAChC,IAAA,CAAA,kBAAkB,GAAG,MAAM,EAAoB;QAC/C,IAAA,CAAA,gBAAgB,GAAG,MAAM,EAAyB;QAGvD,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,CAAC,SAA2B,KAAI;AAC3E,YAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC;AACzC,QAAA,CAAC,CAAC;QAEF,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAA8B,KAAI;AAC1E,YAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC;AACrC,QAAA,CAAC,CAAC;QAEF,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE;AAC3D,YAAA,UAAU,EAAE,IAAI;AACjB,SAAA,CAAC;QAEF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE;AACzD,YAAA,GAAG,EAAE,YAAY;AAClB,SAAA,CAAC;IACJ;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE;AAClC,QAAA,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;IAClC;8GA5BW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,OAAA,EAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AAC1B,iBAAA;;;ACJD;;AAEG
|
|
1
|
+
{"version":3,"file":"acorex-cdk-dom.mjs","sources":["../../../../packages/cdk/dom/src/lib/dom-change.directive.ts","../../../../packages/cdk/dom/src/acorex-cdk-dom.ts"],"sourcesContent":["import { Directive, ElementRef, inject, OnDestroy, output } from '@angular/core';\n\n@Directive({\n selector: '[axDomChange]',\n})\nexport class AXDomChangeDirective implements OnDestroy {\n private mutationObserver: MutationObserver;\n private resizeObserver: ResizeObserver;\n private elementRef = inject(ElementRef);\n public axMutationObserver = output<MutationRecord[]>();\n public axResizeObserver = output<ResizeObserverEntry[]>();\n\n constructor() {\n this.mutationObserver = new MutationObserver((mutations: MutationRecord[]) => {\n this.axMutationObserver.emit(mutations);\n });\n\n this.resizeObserver = new ResizeObserver((entries: ResizeObserverEntry[]) => {\n this.axResizeObserver.emit(entries);\n });\n\n this.mutationObserver.observe(this.elementRef.nativeElement, {\n attributes: true,\n });\n\n this.resizeObserver.observe(this.elementRef.nativeElement, {\n box: 'border-box',\n });\n }\n\n ngOnDestroy(): void {\n this.mutationObserver.disconnect();\n this.resizeObserver.disconnect();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAKa,oBAAoB,CAAA;AAO/B,IAAA,WAAA,GAAA;AAJQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAChC,IAAA,CAAA,kBAAkB,GAAG,MAAM,EAAoB;QAC/C,IAAA,CAAA,gBAAgB,GAAG,MAAM,EAAyB;QAGvD,IAAI,CAAC,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,CAAC,SAA2B,KAAI;AAC3E,YAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC;AACzC,QAAA,CAAC,CAAC;QAEF,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAA8B,KAAI;AAC1E,YAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC;AACrC,QAAA,CAAC,CAAC;QAEF,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE;AAC3D,YAAA,UAAU,EAAE,IAAI;AACjB,SAAA,CAAC;QAEF,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE;AACzD,YAAA,GAAG,EAAE,YAAY;AAClB,SAAA,CAAC;IACJ;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE;AAClC,QAAA,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;IAClC;8GA5BW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,OAAA,EAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AAC1B,iBAAA;;;ACJD;;AAEG;;"}
|
|
@@ -1,24 +1,34 @@
|
|
|
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,
|
|
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
|
+
import { AXHtmlUtil } from '@acorex/core/utils';
|
|
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');
|
|
6
13
|
|
|
7
14
|
class AXDragHandleDirective {
|
|
8
15
|
constructor() {
|
|
9
|
-
this.el = inject(ElementRef);
|
|
16
|
+
this.el = inject((ElementRef));
|
|
17
|
+
this.parent = inject(AX_DRAG_PARENT, { optional: true });
|
|
10
18
|
this.element = signal(this.el.nativeElement, /* @ts-ignore */
|
|
11
19
|
...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
20
|
+
this.parent?.registerHandle(this);
|
|
21
|
+
inject(DestroyRef).onDestroy(() => this.parent?.unregisterHandle(this));
|
|
12
22
|
}
|
|
13
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
14
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragHandleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
24
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXDragHandleDirective, isStandalone: true, selector: "[axDragHandle]", ngImport: i0 }); }
|
|
15
25
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragHandleDirective, decorators: [{
|
|
17
27
|
type: Directive,
|
|
18
28
|
args: [{
|
|
19
29
|
selector: '[axDragHandle]',
|
|
20
30
|
}]
|
|
21
|
-
}] });
|
|
31
|
+
}], ctorParameters: () => [] });
|
|
22
32
|
|
|
23
33
|
/**
|
|
24
34
|
* @Directive axDropList
|
|
@@ -52,6 +62,8 @@ class AXDropListDirective extends NXComponent {
|
|
|
52
62
|
...(ngDevMode ? [{ debugName: "dropListOrientation" }] : /* istanbul ignore next */ []));
|
|
53
63
|
/** Emits when an item is dropped into the list. */
|
|
54
64
|
this.dropListDropped = output();
|
|
65
|
+
/** Emits when the sort preview transforms change during an active drag. */
|
|
66
|
+
this.sortPreviewChanged = output();
|
|
55
67
|
/** The `axDrag` directives that are direct children of this list. */
|
|
56
68
|
this._draggableItems = contentChildren(AXDragDirective, { ...(ngDevMode ? { debugName: "_draggableItems" } : /* istanbul ignore next */ {}), descendants: false });
|
|
57
69
|
// --- Internal State Management ---
|
|
@@ -72,6 +84,9 @@ class AXDropListDirective extends NXComponent {
|
|
|
72
84
|
/** The detected `gap` of the list for the current orientation. */
|
|
73
85
|
this._listGap = signal(0, /* @ts-ignore */
|
|
74
86
|
...(ngDevMode ? [{ debugName: "_listGap" }] : /* istanbul ignore next */ []));
|
|
87
|
+
/** Whether the list is in RTL direction (cached at drag start). */
|
|
88
|
+
this._isRtl = signal(false, /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "_isRtl" }] : /* istanbul ignore next */ []));
|
|
75
90
|
/** Internal orientation state; can be overridden programmatically by host components. */
|
|
76
91
|
this.orientation = linkedSignal(() => this.dropListOrientation(), /* @ts-ignore */
|
|
77
92
|
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
@@ -101,6 +116,10 @@ class AXDropListDirective extends NXComponent {
|
|
|
101
116
|
isDragActiveForThisList(dragItem) {
|
|
102
117
|
return this._activeDragItem() === dragItem;
|
|
103
118
|
}
|
|
119
|
+
/** Whether the list is horizontal and in RTL direction. */
|
|
120
|
+
isHorizontalRtl() {
|
|
121
|
+
return this.orientation() === 'horizontal' && this._isRtl();
|
|
122
|
+
}
|
|
104
123
|
/**
|
|
105
124
|
* Prepares the list for sorting when a drag operation starts from within this list.
|
|
106
125
|
* @param dragItem The item that is being dragged.
|
|
@@ -201,6 +220,7 @@ class AXDropListDirective extends NXComponent {
|
|
|
201
220
|
/** Caches the geometry of the list and its items at the start of a drag. */
|
|
202
221
|
_cacheGeometry() {
|
|
203
222
|
this._listInitialRect.set(this.element.getBoundingClientRect());
|
|
223
|
+
this._isRtl.set(AXHtmlUtil.isRtl(this.element));
|
|
204
224
|
this._detectAndCacheListGap();
|
|
205
225
|
const items = [...this._draggableItems()]
|
|
206
226
|
.sort((a, b) => a.element().compareDocumentPosition(b.element()) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1)
|
|
@@ -261,7 +281,10 @@ class AXDropListDirective extends NXComponent {
|
|
|
261
281
|
const itemMidPoint = (this.orientation() === 'vertical' ? sibling.initialRect.top : sibling.initialRect.left) +
|
|
262
282
|
scrollDelta +
|
|
263
283
|
(this.orientation() === 'vertical' ? sibling.height : sibling.width) / 2;
|
|
264
|
-
|
|
284
|
+
const isBeforeSibling = this.isHorizontalRtl()
|
|
285
|
+
? pointerPosition > itemMidPoint
|
|
286
|
+
: pointerPosition < itemMidPoint;
|
|
287
|
+
if (isBeforeSibling) {
|
|
265
288
|
newIndexInSiblings = i;
|
|
266
289
|
break;
|
|
267
290
|
}
|
|
@@ -311,15 +334,20 @@ class AXDropListDirective extends NXComponent {
|
|
|
311
334
|
? itemData.height + itemData.margins.top + itemData.margins.bottom
|
|
312
335
|
: itemData.width + itemData.margins.left + itemData.margins.right;
|
|
313
336
|
const draggedItemSize = isIntraListDrag ? getItemSpace(this._cachedItems()[originalIndex]) : 0;
|
|
337
|
+
const axisSign = this.isHorizontalRtl() ? -1 : 1;
|
|
314
338
|
this._cachedItems().forEach((data, index) => {
|
|
315
339
|
if (data.item.isDragDisabled()) {
|
|
316
340
|
this._renderer.removeStyle(data.element, 'transform');
|
|
317
341
|
return;
|
|
318
342
|
}
|
|
319
343
|
const transform = this._calculateTransform(index, originalIndex, draggedItemSize, getItemSpace);
|
|
320
|
-
|
|
344
|
+
const signedTransform = transform * axisSign;
|
|
345
|
+
this._renderer.setStyle(data.element, 'transform', transform
|
|
346
|
+
? `${this.orientation() === 'vertical' ? 'translateY' : 'translateX'}(${signedTransform}px)`
|
|
347
|
+
: '');
|
|
321
348
|
});
|
|
322
349
|
}
|
|
350
|
+
this.sortPreviewChanged.emit();
|
|
323
351
|
}
|
|
324
352
|
/** Creates or moves the placeholder element for inter-list drags */
|
|
325
353
|
_updatePlaceholderElement(activeItem, targetIndex) {
|
|
@@ -429,6 +457,7 @@ class AXDropListDirective extends NXComponent {
|
|
|
429
457
|
_resetAllTransforms() {
|
|
430
458
|
this._cachedItems().forEach((data) => this._renderer.setStyle(data.element, 'transform', ''));
|
|
431
459
|
this._removePlaceholderElement(); // Clean up inter-list placeholder
|
|
460
|
+
this.sortPreviewChanged.emit();
|
|
432
461
|
}
|
|
433
462
|
/** Resets the internal state of the directive to its initial values. */
|
|
434
463
|
resetSortState() {
|
|
@@ -439,16 +468,16 @@ class AXDropListDirective extends NXComponent {
|
|
|
439
468
|
this._listInitialRect.set(null);
|
|
440
469
|
this._listGap.set(0);
|
|
441
470
|
}
|
|
442
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
443
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.
|
|
471
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDropListDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
472
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.6", 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", sortPreviewChanged: "sortPreviewChanged" }, queries: [{ propertyName: "_draggableItems", predicate: AXDragDirective, isSignal: true }], exportAs: ["axDropList"], usesInheritance: true, ngImport: i0 }); }
|
|
444
473
|
}
|
|
445
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDropListDirective, decorators: [{
|
|
446
475
|
type: Directive,
|
|
447
476
|
args: [{
|
|
448
477
|
selector: '[axDropList]',
|
|
449
478
|
exportAs: 'axDropList',
|
|
450
479
|
}]
|
|
451
|
-
}], 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 }] }] } });
|
|
480
|
+
}], 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"] }], sortPreviewChanged: [{ type: i0.Output, args: ["sortPreviewChanged"] }], _draggableItems: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AXDragDirective), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
452
481
|
|
|
453
482
|
// Zone detection constants for nested drop lists (tree nodes)
|
|
454
483
|
const ZONE_TOP_THRESHOLD = 0.3; // Top 30% triggers reorder BEFORE
|
|
@@ -463,8 +492,8 @@ class AXDragDirective {
|
|
|
463
492
|
this.platformId = inject(PLATFORM_ID);
|
|
464
493
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
465
494
|
this.el = inject(ElementRef);
|
|
466
|
-
this.
|
|
467
|
-
...(ngDevMode ? [{ debugName: "
|
|
495
|
+
this.registeredHandleElements = signal([], /* @ts-ignore */
|
|
496
|
+
...(ngDevMode ? [{ debugName: "registeredHandleElements" }] : /* istanbul ignore next */ []));
|
|
468
497
|
this.axDrag = input(true, { ...(ngDevMode ? { debugName: "axDrag" } : /* istanbul ignore next */ {}), transform: (value) => value === '' || value === true });
|
|
469
498
|
this.dragData = input(/* @ts-ignore */
|
|
470
499
|
...(ngDevMode ? [undefined, { debugName: "dragData" }] : /* istanbul ignore next */ []));
|
|
@@ -571,53 +600,97 @@ class AXDragDirective {
|
|
|
571
600
|
return this.boundaryElement()?.getBoundingClientRect();
|
|
572
601
|
}, /* @ts-ignore */
|
|
573
602
|
...(ngDevMode ? [{ debugName: "boundaryRect" }] : /* istanbul ignore next */ []));
|
|
574
|
-
this.
|
|
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 */
|
|
575
609
|
...(ngDevMode ? [{ debugName: "handle" }] : /* istanbul ignore next */ []));
|
|
576
610
|
this.boundHandleDblClick = this.handleDblClick.bind(this);
|
|
577
611
|
this.boundHandlePointerUp = this.handlePointerUp.bind(this);
|
|
578
612
|
this.boundHandlePointerDown = this.handlePointerDown.bind(this);
|
|
579
613
|
this.boundHandlePointerMove = this.handlePointerMove.bind(this);
|
|
580
|
-
this.
|
|
581
|
-
|
|
614
|
+
this.attachedHandleElements = [];
|
|
615
|
+
this.styledHandleElements = [];
|
|
616
|
+
this.activeHandleElement = signal(null, /* @ts-ignore */
|
|
617
|
+
...(ngDevMode ? [{ debugName: "activeHandleElement" }] : /* istanbul ignore next */ []));
|
|
582
618
|
this.#dragDisabledEffect = effect(() => {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
619
|
+
const cursor = this.dragCursorOverride();
|
|
620
|
+
const disabled = this.isDragDisabled();
|
|
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');
|
|
589
628
|
}
|
|
590
|
-
this.renderer.setStyle(this.handle(), 'touch-action', this.dragTouchAction());
|
|
591
629
|
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
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;
|
|
643
|
+
}
|
|
644
|
+
if (!moving && !holdReady) {
|
|
645
|
+
this.renderer.setStyle(handle, 'cursor', cursor);
|
|
646
|
+
}
|
|
647
|
+
this.renderer.setStyle(handle, 'touch-action', this.dragTouchAction());
|
|
595
648
|
}
|
|
596
649
|
}, /* @ts-ignore */
|
|
597
650
|
...(ngDevMode ? [{ debugName: "#dragDisabledEffect" }] : /* istanbul ignore next */ []));
|
|
598
651
|
this.#handleChangeEffect = effect(() => {
|
|
599
652
|
if (!isPlatformBrowser(this.platformId))
|
|
600
653
|
return;
|
|
601
|
-
const
|
|
602
|
-
const
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
// Attach listeners to new handle
|
|
609
|
-
if (currentHandle && currentHandle !== previousHandle) {
|
|
610
|
-
this.zone.runOutsideAngular(() => {
|
|
611
|
-
currentHandle.addEventListener('dblclick', this.boundHandleDblClick);
|
|
612
|
-
currentHandle.addEventListener('pointerdown', this.boundHandlePointerDown, { passive: false });
|
|
613
|
-
});
|
|
614
|
-
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
|
+
}
|
|
615
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;
|
|
616
671
|
}, /* @ts-ignore */
|
|
617
672
|
...(ngDevMode ? [{ debugName: "#handleChangeEffect" }] : /* istanbul ignore next */ []));
|
|
618
673
|
}
|
|
619
674
|
#dragDisabledEffect;
|
|
620
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
|
+
}
|
|
621
694
|
ngOnInit() {
|
|
622
695
|
if (isPlatformBrowser(this.platformId)) {
|
|
623
696
|
if (this._parentDropList) {
|
|
@@ -628,11 +701,11 @@ class AXDragDirective {
|
|
|
628
701
|
}
|
|
629
702
|
ngOnDestroy() {
|
|
630
703
|
if (isPlatformBrowser(this.platformId)) {
|
|
631
|
-
const handle
|
|
632
|
-
if (handle) {
|
|
704
|
+
for (const handle of this.attachedHandleElements) {
|
|
633
705
|
handle.removeEventListener('dblclick', this.boundHandleDblClick);
|
|
634
706
|
handle.removeEventListener('pointerdown', this.boundHandlePointerDown);
|
|
635
707
|
}
|
|
708
|
+
this.attachedHandleElements = [];
|
|
636
709
|
this.removeDocumentListeners();
|
|
637
710
|
if (this.createCloneElement()) {
|
|
638
711
|
this.removeCloneElement();
|
|
@@ -645,8 +718,12 @@ class AXDragDirective {
|
|
|
645
718
|
this.renderer.removeStyle(this.element(), 'z-index');
|
|
646
719
|
}
|
|
647
720
|
}
|
|
721
|
+
usesGrabDragCursor() {
|
|
722
|
+
const cursor = this.dragCursorOverride();
|
|
723
|
+
return cursor === 'grab' || cursor === 'grab-on-drag';
|
|
724
|
+
}
|
|
648
725
|
resolveDropCursor(canDrop) {
|
|
649
|
-
if (this.
|
|
726
|
+
if (this.usesGrabDragCursor()) {
|
|
650
727
|
return canDrop ? 'grabbing' : 'not-allowed';
|
|
651
728
|
}
|
|
652
729
|
return canDrop ? 'move' : 'not-allowed';
|
|
@@ -675,17 +752,19 @@ class AXDragDirective {
|
|
|
675
752
|
scheduleHoldDelayFeedback() {
|
|
676
753
|
this.clearHoldDelayTimer();
|
|
677
754
|
const delay = this.startDelay();
|
|
678
|
-
|
|
755
|
+
const cursorMode = this.dragCursorOverride();
|
|
756
|
+
if (delay <= 0 || (cursorMode !== 'grab' && cursorMode !== 'grab-on-drag')) {
|
|
679
757
|
return;
|
|
680
758
|
}
|
|
759
|
+
const readyCursor = cursorMode === 'grab-on-drag' ? 'grab' : 'grabbing';
|
|
681
760
|
this.holdDelayTimer = setTimeout(() => {
|
|
682
761
|
this.holdDelayTimer = null;
|
|
683
762
|
if (!this.isDragging() || this.isMoving() || this.isDragDisabled()) {
|
|
684
763
|
return;
|
|
685
764
|
}
|
|
686
765
|
this.holdDelayReady.set(true);
|
|
687
|
-
this.renderer.setStyle(this.handle(), 'cursor',
|
|
688
|
-
this.setActiveDragCursor(
|
|
766
|
+
this.renderer.setStyle(this.handle(), 'cursor', readyCursor);
|
|
767
|
+
this.setActiveDragCursor(readyCursor);
|
|
689
768
|
}, delay);
|
|
690
769
|
}
|
|
691
770
|
setElementDropCursor(element, cursor) {
|
|
@@ -704,14 +783,16 @@ class AXDragDirective {
|
|
|
704
783
|
return;
|
|
705
784
|
if (!this.axDrag() || this.isDragDisabled() || e.button !== 0 || this._parentDropList?.isSortingDisabled())
|
|
706
785
|
return;
|
|
786
|
+
const handle = e.currentTarget instanceof HTMLElement ? e.currentTarget : this.handle();
|
|
787
|
+
this.activeHandleElement.set(handle);
|
|
707
788
|
this.isDragging.set(true);
|
|
708
789
|
this.movedAfterDelay.set(false);
|
|
709
790
|
if (this.dragCursorOverride() === 'move') {
|
|
710
|
-
this.renderer.setStyle(
|
|
791
|
+
this.renderer.setStyle(handle, 'cursor', 'move');
|
|
711
792
|
}
|
|
712
793
|
this.dragStartOffset.set({ x: e.clientX - this.currentAxis().x, y: e.clientY - this.currentAxis().y });
|
|
713
794
|
this.pointerDownPosition.set({ x: e.clientX, y: e.clientY });
|
|
714
|
-
this.renderer.setStyle(
|
|
795
|
+
this.renderer.setStyle(handle, 'userSelect', 'none');
|
|
715
796
|
this.activePointerId.set(e.pointerId);
|
|
716
797
|
this.addDocumentListeners();
|
|
717
798
|
this.dragStartTime.set(Date.now());
|
|
@@ -783,13 +864,21 @@ class AXDragDirective {
|
|
|
783
864
|
this.activePointerId.set(null);
|
|
784
865
|
this.removeDocumentListeners();
|
|
785
866
|
this.renderer.removeStyle(this.handle(), 'userSelect');
|
|
786
|
-
|
|
867
|
+
this.resetHandleCursorAfterDrag();
|
|
868
|
+
this.clearActiveDragCursor();
|
|
869
|
+
this.activeHandleElement.set(null);
|
|
870
|
+
}
|
|
871
|
+
resetHandleCursorAfterDrag() {
|
|
872
|
+
const cursorMode = this.dragCursorOverride();
|
|
873
|
+
if (cursorMode === 'grab') {
|
|
787
874
|
this.renderer.setStyle(this.handle(), 'cursor', 'grab');
|
|
788
875
|
}
|
|
789
|
-
|
|
876
|
+
else if (cursorMode === 'grab-on-drag') {
|
|
877
|
+
this.renderer.removeStyle(this.handle(), 'cursor');
|
|
878
|
+
}
|
|
790
879
|
}
|
|
791
880
|
startDrag(e) {
|
|
792
|
-
if (this.
|
|
881
|
+
if (this.usesGrabDragCursor()) {
|
|
793
882
|
this.renderer.setStyle(this.handle(), 'cursor', 'grabbing');
|
|
794
883
|
this.setActiveDragCursor('grabbing');
|
|
795
884
|
}
|
|
@@ -822,9 +911,7 @@ class AXDragDirective {
|
|
|
822
911
|
return;
|
|
823
912
|
}
|
|
824
913
|
this.clearHoldDelayTimer();
|
|
825
|
-
|
|
826
|
-
this.renderer.setStyle(this.handle(), 'cursor', 'grab');
|
|
827
|
-
}
|
|
914
|
+
this.resetHandleCursorAfterDrag();
|
|
828
915
|
this.clearActiveDragCursor();
|
|
829
916
|
const wasMoving = this.isMoving();
|
|
830
917
|
this.isMoving.set(false);
|
|
@@ -837,6 +924,7 @@ class AXDragDirective {
|
|
|
837
924
|
this.removeDocumentListeners();
|
|
838
925
|
this._currentDropList.set(null);
|
|
839
926
|
this.renderer.removeStyle(this.handle(), 'userSelect');
|
|
927
|
+
this.activeHandleElement.set(null);
|
|
840
928
|
return;
|
|
841
929
|
}
|
|
842
930
|
this.renderer.removeStyle(this.element(), 'z-index');
|
|
@@ -868,6 +956,7 @@ class AXDragDirective {
|
|
|
868
956
|
this.removeDocumentListeners();
|
|
869
957
|
this._currentDropList.set(null);
|
|
870
958
|
this.renderer.removeStyle(this.handle(), 'userSelect');
|
|
959
|
+
this.activeHandleElement.set(null);
|
|
871
960
|
if (this.createCloneElement()) {
|
|
872
961
|
const listUnderPointer = this.getDropListFromPoint(e.clientX, e.clientY);
|
|
873
962
|
this.removeCloneElementWithAnimation(x || 0, y || 0, listUnderPointer);
|
|
@@ -895,7 +984,7 @@ class AXDragDirective {
|
|
|
895
984
|
if (listUnderPointer) {
|
|
896
985
|
const cloneEl = this.clonedElement();
|
|
897
986
|
const cursor = this.resolveDropCursor(!!canDrop);
|
|
898
|
-
if (this.
|
|
987
|
+
if (this.usesGrabDragCursor()) {
|
|
899
988
|
this.setActiveDragCursor(cursor);
|
|
900
989
|
}
|
|
901
990
|
else if (cloneEl) {
|
|
@@ -1319,15 +1408,16 @@ class AXDragDirective {
|
|
|
1319
1408
|
this.document.removeEventListener('pointercancel', this.boundHandlePointerUp);
|
|
1320
1409
|
});
|
|
1321
1410
|
}
|
|
1322
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1323
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.
|
|
1411
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
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 }); }
|
|
1324
1413
|
}
|
|
1325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1414
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragDirective, decorators: [{
|
|
1326
1415
|
type: Directive,
|
|
1327
1416
|
args: [{
|
|
1328
1417
|
selector: '[axDrag]',
|
|
1418
|
+
providers: [{ provide: AX_DRAG_PARENT, useExisting: AXDragDirective }],
|
|
1329
1419
|
}]
|
|
1330
|
-
}], propDecorators: {
|
|
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"] }] } });
|
|
1331
1421
|
|
|
1332
1422
|
class AXDropZoneDirective extends NXComponent {
|
|
1333
1423
|
constructor() {
|
|
@@ -1344,10 +1434,10 @@ class AXDropZoneDirective extends NXComponent {
|
|
|
1344
1434
|
ngOnInit() {
|
|
1345
1435
|
this.element().dataset['axDropZone'] = 'true';
|
|
1346
1436
|
}
|
|
1347
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1348
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.
|
|
1437
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDropZoneDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1438
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", 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 }); }
|
|
1349
1439
|
}
|
|
1350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDropZoneDirective, decorators: [{
|
|
1351
1441
|
type: Directive,
|
|
1352
1442
|
args: [{
|
|
1353
1443
|
selector: '[axDropZone]',
|
|
@@ -1357,11 +1447,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1357
1447
|
|
|
1358
1448
|
const COMPONENT = [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective];
|
|
1359
1449
|
class AXDragDropModule {
|
|
1360
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
1361
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.
|
|
1362
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.
|
|
1450
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1451
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.6", ngImport: i0, type: AXDragDropModule, imports: [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective], exports: [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective] }); }
|
|
1452
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragDropModule }); }
|
|
1363
1453
|
}
|
|
1364
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
1454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXDragDropModule, decorators: [{
|
|
1365
1455
|
type: NgModule,
|
|
1366
1456
|
args: [{
|
|
1367
1457
|
imports: [...COMPONENT],
|
|
@@ -1408,5 +1498,5 @@ function transferArrayItem(currentArray, targetArray, currentIndex, targetIndex)
|
|
|
1408
1498
|
* Generated bundle index. Do not edit.
|
|
1409
1499
|
*/
|
|
1410
1500
|
|
|
1411
|
-
export { AXDragDirective, AXDragDropModule, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective, moveItemInArray, transferArrayItem };
|
|
1501
|
+
export { AXDragDirective, AXDragDropModule, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective, AX_DRAG_PARENT, moveItemInArray, transferArrayItem };
|
|
1412
1502
|
//# sourceMappingURL=acorex-cdk-drag-drop.mjs.map
|