@acorex/cdk 21.0.1-next.7 → 21.0.1-next.71

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 (73) hide show
  1. package/fesm2022/acorex-cdk-accordion.mjs +23 -23
  2. package/fesm2022/acorex-cdk-accordion.mjs.map +1 -1
  3. package/fesm2022/acorex-cdk-carousel.mjs +22 -31
  4. package/fesm2022/acorex-cdk-carousel.mjs.map +1 -1
  5. package/fesm2022/acorex-cdk-clipboard.mjs +7 -7
  6. package/fesm2022/acorex-cdk-clipboard.mjs.map +1 -1
  7. package/fesm2022/acorex-cdk-common.mjs +113 -104
  8. package/fesm2022/acorex-cdk-common.mjs.map +1 -1
  9. package/fesm2022/acorex-cdk-dom.mjs +3 -3
  10. package/fesm2022/acorex-cdk-dom.mjs.map +1 -1
  11. package/fesm2022/acorex-cdk-double-click.mjs +3 -3
  12. package/fesm2022/acorex-cdk-double-click.mjs.map +1 -1
  13. package/fesm2022/acorex-cdk-drag-drop.mjs +20 -20
  14. package/fesm2022/acorex-cdk-drag-drop.mjs.map +1 -1
  15. package/fesm2022/acorex-cdk-drawer.mjs +40 -16
  16. package/fesm2022/acorex-cdk-drawer.mjs.map +1 -1
  17. package/fesm2022/acorex-cdk-focus-trap.mjs +3 -3
  18. package/fesm2022/acorex-cdk-focus-trap.mjs.map +1 -1
  19. package/fesm2022/acorex-cdk-full-screen.mjs +15 -4
  20. package/fesm2022/acorex-cdk-full-screen.mjs.map +1 -1
  21. package/fesm2022/acorex-cdk-input-mask.mjs +67 -14
  22. package/fesm2022/acorex-cdk-input-mask.mjs.map +1 -1
  23. package/fesm2022/acorex-cdk-list-navigation.mjs +11 -11
  24. package/fesm2022/acorex-cdk-list-navigation.mjs.map +1 -1
  25. package/fesm2022/acorex-cdk-outline.mjs +6 -6
  26. package/fesm2022/acorex-cdk-outline.mjs.map +1 -1
  27. package/fesm2022/acorex-cdk-overlay.mjs +370 -14
  28. package/fesm2022/acorex-cdk-overlay.mjs.map +1 -1
  29. package/fesm2022/acorex-cdk-pan-view.mjs +3 -3
  30. package/fesm2022/acorex-cdk-pan-view.mjs.map +1 -1
  31. package/fesm2022/acorex-cdk-resizable.mjs +3 -3
  32. package/fesm2022/acorex-cdk-resizable.mjs.map +1 -1
  33. package/fesm2022/acorex-cdk-selection.mjs +11 -11
  34. package/fesm2022/acorex-cdk-selection.mjs.map +1 -1
  35. package/fesm2022/acorex-cdk-sliding-item.mjs +3 -3
  36. package/fesm2022/acorex-cdk-sliding-item.mjs.map +1 -1
  37. package/fesm2022/acorex-cdk-sticky.mjs +50 -29
  38. package/fesm2022/acorex-cdk-sticky.mjs.map +1 -1
  39. package/fesm2022/acorex-cdk-uploader.mjs +9 -9
  40. package/fesm2022/acorex-cdk-uploader.mjs.map +1 -1
  41. package/fesm2022/acorex-cdk-virtual-scroll.mjs +10 -10
  42. package/fesm2022/acorex-cdk-virtual-scroll.mjs.map +1 -1
  43. package/fesm2022/acorex-cdk-z-index.mjs +35 -0
  44. package/fesm2022/acorex-cdk-z-index.mjs.map +1 -0
  45. package/package.json +31 -29
  46. package/types/acorex-cdk-carousel.d.ts +16 -0
  47. package/{common/index.d.ts → types/acorex-cdk-common.d.ts} +1 -0
  48. package/{drawer/index.d.ts → types/acorex-cdk-drawer.d.ts} +2 -0
  49. package/{focus-trap/index.d.ts → types/acorex-cdk-focus-trap.d.ts} +1 -1
  50. package/{full-screen/index.d.ts → types/acorex-cdk-full-screen.d.ts} +5 -0
  51. package/{input-mask/index.d.ts → types/acorex-cdk-input-mask.d.ts} +39 -3
  52. package/types/acorex-cdk-overlay.d.ts +128 -0
  53. package/{sticky/index.d.ts → types/acorex-cdk-sticky.d.ts} +18 -11
  54. package/types/acorex-cdk-z-index.d.ts +14 -0
  55. package/z-index/README.md +3 -0
  56. package/carousel/index.d.ts +0 -18
  57. package/overlay/index.d.ts +0 -27
  58. /package/{accordion/index.d.ts → types/acorex-cdk-accordion.d.ts} +0 -0
  59. /package/{clipboard/index.d.ts → types/acorex-cdk-clipboard.d.ts} +0 -0
  60. /package/{dom/index.d.ts → types/acorex-cdk-dom.d.ts} +0 -0
  61. /package/{double-click/index.d.ts → types/acorex-cdk-double-click.d.ts} +0 -0
  62. /package/{drag-drop/index.d.ts → types/acorex-cdk-drag-drop.d.ts} +0 -0
  63. /package/{list-navigation/index.d.ts → types/acorex-cdk-list-navigation.d.ts} +0 -0
  64. /package/{outline/index.d.ts → types/acorex-cdk-outline.d.ts} +0 -0
  65. /package/{pan-view/index.d.ts → types/acorex-cdk-pan-view.d.ts} +0 -0
  66. /package/{qrcode/index.d.ts → types/acorex-cdk-qrcode.d.ts} +0 -0
  67. /package/{resizable/index.d.ts → types/acorex-cdk-resizable.d.ts} +0 -0
  68. /package/{selection/index.d.ts → types/acorex-cdk-selection.d.ts} +0 -0
  69. /package/{sliding-item/index.d.ts → types/acorex-cdk-sliding-item.d.ts} +0 -0
  70. /package/{uploader/index.d.ts → types/acorex-cdk-uploader.d.ts} +0 -0
  71. /package/{virtual-scroll/index.d.ts → types/acorex-cdk-virtual-scroll.d.ts} +0 -0
  72. /package/{wysiwyg/index.d.ts → types/acorex-cdk-wysiwyg.d.ts} +0 -0
  73. /package/{index.d.ts → types/acorex-cdk.d.ts} +0 -0
@@ -1,34 +1,390 @@
1
+ import { convertToPlacement } from '@acorex/cdk/common';
1
2
  import { AXComponentService } from '@acorex/core/components';
3
+ import { AXPlatform } from '@acorex/core/platform';
4
+ import { AXZIndexService } from '@acorex/core/z-index';
5
+ import { DOCUMENT } from '@angular/common';
2
6
  import * as i0 from '@angular/core';
