@acorex/cdk 22.1.0-next.30 → 22.1.0-next.32

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.
Files changed (57) hide show
  1. package/fesm2022/acorex-cdk-accordion.mjs +19 -19
  2. package/fesm2022/acorex-cdk-carousel.mjs +25 -7
  3. package/fesm2022/acorex-cdk-carousel.mjs.map +1 -1
  4. package/fesm2022/acorex-cdk-clipboard.mjs +6 -6
  5. package/fesm2022/acorex-cdk-common.mjs +169 -93
  6. package/fesm2022/acorex-cdk-common.mjs.map +1 -1
  7. package/fesm2022/acorex-cdk-dom.mjs +3 -3
  8. package/fesm2022/acorex-cdk-drag-drop.mjs +210 -68
  9. package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
  10. package/fesm2022/acorex-cdk-drawer.mjs +10 -10
  11. package/fesm2022/acorex-cdk-focus-trap.mjs +3 -3
  12. package/fesm2022/acorex-cdk-full-screen.mjs +26 -147
  13. package/fesm2022/acorex-cdk-full-screen.mjs.map +1 -1
  14. package/fesm2022/acorex-cdk-gesture.mjs +202 -0
  15. package/fesm2022/acorex-cdk-gesture.mjs.map +1 -0
  16. package/fesm2022/acorex-cdk-highlight.mjs +108 -0
  17. package/fesm2022/acorex-cdk-highlight.mjs.map +1 -0
  18. package/fesm2022/acorex-cdk-horizontal-scroll.mjs +150 -125
  19. package/fesm2022/acorex-cdk-horizontal-scroll.mjs.map +1 -1
  20. package/fesm2022/acorex-cdk-input-mask.mjs +3 -3
  21. package/fesm2022/acorex-cdk-list-navigation.mjs +10 -10
  22. package/fesm2022/acorex-cdk-outline.mjs +277 -74
  23. package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
  24. package/fesm2022/acorex-cdk-overlay.mjs +192 -18
  25. package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
  26. package/fesm2022/acorex-cdk-pan-view.mjs +3 -3
  27. package/fesm2022/acorex-cdk-resizable.mjs +3 -3
  28. package/fesm2022/acorex-cdk-selection.mjs +10 -10
  29. package/fesm2022/acorex-cdk-shimmer.mjs +220 -0
  30. package/fesm2022/acorex-cdk-shimmer.mjs.map +1 -0
  31. package/fesm2022/acorex-cdk-sliding-item.mjs +72 -62
  32. package/fesm2022/acorex-cdk-sliding-item.mjs.map +1 -1
  33. package/fesm2022/acorex-cdk-sticky.mjs +3 -3
  34. package/fesm2022/acorex-cdk-uploader.mjs +9 -9
  35. package/fesm2022/acorex-cdk-virtual-scroll.mjs +10 -10
  36. package/fesm2022/acorex-cdk-z-index.mjs +3 -3
  37. package/gesture/README.md +3 -0
  38. package/horizontal-scroll/README.md +1 -1
  39. package/package.json +16 -7
  40. package/shimmer/README.md +11 -0
  41. package/sliding-item/README.md +4 -2
  42. package/types/acorex-cdk-carousel.d.ts +2 -0
  43. package/types/acorex-cdk-clipboard.d.ts +1 -1
  44. package/types/acorex-cdk-common.d.ts +36 -19
  45. package/types/acorex-cdk-drag-drop.d.ts +31 -4
  46. package/types/acorex-cdk-full-screen.d.ts +18 -43
  47. package/types/acorex-cdk-gesture.d.ts +132 -0
  48. package/types/acorex-cdk-highlight.d.ts +54 -0
  49. package/types/acorex-cdk-horizontal-scroll.d.ts +39 -28
  50. package/types/acorex-cdk-outline.d.ts +20 -0
  51. package/types/acorex-cdk-overlay.d.ts +47 -4
  52. package/types/acorex-cdk-shimmer.d.ts +68 -0
  53. package/types/acorex-cdk-sliding-item.d.ts +22 -4
  54. package/types/acorex-cdk-uploader.d.ts +1 -1
  55. package/fesm2022/acorex-cdk-double-click.mjs +0 -178
  56. package/fesm2022/acorex-cdk-double-click.mjs.map +0 -1
  57. package/types/acorex-cdk-double-click.d.ts +0 -66
