@acorex/cdk 21.0.1-next.24 → 21.0.1-next.26
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.
|
@@ -70,7 +70,10 @@ function calculateAnchorPosition(anchorRect, overlayRect, position) {
|
|
|
70
70
|
* Checks if the overlay position fits within the viewport.
|
|
71
71
|
*/
|
|
72
72
|
function fitsInViewport(position, overlayRect, viewportWidth, viewportHeight) {
|
|
73
|
-
return position.left
|
|
73
|
+
return (position.left >= 0 &&
|
|
74
|
+
position.top >= 0 &&
|
|
75
|
+
position.left + overlayRect.width <= viewportWidth &&
|
|
76
|
+
position.top + overlayRect.height <= viewportHeight);
|
|
74
77
|
}
|
|
75
78
|
/**
|
|
76
79
|
* Finds the best position for an overlay that fits in the viewport.
|
|
@@ -328,7 +331,7 @@ class AXOverlayService {
|
|
|
328
331
|
container.style.position = 'fixed';
|
|
329
332
|
container.style.zIndex = String(zIndex);
|
|
330
333
|
container.style.maxWidth = '100vw';
|
|
331
|
-
container.style.maxHeight = '
|
|
334
|
+
container.style.maxHeight = '90vh';
|
|
332
335
|
// Apply width if provided, otherwise use max-content
|
|
333
336
|
if (options?.width) {
|
|
334
337
|
container.style.width = options.width;
|
|
@@ -1 +1 @@
|
|
|
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 position.left + overlayRect.width <= viewportWidth && position.top + overlayRect.height <= viewportHeight;\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\n const fallbackCoords = calculateAnchorPosition(anchorRect, overlayRect, positions[0]);\n return { position: positions[0], coords: fallbackCoords };\n}\n","import { convertToPlacement } from '@acorex/cdk/common';\nimport { AXComponentContent, AXComponentService } from '@acorex/core/components';\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\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 scroll listener\n if (scrollHandler) {\n this.document.removeEventListener('scroll', scrollHandler, true);\n window.removeEventListener('scroll', scrollHandler, true);\n }\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 // Set up scroll listener to close overlay on scroll (for anchored overlays only)\n let scrollHandler: ((e: Event) => void) | null = null;\n let scrollListenerActive = false;\n\n if (options?.anchorOptions?.anchor) {\n const anchorElement =\n options.anchorOptions.anchor instanceof ElementRef\n ? options.anchorOptions.anchor.nativeElement\n : options.anchorOptions.anchor;\n\n scrollHandler = (e: Event) => {\n // Ignore scroll events during initial setup\n if (!scrollListenerActive) {\n return;\n }\n\n const target = e.target as Node;\n\n // Don't close if scrolling inside the overlay itself\n if (overlayContainer?.contains(target)) {\n return;\n }\n\n // Don't close if scrolling inside the anchor element\n if (anchorElement?.contains(target)) {\n return;\n }\n\n // Only close on scrollable container scrolls, not document-level events\n // that might be triggered by layout changes\n if (target === this.document || target === this.document.documentElement) {\n // Check if it's an actual scroll by verifying scroll position changed\n const scrollTop = this.document.documentElement.scrollTop || this.document.body.scrollTop;\n const scrollLeft = this.document.documentElement.scrollLeft || this.document.body.scrollLeft;\n if (scrollTop === 0 && scrollLeft === 0) {\n return;\n }\n }\n\n dispose();\n };\n\n // Listen on document with capture to catch all scroll events\n this.document.addEventListener('scroll', scrollHandler, true);\n window.addEventListener('scroll', scrollHandler, true);\n\n // Delay activation to prevent initial layout scroll events from triggering\n requestAnimationFrame(() => {\n scrollListenerActive = true;\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 container.classList.add('ax-overlay-container');\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 // Apply width if provided, otherwise use max-content\n if (options?.width) {\n container.style.width = options.width;\n } else {\n container.style.width = 'max-content';\n }\n\n // Move content into container\n container.appendChild(content);\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) {\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 (ADD to existing offset, don't replace)\n if (anchorOptions.offsetX || anchorOptions.offsetY) {\n positions = positions.map((p) => ({\n ...p,\n offsetX: (p.offsetX ?? 0) + (anchorOptions.offsetX ?? 0),\n offsetY: (p.offsetY ?? 0) + (anchorOptions.offsetY ?? 0),\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,IAAI,GAAG,CAAC;IACZ,IAAI,GAAG,GAAG,CAAC;;AAGX,IAAA,QAAQ,QAAQ,CAAC,OAAO;AACtB,QAAA,KAAK,OAAO;AACV,YAAA,IAAI,GAAG,UAAU,CAAC,IAAI;YACtB;AACF,QAAA,KAAK,QAAQ;YACX,IAAI,GAAG,UAAU,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,GAAG,CAAC;YAC7C;AACF,QAAA,KAAK,KAAK;AACR,YAAA,IAAI,GAAG,UAAU,CAAC,KAAK;YACvB;;AAGJ,IAAA,QAAQ,QAAQ,CAAC,OAAO;AACtB,QAAA,KAAK,KAAK;AACR,YAAA,GAAG,GAAG,UAAU,CAAC,GAAG;YACpB;AACF,QAAA,KAAK,QAAQ;YACX,GAAG,GAAG,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC;YAC5C;AACF,QAAA,KAAK,QAAQ;AACX,YAAA,GAAG,GAAG,UAAU,CAAC,MAAM;YACvB;;;AAIJ,IAAA,QAAQ,QAAQ,CAAC,QAAQ;AACvB,QAAA,KAAK,OAAO;;YAEV;AACF,QAAA,KAAK,QAAQ;AACX,YAAA,IAAI,IAAI,WAAW,CAAC,KAAK,GAAG,CAAC;YAC7B;AACF,QAAA,KAA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BAAE,UAAU,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC;AAChD,0BAAE,UAAU,CAAC,GAAG,GAAG,aAAa,CAAC,MAAM,IAAI,SAAS,CAAC,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;+GAlWW,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;;;ACTD;;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 * 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\n const fallbackCoords = calculateAnchorPosition(anchorRect, overlayRect, positions[0]);\n return { position: positions[0], coords: fallbackCoords };\n}\n","import { convertToPlacement } from '@acorex/cdk/common';\nimport { AXComponentContent, AXComponentService } from '@acorex/core/components';\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\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 scroll listener\n if (scrollHandler) {\n this.document.removeEventListener('scroll', scrollHandler, true);\n window.removeEventListener('scroll', scrollHandler, true);\n }\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 // Set up scroll listener to close overlay on scroll (for anchored overlays only)\n let scrollHandler: ((e: Event) => void) | null = null;\n let scrollListenerActive = false;\n\n if (options?.anchorOptions?.anchor) {\n const anchorElement =\n options.anchorOptions.anchor instanceof ElementRef\n ? options.anchorOptions.anchor.nativeElement\n : options.anchorOptions.anchor;\n\n scrollHandler = (e: Event) => {\n // Ignore scroll events during initial setup\n if (!scrollListenerActive) {\n return;\n }\n\n const target = e.target as Node;\n\n // Don't close if scrolling inside the overlay itself\n if (overlayContainer?.contains(target)) {\n return;\n }\n\n // Don't close if scrolling inside the anchor element\n if (anchorElement?.contains(target)) {\n return;\n }\n\n // Only close on scrollable container scrolls, not document-level events\n // that might be triggered by layout changes\n if (target === this.document || target === this.document.documentElement) {\n // Check if it's an actual scroll by verifying scroll position changed\n const scrollTop = this.document.documentElement.scrollTop || this.document.body.scrollTop;\n const scrollLeft = this.document.documentElement.scrollLeft || this.document.body.scrollLeft;\n if (scrollTop === 0 && scrollLeft === 0) {\n return;\n }\n }\n\n dispose();\n };\n\n // Listen on document with capture to catch all scroll events\n this.document.addEventListener('scroll', scrollHandler, true);\n window.addEventListener('scroll', scrollHandler, true);\n\n // Delay activation to prevent initial layout scroll events from triggering\n requestAnimationFrame(() => {\n scrollListenerActive = true;\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 container.classList.add('ax-overlay-container');\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 = '90vh';\n\n // Apply width if provided, otherwise use max-content\n if (options?.width) {\n container.style.width = options.width;\n } else {\n container.style.width = 'max-content';\n }\n\n // Move content into container\n container.appendChild(content);\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) {\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 (ADD to existing offset, don't replace)\n if (anchorOptions.offsetX || anchorOptions.offsetY) {\n positions = positions.map((p) => ({\n ...p,\n offsetX: (p.offsetX ?? 0) + (anchorOptions.offsetX ?? 0),\n offsetY: (p.offsetY ?? 0) + (anchorOptions.offsetY ?? 0),\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,IAAI,GAAG,CAAC;IACZ,IAAI,GAAG,GAAG,CAAC;;AAGX,IAAA,QAAQ,QAAQ,CAAC,OAAO;AACtB,QAAA,KAAK,OAAO;AACV,YAAA,IAAI,GAAG,UAAU,CAAC,IAAI;YACtB;AACF,QAAA,KAAK,QAAQ;YACX,IAAI,GAAG,UAAU,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,GAAG,CAAC;YAC7C;AACF,QAAA,KAAK,KAAK;AACR,YAAA,IAAI,GAAG,UAAU,CAAC,KAAK;YACvB;;AAGJ,IAAA,QAAQ,QAAQ,CAAC,OAAO;AACtB,QAAA,KAAK,KAAK;AACR,YAAA,GAAG,GAAG,UAAU,CAAC,GAAG;YACpB;AACF,QAAA,KAAK,QAAQ;YACX,GAAG,GAAG,UAAU,CAAC,GAAG,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC;YAC5C;AACF,QAAA,KAAK,QAAQ;AACX,YAAA,GAAG,GAA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package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/cdk",
|
|
3
|
-
"version": "21.0.1-next.
|
|
3
|
+
"version": "21.0.1-next.26",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex/core": "21.0.1-next.
|
|
5
|
+
"@acorex/core": "21.0.1-next.26",
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
8
|
"quill": ">=2.0.2",
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"types": "./sticky/index.d.ts",
|
|
102
102
|
"default": "./fesm2022/acorex-cdk-sticky.mjs"
|
|
103
103
|
},
|
|
104
|
-
"./virtual-scroll": {
|
|
105
|
-
"types": "./virtual-scroll/index.d.ts",
|
|
106
|
-
"default": "./fesm2022/acorex-cdk-virtual-scroll.mjs"
|
|
107
|
-
},
|
|
108
104
|
"./uploader": {
|
|
109
105
|
"types": "./uploader/index.d.ts",
|
|
110
106
|
"default": "./fesm2022/acorex-cdk-uploader.mjs"
|
|
111
107
|
},
|
|
108
|
+
"./virtual-scroll": {
|
|
109
|
+
"types": "./virtual-scroll/index.d.ts",
|
|
110
|
+
"default": "./fesm2022/acorex-cdk-virtual-scroll.mjs"
|
|
111
|
+
},
|
|
112
112
|
"./wysiwyg": {
|
|
113
113
|
"types": "./wysiwyg/index.d.ts",
|
|
114
114
|
"default": "./fesm2022/acorex-cdk-wysiwyg.mjs"
|