3
- import { inject, TemplateRef, Injectable } from '@angular/core';
7
+ import { inject, TemplateRef, ComponentRef, ElementRef, Injectable } from '@angular/core';
8
+
9
+ /**
10
+ * Calculates the position of an overlay element relative to an anchor element.
11
+ */
12
+ function calculateAnchorPosition(anchorRect, overlayRect, position) {
13
+ let left = 0;
14
+ let top = 0;
15
+ // Calculate origin point on anchor
16
+ switch (position.originX) {
17
+ case 'start':
18
+ left = anchorRect.left;
19
+ break;
20
+ case 'center':
21
+ left = anchorRect.left + anchorRect.width / 2;
22
+ break;
23
+ case 'end':
24
+ left = anchorRect.right;
25
+ break;
26
+ }
27
+ switch (position.originY) {
28
+ case 'top':
29
+ top = anchorRect.top;
30
+ break;
31
+ case 'center':
32
+ top = anchorRect.top + anchorRect.height / 2;
33
+ break;
34
+ case 'bottom':
35
+ top = anchorRect.bottom;
36
+ break;
37
+ }
38
+ // Adjust for overlay alignment
39
+ switch (position.overlayX) {
40
+ case 'start':
41
+ // left stays the same
42
+ break;
43
+ case 'center':
44
+ left -= overlayRect.width / 2;
45
+ break;
46
+ case 'end':
47
+ left -= overlayRect.width;
48
+ break;
49
+ }
50
+ switch (position.overlayY) {
51
+ case 'top':
52
+ // top stays the same
53
+ break;
54
+ case 'center':
55
+ top -= overlayRect.height / 2;
56
+ break;
57
+ case 'bottom':
58
+ top -= overlayRect.height;
59
+ break;
60
+ }
61
+ // Apply offsets
62
+ if (position.offsetX) {
63
+ left += position.offsetX;
64
+ }
65
+ if (position.offsetY) {
66
+ top += position.offsetY;
67
+ }
68
+ return { top, left };
69
+ }
70
+ /**
71
+ * Checks if the overlay position fits within the viewport.
72
+ */
73
+ function fitsInViewport(position, overlayRect, viewportWidth, viewportHeight) {
74
+ return (position.left >= 0 &&
75
+ position.top >= 0 &&
76
+ position.left + overlayRect.width <= viewportWidth &&
77
+ position.top + overlayRect.height <= viewportHeight);
78
+ }
79
+ /**
80
+ * Clamps a position to ensure the overlay stays within viewport bounds.
81
+ */
82
+ function clampToViewport(coords, overlayRect, viewportWidth, viewportHeight, margin = 4) {
83
+ const clampedLeft = Math.max(margin, Math.min(coords.left, viewportWidth - overlayRect.width - margin));
84
+ const clampedTop = Math.max(margin, Math.min(coords.top, viewportHeight - overlayRect.height - margin));
85
+ return { top: clampedTop, left: clampedLeft };
86
+ }
87
+ /**
88
+ * Finds the best position for an overlay that fits in the viewport.
89
+ */
90
+ function findBestPosition(anchorRect, overlayRect, positions, viewportWidth, viewportHeight) {
91
+ for (const position of positions) {
92
+ const coords = calculateAnchorPosition(anchorRect, overlayRect, position);
93
+ if (fitsInViewport(coords, overlayRect, viewportWidth, viewportHeight)) {
94
+ return { position, coords };
95
+ }
96
+ }
97
+ // Fallback to first position if none fit, but clamp to viewport bounds
98
+ const fallbackCoords = calculateAnchorPosition(anchorRect, overlayRect, positions[0]);
99
+ const clampedCoords = clampToViewport(fallbackCoords, overlayRect, viewportWidth, viewportHeight);
100
+ return { position: positions[0], coords: clampedCoords };
101
+ }
4
102
 