@@ -0,0 +1,220 @@
1
+ import { isPlatformBrowser } from '@angular/common';
2
+ import { AX_STYLE_COLOR_TYPES } from '@acorex/cdk/common';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, ElementRef, DestroyRef, PLATFORM_ID, signal, input, effect, afterNextRender, Directive } from '@angular/core';
5
+
6
+ const SHIMMER_DEFAULT_SPREAD = 'calc(3ch + 40px)';
7
+ const SHIMMER_ANIMATION_KEY = '__axShimmerAnimation';
8
+ /**
9
+ * Applies the shimmer text effect to a host element.
10
+ */
11
+ class AXShimmerDirective {
12
+ constructor() {
13
+ this.hostElement = inject((ElementRef));
14
+ this.destroyRef = inject(DestroyRef);
15
+ this.platformId = inject(PLATFORM_ID);
16
+ this.refresh = signal(0, /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "refresh" }] : /* istanbul ignore next */ []));
18
+ /**
19
+ * Plays the shimmer animation once instead of looping.
20
+ *
21
+ * @defaultValue false
22
+ */
23
+ this.once = input(false, /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "once" }] : /* istanbul ignore next */ []));
25
+ /**
26
+ * Reverses the shimmer sweep direction.
27
+ *
28
+ * @defaultValue false
29
+ */
30
+ this.reverse = input(false, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "reverse" }] : /* istanbul ignore next */ []));
32
+ /**
33
+ * Disables the shimmer effect and renders normal text.
34
+ *
35
+ * @defaultValue false
36
+ */
37
+ this.disabled = input(false, /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
39
+ /**
40
+ * Duration of one shimmer sweep in milliseconds.
41
+ *
42
+ * @defaultValue 2000
43
+ */
44
+ this.duration = input(2000, /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "duration" }] : /* istanbul ignore next */ []));
46
+ /**
47
+ * Width of the highlight band. Numbers use the spacing scale; strings accept any CSS length.
48
+ */
49
+ this.spread = input(null, /* @ts-ignore */
50
+ ...(ngDevMode ? [{ debugName: "spread" }] : /* istanbul ignore next */ []));
51
+ /**
52
+ * Tilt of the highlight band in degrees.
53
+ *
54
+ * @defaultValue 20
55
+ */
56
+ this.angle = input(20, /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "angle" }] : /* istanbul ignore next */ []));
58
+ /**
59
+ * Explicit highlight color. Accepts ACoreX semantic colors (`primary`, `danger`, …) or any CSS color value.
60
+ * Falls back to a tint derived from currentColor when omitted.
61
+ */
62
+ this.color = input(null, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
64
+ this.#syncShimmer = effect(() => {
65
+ this.refresh();
66
+ if (!isPlatformBrowser(this.platformId)) {
67
+ return;
68
+ }
69
+ if (this.disabled() || this.prefersReducedMotion()) {
70
+ this.cancelShimmerAnimation();
71
+ this.clearShimmerStyles();
72
+ return;
73
+ }
74
+ this.applyShimmerStyles({
75
+ spread: this.spread(),
76
+ angle: this.angle(),
77
+ color: this.color(),
78
+ });
79
+ this.restartShimmerAnimation({
80
+ duration: this.duration(),
81
+ once: this.once(),
82
+ reverse: this.reverse(),
83
+ rtl: this.isRtl(),
84
+ });
85
+ }, /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "#syncShimmer" }] : /* istanbul ignore next */ []));
87
+ afterNextRender(() => {
88
+ if (!isPlatformBrowser(this.platformId)) {
89
+ return;
90
+ }
91
+ const themeObserver = new MutationObserver(() => {
92
+ this.refresh.update((value) => value + 1);
93
+ });
94
+ themeObserver.observe(document.documentElement, {
95
+ attributes: true,
96
+ attributeFilter: ['class', 'dir'],
97
+ });
98
+ const motionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
99
+ const onMotionPreferenceChange = () => {
100
+ this.refresh.update((value) => value + 1);
101
+ };
102
+ motionQuery.addEventListener('change', onMotionPreferenceChange);
103
+ this.destroyRef.onDestroy(() => {
104
+ themeObserver.disconnect();
105
+ motionQuery.removeEventListener('change', onMotionPreferenceChange);
106
+ this.cancelShimmerAnimation();
107
+ this.clearShimmerStyles();
108
+ });
109
+ });
110
+ }
111
+ #syncShimmer;
112
+ get element() {
113
+ return this.hostElement.nativeElement;
114
+ }
115
+ resolveSpread(spread) {
116
+ if (spread == null || spread === '') {
117
+ return SHIMMER_DEFAULT_SPREAD;
118
+ }
119
+ return typeof spread === 'number' ? `calc(var(--spacing) * ${spread})` : spread;
120
+ }
121
+ isSemanticColor(color) {
122
+ return AX_STYLE_COLOR_TYPES.includes(color);
123
+ }
124
+ resolveHighlightColor(color, isDark) {
125
+ if (!color || color === 'default') {
126
+ return isDark
127
+ ? 'color-mix(in oklch, currentColor 55%, white)'
128
+ : 'color-mix(in oklch, currentColor 30%, transparent)';
129
+ }
130
+ if (this.isSemanticColor(color)) {
131
+ return `var(--color-${color})`;
132
+ }
133
+ return color;
134
+ }
135
+ isDarkMode() {
136
+ return this.element.closest('.dark') !== null || document.documentElement.classList.contains('dark');
137
+ }
138
+ isRtl() {
139
+ const dirHost = this.element.closest('[dir]');
140
+ return dirHost?.getAttribute('dir') === 'rtl' || document.documentElement.getAttribute('dir') === 'rtl';
141
+ }
142
+ prefersReducedMotion() {
143
+ return window.matchMedia('(prefers-reduced-motion: reduce)').matches;
144
+ }
145
+ buildBackgroundImage(angle, spread, highlight) {
146
+ const base = 'currentColor';
147
+ return `linear-gradient(${90 + angle}deg, ${base} calc(50% - ${spread}), color-mix(in oklch, ${highlight}, ${base} 50%) calc(50% - calc(${spread} * 0.5)), ${highlight} 50%, color-mix(in oklch, ${highlight}, ${base} 50%) calc(50% + calc(${spread} * 0.5)), ${base} calc(50% + ${spread}))`;
148
+ }
149
+ applyShimmerStyles(state) {
150
+ const spread = this.resolveSpread(state.spread);
151
+ const highlight = this.resolveHighlightColor(state.color, this.isDarkMode());
152
+ const style = this.element.style;
153
+ style.setProperty('--shimmer-spread', spread);
154
+ style.setProperty('--shimmer-angle', `${state.angle}deg`);
155
+ style.setProperty('--shimmer-color', state.color ?? '');
156
+ style.display = 'inline-block';
157
+ style.backgroundImage = this.buildBackgroundImage(state.angle, spread, highlight);
158
+ style.backgroundRepeat = 'no-repeat';
159
+ style.backgroundSize = `calc(200% + ${spread} * 2) 100%`;
160
+ style.backgroundPosition = '0 0';
161
+ style.backgroundClip = 'text';
162
+ style.setProperty('-webkit-background-clip', 'text');
163
+ style.setProperty('-webkit-text-fill-color', 'transparent');
164
+ }
165
+ clearShimmerStyles() {
166
+ const style = this.element.style;
167
+ style.removeProperty('--shimmer-spread');
168
+ style.removeProperty('--shimmer-angle');
169
+ style.removeProperty('--shimmer-color');
170
+ style.removeProperty('--shimmer-duration');
171
+ style.removeProperty('display');
172
+ style.removeProperty('background-image');
173
+ style.removeProperty('background-repeat');
174
+ style.removeProperty('background-size');
175
+ style.removeProperty('background-position');
176
+ style.removeProperty('background-clip');
177
+ style.removeProperty('-webkit-background-clip');
178
+ style.removeProperty('-webkit-text-fill-color');
179
+ }
180
+ restartShimmerAnimation(options) {
181
+ this.cancelShimmerAnimation();
182
+ this.element.style.setProperty('--shimmer-duration', `${options.duration}ms`);
183
+ let direction = 'normal';
184
+ if (options.reverse) {
185
+ direction = 'reverse';
186
+ }
187
+ else if (options.rtl) {
188
+ direction = 'reverse';
189
+ }
190
+ const animation = this.element.animate([{ backgroundPosition: '100% 0' }, { backgroundPosition: '0 0' }], {
191
+ duration: options.duration,
192
+ iterations: options.once ? 1 : Infinity,
193
+ direction,
194
+ fill: options.once ? 'backwards' : 'auto',
195
+ easing: 'linear',
196
+ });
197
+ this.element[SHIMMER_ANIMATION_KEY] = animation;
198
+ return animation;
199
+ }
200
+ cancelShimmerAnimation() {
201
+ const animation = this.element[SHIMMER_ANIMATION_KEY];
202
+ animation?.cancel();
203
+ delete this.element[SHIMMER_ANIMATION_KEY];
204
+ }
205
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXShimmerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
206
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: AXShimmerDirective, isStandalone: true, selector: "[axShimmer]", inputs: { once: { classPropertyName: "once", publicName: "once", isSignal: true, isRequired: false, transformFunction: null }, reverse: { classPropertyName: "reverse", publicName: "reverse", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, spread: { classPropertyName: "spread", publicName: "spread", isSignal: true, isRequired: false, transformFunction: null }, angle: { classPropertyName: "angle", publicName: "angle", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
207
+ }
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXShimmerDirective, decorators: [{
209
+ type: Directive,
210
+ args: [{
211
+ selector: '[axShimmer]',
212
+ }]
213
+ }], ctorParameters: () => [], propDecorators: { once: [{ type: i0.Input, args: [{ isSignal: true, alias: "once", required: false }] }], reverse: [{ type: i0.Input, args: [{ isSignal: true, alias: "reverse", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], duration: [{ type: i0.Input, args: [{ isSignal: true, alias: "duration", required: false }] }], spread: [{ type: i0.Input, args: [{ isSignal: true, alias: "spread", required: false }] }], angle: [{ type: i0.Input, args: [{ isSignal: true, alias: "angle", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
214
+
215
+ /**
216
+ * Generated bundle index. Do not edit.
217
+ */
218
+
219
+ export { AXShimmerDirective };
220
+ //# sourceMappingURL=acorex-cdk-shimmer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-cdk-shimmer.mjs","sources":["../../../../packages/cdk/shimmer/src/lib/shimmer.directive.ts","../../../../packages/cdk/shimmer/src/acorex-cdk-shimmer.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { AXStyleColorType, AX_STYLE_COLOR_TYPES } from '@acorex/cdk/common';\nimport { afterNextRender, DestroyRef, Directive, effect, ElementRef, inject, input, PLATFORM_ID, signal } from '@angular/core';\n\nconst SHIMMER_DEFAULT_SPREAD = 'calc(3ch + 40px)';\nconst SHIMMER_ANIMATION_KEY = '__axShimmerAnimation';\n\ninterface AXShimmerStyleState {\n spread: string | number | null;\n angle: number;\n color: AXStyleColorType | string | null;\n}\n\ninterface AXShimmerAnimationOptions {\n duration: number;\n once: boolean;\n reverse: boolean;\n rtl: boolean;\n}\n\n/**\n * Applies the shimmer text effect to a host element.\n */\n@Directive({\n selector: '[axShimmer]',\n})\nexport class AXShimmerDirective {\n private readonly hostElement = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly refresh = signal(0);\n\n /**\n * Plays the shimmer animation once instead of looping.\n *\n * @defaultValue false\n */\n once = input(false);\n\n /**\n * Reverses the shimmer sweep direction.\n *\n * @defaultValue false\n */\n reverse = input(false);\n\n /**\n * Disables the shimmer effect and renders normal text.\n *\n * @defaultValue false\n */\n disabled = input(false);\n\n /**\n * Duration of one shimmer sweep in milliseconds.\n *\n * @defaultValue 2000\n */\n duration = input(2000);\n\n /**\n * Width of the highlight band. Numbers use the spacing scale; strings accept any CSS length.\n */\n spread = input<string | number | null>(null);\n\n /**\n * Tilt of the highlight band in degrees.\n *\n * @defaultValue 20\n */\n angle = input(20);\n\n /**\n * Explicit highlight color. Accepts ACoreX semantic colors (`primary`, `danger`, …) or any CSS color value.\n * Falls back to a tint derived from currentColor when omitted.\n */\n color = input<AXStyleColorType | string | null>(null);\n\n constructor() {\n afterNextRender(() => {\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n const themeObserver = new MutationObserver(() => {\n this.refresh.update((value) => value + 1);\n });\n themeObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class', 'dir'],\n });\n\n const motionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');\n const onMotionPreferenceChange = () => {\n this.refresh.update((value) => value + 1);\n };\n motionQuery.addEventListener('change', onMotionPreferenceChange);\n\n this.destroyRef.onDestroy(() => {\n themeObserver.disconnect();\n motionQuery.removeEventListener('change', onMotionPreferenceChange);\n this.cancelShimmerAnimation();\n this.clearShimmerStyles();\n });\n });\n }\n\n #syncShimmer = effect(() => {\n this.refresh();\n\n if (!isPlatformBrowser(this.platformId)) {\n return;\n }\n\n if (this.disabled() || this.prefersReducedMotion()) {\n this.cancelShimmerAnimation();\n this.clearShimmerStyles();\n return;\n }\n\n this.applyShimmerStyles({\n spread: this.spread(),\n angle: this.angle(),\n color: this.color(),\n });\n\n this.restartShimmerAnimation({\n duration: this.duration(),\n once: this.once(),\n reverse: this.reverse(),\n rtl: this.isRtl(),\n });\n });\n\n private get element(): HTMLElement {\n return this.hostElement.nativeElement;\n }\n\n private resolveSpread(spread: string | number | null): string {\n if (spread == null || spread === '') {\n return SHIMMER_DEFAULT_SPREAD;\n }\n\n return typeof spread === 'number' ? `calc(var(--spacing) * ${spread})` : spread;\n }\n\n private isSemanticColor(color: string): color is AXStyleColorType {\n return AX_STYLE_COLOR_TYPES.includes(color as AXStyleColorType);\n }\n\n private resolveHighlightColor(color: AXStyleColorType | string | null, isDark: boolean): string {\n if (!color || color === 'default') {\n return isDark\n ? 'color-mix(in oklch, currentColor 55%, white)'\n : 'color-mix(in oklch, currentColor 30%, transparent)';\n }\n\n if (this.isSemanticColor(color)) {\n return `var(--color-${color})`;\n }\n\n return color;\n }\n\n private isDarkMode(): boolean {\n return this.element.closest('.dark') !== null || document.documentElement.classList.contains('dark');\n }\n\n private isRtl(): boolean {\n const dirHost = this.element.closest('[dir]');\n return dirHost?.getAttribute('dir') === 'rtl' || document.documentElement.getAttribute('dir') === 'rtl';\n }\n\n private prefersReducedMotion(): boolean {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n\n private buildBackgroundImage(angle: number, spread: string, highlight: string): string {\n const base = 'currentColor';\n\n return `linear-gradient(${90 + angle}deg, ${base} calc(50% - ${spread}), color-mix(in oklch, ${highlight}, ${base} 50%) calc(50% - calc(${spread} * 0.5)), ${highlight} 50%, color-mix(in oklch, ${highlight}, ${base} 50%) calc(50% + calc(${spread} * 0.5)), ${base} calc(50% + ${spread}))`;\n }\n\n private applyShimmerStyles(state: AXShimmerStyleState): void {\n const spread = this.resolveSpread(state.spread);\n const highlight = this.resolveHighlightColor(state.color, this.isDarkMode());\n const style = this.element.style;\n\n style.setProperty('--shimmer-spread', spread);\n style.setProperty('--shimmer-angle', `${state.angle}deg`);\n style.setProperty('--shimmer-color', state.color ?? '');\n\n style.display = 'inline-block';\n style.backgroundImage = this.buildBackgroundImage(state.angle, spread, highlight);\n style.backgroundRepeat = 'no-repeat';\n style.backgroundSize = `calc(200% + ${spread} * 2) 100%`;\n style.backgroundPosition = '0 0';\n style.backgroundClip = 'text';\n style.setProperty('-webkit-background-clip', 'text');\n style.setProperty('-webkit-text-fill-color', 'transparent');\n }\n\n private clearShimmerStyles(): void {\n const style = this.element.style;\n\n style.removeProperty('--shimmer-spread');\n style.removeProperty('--shimmer-angle');\n style.removeProperty('--shimmer-color');\n style.removeProperty('--shimmer-duration');\n style.removeProperty('display');\n style.removeProperty('background-image');\n style.removeProperty('background-repeat');\n style.removeProperty('background-size');\n style.removeProperty('background-position');\n style.removeProperty('background-clip');\n style.removeProperty('-webkit-background-clip');\n style.removeProperty('-webkit-text-fill-color');\n }\n\n private restartShimmerAnimation(options: AXShimmerAnimationOptions): Animation | null {\n this.cancelShimmerAnimation();\n\n this.element.style.setProperty('--shimmer-duration', `${options.duration}ms`);\n\n let direction: PlaybackDirection = 'normal';\n if (options.reverse) {\n direction = 'reverse';\n } else if (options.rtl) {\n direction = 'reverse';\n }\n\n const animation = this.element.animate([{ backgroundPosition: '100% 0' }, { backgroundPosition: '0 0' }], {\n duration: options.duration,\n iterations: options.once ? 1 : Infinity,\n direction,\n fill: options.once ? 'backwards' : 'auto',\n easing: 'linear',\n });\n\n (this.element as HTMLElement & { [SHIMMER_ANIMATION_KEY]?: Animation })[SHIMMER_ANIMATION_KEY] = animation;\n return animation;\n }\n\n private cancelShimmerAnimation(): void {\n const animation = (this.element as HTMLElement & { [SHIMMER_ANIMATION_KEY]?: Animation })[SHIMMER_ANIMATION_KEY];\n animation?.cancel();\n delete (this.element as HTMLElement & { [SHIMMER_ANIMATION_KEY]?: Animation })[SHIMMER_ANIMATION_KEY];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAIA,MAAM,sBAAsB,GAAG,kBAAkB;AACjD,MAAM,qBAAqB,GAAG,sBAAsB;AAepD;;AAEG;MAIU,kBAAkB,CAAA;AAoD7B,IAAA,WAAA,GAAA;AAnDiB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,EAAC,UAAuB,EAAC;AAC7C,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAChC,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,CAAC;oFAAC;AAEpC;;;;AAIG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAC,KAAK;iFAAC;AAEnB;;;;AAIG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK;oFAAC;AAEtB;;;;AAIG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;qFAAC;AAEvB;;;;AAIG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,IAAI;qFAAC;AAEtB;;AAEG;QACH,IAAA,CAAA,MAAM,GAAG,KAAK,CAAyB,IAAI;mFAAC;AAE5C;;;;AAIG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,EAAE;kFAAC;AAEjB;;;AAGG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmC,IAAI;kFAAC;AA+BrD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,MAAK;YACzB,IAAI,CAAC,OAAO,EAAE;YAEd,IAAI,CA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kB,EAAA,UAAA,EAAA,CAAA;kBAH9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACxB,iBAAA;;;ACzBD;;AAEG;;;;"}
@@ -1,13 +1,18 @@
1
+ import * as i1 from '@acorex/cdk/gesture';
2
+ import { AXGestureDirective } from '@acorex/cdk/gesture';
1
3
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, signal, effect, afterNextRender, Directive } from '@angular/core';
4
+ import { inject, ElementRef, DestroyRef, signal, effect, afterNextRender, Directive } from '@angular/core';
3
5
 
6
+ /**
7
+ * Enables horizontal sliding on the host via the hosted AXGestureDirective pan events.
8
+ *
9
+ * Do not put `axGesture` on the same element; this directive already hosts it.
10
+ */
4
11
  class AXSlidingItemDirective {
5
12
  constructor() {
6
- this.hostElement = inject(ElementRef);
7
- this.isMouseDown = signal(false, /* @ts-ignore */
8
- ...(ngDevMode ? [{ debugName: "isMouseDown" }] : /* istanbul ignore next */ []));
9
- this.prevX = signal(0, /* @ts-ignore */
10
- ...(ngDevMode ? [{ debugName: "prevX" }] : /* istanbul ignore next */ []));
13
+ this.hostElement = inject((ElementRef));
14
+ this.gesture = inject(AXGestureDirective);
15
+ this.destroyRef = inject(DestroyRef);
11
16
  this.currentX = signal(0, /* @ts-ignore */
12
17
  ...(ngDevMode ? [{ debugName: "currentX" }] : /* istanbul ignore next */ []));
13
18
  this.stopPoint = signal(0, /* @ts-ignore */
@@ -16,6 +21,9 @@ class AXSlidingItemDirective {
16
21
  ...(ngDevMode ? [{ debugName: "disableSlidingRight" }] : /* istanbul ignore next */ []));
17
22
  this.disableSlidingLeft = signal(false, /* @ts-ignore */
18
23
  ...(ngDevMode ? [{ debugName: "disableSlidingLeft" }] : /* istanbul ignore next */ []));
24
+ this.cursor = signal('grab', /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "cursor" }] : /* istanbul ignore next */ []));
26
+ this.originX = 0;
19
27
  this.#positionChange = effect(() => {
20
28
  if (this.currentX() > 0 && this.disableSlidingRight())
21
29
  return;
@@ -26,77 +34,79 @@ class AXSlidingItemDirective {
26
34
  ...(ngDevMode ? [{ debugName: "#positionChange" }] : /* istanbul ignore next */ []));
27
35
  this.#init = afterNextRender(() => {
28
36
  const el = this.hostElement.nativeElement.parentElement;
37
+ if (!el)
38
+ return;
29
39
  el.style.display = 'flex';
30
40
  el.style.justifyContent = 'space-between';
31
41
  el.style.position = 'relative';
32
42
  el.style.overflow = 'hidden';
33
43
  });
34
- this.#effect2 = effect(() => {
35
- this.hostElement.nativeElement.style.position = 'absolute';
36
- this.hostElement.nativeElement.style.top = '0';
37
- this.hostElement.nativeElement.style.left = '0';
38
- this.hostElement.nativeElement.style.width = '100%';
39
- this.hostElement.nativeElement.style.height = '100%';
40
- this.hostElement.nativeElement.style.zIndex = '1';
41
- this.hostElement.nativeElement.style.cursor = 'grab';
42
- this.hostElement.nativeElement.style.userSelect = 'none';
43
- this.hostElement.nativeElement.style.touchAction = 'none';
44
- this.hostElement.nativeElement.onpointerdown = (e) => {
45
- this.hostElement.nativeElement.style.transition = 'none';
46
- this.hostElement.nativeElement.style.cursor = 'grabbing';
47
- this.isMouseDown.set(true);
48
- this.prevX.set(e.clientX);
49
- };
50
- this.hostElement.nativeElement.onpointermove = (e) => {
51
- if (!this.isMouseDown())
52
- return;
53
- const currentX = e.clientX;
54
- const deltaX = currentX - this.prevX();
55
- this.currentX.update((prev) => prev + deltaX);
56
- this.prevX.set(currentX);
57
- };
58
- this.hostElement.nativeElement.onpointerup = () => {
59
- this.isMouseDown.set(false);
60
- this.dismiss();
61
- };
62
- this.hostElement.nativeElement.onpointerleave = () => {
63
- if (!this.isMouseDown())
64
- return;
65
- this.isMouseDown.set(false);
66
- this.dismiss();
67
- };
68
- }, /* @ts-ignore */
69
- ...(ngDevMode ? [{ debugName: "#effect2" }] : /* istanbul ignore next */ []));
44
+ const subscriptions = [
45
+ this.gesture.panstart.subscribe(() => this.handlePanStart()),
46
+ this.gesture.panmove.subscribe((event) => this.handlePanMove(event)),
47
+ this.gesture.panend.subscribe(() => this.handlePanEnd()),
48
+ ];
49
+ this.destroyRef.onDestroy(() => {
50
+ for (const subscription of subscriptions) {
51
+ subscription.unsubscribe();
52
+ }
53
+ });
70
54
  }
71
55
  #positionChange;
72
56
  #init;
73
- #effect2;
57
+ handlePanStart() {
58
+ this.hostElement.nativeElement.style.transition = 'none';
59
+ this.cursor.set('grabbing');
60
+ this.originX = this.currentX();
61
+ }
62
+ handlePanMove(event) {
63
+ let next = this.originX + event.deltaX;
64
+ if (next > 0 && this.disableSlidingRight())
65
+ next = 0;
66
+ if (next < 0 && this.disableSlidingLeft())
67
+ next = 0;
68
+ this.currentX.set(next);
69
+ }
70
+ handlePanEnd() {
71
+ this.dismiss();
72
+ }
74
73
  dismiss() {
75
- const el = this.hostElement.nativeElement;
76
74
  this.hostElement.nativeElement.style.transition = '.5s transform ease';
77
- el.style.cursor = 'grab';
78
- if (this.stopPoint()) {
79
- el.style.transform = `translate(${this.stopPoint()}, 0)`;
80
- this.currentX.set(this.stopPoint());
81
- this.prevX.set(this.stopPoint());
82
- }
83
- else {
84
- el.style.transform = `translate(0, 0)`;
85
- this.currentX.set(0);
86
- this.prevX.set(0);
87
- }
75
+ this.cursor.set('grab');
76
+ const target = this.stopPoint();
77
+ this.currentX.set(target);
78
+ this.setPosition(target);
88
79
  }
80
+ /**
81
+ * Sets the position of the sliding element.
82
+ *
83
+ * @param pos - The horizontal position in pixels to set the element to
84
+ * @returns void - No return value. The element's transform is updated to the specified position.
85
+ */
89
86
  setPosition(pos) {
90
- const el = this.hostElement.nativeElement;
91
- el.style.transform = `translate(${pos}px, 0)`;
87
+ this.hostElement.nativeElement.style.transform = `translate(${pos}px, 0)`;
92
88
  }
93
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXSlidingItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
94
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: AXSlidingItemDirective, isStandalone: true, selector: "[axSlidingItem]", ngImport: i0 }); }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXSlidingItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
90
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXSlidingItemDirective, isStandalone: true, selector: "[axSlidingItem]", host: { properties: { "style.position": "\"absolute\"", "style.top": "\"0\"", "style.left": "\"0\"", "style.width": "\"100%\"", "style.height": "\"100%\"", "style.z-index": "\"1\"", "style.cursor": "cursor()", "style.user-select": "\"none\"", "style.touch-action": "\"none\"" } }, hostDirectives: [{ directive: i1.AXGestureDirective }], ngImport: i0 }); }
95
91
  }
