@acorex/cdk 21.1.0-next.2 → 22.0.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/fesm2022/acorex-cdk-accordion.mjs +47 -33
- package/fesm2022/acorex-cdk-accordion.mjs.map +1 -1
- package/fesm2022/acorex-cdk-carousel.mjs +5 -4
- package/fesm2022/acorex-cdk-carousel.mjs.map +1 -1
- package/fesm2022/acorex-cdk-clipboard.mjs +6 -6
- package/fesm2022/acorex-cdk-common.mjs +111 -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 +7 -5
- package/fesm2022/acorex-cdk-double-click.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drag-drop.mjs +114 -65
- package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
- package/fesm2022/acorex-cdk-drawer.mjs +36 -23
- package/fesm2022/acorex-cdk-drawer.mjs.map +1 -1
- package/fesm2022/acorex-cdk-focus-trap.mjs +5 -4
- package/fesm2022/acorex-cdk-focus-trap.mjs.map +1 -1
- package/fesm2022/acorex-cdk-full-screen.mjs +5 -4
- package/fesm2022/acorex-cdk-full-screen.mjs.map +1 -1
- package/fesm2022/acorex-cdk-horizontal-scroll.mjs +7 -5
- package/fesm2022/acorex-cdk-horizontal-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-input-mask.mjs +21 -12
- package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
- package/fesm2022/acorex-cdk-list-navigation.mjs +22 -16
- package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -1
- package/fesm2022/acorex-cdk-outline.mjs +30 -18
- package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
- package/fesm2022/acorex-cdk-overlay.mjs +3 -3
- package/fesm2022/acorex-cdk-pan-view.mjs +42 -23
- package/fesm2022/acorex-cdk-pan-view.mjs.map +1 -1
- package/fesm2022/acorex-cdk-resizable.mjs +19 -11
- package/fesm2022/acorex-cdk-resizable.mjs.map +1 -1
- package/fesm2022/acorex-cdk-selection.mjs +30 -20
- package/fesm2022/acorex-cdk-selection.mjs.map +1 -1
- package/fesm2022/acorex-cdk-sliding-item.mjs +19 -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 +45 -27
- package/fesm2022/acorex-cdk-uploader.mjs.map +1 -1
- package/fesm2022/acorex-cdk-virtual-scroll.mjs +24 -17
- package/fesm2022/acorex-cdk-virtual-scroll.mjs.map +1 -1
- package/fesm2022/acorex-cdk-wysiwyg.mjs +2 -1
- package/fesm2022/acorex-cdk-wysiwyg.mjs.map +1 -1
- package/fesm2022/acorex-cdk-z-index.mjs +5 -4
- package/fesm2022/acorex-cdk-z-index.mjs.map +1 -1
- package/package.json +2 -2
- package/types/acorex-cdk-pan-view.d.ts +3 -2
|
@@ -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: "
|
|
27
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDomChangeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
27
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: AXDomChangeDirective, isStandalone: true, selector: "[axDomChange]", outputs: { axMutationObserver: "axMutationObserver", axResizeObserver: "axResizeObserver" }, ngImport: i0 }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDomChangeDirective, decorators: [{
|
|
30
30
|
type: Directive,
|
|
31
31
|
args: [{
|
|
32
32
|
selector: '[axDomChange]',
|
|
@@ -24,14 +24,16 @@ 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,
|
|
27
|
+
this.duration = input(250, /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
|
|
28
29
|
/**
|
|
29
30
|
* Input to disable the directive's custom click handling.
|
|
30
31
|
* When true, native click and dblclick events will fire normally (DOM default behavior).
|
|
31
32
|
* When false (default), the directive prevents default and emits custom single/double-click events.
|
|
32
33
|
* Defaults to false.
|
|
33
34
|
*/
|
|
34
|
-
this.disabled = input(false,
|
|
35
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
35
37
|
/**
|
|
36
38
|
* Output event emitted when a single-click is detected.
|
|
37
39
|
* Emits after the configured duration milliseconds if no second click occurs.
|
|
@@ -154,10 +156,10 @@ class AXDoubleClickDirective {
|
|
|
154
156
|
this.clickTimeout = null;
|
|
155
157
|
}
|
|
156
158
|
}
|
|
157
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
158
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
159
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDoubleClickDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
160
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", 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
161
|
}
|
|
160
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDoubleClickDirective, decorators: [{
|
|
161
163
|
type: Directive,
|
|
162
164
|
args: [{
|
|
163
165
|
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;MAQU,sBAAsB,CAAA;AAPnC,IAAA,WAAA,GAAA;AAQU,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC;;;;AAIG;AACI,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,GAAG,+EAAC;AAEpC;;;;;AAKG;AACI,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KA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AAA,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,CAAA;AAPnC,IAAA,WAAA,GAAA;AAQU,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAEvC;;;;AAIG;QACI,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,GAAG;qFAAC;AAEpC;;;;;AAKG;QACI,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK;qFAAC;AAEvC;;;;AAIG;Q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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,13 @@ 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,
|
|
10
|
+
this.element = signal(this.el.nativeElement, /* @ts-ignore */
|
|
11
|
+
...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
11
12
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDragHandleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
14
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: AXDragHandleDirective, isStandalone: true, selector: "[axDragHandle]", ngImport: i0 }); }
|
|
14
15
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDragHandleDirective, decorators: [{
|
|
16
17
|
type: Directive,
|
|
17
18
|
args: [{
|
|
18
19
|
selector: '[axDragHandle]',
|
|
@@ -41,11 +42,14 @@ class AXDropListDirective extends NXComponent {
|
|
|
41
42
|
/** Boolean input matching the directive selector name for conditional application. */
|
|
42
43
|
this.axDropList = input(true, { ...(ngDevMode ? { debugName: "axDropList" } : /* istanbul ignore next */ {}), transform: (value) => value === '' || value === true });
|
|
43
44
|
/** Whether sorting within this list is disabled. */
|
|
44
|
-
this.sortingDisabled = input(false,
|
|
45
|
+
this.sortingDisabled = input(false, /* @ts-ignore */
|
|
46
|
+
...(ngDevMode ? [{ debugName: "sortingDisabled" }] : /* istanbul ignore next */ []));
|
|
45
47
|
/** The group this drop list belongs to. Dragging is only allowed between lists of the same group. */
|
|
46
|
-
this.dropListGroup = input(
|
|
48
|
+
this.dropListGroup = input(/* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [undefined, { debugName: "dropListGroup" }] : /* istanbul ignore next */ []));
|
|
47
50
|
/** The layout orientation of the list. */
|
|
48
|
-
this.dropListOrientation = input('vertical',
|
|
51
|
+
this.dropListOrientation = input('vertical', /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "dropListOrientation" }] : /* istanbul ignore next */ []));
|
|
49
53
|
/** Emits when an item is dropped into the list. */
|
|
50
54
|
this.dropListDropped = output();
|
|
51
55
|
/** The `axDrag` directives that are direct children of this list. */
|
|
@@ -54,15 +58,20 @@ class AXDropListDirective extends NXComponent {
|
|
|
54
58
|
/** The native element of the drop list. */
|
|
55
59
|
this.element = this._hostEl.nativeElement;
|
|
56
60
|
/** The draggable item currently being moved over this list. */
|
|
57
|
-
this._activeDragItem = signal(null,
|
|
61
|
+
this._activeDragItem = signal(null, /* @ts-ignore */
|
|
62
|
+
...(ngDevMode ? [{ debugName: "_activeDragItem" }] : /* istanbul ignore next */ []));
|
|
58
63
|
/** The calculated index where the placeholder/item should be. */
|
|
59
|
-
this._placeholderIndex = signal(-1,
|
|
64
|
+
this._placeholderIndex = signal(-1, /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "_placeholderIndex" }] : /* istanbul ignore next */ []));
|
|
60
66
|
/** A snapshot of the items' data and geometry at the start of the drag. */
|
|
61
|
-
this._cachedItems = signal([],
|
|
67
|
+
this._cachedItems = signal([], /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "_cachedItems" }] : /* istanbul ignore next */ []));
|
|
62
69
|
/** The list's initial bounding box, used to calculate scroll delta. */
|
|
63
|
-
this._listInitialRect = signal(null,
|
|
70
|
+
this._listInitialRect = signal(null, /* @ts-ignore */
|
|
71
|
+
...(ngDevMode ? [{ debugName: "_listInitialRect" }] : /* istanbul ignore next */ []));
|
|
64
72
|
/** The detected `gap` of the list for the current orientation. */
|
|
65
|
-
this._listGap = signal(0,
|
|
73
|
+
this._listGap = signal(0, /* @ts-ignore */
|
|
74
|
+
...(ngDevMode ? [{ debugName: "_listGap" }] : /* istanbul ignore next */ []));
|
|
66
75
|
/** A signal-based alias for the orientation input for internal use. */
|
|
67
76
|
this._orientation = this.dropListOrientation;
|
|
68
77
|
/** DOM placeholder element for inter-list drags */
|
|
@@ -424,10 +433,10 @@ class AXDropListDirective extends NXComponent {
|
|
|
424
433
|
this._listInitialRect.set(null);
|
|
425
434
|
this._listGap.set(0);
|
|
426
435
|
}
|
|
427
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
428
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
436
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDropListDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
437
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.8", 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
438
|
}
|
|
430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDropListDirective, decorators: [{
|
|
431
440
|
type: Directive,
|
|
432
441
|
args: [{
|
|
433
442
|
selector: '[axDropList]',
|
|
@@ -448,41 +457,71 @@ class AXDragDirective {
|
|
|
448
457
|
this.platformId = inject(PLATFORM_ID);
|
|
449
458
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
450
459
|
this.el = inject(ElementRef);
|
|
451
|
-
this.handleDirective = contentChild(AXDragHandleDirective,
|
|
460
|
+
this.handleDirective = contentChild(AXDragHandleDirective, /* @ts-ignore */
|
|
461
|
+
...(ngDevMode ? [{ debugName: "handleDirective" }] : /* istanbul ignore next */ []));
|
|
452
462
|
this.axDrag = input(true, { ...(ngDevMode ? { debugName: "axDrag" } : /* istanbul ignore next */ {}), transform: (value) => value === '' || value === true });
|
|
453
|
-
this.dragData = input(
|
|
454
|
-
|
|
455
|
-
this.
|
|
456
|
-
|
|
457
|
-
this.
|
|
458
|
-
|
|
459
|
-
this.
|
|
460
|
-
|
|
461
|
-
this.
|
|
462
|
-
|
|
463
|
-
this.
|
|
464
|
-
|
|
463
|
+
this.dragData = input(/* @ts-ignore */
|
|
464
|
+
...(ngDevMode ? [undefined, { debugName: "dragData" }] : /* istanbul ignore next */ []));
|
|
465
|
+
this.dragDisabled = input(false, /* @ts-ignore */
|
|
466
|
+
...(ngDevMode ? [{ debugName: "dragDisabled" }] : /* istanbul ignore next */ []));
|
|
467
|
+
this.dragTransition = input(true, /* @ts-ignore */
|
|
468
|
+
...(ngDevMode ? [{ debugName: "dragTransition" }] : /* istanbul ignore next */ []));
|
|
469
|
+
this.dragElementClone = input(false, /* @ts-ignore */
|
|
470
|
+
...(ngDevMode ? [{ debugName: "dragElementClone" }] : /* istanbul ignore next */ []));
|
|
471
|
+
this.dropZoneGroup = input(/* @ts-ignore */
|
|
472
|
+
...(ngDevMode ? [undefined, { debugName: "dropZoneGroup" }] : /* istanbul ignore next */ []));
|
|
473
|
+
this.dragStartDelay = input(/* @ts-ignore */
|
|
474
|
+
...(ngDevMode ? [undefined, { debugName: "dragStartDelay" }] : /* istanbul ignore next */ []));
|
|
475
|
+
this.dragResetOnDblClick = input(true, /* @ts-ignore */
|
|
476
|
+
...(ngDevMode ? [{ debugName: "dragResetOnDblClick" }] : /* istanbul ignore next */ []));
|
|
477
|
+
this.dragLockAxis = input(null, /* @ts-ignore */
|
|
478
|
+
...(ngDevMode ? [{ debugName: "dragLockAxis" }] : /* istanbul ignore next */ []));
|
|
479
|
+
this.dragClonedTemplate = input(/* @ts-ignore */
|
|
480
|
+
...(ngDevMode ? [undefined, { debugName: "dragClonedTemplate" }] : /* istanbul ignore next */ []));
|
|
481
|
+
this.dragCursor = input('move', /* @ts-ignore */
|
|
482
|
+
...(ngDevMode ? [{ debugName: "dragCursor" }] : /* istanbul ignore next */ []));
|
|
483
|
+
this.dragBoundary = input(/* @ts-ignore */
|
|
484
|
+
...(ngDevMode ? [undefined, { debugName: "dragBoundary" }] : /* istanbul ignore next */ []));
|
|
485
|
+
this.dragTransitionDuration = input(150, /* @ts-ignore */
|
|
486
|
+
...(ngDevMode ? [{ debugName: "dragTransitionDuration" }] : /* istanbul ignore next */ []));
|
|
465
487
|
this.dragPositionChanged = output();
|
|
466
|
-
this.isMoving = signal(false,
|
|
467
|
-
|
|
468
|
-
this.
|
|
469
|
-
|
|
470
|
-
this.
|
|
471
|
-
|
|
472
|
-
this.
|
|
473
|
-
|
|
474
|
-
this.
|
|
475
|
-
|
|
476
|
-
this.
|
|
477
|
-
|
|
478
|
-
this.
|
|
479
|
-
|
|
480
|
-
this.
|
|
488
|
+
this.isMoving = signal(false, /* @ts-ignore */
|
|
489
|
+
...(ngDevMode ? [{ debugName: "isMoving" }] : /* istanbul ignore next */ []));
|
|
490
|
+
this.clonedElement = signal(null, /* @ts-ignore */
|
|
491
|
+
...(ngDevMode ? [{ debugName: "clonedElement" }] : /* istanbul ignore next */ []));
|
|
492
|
+
this.currentAxis = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
493
|
+
...(ngDevMode ? [{ debugName: "currentAxis" }] : /* istanbul ignore next */ []));
|
|
494
|
+
this.currentCloneAxis = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
495
|
+
...(ngDevMode ? [{ debugName: "currentCloneAxis" }] : /* istanbul ignore next */ []));
|
|
496
|
+
this.transitionDuration = linkedSignal(() => this.dragTransitionDuration(), /* @ts-ignore */
|
|
497
|
+
...(ngDevMode ? [{ debugName: "transitionDuration" }] : /* istanbul ignore next */ []));
|
|
498
|
+
this.element = signal(this.el.nativeElement, /* @ts-ignore */
|
|
499
|
+
...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
500
|
+
this.dragStartTime = signal(0, /* @ts-ignore */
|
|
501
|
+
...(ngDevMode ? [{ debugName: "dragStartTime" }] : /* istanbul ignore next */ []));
|
|
502
|
+
this.isDragging = signal(false, /* @ts-ignore */
|
|
503
|
+
...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
|
|
504
|
+
this.elementOpacity = signal('1', /* @ts-ignore */
|
|
505
|
+
...(ngDevMode ? [{ debugName: "elementOpacity" }] : /* istanbul ignore next */ []));
|
|
506
|
+
this.movedAfterDelay = signal(false, /* @ts-ignore */
|
|
507
|
+
...(ngDevMode ? [{ debugName: "movedAfterDelay" }] : /* istanbul ignore next */ []));
|
|
508
|
+
this.activePointerId = signal(null, /* @ts-ignore */
|
|
509
|
+
...(ngDevMode ? [{ debugName: "activePointerId" }] : /* istanbul ignore next */ []));
|
|
510
|
+
this.prevDropZone = signal(null, /* @ts-ignore */
|
|
511
|
+
...(ngDevMode ? [{ debugName: "prevDropZone" }] : /* istanbul ignore next */ []));
|
|
512
|
+
this.dragStartOffset = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
513
|
+
...(ngDevMode ? [{ debugName: "dragStartOffset" }] : /* istanbul ignore next */ []));
|
|
514
|
+
this.clonePointerOffset = signal({ x: 0, y: 0 }, /* @ts-ignore */
|
|
515
|
+
...(ngDevMode ? [{ debugName: "clonePointerOffset" }] : /* istanbul ignore next */ []));
|
|
516
|
+
this.clonedElementViewRef = signal(null, /* @ts-ignore */
|
|
517
|
+
...(ngDevMode ? [{ debugName: "clonedElementViewRef" }] : /* istanbul ignore next */ []));
|
|
481
518
|
this.rafId = null;
|
|
482
519
|
this.pendingPointerEvent = null;
|
|
483
520
|
this._parentDropList = inject(AXDropListDirective, { optional: true, skipSelf: true, host: false });
|
|
484
|
-
this._currentDropList = signal(null,
|
|
485
|
-
|
|
521
|
+
this._currentDropList = signal(null, /* @ts-ignore */
|
|
522
|
+
...(ngDevMode ? [{ debugName: "_currentDropList" }] : /* istanbul ignore next */ []));
|
|
523
|
+
this.createCloneElement = computed(() => this.dragElementClone() || !!this._parentDropList, /* @ts-ignore */
|
|
524
|
+
...(ngDevMode ? [{ debugName: "createCloneElement" }] : /* istanbul ignore next */ []));
|
|
486
525
|
this.boundaryElement = computed(() => {
|
|
487
526
|
const boundary = this.dragBoundary();
|
|
488
527
|
if (!boundary) {
|
|
@@ -492,25 +531,30 @@ class AXDragDirective {
|
|
|
492
531
|
return this.document.querySelector(boundary);
|
|
493
532
|
}
|
|
494
533
|
return boundary instanceof ElementRef ? boundary.nativeElement : boundary;
|
|
495
|
-
},
|
|
534
|
+
}, /* @ts-ignore */
|
|
535
|
+
...(ngDevMode ? [{ debugName: "boundaryElement" }] : /* istanbul ignore next */ []));
|
|
496
536
|
this.elementRect = computed(() => {
|
|
497
537
|
if (!isPlatformBrowser(this.platformId)) {
|
|
498
538
|
return null;
|
|
499
539
|
}
|
|
500
540
|
return this.element().getBoundingClientRect();
|
|
501
|
-
},
|
|
541
|
+
}, /* @ts-ignore */
|
|
542
|
+
...(ngDevMode ? [{ debugName: "elementRect" }] : /* istanbul ignore next */ []));
|
|
502
543
|
this.boundaryRect = computed(() => {
|
|
503
544
|
if (!isPlatformBrowser(this.platformId)) {
|
|
504
545
|
return null;
|
|
505
546
|
}
|
|
506
547
|
return this.boundaryElement()?.getBoundingClientRect();
|
|
507
|
-
},
|
|
508
|
-
|
|
548
|
+
}, /* @ts-ignore */
|
|
549
|
+
...(ngDevMode ? [{ debugName: "boundaryRect" }] : /* istanbul ignore next */ []));
|
|
550
|
+
this.handle = computed(() => this.handleDirective()?.element() ?? this.element(), /* @ts-ignore */
|
|
551
|
+
...(ngDevMode ? [{ debugName: "handle" }] : /* istanbul ignore next */ []));
|
|
509
552
|
this.boundHandleDblClick = this.handleDblClick.bind(this);
|
|
510
553
|
this.boundHandlePointerUp = this.handlePointerUp.bind(this);
|
|
511
554
|
this.boundHandlePointerDown = this.handlePointerDown.bind(this);
|
|
512
555
|
this.boundHandlePointerMove = this.handlePointerMove.bind(this);
|
|
513
|
-
this.listenersAttached = signal(null,
|
|
556
|
+
this.listenersAttached = signal(null, /* @ts-ignore */
|
|
557
|
+
...(ngDevMode ? [{ debugName: "listenersAttached" }] : /* istanbul ignore next */ []));
|
|
514
558
|
this.#dragDisabledEffect = effect(() => {
|
|
515
559
|
if (this.dragCursor() === 'none') {
|
|
516
560
|
return;
|
|
@@ -523,7 +567,8 @@ class AXDragDirective {
|
|
|
523
567
|
this.renderer.removeStyle(this.handle(), 'cursor');
|
|
524
568
|
this.renderer.removeStyle(this.handle(), 'touch-action');
|
|
525
569
|
}
|
|
526
|
-
},
|
|
570
|
+
}, /* @ts-ignore */
|
|
571
|
+
...(ngDevMode ? [{ debugName: "#dragDisabledEffect" }] : /* istanbul ignore next */ []));
|
|
527
572
|
this.#handleChangeEffect = effect(() => {
|
|
528
573
|
if (!isPlatformBrowser(this.platformId))
|
|
529
574
|
return;
|
|
@@ -542,7 +587,8 @@ class AXDragDirective {
|
|
|
542
587
|
});
|
|
543
588
|
this.listenersAttached.set(currentHandle);
|
|
544
589
|
}
|
|
545
|
-
},
|
|
590
|
+
}, /* @ts-ignore */
|
|
591
|
+
...(ngDevMode ? [{ debugName: "#handleChangeEffect" }] : /* istanbul ignore next */ []));
|
|
546
592
|
}
|
|
547
593
|
#dragDisabledEffect;
|
|
548
594
|
#handleChangeEffect;
|
|
@@ -1168,10 +1214,10 @@ class AXDragDirective {
|
|
|
1168
1214
|
this.document.removeEventListener('pointercancel', this.boundHandlePointerUp);
|
|
1169
1215
|
});
|
|
1170
1216
|
}
|
|
1171
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1172
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "
|
|
1217
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDragDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1218
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.8", 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
1219
|
}
|
|
1174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDragDirective, decorators: [{
|
|
1175
1221
|
type: Directive,
|
|
1176
1222
|
args: [{
|
|
1177
1223
|
selector: '[axDrag]',
|
|
@@ -1181,19 +1227,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1181
1227
|
class AXDropZoneDirective extends NXComponent {
|
|
1182
1228
|
constructor() {
|
|
1183
1229
|
super(...arguments);
|
|
1184
|
-
this.dropZoneGroup = input(
|
|
1185
|
-
|
|
1186
|
-
this.
|
|
1230
|
+
this.dropZoneGroup = input(/* @ts-ignore */
|
|
1231
|
+
...(ngDevMode ? [undefined, { debugName: "dropZoneGroup" }] : /* istanbul ignore next */ []));
|
|
1232
|
+
this.isHovered = signal(false, /* @ts-ignore */
|
|
1233
|
+
...(ngDevMode ? [{ debugName: "isHovered" }] : /* istanbul ignore next */ []));
|
|
1234
|
+
this.element = signal(this.nativeElement, /* @ts-ignore */
|
|
1235
|
+
...(ngDevMode ? [{ debugName: "element" }] : /* istanbul ignore next */ []));
|
|
1187
1236
|
this.onElementDrop = output();
|
|
1188
1237
|
this.onElementHover = output();
|
|
1189
1238
|
}
|
|
1190
1239
|
ngOnInit() {
|
|
1191
1240
|
this.element().dataset['axDropZone'] = 'true';
|
|
1192
1241
|
}
|
|
1193
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1194
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
1242
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDropZoneDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1243
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", 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
1244
|
}
|
|
1196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDropZoneDirective, decorators: [{
|
|
1197
1246
|
type: Directive,
|
|
1198
1247
|
args: [{
|
|
1199
1248
|
selector: '[axDropZone]',
|
|
@@ -1203,11 +1252,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1203
1252
|
|
|
1204
1253
|
const COMPONENT = [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective];
|
|
1205
1254
|
class AXDragDropModule {
|
|
1206
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1207
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1208
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1255
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDragDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1256
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXDragDropModule, imports: [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective], exports: [AXDragDirective, AXDragHandleDirective, AXDropListDirective, AXDropZoneDirective] }); }
|
|
1257
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDragDropModule }); }
|
|
1209
1258
|
}
|
|
1210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXDragDropModule, decorators: [{
|
|
1211
1260
|
type: NgModule,
|
|
1212
1261
|
args: [{
|
|
1213
1262
|
imports: [...COMPONENT],
|