@acorex/cdk 21.0.2-next.4 → 21.0.2-next.40
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/fesm2022/acorex-cdk-accordion.mjs +35 -35
- package/fesm2022/acorex-cdk-accordion.mjs.map +1 -1
- package/fesm2022/acorex-cdk-carousel.mjs +4 -4
- package/fesm2022/acorex-cdk-carousel.mjs.map +1 -1
- package/fesm2022/acorex-cdk-clipboard.mjs +7 -7
- package/fesm2022/acorex-cdk-clipboard.mjs.map +1 -1
- package/fesm2022/acorex-cdk-common.mjs +101 -101
- package/fesm2022/acorex-cdk-common.mjs.map +1 -1
- package/fesm2022/acorex-cdk-dom.mjs +3 -3
- package/fesm2022/acorex-cdk-double-click.mjs +5 -5
- package/fesm2022/acorex-cdk-double-click.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drag-drop.mjs +68 -68
- package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drawer.mjs +35 -35
- package/fesm2022/acorex-cdk-drawer.mjs.map +1 -1
- package/fesm2022/acorex-cdk-focus-trap.mjs +19 -19
- package/fesm2022/acorex-cdk-focus-trap.mjs.map +1 -1
- package/fesm2022/acorex-cdk-full-screen.mjs +4 -4
- package/fesm2022/acorex-cdk-full-screen.mjs.map +1 -1
- package/fesm2022/acorex-cdk-input-mask.mjs +19 -13
- package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
- package/fesm2022/acorex-cdk-list-navigation.mjs +17 -17
- package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -1
- package/fesm2022/acorex-cdk-outline.mjs +77 -66
- package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +16 -3
- package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
- package/fesm2022/acorex-cdk-pan-view.mjs +67 -49
- package/fesm2022/acorex-cdk-pan-view.mjs.map +1 -1
- package/fesm2022/acorex-cdk-resizable.mjs +46 -22
- package/fesm2022/acorex-cdk-resizable.mjs.map +1 -1
- package/fesm2022/acorex-cdk-selection.mjs +21 -21
- package/fesm2022/acorex-cdk-selection.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sliding-item.mjs +11 -11
- package/fesm2022/acorex-cdk-sliding-item.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sticky.mjs +3 -3
- package/fesm2022/acorex-cdk-uploader.mjs +298 -188
- package/fesm2022/acorex-cdk-uploader.mjs.map +1 -1
- package/fesm2022/acorex-cdk-virtual-scroll.mjs +17 -17
- package/fesm2022/acorex-cdk-virtual-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-wysiwyg.mjs +1 -1
- package/fesm2022/acorex-cdk-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-cdk-z-index.mjs +4 -4
- package/fesm2022/acorex-cdk-z-index.mjs.map +1 -1
- package/package.json +3 -2
- package/types/acorex-cdk-drawer.d.ts +2 -0
- package/types/acorex-cdk-focus-trap.d.ts +2 -3
- package/types/acorex-cdk-input-mask.d.ts +1 -0
- package/types/acorex-cdk-outline.d.ts +1 -0
- package/types/acorex-cdk-overlay.d.ts +1 -0
- package/types/acorex-cdk-pan-view.d.ts +4 -0
- package/types/acorex-cdk-resizable.d.ts +2 -0
- package/types/acorex-cdk-uploader.d.ts +120 -110
|
@@ -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: "21.
|
|
27
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDomChangeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
27
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXDomChangeDirective, isStandalone: true, selector: "[axDomChange]", outputs: { axMutationObserver: "axMutationObserver", axResizeObserver: "axResizeObserver" }, ngImport: i0 }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDomChangeDirective, decorators: [{
|
|
30
30
|
type: Directive,
|
|
31
31
|
args: [{
|
|
32
32
|
selector: '[axDomChange]',
|
|
@@ -24,14 +24,14 @@ class AXDoubleClickDirective {
|
|
|
24
24
|
* Defaults to 250ms.
|
|
25
25
|
* Two clicks/taps within this duration are considered a double-click.
|
|
26
26
|
*/
|
|
27
|
-
this.duration = input(250, ...(ngDevMode ? [{ debugName: "duration" }] : []));
|
|
27
|
+
this.duration = input(250, ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
28
28
|
/**
|
|
29
29
|
* Input to disable the directive's custom click handling.
|
|
30
30
|
* When true, native click and dblclick events will fire normally (DOM default behavior).
|
|
31
31
|
* When false (default), the directive prevents default and emits custom single/double-click events.
|
|
32
32
|
* Defaults to false.
|
|
33
33
|
*/
|
|
34
|
-
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
34
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
35
35
|
/**
|
|
36
36
|
* Output event emitted when a single-click is detected.
|
|
37
37
|
* Emits after the configured duration milliseconds if no second click occurs.
|
|
@@ -154,10 +154,10 @@ class AXDoubleClickDirective {
|
|
|
154
154
|
this.clickTimeout = null;
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
158
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
157
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDoubleClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
158
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: AXDoubleClickDirective, isStandalone: true, selector: "[axDoubleClick]", inputs: { duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onDblClick: "onDblClick" }, host: { listeners: { "click": "handleClick($event)", "touchend": "onTouchEnd($event)" } }, ngImport: i0 }); }
|
|
159
159
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
160
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDoubleClickDirective, decorators: [{
|
|
161
161
|
type: Directive,
|
|
162
162
|
args: [{
|
|
163
163
|
selector: '[axDoubleClick]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-cdk-double-click.mjs","sources":["../../../../packages/cdk/double-click/src/lib/double-click.directive.ts","../../../../packages/cdk/double-click/src/acorex-cdk-double-click.ts"],"sourcesContent":["import { Directive, ElementRef, inject, input, OnDestroy, output } from '@angular/core';\n\n/**\n * Directive to detect single-click and double-click events on the host element.\n * Supports both desktop (click-based detection) and mobile (touchend) events.\n * Prevents native click event propagation and emits separate single-click and double-click events.\n * Can be disabled to allow native DOM behavior (click and dblclick events).\n *\n * Usage:\n * <button\n * axDoubleClick\n * [duration]=\"300\"\n * [disabled]=\"false\"\n * (onClick)=\"onSingleClick($event)\"\n * (onDblClick)=\"onDoubleClick($event)\"\n * >Click me</button>\n */\n@Directive({\n selector: '[axDoubleClick]',\n host: {\n '(click)': 'handleClick($event)',\n '(touchend)': 'onTouchEnd($event)',\n },\n})\nexport class AXDoubleClickDirective implements OnDestroy {\n private elementRef = inject(ElementRef);\n\n /**\n * Input to configure the duration in milliseconds for detecting double-clicks.\n * Defaults to 250ms.\n * Two clicks/taps within this duration are considered a double-click.\n */\n public duration = input<number>(250);\n\n /**\n * Input to disable the directive's custom click handling.\n * When true, native click and dblclick events will fire normally (DOM default behavior).\n * When false (default), the directive prevents default and emits custom single/double-click events.\n * Defaults to false.\n */\n public disabled = input<boolean>(false);\n\n /**\n * Output event emitted when a single-click is detected.\n * Emits after the configured duration milliseconds if no second click occurs.\n * Emits the MouseEvent.\n */\n public onClick = output<MouseEvent>();\n\n /**\n * Output event emitted when a double-click is detected.\n * Emits when two clicks occur within the configured duration milliseconds.\n * Emits the Event (MouseEvent for desktop, TouchEvent for mobile).\n */\n public onDblClick = output<Event>();\n\n private lastClick = 0;\n private lastTap = 0;\n private clickTimeout: ReturnType<typeof setTimeout> | null = null;\n private pendingClickEvent: MouseEvent | null = null;\n\n /**\n * Handles click events and detects both single-clicks and double-clicks.\n * Prevents native click propagation and emits appropriate events.\n * When disabled is true, emits click immediately, still detects double-clicks, and allows native DOM behavior (no preventDefault).\n */\n handleClick(event: MouseEvent): void {\n const duration = this.duration();\n const currentTime = new Date().getTime();\n const clickGap = currentTime - this.lastClick;\n\n // If disabled, emit click immediately and still track for double-click, but don't prevent default\n if (this.disabled()) {\n // Emit single click immediately\n this.onClick.emit(event);\n\n // Still track for double-click detection\n if (clickGap > 0 && clickGap < duration) {\n // Double-click detected - emit double-click\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n this.clickTimeout = null;\n }\n if (this.pendingClickEvent) {\n this.pendingClickEvent = null;\n }\n this.onDblClick.emit(event);\n this.lastClick = 0;\n } else {\n // First click - store it and wait to see if a second click comes\n this.lastClick = currentTime;\n this.pendingClickEvent = event;\n\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n }\n\n // Set timeout to emit double-click if second click occurs within duration\n // Note: We already emitted single-click, so we just track for double-click here\n this.clickTimeout = setTimeout(() => {\n // No double-click detected within duration, reset state\n this.pendingClickEvent = null;\n this.lastClick = 0;\n this.clickTimeout = null;\n }, duration);\n }\n\n // Don't prevent default - allow native click and dblclick to fire\n return;\n }\n\n // When enabled, prevent the native click event from propagating\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n if (clickGap > 0 && clickGap < duration) {\n // Double-click detected - clear pending single click and emit double-click\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n this.clickTimeout = null;\n }\n if (this.pendingClickEvent) {\n this.pendingClickEvent = null;\n }\n this.onDblClick.emit(event);\n this.lastClick = 0;\n } else {\n // First click - store it and wait to see if a second click comes\n this.lastClick = currentTime;\n this.pendingClickEvent = event;\n\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n }\n\n // Set timeout to emit single-click if no second click occurs\n this.clickTimeout = setTimeout(() => {\n // No double-click detected, emit single-click\n if (this.pendingClickEvent) {\n this.onClick.emit(this.pendingClickEvent);\n this.pendingClickEvent = null;\n }\n this.lastClick = 0;\n this.clickTimeout = null;\n }, duration);\n }\n }\n\n /**\n * Handles touchend events (mobile) to detect double-tap.\n * When disabled is true, allows native touch behavior.\n */\n onTouchEnd(event: TouchEvent): void {\n // If disabled, let native events fire normally\n if (this.disabled()) {\n return;\n }\n\n const duration = this.duration();\n const currentTime = new Date().getTime();\n const tapGap = currentTime - this.lastTap;\n\n if (tapGap > 0 && tapGap < duration) {\n // Detected a double-tap\n this.onDblClick.emit(event);\n event.preventDefault(); // Prevent further default actions\n }\n this.lastTap = currentTime;\n }\n\n ngOnDestroy(): void {\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n this.clickTimeout = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;AAcG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,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,qBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAPlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,qBAAqB;AAChC,wBAAA,YAAY,EAAE,oBAAoB;AACnC,qBAAA;AACF,iBAAA;;;ACvBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-cdk-double-click.mjs","sources":["../../../../packages/cdk/double-click/src/lib/double-click.directive.ts","../../../../packages/cdk/double-click/src/acorex-cdk-double-click.ts"],"sourcesContent":["import { Directive, ElementRef, inject, input, OnDestroy, output } from '@angular/core';\n\n/**\n * Directive to detect single-click and double-click events on the host element.\n * Supports both desktop (click-based detection) and mobile (touchend) events.\n * Prevents native click event propagation and emits separate single-click and double-click events.\n * Can be disabled to allow native DOM behavior (click and dblclick events).\n *\n * Usage:\n * <button\n * axDoubleClick\n * [duration]=\"300\"\n * [disabled]=\"false\"\n * (onClick)=\"onSingleClick($event)\"\n * (onDblClick)=\"onDoubleClick($event)\"\n * >Click me</button>\n */\n@Directive({\n selector: '[axDoubleClick]',\n host: {\n '(click)': 'handleClick($event)',\n '(touchend)': 'onTouchEnd($event)',\n },\n})\nexport class AXDoubleClickDirective implements OnDestroy {\n private elementRef = inject(ElementRef);\n\n /**\n * Input to configure the duration in milliseconds for detecting double-clicks.\n * Defaults to 250ms.\n * Two clicks/taps within this duration are considered a double-click.\n */\n public duration = input<number>(250);\n\n /**\n * Input to disable the directive's custom click handling.\n * When true, native click and dblclick events will fire normally (DOM default behavior).\n * When false (default), the directive prevents default and emits custom single/double-click events.\n * Defaults to false.\n */\n public disabled = input<boolean>(false);\n\n /**\n * Output event emitted when a single-click is detected.\n * Emits after the configured duration milliseconds if no second click occurs.\n * Emits the MouseEvent.\n */\n public onClick = output<MouseEvent>();\n\n /**\n * Output event emitted when a double-click is detected.\n * Emits when two clicks occur within the configured duration milliseconds.\n * Emits the Event (MouseEvent for desktop, TouchEvent for mobile).\n */\n public onDblClick = output<Event>();\n\n private lastClick = 0;\n private lastTap = 0;\n private clickTimeout: ReturnType<typeof setTimeout> | null = null;\n private pendingClickEvent: MouseEvent | null = null;\n\n /**\n * Handles click events and detects both single-clicks and double-clicks.\n * Prevents native click propagation and emits appropriate events.\n * When disabled is true, emits click immediately, still detects double-clicks, and allows native DOM behavior (no preventDefault).\n */\n handleClick(event: MouseEvent): void {\n const duration = this.duration();\n const currentTime = new Date().getTime();\n const clickGap = currentTime - this.lastClick;\n\n // If disabled, emit click immediately and still track for double-click, but don't prevent default\n if (this.disabled()) {\n // Emit single click immediately\n this.onClick.emit(event);\n\n // Still track for double-click detection\n if (clickGap > 0 && clickGap < duration) {\n // Double-click detected - emit double-click\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n this.clickTimeout = null;\n }\n if (this.pendingClickEvent) {\n this.pendingClickEvent = null;\n }\n this.onDblClick.emit(event);\n this.lastClick = 0;\n } else {\n // First click - store it and wait to see if a second click comes\n this.lastClick = currentTime;\n this.pendingClickEvent = event;\n\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n }\n\n // Set timeout to emit double-click if second click occurs within duration\n // Note: We already emitted single-click, so we just track for double-click here\n this.clickTimeout = setTimeout(() => {\n // No double-click detected within duration, reset state\n this.pendingClickEvent = null;\n this.lastClick = 0;\n this.clickTimeout = null;\n }, duration);\n }\n\n // Don't prevent default - allow native click and dblclick to fire\n return;\n }\n\n // When enabled, prevent the native click event from propagating\n event.preventDefault();\n event.stopPropagation();\n event.stopImmediatePropagation();\n\n if (clickGap > 0 && clickGap < duration) {\n // Double-click detected - clear pending single click and emit double-click\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n this.clickTimeout = null;\n }\n if (this.pendingClickEvent) {\n this.pendingClickEvent = null;\n }\n this.onDblClick.emit(event);\n this.lastClick = 0;\n } else {\n // First click - store it and wait to see if a second click comes\n this.lastClick = currentTime;\n this.pendingClickEvent = event;\n\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n }\n\n // Set timeout to emit single-click if no second click occurs\n this.clickTimeout = setTimeout(() => {\n // No double-click detected, emit single-click\n if (this.pendingClickEvent) {\n this.onClick.emit(this.pendingClickEvent);\n this.pendingClickEvent = null;\n }\n this.lastClick = 0;\n this.clickTimeout = null;\n }, duration);\n }\n }\n\n /**\n * Handles touchend events (mobile) to detect double-tap.\n * When disabled is true, allows native touch behavior.\n */\n onTouchEnd(event: TouchEvent): void {\n // If disabled, let native events fire normally\n if (this.disabled()) {\n return;\n }\n\n const duration = this.duration();\n const currentTime = new Date().getTime();\n const tapGap = currentTime - this.lastTap;\n\n if (tapGap > 0 && tapGap < duration) {\n // Detected a double-tap\n this.onDblClick.emit(event);\n event.preventDefault(); // Prevent further default actions\n }\n this.lastTap = currentTime;\n }\n\n ngOnDestroy(): void {\n if (this.clickTimeout) {\n clearTimeout(this.clickTimeout);\n this.clickTimeout = null;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;AAcG;MAQU,sBAAsB,C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AA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,qBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAPlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,qBAAqB;AAChC,wBAAA,YAAY,EAAE,oBAAoB;AACnC,qBAAA;AACF,iBAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -7,12 +7,12 @@ import { NXComponent } from '@acorex/cdk/common';
|
|
|
7
7
|
class AXDragHandleDirective {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.el = inject(ElementRef);
|
|
10
|
-
this.element = signal(this.el.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : []));
|
|
10
|
+
this.element = signal(this.el.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
13
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDragHandleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
13
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: AXDragHandleDirective, isStandalone: true, selector: "[axDragHandle]", ngImport: i0 }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDragHandleDirective, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
18
18
|
selector: '[axDragHandle]',
|
|
@@ -39,30 +39,30 @@ class AXDropListDirective extends NXComponent {
|
|
|
39
39
|
this._hostEl = inject(ElementRef);
|
|
40
40
|
// --- Public API: Inputs and Outputs ---
|
|
41
41
|
/** Boolean input matching the directive selector name for conditional application. */
|
|
42
|
-
this.axDropList = input(true, { ...(ngDevMode ? { debugName: "axDropList" } : {}), transform: (value) => value === '' || value === true });
|
|
42
|
+
this.axDropList = input(true, { ...(ngDevMode ? { debugName: "axDropList" } : /* istanbul ignore next */ {}), transform: (value) => value === '' || value === true });
|
|
43
43
|
/** Whether sorting within this list is disabled. */
|
|
44
|
-
this.sortingDisabled = input(false, ...(ngDevMode ? [{ debugName: "sortingDisabled" }] : []));
|
|
44
|
+
this.sortingDisabled = input(false, ...(ngDevMode ? [{ debugName: "sortingDisabled" }] : /* istanbul ignore next */ []));
|
|
45
45
|
/** The group this drop list belongs to. Dragging is only allowed between lists of the same group. */
|
|
46
|
-
this.dropListGroup = input(...(ngDevMode ? [undefined, { debugName: "dropListGroup" }] : []));
|
|
46
|
+
this.dropListGroup = input(...(ngDevMode ? [undefined, { debugName: "dropListGroup" }] : /* istanbul ignore next */ []));
|
|
47
47
|
/** The layout orientation of the list. */
|
|
48
|
-
this.dropListOrientation = input('vertical', ...(ngDevMode ? [{ debugName: "dropListOrientation" }] : []));
|
|
48
|
+
this.dropListOrientation = input('vertical', ...(ngDevMode ? [{ debugName: "dropListOrientation" }] : /* istanbul ignore next */ []));
|
|
49
49
|
/** Emits when an item is dropped into the list. */
|
|
50
50
|
this.dropListDropped = output();
|
|
51
51
|
/** The `axDrag` directives that are direct children of this list. */
|
|
52
|
-
this._draggableItems = contentChildren(AXDragDirective, { ...(ngDevMode ? { debugName: "_draggableItems" } : {}), descendants: false });
|
|
52
|
+
this._draggableItems = contentChildren(AXDragDirective, { ...(ngDevMode ? { debugName: "_draggableItems" } : /* istanbul ignore next */ {}), descendants: false });
|
|
53
53
|
// --- Internal State Management ---
|
|
54
54
|
/** The native element of the drop list. */
|
|
55
55
|
this.element = this._hostEl.nativeElement;
|
|
56
56
|
/** The draggable item currently being moved over this list. */
|
|
57
|
-
this._activeDragItem = signal(null, ...(ngDevMode ? [{ debugName: "_activeDragItem" }] : []));
|
|
57
|
+
this._activeDragItem = signal(null, ...(ngDevMode ? [{ debugName: "_activeDragItem" }] : /* istanbul ignore next */ []));
|
|
58
58
|
/** The calculated index where the placeholder/item should be. */
|
|
59
|
-
this._placeholderIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_placeholderIndex" }] : []));
|
|
59
|
+
this._placeholderIndex = signal(-1, ...(ngDevMode ? [{ debugName: "_placeholderIndex" }] : /* istanbul ignore next */ []));
|
|
60
60
|
/** A snapshot of the items' data and geometry at the start of the drag. */
|
|
61
|
-
this._cachedItems = signal([], ...(ngDevMode ? [{ debugName: "_cachedItems" }] : []));
|
|
61
|
+
this._cachedItems = signal([], ...(ngDevMode ? [{ debugName: "_cachedItems" }] : /* istanbul ignore next */ []));
|
|
62
62
|
/** The list's initial bounding box, used to calculate scroll delta. */
|
|
63
|
-
this._listInitialRect = signal(null, ...(ngDevMode ? [{ debugName: "_listInitialRect" }] : []));
|
|
63
|
+
this._listInitialRect = signal(null, ...(ngDevMode ? [{ debugName: "_listInitialRect" }] : /* istanbul ignore next */ []));
|
|
64
64
|
/** The detected `gap` of the list for the current orientation. */
|
|
65
|
-
this._listGap = signal(0, ...(ngDevMode ? [{ debugName: "_listGap" }] : []));
|
|
65
|
+
this._listGap = signal(0, ...(ngDevMode ? [{ debugName: "_listGap" }] : /* istanbul ignore next */ []));
|
|
66
66
|
/** A signal-based alias for the orientation input for internal use. */
|
|
67
67
|
this._orientation = this.dropListOrientation;
|
|
68
68
|
/** DOM placeholder element for inter-list drags */
|
|
@@ -424,10 +424,10 @@ class AXDropListDirective extends NXComponent {
|
|
|
424
424
|
this._listInitialRect.set(null);
|
|
425
425
|
this._listGap.set(0);
|
|
426
426
|
}
|
|
427
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
428
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.
|
|
427
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDropListDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
428
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.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 }); }
|
|
429
429
|
}
|
|
430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDropListDirective, decorators: [{
|
|
431
431
|
type: Directive,
|
|
432
432
|
args: [{
|
|
433
433
|
selector: '[axDropList]',
|
|
@@ -448,41 +448,41 @@ class AXDragDirective {
|
|
|
448
448
|
this.platformId = inject(PLATFORM_ID);
|
|
449
449
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
450
450
|
this.el = inject(ElementRef);
|
|
451
|
-
this.handleDirective = contentChild(AXDragHandleDirective, ...(ngDevMode ? [{ debugName: "handleDirective" }] : []));
|
|
452
|
-
this.axDrag = input(true, { ...(ngDevMode ? { debugName: "axDrag" } : {}), transform: (value) => value === '' || value === true });
|
|
453
|
-
this.dragData = input(...(ngDevMode ? [undefined, { debugName: "dragData" }] : []));
|
|
454
|
-
this.dragDisabled = input(false, ...(ngDevMode ? [{ debugName: "dragDisabled" }] : []));
|
|
455
|
-
this.dragTransition = input(true, ...(ngDevMode ? [{ debugName: "dragTransition" }] : []));
|
|
456
|
-
this.dragElementClone = input(false, ...(ngDevMode ? [{ debugName: "dragElementClone" }] : []));
|
|
457
|
-
this.dropZoneGroup = input(...(ngDevMode ? [undefined, { debugName: "dropZoneGroup" }] : []));
|
|
458
|
-
this.dragStartDelay = input(...(ngDevMode ? [undefined, { debugName: "dragStartDelay" }] : []));
|
|
459
|
-
this.dragResetOnDblClick = input(true, ...(ngDevMode ? [{ debugName: "dragResetOnDblClick" }] : []));
|
|
460
|
-
this.dragLockAxis = input(null, ...(ngDevMode ? [{ debugName: "dragLockAxis" }] : []));
|
|
461
|
-
this.dragClonedTemplate = input(...(ngDevMode ? [undefined, { debugName: "dragClonedTemplate" }] : []));
|
|
462
|
-
this.dragCursor = input('move', ...(ngDevMode ? [{ debugName: "dragCursor" }] : []));
|
|
463
|
-
this.dragBoundary = input(...(ngDevMode ? [undefined, { debugName: "dragBoundary" }] : []));
|
|
464
|
-
this.dragTransitionDuration = input(150, ...(ngDevMode ? [{ debugName: "dragTransitionDuration" }] : []));
|
|
451
|
+
this.handleDirective = contentChild(AXDragHandleDirective, ...(ngDevMode ? [{ debugName: "handleDirective" }] : /* istanbul ignore next */ []));
|
|
452
|
+
this.axDrag = input(true, { ...(ngDevMode ? { debugName: "axDrag" } : /* istanbul ignore next */ {}), transform: (value) => value === '' || value === true });
|
|
453
|
+
this.dragData = input(...(ngDevMode ? [undefined, { debugName: "dragData" }] : /* istanbul ignore next */ []));
|
|
454
|
+
this.dragDisabled = input(false, ...(ngDevMode ? [{ debugName: "dragDisabled" }] : /* istanbul ignore next */ []));
|
|
455
|
+
this.dragTransition = input(true, ...(ngDevMode ? [{ debugName: "dragTransition" }] : /* istanbul ignore next */ []));
|
|
456
|
+
this.dragElementClone = input(false, ...(ngDevMode ? [{ debugName: "dragElementClone" }] : /* istanbul ignore next */ []));
|
|
457
|
+
this.dropZoneGroup = input(...(ngDevMode ? [undefined, { debugName: "dropZoneGroup" }] : /* istanbul ignore next */ []));
|
|
458
|
+
this.dragStartDelay = input(...(ngDevMode ? [undefined, { debugName: "dragStartDelay" }] : /* istanbul ignore next */ []));
|
|
459
|
+
this.dragResetOnDblClick = input(true, ...(ngDevMode ? [{ debugName: "dragResetOnDblClick" }] : /* istanbul ignore next */ []));
|
|
460
|
+
this.dragLockAxis = input(null, ...(ngDevMode ? [{ debugName: "dragLockAxis" }] : /* istanbul ignore next */ []));
|
|
461
|
+
this.dragClonedTemplate = input(...(ngDevMode ? [undefined, { debugName: "dragClonedTemplate" }] : /* istanbul ignore next */ []));
|
|
462
|
+
this.dragCursor = input('move', ...(ngDevMode ? [{ debugName: "dragCursor" }] : /* istanbul ignore next */ []));
|
|
463
|
+
this.dragBoundary = input(...(ngDevMode ? [undefined, { debugName: "dragBoundary" }] : /* istanbul ignore next */ []));
|
|
464
|
+
this.dragTransitionDuration = input(150, ...(ngDevMode ? [{ debugName: "dragTransitionDuration" }] : /* istanbul ignore next */ []));
|
|
465
465
|
this.dragPositionChanged = output();
|
|
466
|
-
this.isMoving = signal(false, ...(ngDevMode ? [{ debugName: "isMoving" }] : []));
|
|
467
|
-
this.clonedElement = signal(null, ...(ngDevMode ? [{ debugName: "clonedElement" }] : []));
|
|
468
|
-
this.currentAxis = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "currentAxis" }] : []));
|
|
469
|
-
this.currentCloneAxis = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "currentCloneAxis" }] : []));
|
|
470
|
-
this.transitionDuration = linkedSignal(() => this.dragTransitionDuration(), ...(ngDevMode ? [{ debugName: "transitionDuration" }] : []));
|
|
471
|
-
this.element = signal(this.el.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : []));
|
|
472
|
-
this.dragStartTime = signal(0, ...(ngDevMode ? [{ debugName: "dragStartTime" }] : []));
|
|
473
|
-
this.isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : []));
|
|
474
|
-
this.elementOpacity = signal('1', ...(ngDevMode ? [{ debugName: "elementOpacity" }] : []));
|
|
475
|
-
this.movedAfterDelay = signal(false, ...(ngDevMode ? [{ debugName: "movedAfterDelay" }] : []));
|
|
476
|
-
this.activePointerId = signal(null, ...(ngDevMode ? [{ debugName: "activePointerId" }] : []));
|
|
477
|
-
this.prevDropZone = signal(null, ...(ngDevMode ? [{ debugName: "prevDropZone" }] : []));
|
|
478
|
-
this.dragStartOffset = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "dragStartOffset" }] : []));
|
|
479
|
-
this.clonePointerOffset = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "clonePointerOffset" }] : []));
|
|
480
|
-
this.clonedElementViewRef = signal(null, ...(ngDevMode ? [{ debugName: "clonedElementViewRef" }] : []));
|
|
466
|
+
this.isMoving = signal(false, ...(ngDevMode ? [{ debugName: "isMoving" }] : /* istanbul ignore next */ []));
|
|
467
|
+
this.clonedElement = signal(null, ...(ngDevMode ? [{ debugName: "clonedElement" }] : /* istanbul ignore next */ []));
|
|
468
|
+
this.currentAxis = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "currentAxis" }] : /* istanbul ignore next */ []));
|
|
469
|
+
this.currentCloneAxis = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "currentCloneAxis" }] : /* istanbul ignore next */ []));
|
|
470
|
+
this.transitionDuration = linkedSignal(() => this.dragTransitionDuration(), ...(ngDevMode ? [{ debugName: "transitionDuration" }] : /* istanbul ignore next */ []));
|
|
471
|
+
this.element = signal(this.el.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
472
|
+
this.dragStartTime = signal(0, ...(ngDevMode ? [{ debugName: "dragStartTime" }] : /* istanbul ignore next */ []));
|
|
473
|
+
this.isDragging = signal(false, ...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
|
|
474
|
+
this.elementOpacity = signal('1', ...(ngDevMode ? [{ debugName: "elementOpacity" }] : /* istanbul ignore next */ []));
|
|
475
|
+
this.movedAfterDelay = signal(false, ...(ngDevMode ? [{ debugName: "movedAfterDelay" }] : /* istanbul ignore next */ []));
|
|
476
|
+
this.activePointerId = signal(null, ...(ngDevMode ? [{ debugName: "activePointerId" }] : /* istanbul ignore next */ []));
|
|
477
|
+
this.prevDropZone = signal(null, ...(ngDevMode ? [{ debugName: "prevDropZone" }] : /* istanbul ignore next */ []));
|
|
478
|
+
this.dragStartOffset = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "dragStartOffset" }] : /* istanbul ignore next */ []));
|
|
479
|
+
this.clonePointerOffset = signal({ x: 0, y: 0 }, ...(ngDevMode ? [{ debugName: "clonePointerOffset" }] : /* istanbul ignore next */ []));
|
|
480
|
+
this.clonedElementViewRef = signal(null, ...(ngDevMode ? [{ debugName: "clonedElementViewRef" }] : /* istanbul ignore next */ []));
|
|
481
481
|
this.rafId = null;
|
|
482
482
|
this.pendingPointerEvent = null;
|
|
483
483
|
this._parentDropList = inject(AXDropListDirective, { optional: true, skipSelf: true, host: false });
|
|
484
|
-
this._currentDropList = signal(null, ...(ngDevMode ? [{ debugName: "_currentDropList" }] : []));
|
|
485
|
-
this.createCloneElement = computed(() => this.dragElementClone() || !!this._parentDropList, ...(ngDevMode ? [{ debugName: "createCloneElement" }] : []));
|
|
484
|
+
this._currentDropList = signal(null, ...(ngDevMode ? [{ debugName: "_currentDropList" }] : /* istanbul ignore next */ []));
|
|
485
|
+
this.createCloneElement = computed(() => this.dragElementClone() || !!this._parentDropList, ...(ngDevMode ? [{ debugName: "createCloneElement" }] : /* istanbul ignore next */ []));
|
|
486
486
|
this.boundaryElement = computed(() => {
|
|
487
487
|
const boundary = this.dragBoundary();
|
|
488
488
|
if (!boundary) {
|
|
@@ -492,25 +492,25 @@ class AXDragDirective {
|
|
|
492
492
|
return this.document.querySelector(boundary);
|
|
493
493
|
}
|
|
494
494
|
return boundary instanceof ElementRef ? boundary.nativeElement : boundary;
|
|
495
|
-
}, ...(ngDevMode ? [{ debugName: "boundaryElement" }] : []));
|
|
495
|
+
}, ...(ngDevMode ? [{ debugName: "boundaryElement" }] : /* istanbul ignore next */ []));
|
|
496
496
|
this.elementRect = computed(() => {
|
|
497
497
|
if (!isPlatformBrowser(this.platformId)) {
|
|
498
498
|
return null;
|
|
499
499
|
}
|
|
500
500
|
return this.element().getBoundingClientRect();
|
|
501
|
-
}, ...(ngDevMode ? [{ debugName: "elementRect" }] : []));
|
|
501
|
+
}, ...(ngDevMode ? [{ debugName: "elementRect" }] : /* istanbul ignore next */ []));
|
|
502
502
|
this.boundaryRect = computed(() => {
|
|
503
503
|
if (!isPlatformBrowser(this.platformId)) {
|
|
504
504
|
return null;
|
|
505
505
|
}
|
|
506
506
|
return this.boundaryElement()?.getBoundingClientRect();
|
|
507
|
-
}, ...(ngDevMode ? [{ debugName: "boundaryRect" }] : []));
|
|
508
|
-
this.handle = computed(() => this.handleDirective()?.element() ?? this.element(), ...(ngDevMode ? [{ debugName: "handle" }] : []));
|
|
507
|
+
}, ...(ngDevMode ? [{ debugName: "boundaryRect" }] : /* istanbul ignore next */ []));
|
|
508
|
+
this.handle = computed(() => this.handleDirective()?.element() ?? this.element(), ...(ngDevMode ? [{ debugName: "handle" }] : /* istanbul ignore next */ []));
|
|
509
509
|
this.boundHandleDblClick = this.handleDblClick.bind(this);
|
|
510
510
|
this.boundHandlePointerUp = this.handlePointerUp.bind(this);
|
|
511
511
|
this.boundHandlePointerDown = this.handlePointerDown.bind(this);
|
|
512
512
|
this.boundHandlePointerMove = this.handlePointerMove.bind(this);
|
|
513
|
-
this.listenersAttached = signal(null, ...(ngDevMode ? [{ debugName: "listenersAttached" }] : []));
|
|
513
|
+
this.listenersAttached = signal(null, ...(ngDevMode ? [{ debugName: "listenersAttached" }] : /* istanbul ignore next */ []));
|
|
514
514
|
this.#dragDisabledEffect = effect(() => {
|
|
515
515
|
if (this.dragCursor() === 'none') {
|
|
516
516
|
return;
|
|
@@ -523,7 +523,7 @@ class AXDragDirective {
|
|
|
523
523
|
this.renderer.removeStyle(this.handle(), 'cursor');
|
|
524
524
|
this.renderer.removeStyle(this.handle(), 'touch-action');
|
|
525
525
|
}
|
|
526
|
-
}, ...(ngDevMode ? [{ debugName: "#dragDisabledEffect" }] : []));
|
|
526
|
+
}, ...(ngDevMode ? [{ debugName: "#dragDisabledEffect" }] : /* istanbul ignore next */ []));
|
|
527
527
|
this.#handleChangeEffect = effect(() => {
|
|
528
528
|
if (!isPlatformBrowser(this.platformId))
|
|
529
529
|
return;
|
|
@@ -542,7 +542,7 @@ class AXDragDirective {
|
|
|
542
542
|
});
|
|
543
543
|
this.listenersAttached.set(currentHandle);
|
|
544
544
|
}
|
|
545
|
-
}, ...(ngDevMode ? [{ debugName: "#handleChangeEffect" }] : []));
|
|
545
|
+
}, ...(ngDevMode ? [{ debugName: "#handleChangeEffect" }] : /* istanbul ignore next */ []));
|
|
546
546
|
}
|
|
547
547
|
#dragDisabledEffect;
|
|
548
548
|
#handleChangeEffect;
|
|
@@ -1168,10 +1168,10 @@ class AXDragDirective {
|
|
|
1168
1168
|
this.document.removeEventListener('pointercancel', this.boundHandlePointerUp);
|
|
1169
1169
|
});
|
|
1170
1170
|
}
|
|
1171
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1172
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.
|
|
1171
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1172
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.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 }); }
|
|
1173
1173
|
}
|
|
1174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDragDirective, decorators: [{
|
|
1175
1175
|
type: Directive,
|
|
1176
1176
|
args: [{
|
|
1177
1177
|
selector: '[axDrag]',
|
|
@@ -1181,19 +1181,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
1181
1181
|
class AXDropZoneDirective extends NXComponent {
|
|
1182
1182
|
constructor() {
|
|
1183
1183
|
super(...arguments);
|
|
1184
|
-
this.dropZoneGroup = input(...(ngDevMode ? [undefined, { debugName: "dropZoneGroup" }] : []));
|
|
1185
|
-
this.isHovered = signal(false, ...(ngDevMode ? [{ debugName: "isHovered" }] : []));
|
|
1186
|
-
this.element = signal(this.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : []));
|
|
1184
|
+
this.dropZoneGroup = input(...(ngDevMode ? [undefined, { debugName: "dropZoneGroup" }] : /* istanbul ignore next */ []));
|
|
1185
|
+
this.isHovered = signal(false, ...(ngDevMode ? [{ debugName: "isHovered" }] : /* istanbul ignore next */ []));
|
|
1186
|
+
this.element = signal(this.nativeElement, ...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
1187
1187
|
this.onElementDrop = output();
|
|
1188
1188
|
this.onElementHover = output();
|
|
1189
1189
|
}
|
|
1190
1190
|
ngOnInit() {
|
|
1191
1191
|
this.element().dataset['axDropZone'] = 'true';
|
|
1192
1192
|
}
|
|
1193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1194
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
1193
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDropZoneDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1194
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.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 }); }
|
|
1195
1195
|
}
|
|
1196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDropZoneDirective, decorators: [{
|
|
1197
1197
|
type: Directive,
|
|
1198
1198
|
args: [{
|
|
1199
1199
|
selector: '[axDropZone]',
|
|
@@ -1203,11 +1203,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImpor
|
|
|
1203
1203
|
|
|
1204
1204
|
const COMPONENT = [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective];
|
|
1205
1205
|
class AXDragDropModule {
|
|
1206
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1207
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.
|
|
1208
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.
|
|
1206
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1207
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXDragDropModule, imports: [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective], exports: [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective] }); }
|
|
1208
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDragDropModule }); }
|
|
1209
1209
|
}
|
|
1210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXDragDropModule, decorators: [{
|
|
1211
1211
|
type: NgModule,
|
|
1212
1212
|
args: [{
|
|
1213
1213
|
imports: [...COMPONENT],
|