96
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXSlidingItemDirective, decorators: [{
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXSlidingItemDirective, decorators: [{
97
93
  type: Directive,
98
- args: [{ selector: '[axSlidingItem]' }]
99
- }] });
94
+ args: [{
95
+ selector: '[axSlidingItem]',
96
+ hostDirectives: [AXGestureDirective],
97
+ host: {
98
+ '[style.position]': '"absolute"',
99
+ '[style.top]': '"0"',
100
+ '[style.left]': '"0"',
101
+ '[style.width]': '"100%"',
102
+ '[style.height]': '"100%"',
103
+ '[style.z-index]': '"1"',
104
+ '[style.cursor]': 'cursor()',
105
+ '[style.user-select]': '"none"',
106
+ '[style.touch-action]': '"none"',
107
+ },
108
+ }]
109
+ }], ctorParameters: () => [] });
100
110
 
101
111
  /**
102
112
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-cdk-sliding-item.mjs","sources":["../../../../packages/cdk/sliding-item/src/lib/sliding-item.directive.ts","../../../../packages/cdk/sliding-item/src/acorex-cdk-sliding-item.ts"],"sourcesContent":["import { afterNextRender, Directive, effect, ElementRef, inject, signal } from '@angular/core';\n\n@Directive({ selector: '[axSlidingItem]' })\nexport class AXSlidingItemDirective {\n private hostElement = inject(ElementRef);\n private isMouseDown = signal(false);\n private prevX = signal(0);\n currentX = signal(0);\n stopPoint = signal(0);\n disableSlidingRight = signal(false);\n disableSlidingLeft = signal(false);\n\n #positionChange = effect(() => {\n if (this.currentX() > 0 && this.disableSlidingRight()) return;\n if (this.currentX() < 0 && this.disableSlidingLeft()) return;\n this.setPosition(this.currentX());\n });\n\n #init = afterNextRender(() => {\n const el = (this.hostElement.nativeElement as HTMLElement).parentElement;\n el.style.display = 'flex';\n el.style.justifyContent = 'space-between';\n el.style.position = 'relative';\n el.style.overflow = 'hidden';\n });\n\n #effect2 = effect(() => {\n this.hostElement.nativeElement.style.position = 'absolute';\n this.hostElement.nativeElement.style.top = '0';\n this.hostElement.nativeElement.style.left = '0';\n this.hostElement.nativeElement.style.width = '100%';\n this.hostElement.nativeElement.style.height = '100%';\n this.hostElement.nativeElement.style.zIndex = '1';\n this.hostElement.nativeElement.style.cursor = 'grab';\n this.hostElement.nativeElement.style.userSelect = 'none';\n this.hostElement.nativeElement.style.touchAction = 'none';\n\n this.hostElement.nativeElement.onpointerdown = (e: PointerEvent) => {\n this.hostElement.nativeElement.style.transition = 'none';\n this.hostElement.nativeElement.style.cursor = 'grabbing';\n this.isMouseDown.set(true);\n this.prevX.set(e.clientX);\n };\n\n this.hostElement.nativeElement.onpointermove = (e: PointerEvent) => {\n if (!this.isMouseDown()) return;\n const currentX = e.clientX;\n const deltaX = currentX - this.prevX();\n this.currentX.update((prev) => prev + deltaX);\n this.prevX.set(currentX);\n };\n\n this.hostElement.nativeElement.onpointerup = () => {\n this.isMouseDown.set(false);\n this.dismiss();\n };\n\n this.hostElement.nativeElement.onpointerleave = () => {\n if (!this.isMouseDown()) return;\n this.isMouseDown.set(false);\n this.dismiss();\n };\n });\n\n private dismiss() {\n const el = this.hostElement.nativeElement as HTMLElement;\n this.hostElement.nativeElement.style.transition = '.5s transform ease';\n el.style.cursor = 'grab';\n\n if (this.stopPoint()) {\n el.style.transform = `translate(${this.stopPoint()}, 0)`;\n this.currentX.set(this.stopPoint());\n this.prevX.set(this.stopPoint());\n } else {\n el.style.transform = `translate(0, 0)`;\n this.currentX.set(0);\n this.prevX.set(0);\n }\n }\n\n setPosition(pos: number) {\n const el = this.hostElement.nativeElement as HTMLElement;\n el.style.transform = `translate(${pos}px, 0)`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAGa,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;QAChC,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,KAAK;wFAAC;QAC3B,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,CAAC;kFAAC;QACzB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,CAAC;qFAAC;QACpB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,CAAC;sFAAC;QACrB,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,KAAK;gGAAC;QACnC,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,KAAK;+FAAC;AAElC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,MAAK;YAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,mBAAmB,EAAE;gBAAE;YACvD,IAAI,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,kBAAkB,EAAE;gBAAE;YACtD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACnC,CAAC;4FAAC;AAEF,QAAA,IAAA,CAAA,KAAK,GAAG,eAAe,CAAC,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QAAA,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM;AAExB,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE,EAAE;YACpB,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,CAAA,UAAA,EAAa,IAAI,CAAC,SAAS,EAAE,CAAA,IAAA,CAAM;YACxD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACnC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QAClC;aAAO;AACL,YAAA,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,iBAAiB;AACtC,YAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AACpB,YAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACnB;IACF;AAEA,IAAA,WAAW,CAAC,GAAW,EAAA;AACrB,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,aAA4B;QACxD,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,CAAA,UAAA,EAAa,GAAG,QAAQ;IAC/C;8GAhFW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC,SAAS;mBAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE;;;ACF1C;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-cdk-sliding-item.mjs","sources":["../../../../packages/cdk/sliding-item/src/lib/sliding-item.directive.ts","../../../../packages/cdk/sliding-item/src/acorex-cdk-sliding-item.ts"],"sourcesContent":["import { AXGestureDirective, AXGestureEvent } from '@acorex/cdk/gesture';\nimport { afterNextRender, DestroyRef, Directive, effect, ElementRef, inject, signal } from '@angular/core';\n\n/**\n * Enables horizontal sliding on the host via the hosted AXGestureDirective pan events.\n *\n * Do not put `axGesture` on the same element; this directive already hosts it.\n */\n@Directive({\n selector: '[axSlidingItem]',\n hostDirectives: [AXGestureDirective],\n host: {\n '[style.position]': '\"absolute\"',\n '[style.top]': '\"0\"',\n '[style.left]': '\"0\"',\n '[style.width]': '\"100%\"',\n '[style.height]': '\"100%\"',\n '[style.z-index]': '\"1\"',\n '[style.cursor]': 'cursor()',\n '[style.user-select]': '\"none\"',\n '[style.touch-action]': '\"none\"',\n },\n})\nexport class AXSlidingItemDirective {\n private readonly hostElement = inject(ElementRef<HTMLElement>);\n private readonly gesture = inject(AXGestureDirective);\n private readonly destroyRef = inject(DestroyRef);\n\n currentX = signal(0);\n stopPoint = signal(0);\n disableSlidingRight = signal(false);\n disableSlidingLeft = signal(false);\n\n protected readonly cursor = signal('grab');\n private originX = 0;\n\n constructor() {\n const subscriptions = [\n this.gesture.panstart.subscribe(() => this.handlePanStart()),\n this.gesture.panmove.subscribe((event) => this.handlePanMove(event)),\n this.gesture.panend.subscribe(() => this.handlePanEnd()),\n ];\n this.destroyRef.onDestroy(() => {\n for (const subscription of subscriptions) {\n subscription.unsubscribe();\n }\n });\n }\n\n #positionChange = effect(() => {\n if (this.currentX() > 0 && this.disableSlidingRight()) return;\n if (this.currentX() < 0 && this.disableSlidingLeft()) return;\n this.setPosition(this.currentX());\n });\n\n #init = afterNextRender(() => {\n const el = this.hostElement.nativeElement.parentElement;\n if (!el) return;\n el.style.display = 'flex';\n el.style.justifyContent = 'space-between';\n el.style.position = 'relative';\n el.style.overflow = 'hidden';\n });\n\n private handlePanStart(): void {\n this.hostElement.nativeElement.style.transition = 'none';\n this.cursor.set('grabbing');\n this.originX = this.currentX();\n }\n\n private handlePanMove(event: AXGestureEvent): void {\n let next = this.originX + event.deltaX;\n if (next > 0 && this.disableSlidingRight()) next = 0;\n if (next < 0 && this.disableSlidingLeft()) next = 0;\n this.currentX.set(next);\n }\n\n private handlePanEnd(): void {\n this.dismiss();\n }\n\n private dismiss(): void {\n this.hostElement.nativeElement.style.transition = '.5s transform ease';\n this.cursor.set('grab');\n const target = this.stopPoint();\n this.currentX.set(target);\n this.setPosition(target);\n }\n\n /**\n * Sets the position of the sliding element.\n *\n * @param pos - The horizontal position in pixels to set the element to\n * @returns void - No return value. The element's transform is updated to the specified position.\n */\n setPosition(pos: number): void {\n this.hostElement.nativeElement.style.transform = `translate(${pos}px, 0)`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;AAIG;MAgBU,sBAAsB,CAAA;AAajC,IAAA,WAAA,GAAA;AAZiB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,EAAC,UAAuB,EAAC;AAC7C,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACpC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAEhD,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,CAAC;qFAAC;QACpB,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,CAAC;sFAAC;QACrB,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,KAAK;gGAAC;QACnC,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,KAAK;+FAAC;QAEf,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM;mFAAC;QAClC,IAAA,CAAA,OAAO,GAAG,CAAC;AAenB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,MAAK;YAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,mBAAmB,EAAE;gBAAE;YACvD,IAAI,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,kBAAkB,EAAE;gBAAE;YACtD,IA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,UAAA,EAAA,cAAA,EAAA,UAAA,EAAA,eAAA,EAAA,OAAA,EAAA,cAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,UAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAflC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;oBAC3B,cAAc,EAAE,CAAC,kBAAkB,CAAC;AACpC,oBAAA,IAAI,EAAE;AACJ,wBAAA,kBAAkB,EAAE,YAAY;AAChC,wBAAA,aAAa,EAAE,KAAK;AACpB,wBAAA,cAAc,EAAE,KAAK;AACrB,wBAAA,eAAe,EAAE,QAAQ;AACzB,wBAAA,gBAAgB,EAAE,QAAQ;AAC1B,wBAAA,iBAAiB,EAAE,KAAK;AACxB,wBAAA,gBAAgB,EAAE,UAAU;AAC5B,wBAAA,qBAAqB,EAAE,QAAQ;AAC/B,wBAAA,sBAAsB,EAAE,QAAQ;AACjC,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -102,10 +102,10 @@ class AXStickyDirective {
102
102
  this.mutationObserver.disconnect();
103
103
  }