5
103
  class AXOverlayService {
6
104
  constructor() {
7
105
  this.componentService = inject(AXComponentService);
106
+ this.document = inject(DOCUMENT);
107
+ this.zIndexService = inject(AXZIndexService);
108
+ this._platform = inject(AXPlatform);
8
109
  }
110
+ /**
111
+ * Creates an overlay with optional anchor-based positioning.
112
+ * @param content - Component or template to display
113
+ * @param options - Configuration options for the overlay
114
+ * @returns Promise<AXOverlayRef> - Reference to the created overlay
115
+ */
9
116
  async create(content, options) {
117
+ let instance;
118
+ let overlayContainer = null;
119
+ let backdropElement = null;
120
+ let isDisposed = false;
121
+ // Acquire a z-index token for this overlay
122
+ let zToken = this.zIndexService.acquire();
10
123
  if (content instanceof TemplateRef) {
11
- const ref = await this.componentService.createFromTemplate(content);
12
- return {
13
- instance: ref,
14
- };
124
+ instance = this.componentService.createFromTemplate(content);
15
125
  }
16
126
  else {
17
- const ref = await this.componentService.createFromComponent(content);
127
+ instance = this.componentService.createFromComponent(content);
18
128
  if (options?.inputs) {
19
129
  Object.entries(options.inputs).forEach((c) => {
20
- ref.setInput(c[0], c[1]);
130
+ instance.setInput(c[0], c[1]);
21
131
  });
22
132
  }
23
- return {
24
- instance: ref,
25
- };
26
133
  }
134
+ // Get the host element
135
+ const hostElement = this.getHostElement(instance);
136
+ // Create backdrop if enabled
137
+ if (options?.backdrop?.enabled) {
138
+ backdropElement = this.createBackdrop(options, zToken.zIndex);
139
+ }
140
+ // If anchor options are provided, set up positioned overlay (for tooltips, popovers)
141
+ if (options?.anchorOptions?.anchor) {
142
+ overlayContainer = this.createOverlayContainer(hostElement, options, zToken.zIndex);
143
+ this.positionOverlay(overlayContainer, options);
144
+ }
145
+ else if (options?.centered === false) {
146
+ // Non-centered positioned overlay (for toasts, notifications)
147
+ overlayContainer = this.createOverlayContainer(hostElement, options, zToken.zIndex);
148
+ }
149
+ else {
150
+ // No anchor - create centered overlay (for modals, popups)
151
+ overlayContainer = this.createCenteredOverlayContainer(hostElement, options, zToken.zIndex);
152
+ }
153
+ const updatePosition = () => {
154
+ if (overlayContainer && options?.anchorOptions?.anchor) {
155
+ this.positionOverlay(overlayContainer, options);
156
+ }
157
+ };
158
+ const dispose = () => {
159
+ if (isDisposed)
160
+ return;
161
+ isDisposed = true;
162
+ // Remove backdrop
163
+ if (backdropElement) {
164
+ backdropElement.remove();
165
+ }
166
+ if (overlayContainer) {
167
+ overlayContainer.remove();
168
+ }
169
+ if (instance instanceof ComponentRef) {
170
+ instance.destroy();
171
+ }
172
+ else {
173
+ instance.destroy();
174
+ }
175
+ // Release the z-index token
176
+ this.zIndexService.release(zToken);
177
+ zToken = null;
178
+ // Notify callback
179
+ options?.onDispose?.();
180
+ };
181
+ const bringToFront = () => {
182
+ if (!zToken || isDisposed)
183
+ return;
184
+ zToken = this.zIndexService.bringToFront(zToken);
185
+ if (backdropElement) {
186
+ backdropElement.style.zIndex = String(zToken.zIndex);
187
+ }
188
+ if (overlayContainer) {
189
+ overlayContainer.style.zIndex = String(zToken.zIndex);
190
+ }
191
+ };
192
+ // Set up backdrop click handler
193
+ if (backdropElement && options?.backdrop?.closeOnClick) {
194
+ backdropElement.addEventListener('click', () => {
195
+ dispose();
196
+ });
197
+ }
198
+ return {
199
+ instance,
200
+ updatePosition,
201
+ dispose,
202
+ overlayElement: overlayContainer,
203
+ zToken,
204
+ bringToFront,
205
+ };
206
+ }
207
+ /**
208
+ * Creates a backdrop element.
209
+ */
210
+ createBackdrop(options, zIndex) {
211
+ const backdrop = this.document.createElement('div');
212
+ backdrop.classList.add('ax-overlay-backdrop');
213
+ if (options?.backdrop?.backdropClass) {
214
+ backdrop.classList.add(options.backdrop.backdropClass);
215
+ }
216
+ // Style the backdrop
217
+ backdrop.style.position = 'fixed';
218
+ backdrop.style.top = '0';
219
+ backdrop.style.left = '0';
220
+ backdrop.style.width = '100%';
221
+ backdrop.style.height = '100%';
222
+ backdrop.style.zIndex = String(zIndex);
223
+ if (options?.backdrop?.background) {
224
+ backdrop.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';
225
+ }
226
+ this.document.body.appendChild(backdrop);
227
+ return backdrop;
228
+ }
229
+ /**
230
+ * Creates a centered overlay container (for modals/popups).
231
+ */
232
+ createCenteredOverlayContainer(content, options, zIndex) {
233
+ const container = this.document.createElement('div');
234
+ container.classList.add('ax-overlay-container', 'ax-overlay-centered');
235
+ // Add custom panel classes
236
+ if (options?.panelClass) {
237
+ const classes = Array.isArray(options.panelClass) ? options.panelClass : [options.panelClass];
238
+ classes.forEach((cls) => {
239
+ if (cls) {
240
+ container.classList.add(cls);
241
+ }
242
+ });
243
+ }
244
+ // Set styles for centered positioning
245
+ container.style.position = 'fixed';
246
+ container.style.top = '0';
247
+ container.style.left = '0';
248
+ container.style.width = '100%';
249
+ container.style.height = '100%';
250
+ container.style.display = 'flex';
251
+ container.style.alignItems = 'center';
252
+ container.style.justifyContent = 'center';
253
+ container.style.zIndex = String(zIndex);
254
+ // Create inner wrapper for the content
255
+ const contentWrapper = this.document.createElement('div');
256
+ contentWrapper.classList.add('ax-overlay-content');
257
+ // Apply width if provided
258
+ if (options?.width) {
259
+ contentWrapper.style.width = options.width;
260
+ }
261
+ // Move content into wrapper
262
+ contentWrapper.appendChild(content);
263
+ container.appendChild(contentWrapper);
264
+ // Append to body
265
+ this.document.body.appendChild(container);
266
+ return container;
267
+ }
268
+ /**
269
+ * Gets the host element from a ComponentRef or EmbeddedViewRef.
270
+ */
271
+ getHostElement(instance) {
272
+ if (instance instanceof ComponentRef) {
273
+ return instance.location.nativeElement;
274
+ }
275
+ else {
276
+ // EmbeddedViewRef - get the first root node
277
+ return instance.rootNodes[0];
278
+ }
279
+ }
280
+ /**
281
+ * Creates an overlay container element and appends the content to it.
282
+ */
283
+ createOverlayContainer(content, options, zIndex) {
284
+ const container = this.document.createElement('div');
285
+ const pane = this.document.createElement('div');
286
+ container.classList.add('ax-overlay-container');
287
+ if (Array.isArray(options.panelClass)) {
288
+ const check = options.panelClass.some((element) => {
289
+ return element === 'ax-action-sheet-panel';
290
+ });
291
+ if (!check)
292
+ pane.classList.add('ax-overlay-pane');
293
+ }
294
+ if (options.actionSheetStyle && this._platform.is('SM'))
295
+ pane.classList.add('ax-overlay-actionsheet');
296
+ // Add custom panel classes
297
+ if (options?.panelClass) {
298
+ const classes = Array.isArray(options.panelClass) ? options.panelClass : [options.panelClass];
299
+ classes.forEach((cls) => {
300
+ if (cls) {
301
+ container.classList.add(cls);
302
+ }
303
+ });
304
+ }
305
+ // Set initial styles for positioning
306
+ container.style.position = 'fixed';
307
+ container.style.zIndex = String(zIndex);
308
+ container.style.maxWidth = '100vw';
309
+ container.style.maxHeight = '100vh';
310
+ if (options?.actionSheetStyle) {
311
+ container.style.width = this._platform.is('SM') ? '100%' : 'fit-content';
312
+ }
313
+ else {
314
+ container.style.width = options?.width || 'fit-content';
315
+ }
316
+ // Move content into container
317
+ pane.appendChild(content);
318
+ container.appendChild(pane);
319
+ // Append to body
320
+ this.document.body.appendChild(container);
321
+ return container;
322
+ }
323
+ /**
324
+ * Positions the overlay container relative to the anchor element.
325
+ */
326
+ positionOverlay(container, options) {
327
+ if (options.actionSheetStyle && this._platform.is('SM')) {
328
+ container.style.bottom = `0px`;
329
+ container.style.left = `0px`;
330
+ return;
331
+ }
332
+ const anchorOptions = options.anchorOptions;
333
+ if (!anchorOptions?.anchor)
334
+ return;
335
+ const anchorElement = anchorOptions.anchor instanceof ElementRef ? anchorOptions.anchor.nativeElement : anchorOptions.anchor;
336
+ const anchorRect = anchorElement.getBoundingClientRect();
337
+ const containerRect = container.getBoundingClientRect();
338
+ const viewportWidth = window.innerWidth;
339
+ const viewportHeight = window.innerHeight;
340
+ // Get positions from placement
341
+ let positions = convertToPlacement(anchorOptions.placement ?? 'bottom');
342
+ if (positions.length === 0) {
343
+ positions = convertToPlacement('bottom');
344
+ }
345
+ // Apply custom offsets to positions with direction-aware inversion
346
+ // When position flips, the offset should also be inverted to maintain the intended gap
347
+ if (anchorOptions.offsetX || anchorOptions.offsetY) {
348
+ const primaryPosition = positions[0];
349
+ positions = positions.map((p) => {
350
+ let adjustedOffsetX = anchorOptions.offsetX ?? 0;
351
+ let adjustedOffsetY = anchorOptions.offsetY ?? 0;
352
+ // Invert offsetY when vertical direction flips
353
+ // (from bottom to top or vice versa)
354
+ if (primaryPosition.originY !== p.originY) {
355
+ adjustedOffsetY = -adjustedOffsetY;
356
+ }
357
+ // Invert offsetX when horizontal direction flips
358
+ // (from end to start or vice versa)
359
+ if (primaryPosition.originX !== p.originX) {
360
+ adjustedOffsetX = -adjustedOffsetX;
361
+ }
362
+ return {
363
+ ...p,
364
+ offsetX: (p.offsetX ?? 0) + adjustedOffsetX,
365
+ offsetY: (p.offsetY ?? 0) + adjustedOffsetY,
366
+ };
367
+ });
368
+ }
369
+ // Find the best position that fits in viewport
370
+ const { coords } = anchorOptions.autoFlip
371
+ ? findBestPosition(anchorRect, containerRect, positions, viewportWidth, viewportHeight)
372
+ : {
373
+ coords: {
374
+ top: positions[0].originY === 'bottom'
375
+ ? anchorRect.bottom + (positions[0].offsetY ?? 0)
376
+ : anchorRect.top - containerRect.height + (positions[0].offsetY ?? 0),
377
+ left: anchorRect.left + (positions[0].offsetX ?? 0),
378
+ },
379
+ };
380
+ // Apply position
381
+ container.style.top = `${coords.top}px`;
382
+ container.style.left = `${coords.left}px`;
27
383
  }
28
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXOverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
29
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXOverlayService, providedIn: 'root' }); }
384
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXOverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
385
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXOverlayService, providedIn: 'root' }); }
30
386
  }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXOverlayService, decorators: [{
387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXOverlayService, decorators: [{
32
388
  type: Injectable,
33
389
  args: [{
34
390
  providedIn: 'root',
@@ -39,5 +395,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
39
395
  * Generated bundle index. Do not edit.
40
396
  */
41
397
 
42
- export { AXOverlayService };
398
+ export { AXOverlayService, calculateAnchorPosition, clampToViewport, findBestPosition, fitsInViewport };
43
399
  //# sourceMappingURL=acorex-cdk-overlay.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-cdk-overlay.mjs","sources":["../../../../packages/cdk/overlay/src/lib/overlay.service.ts","../../../../packages/cdk/overlay/src/acorex-cdk-overlay.ts"],"sourcesContent":["import { AXComponentContent, AXComponentService } from '@acorex/core/components';\nimport { inject, Injectable, TemplateRef } from '@angular/core';\nimport { AXOverlayOptions, AXOverlayRef } from './overlay.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXOverlayService {\n private componentService = inject(AXComponentService);\n\n async create<T = any>(content: AXComponentContent<T>, options?: AXOverlayOptions): Promise<AXOverlayRef<T>> {\n if (content instanceof TemplateRef) {\n const ref = await this.componentService.createFromTemplate<T>(content);\n return {\n instance: ref,\n };\n } else {\n const ref = await this.componentService.createFromComponent<T>(content);\n if (options?.inputs) {\n Object.entries(options.inputs).forEach((c) => {\n ref.setInput(c[0], c[1]);\n });\n }\n return {\n instance: ref,\n };\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAOa,gBAAgB,CAAA;AAH7B,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAoBtD,IAAA;AAlBC,IAAA,MAAM,MAAM,CAAU,OAA8B,EAAE,OAA0B,EAAA;AAC9E,QAAA,IAAI,OAAO,YAAY,WAAW,EAAE;YAClC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAI,OAAO,CAAC;YACtE,OAAO;AACL,gBAAA,QAAQ,EAAE,GAAG;aACd;QACH;aAAO;YACL,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAI,OAAO,CAAC;AACvE,YAAA,IAAI,OAAO,EAAE,MAAM,EAAE;AACnB,gBAAA,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAI;AAC3C,oBAAA,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1B,gBAAA,CAAC,CAAC;YACJ;YACA,OAAO;AACL,gBAAA,QAAQ,EAAE,GAAG;aACd;QACH;IACF;+GApBW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;;4FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-cdk-overlay.mjs","sources":["../../../../packages/cdk/overlay/src/lib/overlay.types.ts","../../../../packages/cdk/overlay/src/lib/overlay.service.ts","../../../../packages/cdk/overlay/src/acorex-cdk-overlay.ts"],"sourcesContent":["import { AXConnectedPosition, AXPlacement, AXPlacementType } from '@acorex/cdk/common';\nimport { AXComponentOptions } from '@acorex/core/components';\nimport { AXZToken } from '@acorex/core/z-index';\nimport { ComponentRef, ElementRef, EmbeddedViewRef } from '@angular/core';\n\nexport interface AXOverlayRef<T> {\n instance: EmbeddedViewRef<T> | ComponentRef<T>;\n /** Updates the overlay position relative to the anchor */\n updatePosition: () => void;\n /** Destroys the overlay and removes it from the DOM */\n dispose: () => void;\n /** The overlay container element */\n overlayElement: HTMLElement | null;\n /** The z-index token for this overlay */\n zToken: AXZToken | null;\n /** Brings this overlay to the front of all other overlays */\n bringToFront: () => void;\n}\n\nexport interface AXOverlayAnchorOptions {\n /** The anchor element to position relative to */\n anchor: HTMLElement | ElementRef<HTMLElement>;\n /** Placement of the overlay relative to the anchor */\n placement?: AXPlacementType;\n /** Horizontal offset in pixels */\n offsetX?: number;\n /** Vertical offset in pixels */\n offsetY?: number;\n /** Whether to flip the overlay when it overflows the viewport */\n autoFlip?: boolean;\n}\n\nexport interface AXOverlayOptions extends AXComponentOptions {\n backdrop?: {\n enabled?: boolean;\n background?: boolean;\n backdropClass?: string;\n closeOnClick?: boolean;\n };\n position?: AXPlacement;\n /** Anchor-based positioning options for tooltips, popovers, etc. */\n anchorOptions?: AXOverlayAnchorOptions;\n /** Custom CSS class for the overlay panel */\n panelClass?: string | string[];\n /** Whether to close when clicking outside */\n closeOnOutsideClick?: boolean;\n /** Whether to close when pressing Escape */\n closeOnEscape?: boolean;\n /** Width of the overlay container (e.g., 'auto', '200px', '100%') */\n width?: string;\n /** Callback when the overlay is disposed (e.g., due to scroll) */\n onDispose?: () => void;\n /** Whether to use centered container (default: true). Set to false for positioned overlays like toasts */\n centered?: boolean;\n actionSheetStyle?: boolean;\n}\n\n/**\n * Calculates the position of an overlay element relative to an anchor element.\n */\nexport function calculateAnchorPosition(\n anchorRect: DOMRect,\n overlayRect: DOMRect,\n position: AXConnectedPosition,\n): { top: number; left: number } {\n let left = 0;\n let top = 0;\n\n // Calculate origin point on anchor\n switch (position.originX) {\n case 'start':\n left = anchorRect.left;\n break;\n case 'center':\n left = anchorRect.left + anchorRect.width / 2;\n break;\n case 'end':\n left = anchorRect.right;\n break;\n }\n\n switch (position.originY) {\n case 'top':\n top = anchorRect.top;\n break;\n case 'center':\n top = anchorRect.top + anchorRect.height / 2;\n break;\n case 'bottom':\n top = anchorRect.bottom;\n break;\n }\n\n // Adjust for overlay alignment\n switch (position.overlayX) {\n case 'start':\n // left stays the same\n break;\n case 'center':\n left -= overlayRect.width / 2;\n break;\n case 'end':\n left -= overlayRect.width;\n break;\n }\n\n switch (position.overlayY) {\n case 'top':\n // top stays the same\n break;\n case 'center':\n top -= overlayRect.height / 2;\n break;\n case 'bottom':\n top -= overlayRect.height;\n break;\n }\n\n // Apply offsets\n if (position.offsetX) {\n left += position.offsetX;\n }\n if (position.offsetY) {\n top += position.offsetY;\n }\n\n return { top, left };\n}\n\n/**\n * Checks if the overlay position fits within the viewport.\n */\nexport function fitsInViewport(\n position: { top: number; left: number },\n overlayRect: DOMRect,\n viewportWidth: number,\n viewportHeight: number,\n): boolean {\n return (\n position.left >= 0 &&\n position.top >= 0 &&\n position.left + overlayRect.width <= viewportWidth &&\n position.top + overlayRect.height <= viewportHeight\n );\n}\n\n/**\n * Clamps a position to ensure the overlay stays within viewport bounds.\n */\nexport function clampToViewport(\n coords: { top: number; left: number },\n overlayRect: DOMRect,\n viewportWidth: number,\n viewportHeight: number,\n margin = 4,\n): { top: number; left: number } {\n const clampedLeft = Math.max(margin, Math.min(coords.left, viewportWidth - overlayRect.width - margin));\n const clampedTop = Math.max(margin, Math.min(coords.top, viewportHeight - overlayRect.height - margin));\n\n return { top: clampedTop, left: clampedLeft };\n}\n\n/**\n * Finds the best position for an overlay that fits in the viewport.\n */\nexport function findBestPosition(\n anchorRect: DOMRect,\n overlayRect: DOMRect,\n positions: AXConnectedPosition[],\n viewportWidth: number,\n viewportHeight: number,\n): { position: AXConnectedPosition; coords: { top: number; left: number } } {\n for (const position of positions) {\n const coords = calculateAnchorPosition(anchorRect, overlayRect, position);\n\n if (fitsInViewport(coords, overlayRect, viewportWidth, viewportHeight)) {\n return { position, coords };\n }\n }\n\n // Fallback to first position if none fit, but clamp to viewport bounds\n const fallbackCoords = calculateAnchorPosition(anchorRect, overlayRect, positions[0]);\n const clampedCoords = clampToViewport(fallbackCoords, overlayRect, viewportWidth, viewportHeight);\n return { position: positions[0], coords: clampedCoords };\n}\n","import { convertToPlacement } from '@acorex/cdk/common';\nimport { AXComponentContent, AXComponentService } from '@acorex/core/components';\nimport { AXPlatform } from '@acorex/core/platform';\nimport { AXZIndexService, AXZToken } from '@acorex/core/z-index';\nimport { DOCUMENT } from '@angular/common';\nimport { ComponentRef, ElementRef, EmbeddedViewRef, inject, Injectable, TemplateRef } from '@angular/core';\nimport { AXOverlayOptions, AXOverlayRef, findBestPosition } from './overlay.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXOverlayService {\n private componentService = inject(AXComponentService);\n private document = inject(DOCUMENT);\n private zIndexService = inject(AXZIndexService);\n private _platform: AXPlatform = inject(AXPlatform);\n\n /**\n * Creates an overlay with optional anchor-based positioning.\n * @param content - Component or template to display\n * @param options - Configuration options for the overlay\n * @returns Promise<AXOverlayRef> - Reference to the created overlay\n */\n async create<T = unknown>(content: AXComponentContent<T>, options?: AXOverlayOptions): Promise<AXOverlayRef<T>> {\n let instance: EmbeddedViewRef<T> | ComponentRef<T>;\n let overlayContainer: HTMLElement | null = null;\n let backdropElement: HTMLElement | null = null;\n let isDisposed = false;\n\n // Acquire a z-index token for this overlay\n let zToken: AXZToken | null = this.zIndexService.acquire();\n\n if (content instanceof TemplateRef) {\n instance = this.componentService.createFromTemplate<T>(content);\n } else {\n instance = this.componentService.createFromComponent<T>(content);\n if (options?.inputs) {\n Object.entries(options.inputs).forEach((c) => {\n (instance as ComponentRef<T>).setInput(c[0], c[1]);\n });\n }\n }\n\n // Get the host element\n const hostElement = this.getHostElement(instance);\n\n // Create backdrop if enabled\n if (options?.backdrop?.enabled) {\n backdropElement = this.createBackdrop(options, zToken.zIndex);\n }\n\n // If anchor options are provided, set up positioned overlay (for tooltips, popovers)\n if (options?.anchorOptions?.anchor) {\n overlayContainer = this.createOverlayContainer(hostElement, options, zToken.zIndex);\n this.positionOverlay(overlayContainer, options);\n } else if (options?.centered === false) {\n // Non-centered positioned overlay (for toasts, notifications)\n overlayContainer = this.createOverlayContainer(hostElement, options, zToken.zIndex);\n } else {\n // No anchor - create centered overlay (for modals, popups)\n overlayContainer = this.createCenteredOverlayContainer(hostElement, options, zToken.zIndex);\n }\n\n const updatePosition = () => {\n if (overlayContainer && options?.anchorOptions?.anchor) {\n this.positionOverlay(overlayContainer, options);\n }\n };\n\n const dispose = () => {\n if (isDisposed) return;\n isDisposed = true;\n\n // Remove backdrop\n if (backdropElement) {\n backdropElement.remove();\n }\n\n if (overlayContainer) {\n overlayContainer.remove();\n }\n if (instance instanceof ComponentRef) {\n instance.destroy();\n } else {\n instance.destroy();\n }\n\n // Release the z-index token\n this.zIndexService.release(zToken);\n zToken = null;\n\n // Notify callback\n options?.onDispose?.();\n };\n\n const bringToFront = () => {\n if (!zToken || isDisposed) return;\n zToken = this.zIndexService.bringToFront(zToken);\n if (backdropElement) {\n backdropElement.style.zIndex = String(zToken.zIndex);\n }\n if (overlayContainer) {\n overlayContainer.style.zIndex = String(zToken.zIndex);\n }\n };\n\n // Set up backdrop click handler\n if (backdropElement && options?.backdrop?.closeOnClick) {\n backdropElement.addEventListener('click', () => {\n dispose();\n });\n }\n\n return {\n instance,\n updatePosition,\n dispose,\n overlayElement: overlayContainer,\n zToken,\n bringToFront,\n };\n }\n\n /**\n * Creates a backdrop element.\n */\n private createBackdrop(options: AXOverlayOptions | undefined, zIndex: number): HTMLElement {\n const backdrop = this.document.createElement('div');\n backdrop.classList.add('ax-overlay-backdrop');\n\n if (options?.backdrop?.backdropClass) {\n backdrop.classList.add(options.backdrop.backdropClass);\n }\n\n // Style the backdrop\n backdrop.style.position = 'fixed';\n backdrop.style.top = '0';\n backdrop.style.left = '0';\n backdrop.style.width = '100%';\n backdrop.style.height = '100%';\n backdrop.style.zIndex = String(zIndex);\n\n if (options?.backdrop?.background) {\n backdrop.style.backgroundColor = 'rgba(0, 0, 0, 0.5)';\n }\n\n this.document.body.appendChild(backdrop);\n return backdrop;\n }\n\n /**\n * Creates a centered overlay container (for modals/popups).\n */\n private createCenteredOverlayContainer(\n content: HTMLElement,\n options: AXOverlayOptions | undefined,\n zIndex: number,\n ): HTMLElement {\n const container = this.document.createElement('div');\n container.classList.add('ax-overlay-container', 'ax-overlay-centered');\n\n // Add custom panel classes\n if (options?.panelClass) {\n const classes = Array.isArray(options.panelClass) ? options.panelClass : [options.panelClass];\n classes.forEach((cls) => {\n if (cls) {\n container.classList.add(cls);\n }\n });\n }\n\n // Set styles for centered positioning\n container.style.position = 'fixed';\n container.style.top = '0';\n container.style.left = '0';\n container.style.width = '100%';\n container.style.height = '100%';\n container.style.display = 'flex';\n container.style.alignItems = 'center';\n container.style.justifyContent = 'center';\n container.style.zIndex = String(zIndex);\n\n // Create inner wrapper for the content\n const contentWrapper = this.document.createElement('div');\n contentWrapper.classList.add('ax-overlay-content');\n\n // Apply width if provided\n if (options?.width) {\n contentWrapper.style.width = options.width;\n }\n\n // Move content into wrapper\n contentWrapper.appendChild(content);\n container.appendChild(contentWrapper);\n\n // Append to body\n this.document.body.appendChild(container);\n\n return container;\n }\n\n /**\n * Gets the host element from a ComponentRef or EmbeddedViewRef.\n */\n private getHostElement<T>(instance: EmbeddedViewRef<T> | ComponentRef<T>): HTMLElement {\n if (instance instanceof ComponentRef) {\n return instance.location.nativeElement;\n } else {\n // EmbeddedViewRef - get the first root node\n return instance.rootNodes[0] as HTMLElement;\n }\n }\n\n /**\n * Creates an overlay container element and appends the content to it.\n */\n private createOverlayContainer(\n content: HTMLElement,\n options: AXOverlayOptions | undefined,\n zIndex: number,\n ): HTMLElement {\n const container = this.document.createElement('div');\n const pane = this.document.createElement('div');\n container.classList.add('ax-overlay-container');\n\n if (Array.isArray(options.panelClass)) {\n const check = options.panelClass.some((element) => {\n return element === 'ax-action-sheet-panel';\n });\n if (!check) pane.classList.add('ax-overlay-pane');\n }\n\n if (options.actionSheetStyle && this._platform.is('SM')) pane.classList.add('ax-overlay-actionsheet');\n\n // Add custom panel classes\n if (options?.panelClass) {\n const classes = Array.isArray(options.panelClass) ? options.panelClass : [options.panelClass];\n classes.forEach((cls) => {\n if (cls) {\n container.classList.add(cls);\n }\n });\n }\n\n // Set initial styles for positioning\n container.style.position = 'fixed';\n container.style.zIndex = String(zIndex);\n container.style.maxWidth = '100vw';\n container.style.maxHeight = '100vh';\n\n if (options?.actionSheetStyle) {\n container.style.width = this._platform.is('SM') ? '100%' : 'fit-content';\n } else {\n container.style.width = options?.width || 'fit-content';\n }\n\n // Move content into container\n pane.appendChild(content);\n container.appendChild(pane);\n\n // Append to body\n this.document.body.appendChild(container);\n\n return container;\n }\n\n /**\n * Positions the overlay container relative to the anchor element.\n */\n private positionOverlay(container: HTMLElement, options: AXOverlayOptions): void {\n if (options.actionSheetStyle && this._platform.is('SM')) {\n container.style.bottom = `0px`;\n container.style.left = `0px`;\n return;\n }\n\n const anchorOptions = options.anchorOptions;\n if (!anchorOptions?.anchor) return;\n\n const anchorElement =\n anchorOptions.anchor instanceof ElementRef ? anchorOptions.anchor.nativeElement : anchorOptions.anchor;\n\n const anchorRect = anchorElement.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n // Get positions from placement\n let positions = convertToPlacement(anchorOptions.placement ?? 'bottom');\n if (positions.length === 0) {\n positions = convertToPlacement('bottom');\n }\n\n // Apply custom offsets to positions with direction-aware inversion\n // When position flips, the offset should also be inverted to maintain the intended gap\n if (anchorOptions.offsetX || anchorOptions.offsetY) {\n const primaryPosition = positions[0];\n positions = positions.map((p) => {\n let adjustedOffsetX = anchorOptions.offsetX ?? 0;\n let adjustedOffsetY = anchorOptions.offsetY ?? 0;\n\n // Invert offsetY when vertical direction flips\n // (from bottom to top or vice versa)\n if (primaryPosition.originY !== p.originY) {\n adjustedOffsetY = -adjustedOffsetY;\n }\n\n // Invert offsetX when horizontal direction flips\n // (from end to start or vice versa)\n if (primaryPosition.originX !== p.originX) {\n adjustedOffsetX = -adjustedOffsetX;\n }\n\n return {\n ...p,\n offsetX: (p.offsetX ?? 0) + adjustedOffsetX,\n offsetY: (p.offsetY ?? 0) + adjustedOffsetY,\n };\n });\n }\n\n // Find the best position that fits in viewport\n const { coords } = anchorOptions.autoFlip\n ? findBestPosition(anchorRect, containerRect, positions, viewportWidth, viewportHeight)\n : {\n coords: {\n top:\n positions[0].originY === 'bottom'\n ? anchorRect.bottom + (positions[0].offsetY ?? 0)\n : anchorRect.top - containerRect.height + (positions[0].offsetY ?? 0),\n left: anchorRect.left + (positions[0].offsetX ?? 0),\n },\n };\n\n // Apply position\n container.style.top = `${coords.top}px`;\n container.style.left = `${coords.left}px`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAyDA;;AAEG;SACa,uBAAuB,CACrC,UAAmB,EACnB,WAAoB,EACpB,QAA6B,EAAA;IAE7B,IAAI,IAA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AC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC;AACzE,oBAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC;AACpD,iBAAA;aACF;;QAGL,SAAS,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,CAAA,EAAA,CAAI;QACvC,SAAS,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,MAAM,CAAC,IAAI,CAAA,EAAA,CAAI;IAC3C;8GAtUW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA,CAAA;;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -182,10 +182,10 @@ class AXPanViewDirective {
182
182
  this.zoom.set(Math.round(Math.max(this.minZoom(), Math.min(this.maxZoom(), this.zoom() - this.zoomStep()))));
183
183
  this.setElementPosition();
184
184
  }
185
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXPanViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
186
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: AXPanViewDirective, isStandalone: true, selector: "[axPanView]", inputs: { zoomStep: { classPropertyName: "zoomStep", publicName: "zoomStep", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, freeMode: { classPropertyName: "freeMode", publicName: "freeMode", isSignal: true, isRequired: false, transformFunction: null }, fitContent: { classPropertyName: "fitContent", publicName: "fitContent", isSignal: true, isRequired: false, transformFunction: null }, disablePan: { classPropertyName: "disablePan", publicName: "disablePan", isSignal: true, isRequired: false, transformFunction: null }, disableZoom: { classPropertyName: "disableZoom", publicName: "disableZoom", isSignal: true, isRequired: false, transformFunction: null }, wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: true, isRequired: false, transformFunction: null }, panX: { classPropertyName: "panX", publicName: "panX", isSignal: true, isRequired: false, transformFunction: null }, panY: { classPropertyName: "panY", publicName: "panY", isSignal: true, isRequired: false, transformFunction: null }, zoom: { classPropertyName: "zoom", publicName: "zoom", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { panX: "panXChange", panY: "panYChange", zoom: "zoomChange", zoomChange: "zoomChange", positionChange: "positionChange" }, exportAs: ["axPanView"], ngImport: i0 }); }
185
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXPanViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
186
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.3", type: AXPanViewDirective, isStandalone: true, selector: "[axPanView]", inputs: { zoomStep: { classPropertyName: "zoomStep", publicName: "zoomStep", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, freeMode: { classPropertyName: "freeMode", publicName: "freeMode", isSignal: true, isRequired: false, transformFunction: null }, fitContent: { classPropertyName: "fitContent", publicName: "fitContent", isSignal: true, isRequired: false, transformFunction: null }, disablePan: { classPropertyName: "disablePan", publicName: "disablePan", isSignal: true, isRequired: false, transformFunction: null }, disableZoom: { classPropertyName: "disableZoom", publicName: "disableZoom", isSignal: true, isRequired: false, transformFunction: null }, wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: true, isRequired: false, transformFunction: null }, panX: { classPropertyName: "panX", publicName: "panX", isSignal: true, isRequired: false, transformFunction: null }, panY: { classPropertyName: "panY", publicName: "panY", isSignal: true, isRequired: false, transformFunction: null }, zoom: { classPropertyName: "zoom", publicName: "zoom", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { panX: "panXChange", panY: "panYChange", zoom: "zoomChange", zoomChange: "zoomChange", positionChange: "positionChange" }, exportAs: ["axPanView"], ngImport: i0 }); }
187
187
  }
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXPanViewDirective, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXPanViewDirective, decorators: [{
189
189
  type: Directive,
190
190
  args: [{
191
191
  selector: '[axPanView]',
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-cdk-pan-view.mjs","sources":["../../../../packages/cdk/pan-view/src/lib/pan-view.directive.ts","../../../../packages/cdk/pan-view/src/acorex-cdk-pan-view.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n computed,\n Directive,\n DOCUMENT,\n ElementRef,\n inject,\n input,\n linkedSignal,\n model,\n NgZone,\n OnDestroy,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n} from '@angular/core';\n\n@Directive({\n selector: '[axPanView]',\n exportAs: 'axPanView',\n})\nexport class AXPanViewDirective implements OnDestroy {\n private resizeObserver: ResizeObserver;\n\n private platformId = inject(PLATFORM_ID);\n private zone = inject(NgZone);\n private render = inject(Renderer2);\n private document = inject(DOCUMENT);\n private el = inject(ElementRef<HTMLElement>);\n\n private startX = signal(0);\n private startY = signal(0);\n private pointerDown = signal(false);\n private wrapper = signal<HTMLDivElement | null>(null);\n\n zoomStep = input(7);\n minZoom = input(25);\n maxZoom = input(400);\n freeMode = input(false);\n fitContent = input(true);\n disablePan = input(false);\n disableZoom = input(false);\n wrapperClasses = input('');\n\n panX = model(0);\n panY = model(0);\n zoom = model(100);\n\n zoomChange = output<number>();\n positionChange = output<{ x: number; y: number }>();\n\n private nativeEl = computed(() => this.el.nativeElement as HTMLElement);\n\n private initialWidth = linkedSignal(() => this.nativeEl().getBoundingClientRect().width);\n private initialHeight = linkedSignal(() => this.nativeEl().getBoundingClientRect().height);\n\n #anr = afterNextRender(() => {\n // Create Wrapper\n this.createWrapper();\n this.zone.runOutsideAngular(() => {\n // Wheel Event\n this.wrapper().onwheel = (e) => {\n e.preventDefault();\n if (e.ctrlKey || this.freeMode()) {\n this.handleZoomChange(e);\n return;\n } else if (e.shiftKey) {\n if (this.disablePan()) return;\n this.panX.update((prev) => prev - e.deltaY / 3);\n this.setElementPosition();\n } else {\n if (this.disablePan()) return;\n this.panY.update((prev) => prev - e.deltaY / 3);\n this.setElementPosition();\n }\n };\n // Pointer Down Event\n this.wrapper().onpointerdown = (e) => this.handlePointerDown(e);\n // Pointer Move Event\n this.document.onpointermove = (e) => this.handlePointerMove(e);\n // Pointer Up/Leave Event\n this.document.onpointerup = (e) => this.handlePointerUp(e);\n\n if (isPlatformBrowser(this.platformId)) {\n this.resizeObserver = new ResizeObserver(() => this.sizeChanged());\n this.resizeObserver.observe(this.wrapper());\n this.resizeObserver.observe(this.nativeEl());\n }\n });\n setTimeout(() => {\n this.resetPosition();\n });\n });\n\n ngOnDestroy(): void {\n if (isPlatformBrowser(this.platformId)) this.resizeObserver.disconnect();\n }\n\n private createWrapper() {\n this.wrapper.set(this.render.createElement('div'));\n this.render.addClass(this.wrapper(), 'ax-pan-view-wrapper');\n if (this.wrapperClasses()) this.render.addClass(this.wrapper(), this.wrapperClasses());\n\n const parent = this.nativeEl().parentNode;\n this.render.appendChild(this.wrapper(), this.nativeEl());\n this.render.insertBefore(parent, this.wrapper(), this.nativeEl().nextSibling);\n\n this.render.setStyle(this.wrapper(), 'width', '100%');\n this.render.setStyle(this.wrapper(), 'height', '100%');\n this.render.setStyle(this.wrapper(), 'overflow', 'hidden');\n this.render.setStyle(this.wrapper(), 'position', 'relative');\n\n this.render.setStyle(this.nativeEl(), 'top', '0');\n this.render.setStyle(this.nativeEl(), 'left', '0');\n this.render.setStyle(this.nativeEl(), 'position', 'absolute');\n }\n\n private handlePointerDown(e: PointerEvent) {\n if (this.disablePan()) return;\n if (!this.freeMode() && e.pointerType === 'mouse' && e.buttons !== 4) return;\n if (this.freeMode() && e.pointerType === 'mouse' && e.buttons !== 1) return;\n e.preventDefault();\n this.pointerDown.set(true);\n this.wrapper().style.cursor = 'grabbing';\n\n // Update previous position for next move\n this.startX.set(e.clientX - this.panX());\n this.startY.set(e.clientY - this.panY());\n }\n\n private handlePointerMove(e: PointerEvent) {\n if (!this.pointerDown() || this.disablePan()) return;\n e.preventDefault();\n this.panX.set(e.clientX - this.startX());\n this.panY.set(e.clientY - this.startY());\n\n this.setElementPosition();\n }\n\n private handlePointerUp(e: PointerEvent) {\n if (!this.pointerDown() || this.disablePan()) return;\n e.preventDefault();\n this.pointerDown.set(false);\n this.wrapper().style.cursor = 'auto';\n }\n\n private handleZoomChange(e: WheelEvent) {\n if (this.disableZoom()) return;\n\n e.preventDefault();\n\n const rect = this.nativeEl().getBoundingClientRect();\n const mouseX = e.clientX - rect.left;\n const mouseY = e.clientY - rect.top;\n\n // Calculate the new zoom based on step\n const zoomDirection = e.deltaY > 0 ? -1 : 1; // Scroll up -> zoom in, scroll down -> zoom out\n const newZoom = Math.round(\n Math.max(this.minZoom(), Math.min(this.maxZoom(), this.zoom() + zoomDirection * this.zoomStep())),\n );\n\n const scaleChange = newZoom / this.zoom();\n\n // Adjust pan to keep zoom centered at the mouse position\n this.panX.update((prev) => prev - (mouseX - rect.width / 2) * (scaleChange - 1));\n this.panY.update((prev) => prev - (mouseY - rect.height / 2) * (scaleChange - 1));\n this.zoom.set(newZoom);\n\n this.setElementPosition();\n }\n\n private sizeChanged() {\n const prevWidth = this.initialWidth();\n const prevHeight = this.initialHeight();\n\n this.initialWidth.set((this.nativeEl().getBoundingClientRect().width * 100) / this.zoom());\n this.initialHeight.set((this.nativeEl().getBoundingClientRect().height * 100) / this.zoom());\n\n const newWidth = this.initialWidth();\n const newHeight = this.initialHeight();\n\n // Maintain the same relative position\n this.panX.update((prev) => prev - (newWidth - prevWidth) / 2);\n this.panY.update((prev) => prev - (newHeight - prevHeight) / 2);\n\n this.setElementPosition();\n }\n\n private setFitContentScale() {\n if (!this.fitContent()) return;\n const height = this.wrapper().clientHeight / this.nativeEl().clientHeight;\n const width = this.wrapper().clientWidth / this.nativeEl().clientWidth;\n this.zoom.set(Math.round(Math.min(height, width) * 100));\n }\n\n setElementPosition() {\n this.nativeEl().style.transform = `translate(${this.panX()}px, ${this.panY()}px) scale(${this.zoom() / 100})`;\n\n this.positionChange.emit({ x: this.panX(), y: this.panY() });\n this.zoomChange.emit(this.zoom());\n }\n\n resetPosition() {\n const containerWidth = this.wrapper().offsetWidth;\n const containerHeight = this.wrapper().offsetHeight;\n\n const boxLeft = (containerWidth - this.initialWidth()) / 2;\n const boxTop = (containerHeight - this.initialHeight()) / 2;\n\n this.panX.set(boxLeft);\n this.panY.set(boxTop);\n\n if (this.fitContent()) this.setFitContentScale();\n else this.zoom.set(100);\n\n this.setElementPosition();\n }\n\n zoomIn() {\n this.zoom.set(Math.round(Math.max(this.minZoom(), Math.min(this.maxZoom(), this.zoom() + this.zoomStep()))));\n this.setElementPosition();\n }\n\n zoomOut() {\n this.zoom.set(Math.round(Math.max(this.minZoom(), Math.min(this.maxZoom(), this.zoom() - this.zoomStep()))));\n this.setElementPosition();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\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AAA,IAAA,EAAA,YAAA,EAAA,IAAA,EAAA,YAAA,EAAA,IAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACtB,iBAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-cdk-pan-view.mjs","sources":["../../../../packages/cdk/pan-view/src/lib/pan-view.directive.ts","../../../../packages/cdk/pan-view/src/acorex-cdk-pan-view.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport {\n afterNextRender,\n computed,\n Directive,\n DOCUMENT,\n ElementRef,\n inject,\n input,\n linkedSignal,\n model,\n NgZone,\n OnDestroy,\n output,\n PLATFORM_ID,\n Renderer2,\n signal,\n} from '@angular/core';\n\n@Directive({\n selector: '[axPanView]',\n exportAs: 'axPanView',\n})\nexport class AXPanViewDirective implements OnDestroy {\n private resizeObserver: ResizeObserver;\n\n private platformId = inject(PLATFORM_ID);\n private zone = inject(NgZone);\n private render = inject(Renderer2);\n private document = inject(DOCUMENT);\n private el = inject(ElementRef<HTMLElement>);\n\n private startX = signal(0);\n private startY = signal(0);\n private pointerDown = signal(false);\n private wrapper = signal<HTMLDivElement | null>(null);\n\n zoomStep = input(7);\n minZoom = input(25);\n maxZoom = input(400);\n freeMode = input(false);\n fitContent = input(true);\n disablePan = input(false);\n disableZoom = input(false);\n wrapperClasses = input('');\n\n panX = model(0);\n panY = model(0);\n zoom = model(100);\n\n zoomChange = output<number>();\n positionChange = output<{ x: number; y: number }>();\n\n private nativeEl = computed(() => this.el.nativeElement as HTMLElement);\n\n private initialWidth = linkedSignal(() => this.nativeEl().getBoundingClientRect().width);\n private initialHeight = linkedSignal(() => this.nativeEl().getBoundingClientRect().height);\n\n #anr = afterNextRender(() => {\n // Create Wrapper\n this.createWrapper();\n this.zone.runOutsideAngular(() => {\n // Wheel Event\n this.wrapper().onwheel = (e) => {\n e.preventDefault();\n if (e.ctrlKey || this.freeMode()) {\n this.handleZoomChange(e);\n return;\n } else if (e.shiftKey) {\n if (this.disablePan()) return;\n this.panX.update((prev) => prev - e.deltaY / 3);\n this.setElementPosition();\n } else {\n if (this.disablePan()) return;\n this.panY.update((prev) => prev - e.deltaY / 3);\n this.setElementPosition();\n }\n };\n // Pointer Down Event\n this.wrapper().onpointerdown = (e) => this.handlePointerDown(e);\n // Pointer Move Event\n this.document.onpointermove = (e) => this.handlePointerMove(e);\n // Pointer Up/Leave Event\n this.document.onpointerup = (e) => this.handlePointerUp(e);\n\n if (isPlatformBrowser(this.platformId)) {\n this.resizeObserver = new ResizeObserver(() => this.sizeChanged());\n this.resizeObserver.observe(this.wrapper());\n this.resizeObserver.observe(this.nativeEl());\n }\n });\n setTimeout(() => {\n this.resetPosition();\n });\n });\n\n ngOnDestroy(): void {\n if (isPlatformBrowser(this.platformId)) this.resizeObserver.disconnect();\n }\n\n private createWrapper() {\n this.wrapper.set(this.render.createElement('div'));\n this.render.addClass(this.wrapper(), 'ax-pan-view-wrapper');\n if (this.wrapperClasses()) this.render.addClass(this.wrapper(), this.wrapperClasses());\n\n const parent = this.nativeEl().parentNode;\n this.render.appendChild(this.wrapper(), this.nativeEl());\n this.render.insertBefore(parent, this.wrapper(), this.nativeEl().nextSibling);\n\n this.render.setStyle(this.wrapper(), 'width', '100%');\n this.render.setStyle(this.wrapper(), 'height', '100%');\n this.render.setStyle(this.wrapper(), 'overflow', 'hidden');\n this.render.setStyle(this.wrapper(), 'position', 'relative');\n\n this.render.setStyle(this.nativeEl(), 'top', '0');\n this.render.setStyle(this.nativeEl(), 'left', '0');\n this.render.setStyle(this.nativeEl(), 'position', 'absolute');\n }\n\n private handlePointerDown(e: PointerEvent) {\n if (this.disablePan()) return;\n if (!this.freeMode() && e.pointerType === 'mouse' && e.buttons !== 4) return;\n if (this.freeMode() && e.pointerType === 'mouse' && e.buttons !== 1) return;\n e.preventDefault();\n this.pointerDown.set(true);\n this.wrapper().style.cursor = 'grabbing';\n\n // Update previous position for next move\n this.startX.set(e.clientX - this.panX());\n this.startY.set(e.clientY - this.panY());\n }\n\n private handlePointerMove(e: PointerEvent) {\n if (!this.pointerDown() || this.disablePan()) return;\n e.preventDefault();\n this.panX.set(e.clientX - this.startX());\n this.panY.set(e.clientY - this.startY());\n\n this.setElementPosition();\n }\n\n private handlePointerUp(e: PointerEvent) {\n if (!this.pointerDown() || this.disablePan()) return;\n e.preventDefault();\n this.pointerDown.set(false);\n this.wrapper().style.cursor = 'auto';\n }\n\n private handleZoomChange(e: WheelEvent) {\n if (this.disableZoom()) return;\n\n e.preventDefault();\n\n const rect = this.nativeEl().getBoundingClientRect();\n const mouseX = e.clientX - rect.left;\n const mouseY = e.clientY - rect.top;\n\n // Calculate the new zoom based on step\n const zoomDirection = e.deltaY > 0 ? -1 : 1; // Scroll up -> zoom in, scroll down -> zoom out\n const newZoom = Math.round(\n Math.max(this.minZoom(), Math.min(this.maxZoom(), this.zoom() + zoomDirection * this.zoomStep())),\n );\n\n const scaleChange = newZoom / this.zoom();\n\n // Adjust pan to keep zoom centered at the mouse position\n this.panX.update((prev) => prev - (mouseX - rect.width / 2) * (scaleChange - 1));\n this.panY.update((prev) => prev - (mouseY - rect.height / 2) * (scaleChange - 1));\n this.zoom.set(newZoom);\n\n this.setElementPosition();\n }\n\n private sizeChanged() {\n const prevWidth = this.initialWidth();\n const prevHeight = this.initialHeight();\n\n this.initialWidth.set((this.nativeEl().getBoundingClientRect().width * 100) / this.zoom());\n this.initialHeight.set((this.nativeEl().getBoundingClientRect().height * 100) / this.zoom());\n\n const newWidth = this.initialWidth();\n const newHeight = this.initialHeight();\n\n // Maintain the same relative position\n this.panX.update((prev) => prev - (newWidth - prevWidth) / 2);\n this.panY.update((prev) => prev - (newHeight - prevHeight) / 2);\n\n this.setElementPosition();\n }\n\n private setFitContentScale() {\n if (!this.fitContent()) return;\n const height = this.wrapper().clientHeight / this.nativeEl().clientHeight;\n const width = this.wrapper().clientWidth / this.nativeEl().clientWidth;\n this.zoom.set(Math.round(Math.min(height, width) * 100));\n }\n\n setElementPosition() {\n this.nativeEl().style.transform = `translate(${this.panX()}px, ${this.panY()}px) scale(${this.zoom() / 100})`;\n\n this.positionChange.emit({ x: this.panX(), y: this.panY() });\n this.zoomChange.emit(this.zoom());\n }\n\n resetPosition() {\n const containerWidth = this.wrapper().offsetWidth;\n const containerHeight = this.wrapper().offsetHeight;\n\n const boxLeft = (containerWidth - this.initialWidth()) / 2;\n const boxTop = (containerHeight - this.initialHeight()) / 2;\n\n this.panX.set(boxLeft);\n this.panY.set(boxTop);\n\n if (this.fitContent()) this.setFitContentScale();\n else this.zoom.set(100);\n\n this.setElementPosition();\n }\n\n zoomIn() {\n this.zoom.set(Math.round(Math.max(this.minZoom(), Math.min(this.maxZoom(), this.zoom() + this.zoomStep()))));\n this.setElementPosition();\n }\n\n zoomOut() {\n this.zoom.set(Math.round(Math.max(this.minZoom(), Math.min(this.maxZoom(), this.zoom() - this.zoomStep()))));\n this.setElementPosition();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAuBa,kBAAkB,CAAA;AAJ/B,IAAA,WAAA,GAAA;AAOU,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AACrB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;AAC1B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,EAAE,GAAG,MAAM,EA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ACtBD;;AAEG;;;;"}
@@ -279,10 +279,10 @@ class AXResizableDirective {
279
279
  this.hostElement.style.width = 'fit-content';
280
280
  return this.hostElement.clientWidth;
281
281
  }
282
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXResizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
283
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: AXResizableDirective, isStandalone: true, selector: "[axResizable]", inputs: { axResizable: { classPropertyName: "axResizable", publicName: "axResizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, dblClickAction: { classPropertyName: "dblClickAction", publicName: "dblClickAction", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, defaultWidth: { classPropertyName: "defaultWidth", publicName: "defaultWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { axResizable: "axResizableChange", minWidth: "minWidthChange", maxWidth: "maxWidthChange", dblClickAction: "dblClickActionChange", width: "widthChange", defaultWidth: "defaultWidthChange", onResizingStarted: "onResizingStarted", onResizingEnded: "onResizingEnded", onResizingDblClick: "onResizingDblClick" }, ngImport: i0 }); }
282
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXResizableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
283
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.3", type: AXResizableDirective, isStandalone: true, selector: "[axResizable]", inputs: { axResizable: { classPropertyName: "axResizable", publicName: "axResizable", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, dblClickAction: { classPropertyName: "dblClickAction", publicName: "dblClickAction", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, defaultWidth: { classPropertyName: "defaultWidth", publicName: "defaultWidth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { axResizable: "axResizableChange", minWidth: "minWidthChange", maxWidth: "maxWidthChange", dblClickAction: "dblClickActionChange", width: "widthChange", defaultWidth: "defaultWidthChange", onResizingStarted: "onResizingStarted", onResizingEnded: "onResizingEnded", onResizingDblClick: "onResizingDblClick" }, ngImport: i0 }); }
284
284
  }
285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AXResizableDirective, decorators: [{
285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: AXResizableDirective, decorators: [{
286
286
  type: Directive,
287
287
  args: [{
288
288
  selector: '[axResizable]',