104
104
  }
105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXStickyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
106
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: AXStickyDirective, isStandalone: true, selector: "[axSticky]", inputs: { stickyClass: ["axpSticky", "stickyClass"], stickyOffset: "stickyOffset", stickyParent: "stickyParent", stickyTarget: "stickyTarget" }, outputs: { isStickyChange: "isStickyChange" }, exportAs: ["axpSticky"], ngImport: i0 }); }
105
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXStickyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
106
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXStickyDirective, isStandalone: true, selector: "[axSticky]", inputs: { stickyClass: ["axpSticky", "stickyClass"], stickyOffset: "stickyOffset", stickyParent: "stickyParent", stickyTarget: "stickyTarget" }, outputs: { isStickyChange: "isStickyChange" }, exportAs: ["axpSticky"], ngImport: i0 }); }
107
107
  }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXStickyDirective, decorators: [{
108
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXStickyDirective, decorators: [{
109
109
  type: Directive,
110
110
  args: [{
111
111
  selector: '[axSticky]',
@@ -344,10 +344,10 @@ class AXUploaderService {
344
344
  }
345
345
  return requests;
346
346
  }
347
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXUploaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
348
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXUploaderService, providedIn: 'root' }); }
347
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXUploaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
348
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXUploaderService, providedIn: 'root' }); }
349
349
  }
350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXUploaderService, decorators: [{
350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXUploaderService, decorators: [{
351
351
  type: Injectable,
352
352
  args: [{ providedIn: 'root' }]
353
353
  }] });
@@ -798,10 +798,10 @@ class AXUploaderZoneDirective {
798
798
  });
799
799
  }
800
800
  }
801
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXUploaderZoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
802
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: AXUploaderZoneDirective, isStandalone: true, selector: "[axUploaderZone]", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, fileType: { classPropertyName: "fileType", publicName: "fileType", isSignal: true, isRequired: false, transformFunction: null }, overlayTemplate: { classPropertyName: "overlayTemplate", publicName: "overlayTemplate", isSignal: true, isRequired: false, transformFunction: null }, disableBrowse: { classPropertyName: "disableBrowse", publicName: "disableBrowse", isSignal: true, isRequired: false, transformFunction: null }, disableDragDrop: { classPropertyName: "disableDragDrop", publicName: "disableDragDrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileChange: "fileChange", onChanged: "onChanged", dragEnter: "dragEnter", dragLeave: "dragLeave", dragOver: "dragOver", onFileUploadComplete: "onFileUploadComplete", onFilesUploadComplete: "onFilesUploadComplete" }, host: { classAttribute: "ax-drop-zone" }, providers: [AXUnsubscriber], ngImport: i0 }); }
801
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXUploaderZoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
802
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: AXUploaderZoneDirective, isStandalone: true, selector: "[axUploaderZone]", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, fileType: { classPropertyName: "fileType", publicName: "fileType", isSignal: true, isRequired: false, transformFunction: null }, overlayTemplate: { classPropertyName: "overlayTemplate", publicName: "overlayTemplate", isSignal: true, isRequired: false, transformFunction: null }, disableBrowse: { classPropertyName: "disableBrowse", publicName: "disableBrowse", isSignal: true, isRequired: false, transformFunction: null }, disableDragDrop: { classPropertyName: "disableDragDrop", publicName: "disableDragDrop", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fileChange: "fileChange", onChanged: "onChanged", dragEnter: "dragEnter", dragLeave: "dragLeave", dragOver: "dragOver", onFileUploadComplete: "onFileUploadComplete", onFilesUploadComplete: "onFilesUploadComplete" }, host: { classAttribute: "ax-drop-zone" }, providers: [AXUnsubscriber], ngImport: i0 }); }
803
803
  }
804
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXUploaderZoneDirective, decorators: [{
804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXUploaderZoneDirective, decorators: [{
805
805
  type: Directive,
806
806
  args: [{
807
807
  selector: '[axUploaderZone]',
@@ -858,10 +858,10 @@ class AXUploaderBrowseDirective {
858
858
  }
859
859
  await zone.browser();
860
860
  }
861
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXUploaderBrowseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
862
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: AXUploaderBrowseDirective, isStandalone: true, selector: "[axUploaderBrowseHandle]", ngImport: i0 }); }
861
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXUploaderBrowseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
862
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXUploaderBrowseDirective, isStandalone: true, selector: "[axUploaderBrowseHandle]", ngImport: i0 }); }
863
863
  }
864
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXUploaderBrowseDirective, decorators: [{
864
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXUploaderBrowseDirective, decorators: [{
865
865
  type: Directive,
866
866
  args: [{ selector: '[axUploaderBrowseHandle]' }]
867
867
  }] });
@@ -8,10 +8,10 @@ class AXVirtualScrollingItemDirective {
8
8
  get nativeElement() {
9
9
  return this.elementRef.nativeElement;
10
10
  }
11
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXVirtualScrollingItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: AXVirtualScrollingItemDirective, isStandalone: true, selector: "[axVirtualScrollingItem]", ngImport: i0 }); }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXVirtualScrollingItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXVirtualScrollingItemDirective, isStandalone: true, selector: "[axVirtualScrollingItem]", ngImport: i0 }); }
13
13
  }
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXVirtualScrollingItemDirective, decorators: [{
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXVirtualScrollingItemDirective, decorators: [{
15
15
  type: Directive,
16
16
  args: [{ selector: '[axVirtualScrollingItem]' }]
17
17
  }] });
@@ -83,10 +83,10 @@ class AXVirtualScrollingContainerDirective {
83
83
  get __hostClass() {
84
84
  return `${this.height()}`;
85
85
  }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXVirtualScrollingContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
87
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.8", type: AXVirtualScrollingContainerDirective, isStandalone: true, selector: "[axVirtualScrollingContainer]", inputs: { height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { ScrollEnd: "ScrollEnd" }, host: { properties: { "style.height": "this.__hostClass" } }, queries: [{ propertyName: "children", predicate: AXVirtualScrollingItemDirective, isSignal: true }], ngImport: i0 }); }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXVirtualScrollingContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
87
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.1.6", type: AXVirtualScrollingContainerDirective, isStandalone: true, selector: "[axVirtualScrollingContainer]", inputs: { height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { ScrollEnd: "ScrollEnd" }, host: { properties: { "style.height": "this.__hostClass" } }, queries: [{ propertyName: "children", predicate: AXVirtualScrollingItemDirective, isSignal: true }], ngImport: i0 }); }
88
88
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXVirtualScrollingContainerDirective, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXVirtualScrollingContainerDirective, decorators: [{
90
90
  type: Directive,
91
91
  args: [{ selector: '[axVirtualScrollingContainer]' }]
92
92
  }], propDecorators: { height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: true }] }], ScrollEnd: [{ type: i0.Output, args: ["ScrollEnd"] }], children: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => AXVirtualScrollingItemDirective), { isSignal: true }] }], __hostClass: [{
@@ -97,11 +97,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
97
97
  const COMPONENT = [AXVirtualScrollingContainerDirective, AXVirtualScrollingItemDirective];
98
98
  const MODULES = [];
99
99
  class AXVirtualScrollModule {
100
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXVirtualScrollModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
101
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXVirtualScrollModule, imports: [AXVirtualScrollingContainerDirective, AXVirtualScrollingItemDirective], exports: [AXVirtualScrollingContainerDirective, AXVirtualScrollingItemDirective] }); }
102
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXVirtualScrollModule, imports: [MODULES] }); }
100
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXVirtualScrollModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
101
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.6", ngImport: i0, type: AXVirtualScrollModule, imports: [AXVirtualScrollingContainerDirective, AXVirtualScrollingItemDirective], exports: [AXVirtualScrollingContainerDirective, AXVirtualScrollingItemDirective] }); }
102
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXVirtualScrollModule, imports: [MODULES] }); }
103
103
  }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXVirtualScrollModule, decorators: [{
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXVirtualScrollModule, decorators: [{
105
105
  type: NgModule,
106
106
  args: [{
107
107
  imports: [...MODULES, ...COMPONENT],
@@ -17,10 +17,10 @@ class AXZindexDirective {
17
17
  ngOnDestroy() {
18
18
  this.z.release(this.token());
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXZindexDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
21
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: AXZindexDirective, isStandalone: true, selector: "[axZindex]", exportAs: ["axZindex"], ngImport: i0 }); }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXZindexDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
21
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: AXZindexDirective, isStandalone: true, selector: "[axZindex]", exportAs: ["axZindex"], ngImport: i0 }); }
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXZindexDirective, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AXZindexDirective, decorators: [{
24
24
  type: Directive,
25
25
  args: [{
26
26
  selector: '[axZindex]',
@@ -0,0 +1,3 @@
1
+ # @acorex/cdk/gesture
2
+
3
+ Secondary entry point of `@acorex/cdk`. It can be used by importing from `@acorex/cdk/gesture`.