@shival99/z-ui 2.2.4 → 2.2.6

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 (27) hide show
  1. package/assets/css/themes/hospital.css +28 -2
  2. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +22 -13
  3. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  4. package/fesm2022/shival99-z-ui-components-z-icon.mjs +80 -8
  5. package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
  6. package/fesm2022/shival99-z-ui-components-z-menu.mjs +5 -5
  7. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
  8. package/fesm2022/shival99-z-ui-components-z-table.mjs +2 -2
  9. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  10. package/fesm2022/shival99-z-ui-providers.mjs +9 -2
  11. package/fesm2022/shival99-z-ui-providers.mjs.map +1 -1
  12. package/fesm2022/shival99-z-ui-services.mjs +161 -73
  13. package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/types/shival99-z-ui-components-z-autocomplete.d.ts +1 -1
  16. package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
  17. package/types/shival99-z-ui-components-z-drawer.d.ts +13 -5
  18. package/types/shival99-z-ui-components-z-editor.d.ts +1 -1
  19. package/types/shival99-z-ui-components-z-gallery.d.ts +4 -4
  20. package/types/shival99-z-ui-components-z-icon.d.ts +16 -4
  21. package/types/shival99-z-ui-components-z-modal.d.ts +1 -1
  22. package/types/shival99-z-ui-components-z-popover.d.ts +1 -1
  23. package/types/shival99-z-ui-components-z-select.d.ts +1 -1
  24. package/types/shival99-z-ui-components-z-table.d.ts +1 -1
  25. package/types/shival99-z-ui-components-z-upload.d.ts +3 -3
  26. package/types/shival99-z-ui-providers.d.ts +3 -1
  27. package/types/shival99-z-ui-services.d.ts +21 -6
@@ -1 +1 @@
1
- {"version":3,"file":"shival99-z-ui-components-z-drawer.mjs","sources":["../../../../libs/core-ui/components/z-drawer/directives/z-drawer-content.directive.ts","../../../../libs/core-ui/components/z-drawer/directives/z-drawer-footer.directive.ts","../../../../libs/core-ui/components/z-drawer/directives/z-drawer-header.directive.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.define.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.types.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.utils.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.variants.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.component.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.component.html","../../../../libs/core-ui/components/z-drawer/z-drawer.ref.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.service.ts","../../../../libs/core-ui/components/z-drawer/shival99-z-ui-components-z-drawer.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-content], [zDrawerContent]',\n standalone: true,\n})\nexport class ZDrawerContentDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-footer], [zDrawerFooter]',\n standalone: true,\n})\nexport class ZDrawerFooterDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-header], [zDrawerHeader]',\n standalone: true,\n})\nexport class ZDrawerHeaderDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","export const Z_DRAWER_RESIZE_MIN_SIZE = 240;\nexport const Z_DRAWER_RESIZE_VIEWPORT_PADDING = 32;\nexport const Z_DRAWER_RESIZE_KEY_PREFIX = 'z-drawer-resize';\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type ComponentType } from '@angular/cdk/overlay';\nimport {\n type EventEmitter,\n InjectionToken,\n type TemplateRef,\n type Type,\n type ViewContainerRef,\n type WritableSignal,\n} from '@angular/core';\nimport type { ZIcon } from '@shival99/z-ui/components/z-icon';\nimport type { ClassValue } from 'clsx';\nimport type { Observable } from 'rxjs';\n\nexport type ZDrawerContentType<T> = ComponentType<T> | TemplateRef<T> | string;\nexport type ZDrawerPlacement = 'left' | 'right' | 'top' | 'bottom';\n\nexport const Z_DRAWER_DATA = new InjectionToken<any>('Z_DRAWER_DATA');\nexport const Z_DRAWER_ANIMATION_DURATION = 250;\n\nexport enum ZDrawerTriggerAction {\n CANCEL = 'cancel',\n OK = 'ok',\n}\n\nexport type ZDrawerOnClickCallBack<T> = (instance: T, drawerRef?: unknown) => false | void | object;\n\nconst noopFun = (): void => {};\n\n/**\n * Configuration options for z-drawer component.\n *\n * @template T - The type of the content component\n * @template U - The type of the data passed to the drawer\n */\nexport class ZDrawerOptions<T, U> {\n /** Icon for the cancel button */\n public zCancelIcon?: ZIcon;\n /** Text for the cancel button. Set to null to hide the button */\n public zCancelText?: string | null;\n /** Whether the drawer is closable (shows close button) */\n public zClosable?: boolean;\n /** Drawer content - can be a component, template, or string */\n public zContent?: string | TemplateRef<T> | Type<T>;\n /** Custom CSS classes for the drawer */\n public class?: ClassValue;\n /** Custom CSS classes for the drawer body */\n public zBodyClass?: ClassValue;\n /** Data to be passed to the content component via Z_DRAWER_DATA token */\n public zData?: U;\n /**\n * Observable for deferred data loading before showing drawer content.\n * Drawer will show a loading spinner until the Observable completes.\n * The resolved data will be available via Z_DRAWER_DATA.\n */\n public zDefer?: Observable<U>;\n /** Description text shown below the title */\n public zDescription?: string;\n /** Whether to disable the header and footer shadows */\n public zDisableShadow?: boolean;\n /** Whether to show a border below the header */\n public zHeaderBorder?: boolean;\n /** Whether to show a border above the footer */\n public zFooterBorder?: boolean;\n /** Whether to hide the default footer */\n public zHideFooter?: boolean;\n /** Whether to hide the default header */\n public zHideHeader?: boolean;\n /**\n * WritableSignal to control loading state of the OK button.\n * Use this when submitting forms or calling APIs.\n */\n public readonly zLoading?: WritableSignal<boolean>;\n /** Whether clicking mask closes the drawer */\n public zMaskClosable?: boolean;\n /** Whether OK button has destructive (red) style */\n public zOkDestructive?: boolean;\n /** Whether OK button is disabled */\n public zOkDisabled?: boolean;\n /** Overlay style: 'dark' (black overlay) or 'blur' (backdrop blur) */\n public zOverlay?: 'dark' | 'blur';\n /** Icon for the OK button */\n public zOkIcon?: ZIcon;\n /** Text for the OK button. Set to null to hide the button */\n public zOkText?: string | null;\n /** Callback or EventEmitter when cancel is clicked */\n public zOnCancel?: EventEmitter<T> | ZDrawerOnClickCallBack<T> = noopFun;\n /** Callback or EventEmitter when OK is clicked */\n public zOnOk?: EventEmitter<T> | ZDrawerOnClickCallBack<T> = noopFun;\n /** Drawer title - supports string, HTML string, or TemplateRef */\n public zTitle?: string | TemplateRef<T>;\n /** ViewContainerRef for the drawer portal */\n public zViewContainerRef?: ViewContainerRef;\n /** Drawer width for left/right placement (e.g., '400px', '80%') */\n public zWidth?: string;\n /** Drawer height for top/bottom placement (e.g., '400px', '50%') */\n public zHeight?: string;\n /** Placement of the drawer: 'left', 'right', 'top', 'bottom' */\n public zPlacement?: ZDrawerPlacement;\n /** Force shadow on header/footer regardless of scroll state */\n public zShadow?: boolean;\n /** Shape of the drawer: 'rounded' (with border-radius) or 'square' (no border-radius) */\n public zShape?: 'rounded' | 'square';\n /** WritableSignal to control content loading state (shows skeleton when true) */\n public readonly zContentLoading?: WritableSignal<boolean>;\n /** Number of skeleton rows to show when content is loading (default: 5 for left/right, 3 for top/bottom) */\n public zSkeletonRows?: number;\n /** Whether the drawer can be resized from its outer edge */\n public zExpand?: boolean;\n}\n","import { zDetectBrowser } from '@shival99/z-ui/utils';\n\nexport type ZDrawerOverlayType = 'dark' | 'blur';\nexport const getOverlayType = (): ZDrawerOverlayType => {\n const browser = zDetectBrowser();\n return browser.name === 'Chrome' ? 'dark' : 'blur';\n};\n","import { cva } from 'class-variance-authority';\n\nexport type ZDrawerShape = 'rounded' | 'square';\n\nexport const zDrawerVariants = cva(['fixed z-50 flex flex-col bg-background overflow-hidden'].join(' '), {\n variants: {\n placement: {\n left: 'left-0 top-0 h-full max-w-[90vw] dark:border-r shadow-[3px_0_10px_rgba(0,0,0,0.08)]',\n right: 'right-0 top-0 h-full max-w-[90vw] dark:border-l shadow-[-3px_0_10px_rgba(0,0,0,0.08)]',\n top: 'top-0 left-0 w-full max-h-[90vh] dark:border-b shadow-[0_3px_10px_rgba(0,0,0,0.08)]',\n bottom: 'bottom-0 left-0 w-full max-h-[90vh] dark:border-t shadow-[0_-3px_10px_rgba(0,0,0,0.08)]',\n },\n shape: {\n rounded: '',\n square: '',\n },\n },\n compoundVariants: [\n { placement: 'left', shape: 'rounded', class: 'rounded-r-lg' },\n { placement: 'right', shape: 'rounded', class: 'rounded-l-lg' },\n { placement: 'top', shape: 'rounded', class: 'rounded-b-lg' },\n { placement: 'bottom', shape: 'rounded', class: 'rounded-t-lg' },\n ],\n defaultVariants: {\n placement: 'right',\n shape: 'rounded',\n },\n});\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n type ComponentPortal,\n PortalModule,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewChecked,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n type ComponentRef,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n type EmbeddedViewRef,\n inject,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n type TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';\nimport { ZContentTypePipe, ZSafeHtmlPipe } from '@shival99/z-ui/pipes';\nimport {\n ZIndexDbService,\n ZOverlayContainerService,\n ZOverlayZIndexService,\n ZTranslateService,\n} from '@shival99/z-ui/services';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { NgScrollbar } from 'ngx-scrollbar';\nimport { Subscription } from 'rxjs';\nimport { ZDrawerContentDirective } from './directives/z-drawer-content.directive';\nimport { ZDrawerFooterDirective } from './directives/z-drawer-footer.directive';\nimport { ZDrawerHeaderDirective } from './directives/z-drawer-header.directive';\nimport {\n Z_DRAWER_RESIZE_KEY_PREFIX,\n Z_DRAWER_RESIZE_MIN_SIZE,\n Z_DRAWER_RESIZE_VIEWPORT_PADDING,\n} from './z-drawer.define';\nimport { ZDrawerRef } from './z-drawer.ref';\nimport { Z_DRAWER_ANIMATION_DURATION, ZDrawerOptions, ZDrawerPlacement } from './z-drawer.types';\nimport { getOverlayType } from './z-drawer.utils';\nimport { type ZDrawerShape, zDrawerVariants } from './z-drawer.variants';\n\n@Component({\n selector: 'z-drawer',\n imports: [\n PortalModule,\n NgTemplateOutlet,\n ZButtonComponent,\n ZIconComponent,\n ZContentTypePipe,\n ZTooltipDirective,\n ZSkeletonComponent,\n NgScrollbar,\n ZSafeHtmlPipe,\n TranslatePipe,\n CdkScrollable,\n ],\n standalone: true,\n templateUrl: './z-drawer.component.html',\n styleUrl: './z-drawer.component.scss',\n providers: [TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[style.width]': 'effectiveWidth()',\n '[style.height]': 'effectiveHeight()',\n '[attr.data-placement]': 'effectivePlacement()',\n '(pointerdown)': 'onHostPointerDown($event)',\n '[class.z-drawer-resizing]': 'isResizing()',\n },\n exportAs: 'zDrawer',\n})\nexport class ZDrawerComponent<T, U> extends BasePortalOutlet implements OnDestroy, AfterViewChecked {\n public readonly zOnOk = output<void>();\n public readonly zOnCancel = output<void>();\n public readonly zAfterClose = output<void>();\n public readonly zScrollbar = output<NgScrollbar>();\n\n public readonly class = input<ClassValue>('');\n public readonly zBodyClass = input<ClassValue>('');\n public readonly zVisible = model<boolean>(false);\n public readonly zTitle = input<string | TemplateRef<unknown>>();\n public readonly zDescription = input<string | TemplateRef<unknown>>();\n public readonly zWidth = input<string>('400px');\n public readonly zHeight = input<string>('400px');\n public readonly zPlacement = input<ZDrawerPlacement>('right');\n public readonly zClosable = input<boolean>(true);\n public readonly zMaskClosable = input<boolean>(true);\n public readonly zDisableShadow = input<boolean>(false);\n public readonly zHeaderBorder = input<boolean>(false);\n public readonly zFooterBorder = input<boolean>(false);\n public readonly zHideFooter = input<boolean>(false);\n public readonly zHideHeader = input<boolean>(false);\n public readonly zOkText = input<string | null>(null);\n public readonly zCancelText = input<string | null>(null);\n public readonly zOkDestructive = input<boolean>(false);\n public readonly zOkDisabled = input<boolean>(false);\n public readonly zLoading = input<boolean>(false);\n public readonly zOverlay = input<'dark' | 'blur'>(getOverlayType());\n public readonly zShadow = input<boolean>(false);\n public readonly zShape = input<ZDrawerShape>('rounded');\n public readonly zContentLoading = input<boolean>(false);\n public readonly zSkeletonRows = input<number | null>(null);\n public readonly zExpand = input(false, { transform: booleanAttribute });\n\n protected readonly customHeader = contentChild(ZDrawerHeaderDirective);\n protected readonly customContent = contentChild(ZDrawerContentDirective);\n protected readonly customFooter = contentChild(ZDrawerFooterDirective);\n\n private readonly _drawerRef = signal<ZDrawerRef<T> | undefined>(undefined);\n public get drawerRef(): ZDrawerRef<T> | undefined {\n return this._drawerRef();\n }\n\n public set drawerRef(value: ZDrawerRef<T> | undefined) {\n this._drawerRef.set(value);\n }\n\n public readonly portalOutlet = viewChild(CdkPortalOutlet);\n protected readonly dummyTemplateRef = viewChild<TemplateRef<unknown>>('dummyTemplate');\n protected readonly mainContentRef = viewChild<NgScrollbar>('mainContent');\n\n protected readonly config = inject(ZDrawerOptions<T, U>, { optional: true }) || new ZDrawerOptions<T, U>();\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _host = inject(ElementRef<HTMLElement>);\n private readonly _overlay = inject(Overlay);\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _cdr = inject(ChangeDetectorRef);\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _zTranslate = inject(ZTranslateService);\n private readonly _overlayContainerService = inject(ZOverlayContainerService);\n private readonly _zIndexService = inject(ZOverlayZIndexService);\n private readonly _indexDb = inject(ZIndexDbService, { optional: true });\n\n private _templateOverlayRef: OverlayRef | null = null;\n private _originalParent: HTMLElement | null = null;\n private _originalNextSibling: Node | null = null;\n private _backdropSubscription: Subscription | null = null;\n private _closeTimeout: ReturnType<typeof setTimeout> | null = null;\n private _resizeCleanup: (() => void) | null = null;\n private _resizeStorageKey: string | null = null;\n\n protected readonly isResizing = signal(false);\n protected readonly isLeaving = signal(false);\n protected readonly hasScrollableContent = signal(false);\n protected readonly isScrolledFromTop = signal(false);\n protected readonly isScrolledToBottom = signal(false);\n protected readonly isServiceMode = computed(() => !!this._drawerRef());\n protected readonly isTemplateMode = computed(() => !this.isServiceMode());\n protected readonly shouldRenderContent = computed(() => this.zVisible() || this.isLeaving());\n protected readonly isStringContent = computed(() => typeof this.config.zContent === 'string');\n private _lastScrollHeight = 0;\n private readonly _resizedWidth = signal<string | null>(null);\n private readonly _resizedHeight = signal<string | null>(null);\n\n public ngAfterViewChecked(): void {\n if (this.isServiceMode() && this._resizeStorageKey === null) {\n void this._restoreResize();\n }\n this._checkScrollState();\n }\n\n private _checkScrollState(): void {\n const scrollbar = this.mainContentRef();\n if (!scrollbar) {\n return;\n }\n\n const viewport = scrollbar.nativeElement.querySelector('.ng-scroll-viewport') as HTMLElement;\n if (!viewport) {\n return;\n }\n\n if (viewport.scrollHeight === this._lastScrollHeight) {\n return;\n }\n this._lastScrollHeight = viewport.scrollHeight;\n\n const hasVerticalScroll = viewport.scrollHeight > viewport.clientHeight;\n this.hasScrollableContent.set(hasVerticalScroll);\n }\n\n public onContentScroll(event: Event): void {\n const target = event.target as HTMLElement;\n if (!target) {\n return;\n }\n\n const { scrollTop } = target;\n const { scrollHeight } = target;\n const { clientHeight } = target;\n\n this.isScrolledFromTop.set(scrollTop > 0);\n this.isScrolledToBottom.set(scrollTop + clientHeight >= scrollHeight - 1);\n }\n\n protected readonly effectiveTitle = computed(() => {\n this._zTranslate.currentLang();\n return this.isServiceMode() ? this.config.zTitle : this.zTitle();\n });\n\n protected readonly effectiveDescription = computed(() =>\n this.isServiceMode() ? this.config.zDescription : this.zDescription()\n );\n\n protected readonly hasEffectiveDescription = computed(() => !!this.effectiveDescription());\n\n protected readonly headerContentClasses = computed(() =>\n zMergeClasses(\n 'flex w-full justify-between overflow-hidden px-4',\n this.hasEffectiveDescription() ? 'items-start' : 'items-center'\n )\n );\n\n protected readonly effectiveBodyClass = computed(() =>\n this.isServiceMode() ? this.config.zBodyClass : this.zBodyClass()\n );\n\n protected readonly bodyClasses = computed(() =>\n zMergeClasses('flex min-h-0 flex-col gap-4 px-4 py-4', this.effectiveBodyClass())\n );\n\n protected readonly effectiveClosable = computed(() =>\n this.isServiceMode() ? (this.config.zClosable ?? true) : this.zClosable()\n );\n\n protected readonly effectiveDisableShadow = computed(() =>\n this.isServiceMode() ? (this.config.zDisableShadow ?? false) : this.zDisableShadow()\n );\n\n protected readonly shouldShowShadow = computed(() => !this.effectiveDisableShadow());\n\n protected readonly effectiveHeaderBorder = computed(() =>\n this.isServiceMode() ? (this.config.zHeaderBorder ?? false) : this.zHeaderBorder()\n );\n\n protected readonly effectiveFooterBorder = computed(() =>\n this.isServiceMode() ? (this.config.zFooterBorder ?? false) : this.zFooterBorder()\n );\n\n protected readonly effectiveHideFooter = computed(() =>\n this.isServiceMode() ? this.config.zHideFooter : this.zHideFooter()\n );\n\n protected readonly effectiveHideHeader = computed(() =>\n this.isServiceMode() ? (this.config.zHideHeader ?? false) : this.zHideHeader()\n );\n\n protected readonly effectiveOkText = computed(() => (this.isServiceMode() ? this.config.zOkText : this.zOkText()));\n\n protected readonly effectiveCancelText = computed(() =>\n this.isServiceMode() ? this.config.zCancelText : this.zCancelText()\n );\n\n protected readonly effectiveOkDestructive = computed(() =>\n this.isServiceMode() ? this.config.zOkDestructive : this.zOkDestructive()\n );\n\n protected readonly effectiveOkDisabled = computed(() =>\n this.isServiceMode() ? this.config.zOkDisabled : this.zOkDisabled()\n );\n\n protected readonly effectiveLoading = computed(() => {\n if (this.isServiceMode()) {\n return this.drawerRef?.loading() || (this.config.zLoading?.() ?? false);\n }\n return this.zLoading();\n });\n\n protected readonly effectiveContentLoading = computed(() => {\n if (this.isServiceMode()) {\n return this.config.zContentLoading?.() ?? false;\n }\n return this.zContentLoading();\n });\n\n protected readonly effectiveSkeletonRows = computed(() => {\n if (this.isServiceMode() && this.config.zSkeletonRows != null) {\n return this.config.zSkeletonRows;\n }\n if (this.zSkeletonRows() != null) {\n return this.zSkeletonRows() as number;\n }\n const placement = this.effectivePlacement();\n return placement === 'left' || placement === 'right' ? 6 : 3;\n });\n\n protected readonly effectivePlacement = computed<ZDrawerPlacement>(() => {\n if (this.isServiceMode()) {\n return this.config.zPlacement ?? 'right';\n }\n return this.zPlacement();\n });\n\n protected readonly effectiveExpand = computed(() =>\n this.isServiceMode() ? (this.config.zExpand ?? false) : this.zExpand()\n );\n\n protected readonly resizeIcon = computed(() => {\n const placement = this.effectivePlacement();\n return placement === 'left' || placement === 'right' ? 'lucideGripVertical' : 'lucideGripHorizontal';\n });\n\n protected readonly effectiveShadow = computed(() => {\n if (this.isServiceMode()) {\n return this.config.zShadow ?? false;\n }\n return this.zShadow();\n });\n\n protected readonly effectiveShape = computed<ZDrawerShape>(() => {\n if (this.isServiceMode()) {\n return this.config.zShape ?? 'rounded';\n }\n return this.zShape();\n });\n\n protected readonly effectiveWidth = computed(() => {\n const placement = this.effectivePlacement();\n if (placement === 'top' || placement === 'bottom') {\n return null;\n }\n const resized = this._resizedWidth();\n if (resized) {\n return resized;\n }\n if (this.isServiceMode()) {\n return this.zWidth() || this.config.zWidth || null;\n }\n return this.shouldRenderContent() ? this.zWidth() : null;\n });\n\n protected readonly effectiveHeight = computed(() => {\n const placement = this.effectivePlacement();\n if (placement === 'left' || placement === 'right') {\n return null;\n }\n const resized = this._resizedHeight();\n if (resized) {\n return resized;\n }\n if (this.isServiceMode()) {\n return this.zHeight() || this.config.zHeight || null;\n }\n return this.shouldRenderContent() ? this.zHeight() : null;\n });\n\n protected readonly isDeferLoading = computed(() => {\n if (!this.isServiceMode()) {\n return false;\n }\n return !!this.config.zDefer && !this.portalOutlet()?.hasAttached();\n });\n\n protected readonly classes = computed(() =>\n zMergeClasses(\n zDrawerVariants({ placement: this.effectivePlacement(), shape: this.effectiveShape() }),\n this.isServiceMode() ? this.config.class : this.class()\n )\n );\n\n protected readonly hostClasses = computed(() => {\n const baseClasses = this.classes();\n if (this.isServiceMode()) {\n return `${baseClasses} z-drawer-service-mode`.trim();\n }\n if (this.shouldRenderContent()) {\n return `${baseClasses} z-drawer-template-mode`.trim();\n }\n return 'z-drawer-template-host';\n });\n\n constructor() {\n super();\n\n effect(() => {\n this._zTranslate.currentLang();\n this._cdr.markForCheck();\n });\n\n if (isPlatformBrowser(this._platformId) && this.isServiceMode()) {\n void this._restoreResize();\n }\n\n effect(() => {\n const scrollbar = this.mainContentRef();\n if (scrollbar) {\n this.zScrollbar.emit(scrollbar);\n }\n });\n\n effect(() => {\n const visible = this.zVisible();\n if (visible && this.isTemplateMode() && !this._templateOverlayRef) {\n this._openTemplateOverlay();\n return;\n }\n\n if (!visible && this.isTemplateMode() && this._templateOverlayRef && !this.isLeaving()) {\n this._closeWithAnimation();\n }\n });\n }\n\n public ngOnDestroy(): void {\n this._clearCloseTimeout();\n this._resizeCleanup?.();\n this._disposeTemplateOverlay();\n }\n\n public startResize(event: PointerEvent): void {\n if (!this.effectiveExpand() || event.button !== 0) {\n return;\n }\n event.preventDefault();\n this.isResizing.set(true);\n const host = this._host.nativeElement;\n const placement = this.effectivePlacement();\n const horizontal = placement === 'left' || placement === 'right';\n const startCoordinate = horizontal ? event.clientX : event.clientY;\n const startSize = horizontal ? host.getBoundingClientRect().width : host.getBoundingClientRect().height;\n const direction = placement === 'left' || placement === 'top' ? 1 : -1;\n const onMove = (moveEvent: PointerEvent): void => {\n const delta = (horizontal ? moveEvent.clientX : moveEvent.clientY) - startCoordinate;\n const maxSize = (horizontal ? window.innerWidth : window.innerHeight) - Z_DRAWER_RESIZE_VIEWPORT_PADDING;\n const size = Math.min(maxSize, Math.max(Z_DRAWER_RESIZE_MIN_SIZE, startSize + delta * direction));\n const value = `${Math.round(size)}px`;\n if (horizontal) {\n this._resizedWidth.set(value);\n } else {\n this._resizedHeight.set(value);\n }\n };\n const onUp = (): void => {\n this._resizeCleanup?.();\n this._resizeCleanup = null;\n this.isResizing.set(false);\n void this._persistResize();\n };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onUp, { once: true });\n this._resizeCleanup = () => {\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onUp);\n };\n }\n\n public onHostPointerDown(event: PointerEvent): void {\n if (!this.effectiveExpand() || event.button !== 0) {\n return;\n }\n const rect = this._host.nativeElement.getBoundingClientRect();\n const placement = this.effectivePlacement();\n const distance =\n placement === 'left'\n ? rect.right - event.clientX\n : placement === 'right'\n ? event.clientX - rect.left\n : placement === 'top'\n ? rect.bottom - event.clientY\n : event.clientY - rect.top;\n if (distance <= 16) {\n this.startResize(event);\n }\n }\n\n public isDestroyed(): boolean {\n return this._destroyRef.destroyed;\n }\n\n public getNativeElement(): HTMLElement {\n return this._host.nativeElement;\n }\n\n public attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._cdr.detectChanges();\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n return outlet?.attachComponentPortal(portal) as ComponentRef<T>;\n }\n\n public attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n return outlet?.attachTemplatePortal(portal) as EmbeddedViewRef<C>;\n }\n\n public onOkClick(): void {\n if (this.effectiveLoading()) {\n return;\n }\n this.zOnOk.emit();\n }\n\n public onCloseClick(): void {\n if (this.effectiveLoading()) {\n return;\n }\n this.zOnCancel.emit();\n if (this.isTemplateMode()) {\n this._closeWithAnimation();\n }\n }\n\n public onBackdropClick(): void {\n if (this.zMaskClosable() && !this.effectiveLoading()) {\n this.zOnCancel.emit();\n this._closeWithAnimation();\n }\n }\n\n public open(): void {\n this.isLeaving.set(false);\n this.zVisible.set(true);\n }\n\n public close(): void {\n this._closeWithAnimation();\n }\n\n private _createOverlay(): OverlayRef | null {\n if (!isPlatformBrowser(this._platformId)) {\n return null;\n }\n\n const overlayType = this.zOverlay();\n const backdropClass = overlayType === 'blur' ? 'z-drawer-backdrop-blur' : 'z-drawer-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n panelClass: 'z-drawer-overlay-pane',\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: this._overlay.scrollStrategies.block(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _openTemplateOverlay(): void {\n if (this._templateOverlayRef) {\n return;\n }\n\n const dummyRef = this.dummyTemplateRef();\n if (!dummyRef) {\n return;\n }\n\n this._templateOverlayRef = this._createOverlay();\n if (!this._templateOverlayRef) {\n return;\n }\n\n void this._restoreResize();\n\n this._zIndexService.applyToOverlay(this._templateOverlayRef);\n\n const hostElement = this._host.nativeElement;\n this._originalParent = hostElement.parentElement;\n this._originalNextSibling = hostElement.nextSibling;\n\n const portal = new TemplatePortal(dummyRef, this._viewContainerRef);\n this._templateOverlayRef.attach(portal);\n\n const overlayPane = this._templateOverlayRef.overlayElement;\n overlayPane.style.position = 'static';\n overlayPane.appendChild(hostElement);\n\n this._backdropSubscription = this._templateOverlayRef.backdropClick().subscribe(() => {\n this.onBackdropClick();\n });\n }\n\n private _getResizeKey(): string {\n const title = this.effectiveTitle();\n const titleKey = typeof title === 'string' && title.trim() ? title.trim() : 'default';\n return `${Z_DRAWER_RESIZE_KEY_PREFIX}:${this.effectivePlacement()}:${titleKey}`;\n }\n\n private async _restoreResize(): Promise<void> {\n if (!this._indexDb) {\n return;\n }\n const key = this._getResizeKey();\n if (key === this._resizeStorageKey) {\n return;\n }\n this._resizeStorageKey = key;\n const saved = await this._indexDb.get<{ width?: string; height?: string }>(key);\n if (saved?.width) {\n this._resizedWidth.set(saved.width);\n }\n if (saved?.height) {\n this._resizedHeight.set(saved.height);\n }\n }\n\n private async _persistResize(): Promise<void> {\n if (!this._indexDb) {\n return;\n }\n const width = this._resizedWidth();\n const height = this._resizedHeight();\n if (!width && !height) {\n return;\n }\n await this._indexDb.set(this._getResizeKey(), { width, height }).catch(() => undefined);\n }\n\n private _closeWithAnimation(): void {\n if (this.isLeaving()) {\n return;\n }\n\n this._overlayContainerService.notifyClosing();\n this.isLeaving.set(true);\n this.zVisible.set(false);\n\n const hostElement = this._host.nativeElement;\n const { backdropElement } = this._templateOverlayRef ?? {};\n\n if (backdropElement) {\n backdropElement.classList.add('z-backdrop-leaving');\n }\n\n hostElement.classList.add('drawer-leave');\n\n this._clearCloseTimeout();\n this._closeTimeout = setTimeout(() => {\n if (this._destroyRef.destroyed) {\n return;\n }\n\n this.isLeaving.set(false);\n this._disposeTemplateOverlay();\n this.zAfterClose.emit();\n }, Z_DRAWER_ANIMATION_DURATION);\n }\n\n private _clearCloseTimeout(): void {\n if (!this._closeTimeout) {\n return;\n }\n\n clearTimeout(this._closeTimeout);\n this._closeTimeout = null;\n }\n\n private _disposeTemplateOverlay(): void {\n const hostElement = this._host.nativeElement;\n\n if (this._originalParent && this._originalNextSibling) {\n this._originalParent.insertBefore(hostElement, this._originalNextSibling);\n }\n\n if (this._originalParent && !this._originalNextSibling) {\n this._originalParent.appendChild(hostElement);\n }\n\n hostElement.classList.remove('drawer-leave');\n if (this._templateOverlayRef) {\n this._templateOverlayRef.dispose();\n this._templateOverlayRef = null;\n }\n\n this._originalParent = null;\n this._originalNextSibling = null;\n\n if (this._backdropSubscription) {\n this._backdropSubscription.unsubscribe();\n this._backdropSubscription = null;\n }\n }\n}\n","<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n class=\"-mt-1 -mr-2 shrink-0\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n @if (customContent(); as contentDir) {\n <ng-container *ngTemplateOutlet=\"contentDir.templateRef\" />\n } @else {\n <ng-content />\n }\n </main>\n </ng-scrollbar>\n\n @if (customFooter(); as footerDir) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n <ng-container *ngTemplateOutlet=\"footerDir.templateRef\" />\n </div>\n </footer>\n } @else if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n@if (effectiveExpand()) {\n <button\n type=\"button\"\n class=\"z-drawer-resize-handle\"\n [attr.data-placement]=\"effectivePlacement()\"\n [attr.aria-label]=\"'i18n_z_ui_drawer_resize' | translate\"\n (pointerdown)=\"$event.stopPropagation(); startResize($event)\">\n <z-icon [zType]=\"$any(resizeIcon())\" zSize=\"14\" />\n </button>\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n @if (config.zCancelIcon) {\n <z-icon [zType]=\"config.zCancelIcon\" />\n }\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n @if (config.zOkIcon && !effectiveLoading()) {\n <z-icon [zType]=\"config.zOkIcon\" />\n }\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { isPlatformBrowser } from '@angular/common';\nimport { EventEmitter, Inject, PLATFORM_ID, signal } from '@angular/core';\nimport { filter, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ZDrawerComponent } from './z-drawer.component';\nimport { Z_DRAWER_ANIMATION_DURATION, ZDrawerOptions, ZDrawerTriggerAction } from './z-drawer.types';\n\nexport class ZDrawerRef<T = any, R = any, U = any> {\n private readonly _destroy$ = new Subject<void>();\n private _isClosing = false;\n private _result?: R;\n\n public componentInstance: T | null = null;\n public readonly loading = signal(false);\n public readonly zAfterClose = new EventEmitter<R | undefined>();\n\n public constructor(\n private readonly _overlayRef: OverlayRef,\n private readonly _config: ZDrawerOptions<T, U>,\n private readonly _containerInstance: ZDrawerComponent<T, U>,\n @Inject(PLATFORM_ID) private readonly _platformId: object\n ) {\n this._containerInstance.zOnCancel.subscribe(() => this._trigger(ZDrawerTriggerAction.CANCEL));\n this._containerInstance.zOnOk.subscribe(() => this._trigger(ZDrawerTriggerAction.OK));\n\n if ((this._config.zMaskClosable ?? true) && isPlatformBrowser(this._platformId)) {\n this._overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (!this.loading()) {\n this._trigger(ZDrawerTriggerAction.CANCEL);\n }\n });\n }\n\n if (isPlatformBrowser(this._platformId)) {\n fromEvent<KeyboardEvent>(document, 'keydown')\n .pipe(\n filter(event => event.key === 'Escape'),\n takeUntil(this._destroy$)\n )\n .subscribe(() => {\n if (!this.loading()) {\n this._trigger(ZDrawerTriggerAction.CANCEL);\n }\n });\n }\n }\n\n public setLoading(value: boolean): void {\n this.loading.set(value);\n }\n\n public close(result?: R): void {\n if (this._isClosing) {\n return;\n }\n\n this._isClosing = true;\n this._result = result;\n\n if (isPlatformBrowser(this._platformId)) {\n const hostElement = this._containerInstance.getNativeElement();\n hostElement.classList.add('drawer-leave');\n const { backdropElement } = this._overlayRef;\n if (backdropElement) {\n backdropElement.classList.add('z-backdrop-leaving');\n }\n }\n\n setTimeout(() => {\n if (!this._containerInstance.isDestroyed()) {\n this._containerInstance.zAfterClose.emit();\n }\n\n this.zAfterClose.emit(this._result);\n\n if (this._overlayRef) {\n if (this._overlayRef.hasAttached()) {\n this._overlayRef.detachBackdrop();\n }\n\n this._overlayRef.dispose();\n }\n\n if (!this._destroy$.closed) {\n this._destroy$.next();\n this._destroy$.complete();\n }\n }, Z_DRAWER_ANIMATION_DURATION);\n }\n\n private _trigger(action: ZDrawerTriggerAction): void {\n if (this.loading()) {\n return;\n }\n\n const trigger = {\n ok: this._config.zOnOk,\n cancel: this._config.zOnCancel,\n }[action];\n\n if (trigger instanceof EventEmitter) {\n trigger.emit(this._getContentComponent());\n return;\n }\n\n if (typeof trigger === 'function') {\n const result = trigger(this._getContentComponent(), this) as R;\n this._closeWithResult(result);\n return;\n }\n\n this.close();\n }\n\n private _getContentComponent(): T {\n return this.componentInstance as T;\n }\n\n private _closeWithResult(result: R): void {\n if (result !== false) {\n this.close(result);\n }\n }\n}\n","import { type ComponentType, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, Injector, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { ZOverlayZIndexService } from '@shival99/z-ui/services';\nimport { ZDrawerComponent } from './z-drawer.component';\nimport { ZDrawerRef } from './z-drawer.ref';\nimport { Z_DRAWER_DATA, ZDrawerContentType, ZDrawerOptions } from './z-drawer.types';\nimport { getOverlayType } from './z-drawer.utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZDrawerService {\n private readonly _overlay = inject(Overlay);\n private readonly _injector = inject(Injector);\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _zIndexService = inject(ZOverlayZIndexService);\n\n public create<T, U>(config: ZDrawerOptions<T, U>): ZDrawerRef<T> {\n return this._open<T, U>(config.zContent as ComponentType<T>, config);\n }\n\n private _open<T, U>(componentOrTemplateRef: ZDrawerContentType<T>, config: ZDrawerOptions<T, U>) {\n const overlayRef = this._createOverlay(config);\n\n if (!overlayRef) {\n return new ZDrawerRef(\n undefined as unknown as OverlayRef,\n config,\n undefined as unknown as ZDrawerComponent<T, U>,\n this._platformId\n );\n }\n\n const drawerContainer = this._attachDrawerContainer<T, U>(overlayRef, config);\n const drawerRef = this._attachDrawerContent<T, U>(componentOrTemplateRef, drawerContainer, overlayRef, config);\n\n return drawerRef;\n }\n\n private _createOverlay<T, U>(config: ZDrawerOptions<T, U>): OverlayRef | undefined {\n if (!isPlatformBrowser(this._platformId)) {\n return undefined;\n }\n\n const overlayType = config.zOverlay ?? getOverlayType();\n const backdropClass = overlayType === 'blur' ? 'z-drawer-backdrop-blur' : 'z-drawer-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n });\n\n const overlayRef = this._overlay.create(overlayConfig);\n\n this._zIndexService.applyToOverlay(overlayRef);\n\n return overlayRef;\n }\n\n private _attachDrawerContainer<T, U>(overlayRef: OverlayRef, config: ZDrawerOptions<T, U>) {\n const injector = Injector.create({\n parent: this._injector,\n providers: [\n { provide: OverlayRef, useValue: overlayRef },\n { provide: ZDrawerOptions, useValue: config },\n ],\n });\n\n const containerPortal = new ComponentPortal<ZDrawerComponent<T, U>>(\n ZDrawerComponent,\n config.zViewContainerRef,\n injector\n );\n const containerRef = overlayRef.attach<ZDrawerComponent<T, U>>(containerPortal);\n\n return containerRef.instance;\n }\n\n private _attachDrawerContent<T, U>(\n componentOrTemplateRef: ZDrawerContentType<T>,\n drawerContainer: ZDrawerComponent<T, U>,\n overlayRef: OverlayRef,\n config: ZDrawerOptions<T, U>\n ) {\n const drawerRef = new ZDrawerRef<T>(overlayRef, config, drawerContainer, this._platformId);\n drawerContainer.drawerRef = drawerRef;\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n drawerContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null as unknown as ViewContainerRef, { drawerRef } as T)\n );\n return drawerRef;\n }\n\n if (typeof componentOrTemplateRef !== 'string') {\n const injector = this._createInjector<T, U>(drawerRef, config);\n const contentRef = drawerContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, config.zViewContainerRef, injector)\n );\n\n if (contentRef) {\n drawerRef.componentInstance = contentRef.instance;\n }\n }\n\n return drawerRef;\n }\n\n private _createInjector<T, U>(drawerRef: ZDrawerRef<T>, config: ZDrawerOptions<T, U>) {\n return Injector.create({\n parent: this._injector,\n providers: [\n { provide: ZDrawerRef, useValue: drawerRef },\n { provide: Z_DRAWER_DATA, useValue: config.zData },\n ],\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],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;AAEG;;;;"}
1
+ {"version":3,"file":"shival99-z-ui-components-z-drawer.mjs","sources":["../../../../libs/core-ui/components/z-drawer/directives/z-drawer-content.directive.ts","../../../../libs/core-ui/components/z-drawer/directives/z-drawer-footer.directive.ts","../../../../libs/core-ui/components/z-drawer/directives/z-drawer-header.directive.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.define.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.options.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.utils.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.variants.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.component.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.component.html","../../../../libs/core-ui/components/z-drawer/z-drawer.ref.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.service.ts","../../../../libs/core-ui/components/z-drawer/shival99-z-ui-components-z-drawer.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-content], [zDrawerContent]',\n standalone: true,\n})\nexport class ZDrawerContentDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-footer], [zDrawerFooter]',\n standalone: true,\n})\nexport class ZDrawerFooterDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-header], [zDrawerHeader]',\n standalone: true,\n})\nexport class ZDrawerHeaderDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { InjectionToken } from '@angular/core';\n\nexport const Z_DRAWER_DATA = new InjectionToken<any>('Z_DRAWER_DATA');\nexport const Z_DRAWER_ANIMATION_DURATION = 250;\nexport const Z_DRAWER_RESIZE_MIN_SIZE = 240;\nexport const Z_DRAWER_RESIZE_VIEWPORT_PADDING = 32;\nexport const Z_DRAWER_RESIZE_KEY_PREFIX = 'z-drawer-resize';\n\nexport enum ZDrawerTriggerAction {\n CANCEL = 'cancel',\n OK = 'ok',\n}\n","import type { EventEmitter, TemplateRef, Type, ViewContainerRef, WritableSignal } from '@angular/core';\nimport type { ZIcon } from '@shival99/z-ui/components/z-icon';\nimport type { ClassValue } from 'clsx';\nimport type { Observable } from 'rxjs';\nimport type { ZDrawerOnClickCallBack, ZDrawerPlacement, ZDrawerScrollMode } from './z-drawer.types';\n\n/**\n * Configuration options for z-drawer component.\n *\n * @template T - The type of the content component\n * @template U - The type of the data passed to the drawer\n */\nexport class ZDrawerOptions<T, U> {\n /** Icon for the cancel button */\n public zCancelIcon?: ZIcon;\n /** Text for the cancel button. Set to null to hide the button */\n public zCancelText?: string | null;\n /** Whether the drawer is closable (shows close button) */\n public zClosable?: boolean;\n /** Drawer content - can be a component, template, or string */\n public zContent?: string | TemplateRef<T> | Type<T>;\n /** Custom CSS classes for the drawer */\n public class?: ClassValue;\n /** Custom CSS classes for the drawer body */\n public zBodyClass?: ClassValue;\n /** Data to be passed to the content component via Z_DRAWER_DATA token */\n public zData?: U;\n /**\n * Observable for deferred data loading before showing drawer content.\n * Drawer will show a loading spinner until the Observable completes.\n * The resolved data will be available via Z_DRAWER_DATA.\n */\n public zDefer?: Observable<U>;\n /** Description text shown below the title */\n public zDescription?: string;\n /** Whether to disable the header and footer shadows */\n public zDisableShadow?: boolean;\n /** Whether to show a border below the header */\n public zHeaderBorder?: boolean;\n /** Whether to show a border above the footer */\n public zFooterBorder?: boolean;\n /** Whether to hide the default footer */\n public zHideFooter?: boolean;\n /** Whether to hide the default header */\n public zHideHeader?: boolean;\n /**\n * WritableSignal to control loading state of the OK button.\n * Use this when submitting forms or calling APIs.\n */\n public readonly zLoading?: WritableSignal<boolean>;\n /** Whether clicking mask closes the drawer */\n public zMaskClosable?: boolean;\n /** Whether OK button has destructive (red) style */\n public zOkDestructive?: boolean;\n /** Whether OK button is disabled */\n public zOkDisabled?: boolean;\n /** Overlay style: 'dark' (black overlay) or 'blur' (backdrop blur) */\n public zOverlay?: 'dark' | 'blur';\n /** Icon for the OK button */\n public zOkIcon?: ZIcon;\n /** Text for the OK button. Set to null to hide the button */\n public zOkText?: string | null;\n /** Callback or EventEmitter when cancel is clicked */\n public zOnCancel?: EventEmitter<T> | ZDrawerOnClickCallBack<T> = (): void => {};\n /** Callback or EventEmitter when OK is clicked */\n public zOnOk?: EventEmitter<T> | ZDrawerOnClickCallBack<T> = (): void => {};\n /** Drawer title - supports string, HTML string, or TemplateRef */\n public zTitle?: string | TemplateRef<T>;\n /** ViewContainerRef for the drawer portal */\n public zViewContainerRef?: ViewContainerRef;\n /** Drawer width for left/right placement (e.g., '400px', '80%') */\n public zWidth?: string;\n /** Drawer height for top/bottom placement (e.g., '400px', '50%') */\n public zHeight?: string;\n /** Placement of the drawer: 'left', 'right', 'top', 'bottom' */\n public zPlacement?: ZDrawerPlacement;\n /** Force shadow on header/footer regardless of scroll state */\n public zShadow?: boolean;\n /** Shape of the drawer: 'rounded' (with border-radius) or 'square' (no border-radius) */\n public zShape?: 'rounded' | 'square';\n /** WritableSignal to control content loading state (shows skeleton when true) */\n public readonly zContentLoading?: WritableSignal<boolean>;\n /** Number of skeleton rows to show when content is loading (default: 5 for left/right, 3 for top/bottom) */\n public zSkeletonRows?: number;\n /** Whether the drawer can be resized from its outer edge */\n public zExpand?: boolean;\n /** Scroll ownership: the drawer viewport by default, or an inner content viewport */\n public zScrollMode?: ZDrawerScrollMode;\n}\n","import { zDetectBrowser } from '@shival99/z-ui/utils';\n\nexport type ZDrawerOverlayType = 'dark' | 'blur';\nexport const getOverlayType = (): ZDrawerOverlayType => {\n const browser = zDetectBrowser();\n return browser.name === 'Chrome' ? 'dark' : 'blur';\n};\n","import { cva } from 'class-variance-authority';\n\nexport type ZDrawerShape = 'rounded' | 'square';\n\nexport const zDrawerVariants = cva(['fixed z-50 flex flex-col bg-background overflow-hidden'].join(' '), {\n variants: {\n placement: {\n left: 'left-0 top-0 h-full max-w-[90vw] dark:border-r shadow-[3px_0_10px_rgba(0,0,0,0.08)]',\n right: 'right-0 top-0 h-full max-w-[90vw] dark:border-l shadow-[-3px_0_10px_rgba(0,0,0,0.08)]',\n top: 'top-0 left-0 w-full max-h-[90vh] dark:border-b shadow-[0_3px_10px_rgba(0,0,0,0.08)]',\n bottom: 'bottom-0 left-0 w-full max-h-[90vh] dark:border-t shadow-[0_-3px_10px_rgba(0,0,0,0.08)]',\n },\n shape: {\n rounded: '',\n square: '',\n },\n },\n compoundVariants: [\n { placement: 'left', shape: 'rounded', class: 'rounded-r-lg' },\n { placement: 'right', shape: 'rounded', class: 'rounded-l-lg' },\n { placement: 'top', shape: 'rounded', class: 'rounded-b-lg' },\n { placement: 'bottom', shape: 'rounded', class: 'rounded-t-lg' },\n ],\n defaultVariants: {\n placement: 'right',\n shape: 'rounded',\n },\n});\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n type ComponentPortal,\n PortalModule,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewChecked,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n type ComponentRef,\n computed,\n contentChild,\n DestroyRef,\n effect,\n ElementRef,\n type EmbeddedViewRef,\n inject,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n type TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';\nimport { ZContentTypePipe, ZSafeHtmlPipe } from '@shival99/z-ui/pipes';\nimport {\n ZIndexDbService,\n ZOverlayContainerService,\n ZOverlayZIndexService,\n ZTranslateService,\n} from '@shival99/z-ui/services';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { NgScrollbar } from 'ngx-scrollbar';\nimport { Subscription } from 'rxjs';\nimport { ZDrawerContentDirective } from './directives/z-drawer-content.directive';\nimport { ZDrawerFooterDirective } from './directives/z-drawer-footer.directive';\nimport { ZDrawerHeaderDirective } from './directives/z-drawer-header.directive';\nimport {\n Z_DRAWER_ANIMATION_DURATION,\n Z_DRAWER_RESIZE_KEY_PREFIX,\n Z_DRAWER_RESIZE_MIN_SIZE,\n Z_DRAWER_RESIZE_VIEWPORT_PADDING,\n} from './z-drawer.define';\nimport { ZDrawerOptions } from './z-drawer.options';\nimport { ZDrawerRef } from './z-drawer.ref';\nimport { type ZDrawerPlacement, type ZDrawerScrollMode } from './z-drawer.types';\nimport { getOverlayType } from './z-drawer.utils';\nimport { type ZDrawerShape, zDrawerVariants } from './z-drawer.variants';\n\n@Component({\n selector: 'z-drawer',\n imports: [\n PortalModule,\n NgTemplateOutlet,\n ZButtonComponent,\n ZIconComponent,\n ZContentTypePipe,\n ZTooltipDirective,\n ZSkeletonComponent,\n NgScrollbar,\n ZSafeHtmlPipe,\n TranslatePipe,\n CdkScrollable,\n ],\n standalone: true,\n templateUrl: './z-drawer.component.html',\n styleUrl: './z-drawer.component.scss',\n providers: [TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[style.width]': 'effectiveWidth()',\n '[style.height]': 'effectiveHeight()',\n '[attr.data-placement]': 'effectivePlacement()',\n '(pointerdown)': 'onHostPointerDown($event)',\n '[class.z-drawer-resizing]': 'isResizing()',\n },\n exportAs: 'zDrawer',\n})\nexport class ZDrawerComponent<T, U> extends BasePortalOutlet implements OnDestroy, AfterViewChecked {\n public readonly zOnOk = output<void>();\n public readonly zOnCancel = output<void>();\n public readonly zAfterClose = output<void>();\n public readonly zScrollbar = output<NgScrollbar>();\n\n public readonly class = input<ClassValue>('');\n public readonly zBodyClass = input<ClassValue>('');\n public readonly zVisible = model<boolean>(false);\n public readonly zTitle = input<string | TemplateRef<unknown>>();\n public readonly zDescription = input<string | TemplateRef<unknown>>();\n public readonly zWidth = input<string>('400px');\n public readonly zHeight = input<string>('400px');\n public readonly zPlacement = input<ZDrawerPlacement>('right');\n public readonly zClosable = input<boolean>(true);\n public readonly zMaskClosable = input<boolean>(true);\n public readonly zDisableShadow = input<boolean>(false);\n public readonly zHeaderBorder = input<boolean>(false);\n public readonly zFooterBorder = input<boolean>(false);\n public readonly zHideFooter = input<boolean>(false);\n public readonly zHideHeader = input<boolean>(false);\n public readonly zOkText = input<string | null>(null);\n public readonly zCancelText = input<string | null>(null);\n public readonly zOkDestructive = input<boolean>(false);\n public readonly zOkDisabled = input<boolean>(false);\n public readonly zLoading = input<boolean>(false);\n public readonly zOverlay = input<'dark' | 'blur'>(getOverlayType());\n public readonly zShadow = input<boolean>(false);\n public readonly zShape = input<ZDrawerShape>('rounded');\n public readonly zContentLoading = input<boolean>(false);\n public readonly zSkeletonRows = input<number | null>(null);\n public readonly zExpand = input(false, { transform: booleanAttribute });\n public readonly zScrollMode = input<ZDrawerScrollMode>('drawer');\n\n protected readonly customHeader = contentChild(ZDrawerHeaderDirective);\n protected readonly customContent = contentChild(ZDrawerContentDirective);\n protected readonly customFooter = contentChild(ZDrawerFooterDirective);\n\n private readonly _drawerRef = signal<ZDrawerRef<T> | undefined>(undefined);\n public get drawerRef(): ZDrawerRef<T> | undefined {\n return this._drawerRef();\n }\n\n public set drawerRef(value: ZDrawerRef<T> | undefined) {\n this._drawerRef.set(value);\n }\n\n public readonly portalOutlet = viewChild(CdkPortalOutlet);\n protected readonly dummyTemplateRef = viewChild<TemplateRef<unknown>>('dummyTemplate');\n protected readonly mainContentRef = viewChild<NgScrollbar>('mainContent');\n\n protected readonly config = inject(ZDrawerOptions<T, U>, { optional: true }) || new ZDrawerOptions<T, U>();\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _host = inject(ElementRef<HTMLElement>);\n private readonly _overlay = inject(Overlay);\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _cdr = inject(ChangeDetectorRef);\n private readonly _destroyRef = inject(DestroyRef);\n private readonly _zTranslate = inject(ZTranslateService);\n private readonly _overlayContainerService = inject(ZOverlayContainerService);\n private readonly _zIndexService = inject(ZOverlayZIndexService);\n private readonly _indexDb = inject(ZIndexDbService, { optional: true });\n\n private _templateOverlayRef: OverlayRef | null = null;\n private _originalParent: HTMLElement | null = null;\n private _originalNextSibling: Node | null = null;\n private _backdropSubscription: Subscription | null = null;\n private _closeTimeout: ReturnType<typeof setTimeout> | null = null;\n private _resizeCleanup: (() => void) | null = null;\n private _resizeStorageKey: string | null = null;\n\n protected readonly isResizing = signal(false);\n protected readonly isLeaving = signal(false);\n protected readonly hasScrollableContent = signal(false);\n protected readonly isScrolledFromTop = signal(false);\n protected readonly isScrolledToBottom = signal(false);\n protected readonly isServiceMode = computed(() => !!this._drawerRef());\n protected readonly isTemplateMode = computed(() => !this.isServiceMode());\n protected readonly shouldRenderContent = computed(() => this.zVisible() || this.isLeaving());\n protected readonly isStringContent = computed(() => typeof this.config.zContent === 'string');\n private _lastScrollHeight = 0;\n private readonly _resizedWidth = signal<string | null>(null);\n private readonly _resizedHeight = signal<string | null>(null);\n\n public ngAfterViewChecked(): void {\n if (this.isServiceMode() && this._resizeStorageKey === null) {\n void this._restoreResize();\n }\n this._checkScrollState();\n }\n\n private _checkScrollState(): void {\n const scrollbar = this.mainContentRef();\n if (!scrollbar) {\n return;\n }\n\n const viewport = scrollbar.nativeElement.querySelector('.ng-scroll-viewport') as HTMLElement;\n if (!viewport) {\n return;\n }\n\n if (viewport.scrollHeight === this._lastScrollHeight) {\n return;\n }\n this._lastScrollHeight = viewport.scrollHeight;\n\n const hasVerticalScroll = viewport.scrollHeight > viewport.clientHeight;\n this.hasScrollableContent.set(hasVerticalScroll);\n }\n\n public onContentScroll(event: Event): void {\n const target = event.target as HTMLElement;\n if (!target) {\n return;\n }\n\n const { scrollTop } = target;\n const { scrollHeight } = target;\n const { clientHeight } = target;\n\n this.isScrolledFromTop.set(scrollTop > 0);\n this.isScrolledToBottom.set(scrollTop + clientHeight >= scrollHeight - 1);\n }\n\n protected readonly effectiveTitle = computed(() => {\n this._zTranslate.currentLang();\n return this.isServiceMode() ? this.config.zTitle : this.zTitle();\n });\n\n protected readonly effectiveDescription = computed(() =>\n this.isServiceMode() ? this.config.zDescription : this.zDescription()\n );\n\n protected readonly hasEffectiveDescription = computed(() => !!this.effectiveDescription());\n\n protected readonly headerContentClasses = computed(() =>\n zMergeClasses(\n 'flex w-full justify-between overflow-hidden px-4',\n this.hasEffectiveDescription() ? 'items-start' : 'items-center'\n )\n );\n\n protected readonly effectiveBodyClass = computed(() =>\n this.isServiceMode() ? this.config.zBodyClass : this.zBodyClass()\n );\n\n protected readonly bodyClasses = computed(() =>\n zMergeClasses('flex min-h-0 flex-col gap-4 px-4 py-4', this.effectiveBodyClass())\n );\n\n protected readonly effectiveClosable = computed(() =>\n this.isServiceMode() ? (this.config.zClosable ?? true) : this.zClosable()\n );\n\n protected readonly effectiveDisableShadow = computed(() =>\n this.isServiceMode() ? (this.config.zDisableShadow ?? false) : this.zDisableShadow()\n );\n\n protected readonly shouldShowShadow = computed(() => !this.effectiveDisableShadow());\n\n protected readonly effectiveHeaderBorder = computed(() =>\n this.isServiceMode() ? (this.config.zHeaderBorder ?? false) : this.zHeaderBorder()\n );\n\n protected readonly effectiveFooterBorder = computed(() =>\n this.isServiceMode() ? (this.config.zFooterBorder ?? false) : this.zFooterBorder()\n );\n\n protected readonly effectiveHideFooter = computed(() =>\n this.isServiceMode() ? this.config.zHideFooter : this.zHideFooter()\n );\n\n protected readonly effectiveHideHeader = computed(() =>\n this.isServiceMode() ? (this.config.zHideHeader ?? false) : this.zHideHeader()\n );\n\n protected readonly effectiveOkText = computed(() => (this.isServiceMode() ? this.config.zOkText : this.zOkText()));\n\n protected readonly effectiveCancelText = computed(() =>\n this.isServiceMode() ? this.config.zCancelText : this.zCancelText()\n );\n\n protected readonly effectiveOkDestructive = computed(() =>\n this.isServiceMode() ? this.config.zOkDestructive : this.zOkDestructive()\n );\n\n protected readonly effectiveOkDisabled = computed(() =>\n this.isServiceMode() ? this.config.zOkDisabled : this.zOkDisabled()\n );\n\n protected readonly effectiveLoading = computed(() => {\n if (this.isServiceMode()) {\n return this.drawerRef?.loading() || (this.config.zLoading?.() ?? false);\n }\n return this.zLoading();\n });\n\n protected readonly effectiveContentLoading = computed(() => {\n if (this.isServiceMode()) {\n return this.config.zContentLoading?.() ?? false;\n }\n return this.zContentLoading();\n });\n\n protected readonly effectiveSkeletonRows = computed(() => {\n if (this.isServiceMode() && this.config.zSkeletonRows != null) {\n return this.config.zSkeletonRows;\n }\n if (this.zSkeletonRows() != null) {\n return this.zSkeletonRows() as number;\n }\n const placement = this.effectivePlacement();\n return placement === 'left' || placement === 'right' ? 6 : 3;\n });\n\n protected readonly effectivePlacement = computed<ZDrawerPlacement>(() => {\n if (this.isServiceMode()) {\n return this.config.zPlacement ?? 'right';\n }\n return this.zPlacement();\n });\n\n protected readonly effectiveExpand = computed(() =>\n this.isServiceMode() ? (this.config.zExpand ?? false) : this.zExpand()\n );\n\n protected readonly effectiveScrollMode = computed<ZDrawerScrollMode>(() =>\n this.isServiceMode() ? (this.config.zScrollMode ?? 'drawer') : this.zScrollMode()\n );\n\n protected readonly isInnerScrollMode = computed(() => this.effectiveScrollMode() === 'inner');\n\n protected readonly resizeIcon = computed(() => {\n const placement = this.effectivePlacement();\n return placement === 'left' || placement === 'right' ? 'lucideGripVertical' : 'lucideGripHorizontal';\n });\n\n protected readonly effectiveShadow = computed(() => {\n if (this.isServiceMode()) {\n return this.config.zShadow ?? false;\n }\n return this.zShadow();\n });\n\n protected readonly effectiveShape = computed<ZDrawerShape>(() => {\n if (this.isServiceMode()) {\n return this.config.zShape ?? 'rounded';\n }\n return this.zShape();\n });\n\n protected readonly effectiveWidth = computed(() => {\n const placement = this.effectivePlacement();\n if (placement === 'top' || placement === 'bottom') {\n return null;\n }\n const resized = this._resizedWidth();\n if (resized) {\n return resized;\n }\n if (this.isServiceMode()) {\n return this.zWidth() || this.config.zWidth || null;\n }\n return this.shouldRenderContent() ? this.zWidth() : null;\n });\n\n protected readonly effectiveHeight = computed(() => {\n const placement = this.effectivePlacement();\n if (placement === 'left' || placement === 'right') {\n return null;\n }\n const resized = this._resizedHeight();\n if (resized) {\n return resized;\n }\n if (this.isServiceMode()) {\n return this.zHeight() || this.config.zHeight || null;\n }\n return this.shouldRenderContent() ? this.zHeight() : null;\n });\n\n protected readonly isDeferLoading = computed(() => {\n if (!this.isServiceMode()) {\n return false;\n }\n return !!this.config.zDefer && !this.portalOutlet()?.hasAttached();\n });\n\n protected readonly classes = computed(() =>\n zMergeClasses(\n zDrawerVariants({ placement: this.effectivePlacement(), shape: this.effectiveShape() }),\n this.isServiceMode() ? this.config.class : this.class()\n )\n );\n\n protected readonly hostClasses = computed(() => {\n const baseClasses = this.classes();\n const scrollModeClass = this.isInnerScrollMode() ? 'z-drawer-inner-scroll-mode' : '';\n if (this.isServiceMode()) {\n return zMergeClasses(`${baseClasses} z-drawer-service-mode`, scrollModeClass);\n }\n if (this.shouldRenderContent()) {\n return zMergeClasses(`${baseClasses} z-drawer-template-mode`, scrollModeClass);\n }\n return zMergeClasses('z-drawer-template-host', scrollModeClass);\n });\n\n constructor() {\n super();\n\n effect(() => {\n this._zTranslate.currentLang();\n this._cdr.markForCheck();\n });\n\n if (isPlatformBrowser(this._platformId) && this.isServiceMode()) {\n void this._restoreResize();\n }\n\n effect(() => {\n const scrollbar = this.mainContentRef();\n if (scrollbar) {\n this.zScrollbar.emit(scrollbar);\n }\n });\n\n effect(() => {\n const visible = this.zVisible();\n if (visible && this.isTemplateMode() && !this._templateOverlayRef) {\n this._openTemplateOverlay();\n return;\n }\n\n if (!visible && this.isTemplateMode() && this._templateOverlayRef && !this.isLeaving()) {\n this._closeWithAnimation();\n }\n });\n }\n\n public ngOnDestroy(): void {\n this._clearCloseTimeout();\n this._resizeCleanup?.();\n this._disposeTemplateOverlay();\n }\n\n public startResize(event: PointerEvent): void {\n if (!this.effectiveExpand() || event.button !== 0) {\n return;\n }\n event.preventDefault();\n this.isResizing.set(true);\n const host = this._host.nativeElement;\n const placement = this.effectivePlacement();\n const horizontal = placement === 'left' || placement === 'right';\n const startCoordinate = horizontal ? event.clientX : event.clientY;\n const startSize = horizontal ? host.getBoundingClientRect().width : host.getBoundingClientRect().height;\n const direction = placement === 'left' || placement === 'top' ? 1 : -1;\n const onMove = (moveEvent: PointerEvent): void => {\n const delta = (horizontal ? moveEvent.clientX : moveEvent.clientY) - startCoordinate;\n const maxSize = (horizontal ? window.innerWidth : window.innerHeight) - Z_DRAWER_RESIZE_VIEWPORT_PADDING;\n const size = Math.min(maxSize, Math.max(Z_DRAWER_RESIZE_MIN_SIZE, startSize + delta * direction));\n const value = `${Math.round(size)}px`;\n if (horizontal) {\n this._resizedWidth.set(value);\n } else {\n this._resizedHeight.set(value);\n }\n };\n const onUp = (): void => {\n this._resizeCleanup?.();\n this._resizeCleanup = null;\n this.isResizing.set(false);\n void this._persistResize();\n };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onUp, { once: true });\n this._resizeCleanup = () => {\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onUp);\n };\n }\n\n public onHostPointerDown(event: PointerEvent): void {\n if (!this.effectiveExpand() || event.button !== 0) {\n return;\n }\n const rect = this._host.nativeElement.getBoundingClientRect();\n const placement = this.effectivePlacement();\n const distance =\n placement === 'left'\n ? rect.right - event.clientX\n : placement === 'right'\n ? event.clientX - rect.left\n : placement === 'top'\n ? rect.bottom - event.clientY\n : event.clientY - rect.top;\n if (distance <= 16) {\n this.startResize(event);\n }\n }\n\n public isDestroyed(): boolean {\n return this._destroyRef.destroyed;\n }\n\n public getNativeElement(): HTMLElement {\n return this._host.nativeElement;\n }\n\n public attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._cdr.detectChanges();\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n return outlet?.attachComponentPortal(portal) as ComponentRef<T>;\n }\n\n public attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n return outlet?.attachTemplatePortal(portal) as EmbeddedViewRef<C>;\n }\n\n public onOkClick(): void {\n if (this.effectiveLoading()) {\n return;\n }\n this.zOnOk.emit();\n }\n\n public onCloseClick(): void {\n if (this.effectiveLoading()) {\n return;\n }\n this.zOnCancel.emit();\n if (this.isTemplateMode()) {\n this._closeWithAnimation();\n }\n }\n\n public onBackdropClick(): void {\n if (this.zMaskClosable() && !this.effectiveLoading()) {\n this.zOnCancel.emit();\n this._closeWithAnimation();\n }\n }\n\n public open(): void {\n this.isLeaving.set(false);\n this.zVisible.set(true);\n }\n\n public close(): void {\n this._closeWithAnimation();\n }\n\n private _createOverlay(): OverlayRef | null {\n if (!isPlatformBrowser(this._platformId)) {\n return null;\n }\n\n const overlayType = this.zOverlay();\n const backdropClass = overlayType === 'blur' ? 'z-drawer-backdrop-blur' : 'z-drawer-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n panelClass: 'z-drawer-overlay-pane',\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: this._overlay.scrollStrategies.block(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _openTemplateOverlay(): void {\n if (this._templateOverlayRef) {\n return;\n }\n\n const dummyRef = this.dummyTemplateRef();\n if (!dummyRef) {\n return;\n }\n\n this._templateOverlayRef = this._createOverlay();\n if (!this._templateOverlayRef) {\n return;\n }\n\n void this._restoreResize();\n\n this._zIndexService.applyToOverlay(this._templateOverlayRef);\n\n const hostElement = this._host.nativeElement;\n this._originalParent = hostElement.parentElement;\n this._originalNextSibling = hostElement.nextSibling;\n\n const portal = new TemplatePortal(dummyRef, this._viewContainerRef);\n this._templateOverlayRef.attach(portal);\n\n const overlayPane = this._templateOverlayRef.overlayElement;\n overlayPane.style.position = 'static';\n overlayPane.appendChild(hostElement);\n\n this._backdropSubscription = this._templateOverlayRef.backdropClick().subscribe(() => {\n this.onBackdropClick();\n });\n }\n\n private _getResizeKey(): string {\n const title = this.effectiveTitle();\n const titleKey = typeof title === 'string' && title.trim() ? title.trim() : 'default';\n return `${Z_DRAWER_RESIZE_KEY_PREFIX}:${this.effectivePlacement()}:${titleKey}`;\n }\n\n private async _restoreResize(): Promise<void> {\n if (!this._indexDb) {\n return;\n }\n const key = this._getResizeKey();\n if (key === this._resizeStorageKey) {\n return;\n }\n this._resizeStorageKey = key;\n const saved = await this._indexDb.get<{ width?: string; height?: string }>(key);\n if (saved?.width) {\n this._resizedWidth.set(saved.width);\n }\n if (saved?.height) {\n this._resizedHeight.set(saved.height);\n }\n }\n\n private async _persistResize(): Promise<void> {\n if (!this._indexDb) {\n return;\n }\n const width = this._resizedWidth();\n const height = this._resizedHeight();\n if (!width && !height) {\n return;\n }\n await this._indexDb.set(this._getResizeKey(), { width, height }).catch(() => undefined);\n }\n\n private _closeWithAnimation(): void {\n if (this.isLeaving()) {\n return;\n }\n\n this._overlayContainerService.notifyClosing();\n this.isLeaving.set(true);\n this.zVisible.set(false);\n\n const hostElement = this._host.nativeElement;\n const { backdropElement } = this._templateOverlayRef ?? {};\n\n if (backdropElement) {\n backdropElement.classList.add('z-backdrop-leaving');\n }\n\n hostElement.classList.add('drawer-leave');\n\n this._clearCloseTimeout();\n this._closeTimeout = setTimeout(() => {\n if (this._destroyRef.destroyed) {\n return;\n }\n\n this.isLeaving.set(false);\n this._disposeTemplateOverlay();\n this.zAfterClose.emit();\n }, Z_DRAWER_ANIMATION_DURATION);\n }\n\n private _clearCloseTimeout(): void {\n if (!this._closeTimeout) {\n return;\n }\n\n clearTimeout(this._closeTimeout);\n this._closeTimeout = null;\n }\n\n private _disposeTemplateOverlay(): void {\n const hostElement = this._host.nativeElement;\n\n if (this._originalParent && this._originalNextSibling) {\n this._originalParent.insertBefore(hostElement, this._originalNextSibling);\n }\n\n if (this._originalParent && !this._originalNextSibling) {\n this._originalParent.appendChild(hostElement);\n }\n\n hostElement.classList.remove('drawer-leave');\n if (this._templateOverlayRef) {\n this._templateOverlayRef.dispose();\n this._templateOverlayRef = null;\n }\n\n this._originalParent = null;\n this._originalNextSibling = null;\n\n if (this._backdropSubscription) {\n this._backdropSubscription.unsubscribe();\n this._backdropSubscription = null;\n }\n }\n}\n","<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n class=\"-mt-1 -mr-2 shrink-0\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n @if (customContent(); as contentDir) {\n <ng-container *ngTemplateOutlet=\"contentDir.templateRef\" />\n } @else {\n <ng-content />\n }\n </main>\n </ng-scrollbar>\n\n @if (customFooter(); as footerDir) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n <ng-container *ngTemplateOutlet=\"footerDir.templateRef\" />\n </div>\n </footer>\n } @else if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n@if (effectiveExpand()) {\n <button\n type=\"button\"\n class=\"z-drawer-resize-handle\"\n [attr.data-placement]=\"effectivePlacement()\"\n [attr.aria-label]=\"'i18n_z_ui_drawer_resize' | translate\"\n (pointerdown)=\"$event.stopPropagation(); startResize($event)\">\n <z-icon [zType]=\"$any(resizeIcon())\" zSize=\"14\" />\n </button>\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n @if (config.zCancelIcon) {\n <z-icon [zType]=\"config.zCancelIcon\" />\n }\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n @if (config.zOkIcon && !effectiveLoading()) {\n <z-icon [zType]=\"config.zOkIcon\" />\n }\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { isPlatformBrowser } from '@angular/common';\nimport { EventEmitter, Inject, PLATFORM_ID, signal } from '@angular/core';\nimport { filter, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ZDrawerComponent } from './z-drawer.component';\nimport { Z_DRAWER_ANIMATION_DURATION, ZDrawerTriggerAction } from './z-drawer.define';\nimport { ZDrawerOptions } from './z-drawer.options';\n\nexport class ZDrawerRef<T = any, R = any, U = any> {\n private readonly _destroy$ = new Subject<void>();\n private _isClosing = false;\n private _result?: R;\n\n public componentInstance: T | null = null;\n public readonly loading = signal(false);\n public readonly zAfterClose = new EventEmitter<R | undefined>();\n\n public constructor(\n private readonly _overlayRef: OverlayRef,\n private readonly _config: ZDrawerOptions<T, U>,\n private readonly _containerInstance: ZDrawerComponent<T, U>,\n @Inject(PLATFORM_ID) private readonly _platformId: object\n ) {\n this._containerInstance.zOnCancel.subscribe(() => this._trigger(ZDrawerTriggerAction.CANCEL));\n this._containerInstance.zOnOk.subscribe(() => this._trigger(ZDrawerTriggerAction.OK));\n\n if ((this._config.zMaskClosable ?? true) && isPlatformBrowser(this._platformId)) {\n this._overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (!this.loading()) {\n this._trigger(ZDrawerTriggerAction.CANCEL);\n }\n });\n }\n\n if (isPlatformBrowser(this._platformId)) {\n fromEvent<KeyboardEvent>(document, 'keydown')\n .pipe(\n filter(event => event.key === 'Escape'),\n takeUntil(this._destroy$)\n )\n .subscribe(() => {\n if (!this.loading()) {\n this._trigger(ZDrawerTriggerAction.CANCEL);\n }\n });\n }\n }\n\n public setLoading(value: boolean): void {\n this.loading.set(value);\n }\n\n public close(result?: R): void {\n if (this._isClosing) {\n return;\n }\n\n this._isClosing = true;\n this._result = result;\n\n if (isPlatformBrowser(this._platformId)) {\n const hostElement = this._containerInstance.getNativeElement();\n hostElement.classList.add('drawer-leave');\n const { backdropElement } = this._overlayRef;\n if (backdropElement) {\n backdropElement.classList.add('z-backdrop-leaving');\n }\n }\n\n setTimeout(() => {\n if (!this._containerInstance.isDestroyed()) {\n this._containerInstance.zAfterClose.emit();\n }\n\n this.zAfterClose.emit(this._result);\n\n if (this._overlayRef) {\n if (this._overlayRef.hasAttached()) {\n this._overlayRef.detachBackdrop();\n }\n\n this._overlayRef.dispose();\n }\n\n if (!this._destroy$.closed) {\n this._destroy$.next();\n this._destroy$.complete();\n }\n }, Z_DRAWER_ANIMATION_DURATION);\n }\n\n private _trigger(action: ZDrawerTriggerAction): void {\n if (this.loading()) {\n return;\n }\n\n const trigger = {\n ok: this._config.zOnOk,\n cancel: this._config.zOnCancel,\n }[action];\n\n if (trigger instanceof EventEmitter) {\n trigger.emit(this._getContentComponent());\n return;\n }\n\n if (typeof trigger === 'function') {\n const result = trigger(this._getContentComponent(), this) as R;\n this._closeWithResult(result);\n return;\n }\n\n this.close();\n }\n\n private _getContentComponent(): T {\n return this.componentInstance as T;\n }\n\n private _closeWithResult(result: R): void {\n if (result !== false) {\n this.close(result);\n }\n }\n}\n","import { type ComponentType, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, Injector, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { ZOverlayZIndexService } from '@shival99/z-ui/services';\nimport { ZDrawerComponent } from './z-drawer.component';\nimport { Z_DRAWER_DATA } from './z-drawer.define';\nimport { ZDrawerOptions } from './z-drawer.options';\nimport { ZDrawerRef } from './z-drawer.ref';\nimport { type ZDrawerContentType } from './z-drawer.types';\nimport { getOverlayType } from './z-drawer.utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZDrawerService {\n private readonly _overlay = inject(Overlay);\n private readonly _injector = inject(Injector);\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _zIndexService = inject(ZOverlayZIndexService);\n\n public create<T, U>(config: ZDrawerOptions<T, U>): ZDrawerRef<T> {\n return this._open<T, U>(config.zContent as ComponentType<T>, config);\n }\n\n private _open<T, U>(componentOrTemplateRef: ZDrawerContentType<T>, config: ZDrawerOptions<T, U>) {\n const overlayRef = this._createOverlay(config);\n\n if (!overlayRef) {\n return new ZDrawerRef(\n undefined as unknown as OverlayRef,\n config,\n undefined as unknown as ZDrawerComponent<T, U>,\n this._platformId\n );\n }\n\n const drawerContainer = this._attachDrawerContainer<T, U>(overlayRef, config);\n const drawerRef = this._attachDrawerContent<T, U>(componentOrTemplateRef, drawerContainer, overlayRef, config);\n\n return drawerRef;\n }\n\n private _createOverlay<T, U>(config: ZDrawerOptions<T, U>): OverlayRef | undefined {\n if (!isPlatformBrowser(this._platformId)) {\n return undefined;\n }\n\n const overlayType = config.zOverlay ?? getOverlayType();\n const backdropClass = overlayType === 'blur' ? 'z-drawer-backdrop-blur' : 'z-drawer-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n });\n\n const overlayRef = this._overlay.create(overlayConfig);\n\n this._zIndexService.applyToOverlay(overlayRef);\n\n return overlayRef;\n }\n\n private _attachDrawerContainer<T, U>(overlayRef: OverlayRef, config: ZDrawerOptions<T, U>) {\n const injector = Injector.create({\n parent: this._injector,\n providers: [\n { provide: OverlayRef, useValue: overlayRef },\n { provide: ZDrawerOptions, useValue: config },\n ],\n });\n\n const containerPortal = new ComponentPortal<ZDrawerComponent<T, U>>(\n ZDrawerComponent,\n config.zViewContainerRef,\n injector\n );\n const containerRef = overlayRef.attach<ZDrawerComponent<T, U>>(containerPortal);\n\n return containerRef.instance;\n }\n\n private _attachDrawerContent<T, U>(\n componentOrTemplateRef: ZDrawerContentType<T>,\n drawerContainer: ZDrawerComponent<T, U>,\n overlayRef: OverlayRef,\n config: ZDrawerOptions<T, U>\n ) {\n const drawerRef = new ZDrawerRef<T>(overlayRef, config, drawerContainer, this._platformId);\n drawerContainer.drawerRef = drawerRef;\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n drawerContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null as unknown as ViewContainerRef, { drawerRef } as T)\n );\n return drawerRef;\n }\n\n if (typeof componentOrTemplateRef !== 'string') {\n const injector = this._createInjector<T, U>(drawerRef, config);\n const contentRef = drawerContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, config.zViewContainerRef, injector)\n );\n\n if (contentRef) {\n drawerRef.componentInstance = contentRef.instance;\n }\n }\n\n return drawerRef;\n }\n\n private _createInjector<T, U>(drawerRef: ZDrawerRef<T>, config: ZDrawerOptions<T, U>) {\n return Injector.create({\n parent: this._injector,\n providers: [\n { provide: ZDrawerRef, useValue: drawerRef },\n { provide: Z_DRAWER_DATA, useValue: config.zData },\n ],\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAMa,uBAAuB,CAAA;AAClB,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;uGAD/C,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sCAAsC;AAChD,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;MCCY,sBAAsB,CAAA;AACjB,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;uGAD/C,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oCAAoC;AAC9C,oBAAA,UAAU,E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AAC,sBAAsB,EAAE,MAAM,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAChF;YAED,IAAI,UAAU,EAAE;AACd,gBAAA,SAAS,CAAC,iBAAiB,GAAG,UAAU,CAAC,QAAQ;YACnD;QACF;AAEA,QAAA,OAAO,SAAS;IAClB;IAEQ,eAAe,CAAO,SAAwB,EAAE,MAA4B,EAAA;QAClF,OAAO,QAAQ,CAAC,MAAM,CAAC;YACrB,MAAM,EAAE,IAAI,CAAC,SAAS;AACtB,YAAA,SAAS,EAAE;AACT,gBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE;gBAC5C,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,EAAE;AACnD,aAAA;AACF,SAAA,CAAC;IACJ;uGAzGW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACdD;;AAEG;;;;"}
@@ -1,6 +1,5 @@
1
- import { NgComponentOutlet } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { isDevMode, input, signal, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, makeEnvironmentProviders, inject } from '@angular/core';
2
+ import { isDevMode, input, signal, computed, viewChild, ViewContainerRef, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, makeEnvironmentProviders, inject } from '@angular/core';
4
3
  import { NgIconComponent, provideNgIconLoader, withCaching } from '@ng-icons/core';
5
4
  import { zMergeClasses } from '@shival99/z-ui/utils';
6
5
  import * as animatedIcons from 'ng-animated-icons';
@@ -109,6 +108,7 @@ class ZIconComponent {
109
108
  ...(ngDevMode ? [{ debugName: "_svgFetchError" }] : /* istanbul ignore next */ []));
110
109
  zClasses = computed(() => zMergeClasses(zIconVariants({ zSize: this.zSize() }), this.class(), this.zStrokeWidth() === 0 ? 'stroke-none' : '', 'inline-flex shrink-0'), /* @ts-ignore */
111
110
  ...(ngDevMode ? [{ debugName: "zClasses" }] : /* istanbul ignore next */ []));
111
+ animatedIconHost = viewChild('animatedIconHost', { ...(ngDevMode ? { debugName: "animatedIconHost" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
112
112
  animatedIcon = computed(() => {
113
113
  const animatedType = this.zAnimatedType();
114
114
  if (!animatedType) {
@@ -117,13 +117,19 @@ class ZIconComponent {
117
117
  return getZAnimatedIconComponent(animatedType);
118
118
  }, /* @ts-ignore */
119
119
  ...(ngDevMode ? [{ debugName: "animatedIcon" }] : /* istanbul ignore next */ []));
120
- animatedIconInputs = computed(() => ({
120
+ _animatedIconInputs = computed(() => ({
121
121
  animate: this.shouldAnimate(),
122
122
  color: 'currentColor',
123
123
  size: Number(this.normalizedSize()),
124
124
  strokeWidth: this.zStrokeWidth(),
125
125
  }), /* @ts-ignore */
126
- ...(ngDevMode ? [{ debugName: "animatedIconInputs" }] : /* istanbul ignore next */ []));
126
+ ...(ngDevMode ? [{ debugName: "_animatedIconInputs" }] : /* istanbul ignore next */ []));
127
+ _animatedIconRef = null;
128
+ _animatedIconType = null;
129
+ _animatedIconListenerCleanup = null;
130
+ _animatedIconRestartTimeoutId = null;
131
+ _isPersistentAnimate = computed(() => this.zAnimationTrigger() === 'always' || this.zAnimate(), /* @ts-ignore */
132
+ ...(ngDevMode ? [{ debugName: "_isPersistentAnimate" }] : /* istanbul ignore next */ []));
127
133
  shouldAnimate = computed(() => {
128
134
  const trigger = this.zAnimationTrigger();
129
135
  if (trigger === 'always' || this.zAnimate()) {
@@ -142,6 +148,33 @@ class ZIconComponent {
142
148
  }, /* @ts-ignore */
143
149
  ...(ngDevMode ? [{ debugName: "shouldAnimate" }] : /* istanbul ignore next */ []));
144
150
  constructor() {
151
+ effect(() => {
152
+ const host = this.animatedIconHost();
153
+ const type = this.animatedIcon();
154
+ if (!host) {
155
+ this._destroyAnimatedIconRef();
156
+ return;
157
+ }
158
+ if (type !== this._animatedIconType) {
159
+ this._destroyAnimatedIconRef();
160
+ this._animatedIconType = type;
161
+ host.clear();
162
+ if (type) {
163
+ this._animatedIconRef = host.createComponent(type);
164
+ this._attachAnimatedIconLoopListener(this._animatedIconRef);
165
+ }
166
+ }
167
+ const ref = this._animatedIconRef;
168
+ if (ref) {
169
+ const inputs = this._animatedIconInputs();
170
+ for (const [key, value] of Object.entries(inputs)) {
171
+ ref.setInput(key, value);
172
+ }
173
+ // Signal inputs set imperatively via setInput() don't reliably schedule
174
+ // change detection for a dynamically created OnPush child, so force it.
175
+ ref.changeDetectorRef.detectChanges();
176
+ }
177
+ });
145
178
  effect(onCleanup => {
146
179
  const svgInput = this.zSvg().trim();
147
180
  if (!svgInput) {
@@ -202,6 +235,45 @@ class ZIconComponent {
202
235
  });
203
236
  });
204
237
  }
238
+ _destroyAnimatedIconRef() {
239
+ this._cancelAnimatedIconRestart();
240
+ this._animatedIconListenerCleanup?.();
241
+ this._animatedIconListenerCleanup = null;
242
+ this._animatedIconRef?.destroy();
243
+ this._animatedIconRef = null;
244
+ this._animatedIconType = null;
245
+ }
246
+ _attachAnimatedIconLoopListener(ref) {
247
+ const nativeElement = ref.location.nativeElement;
248
+ const handler = () => this._restartAnimatedIconLoop(ref);
249
+ nativeElement.addEventListener('animationend', handler);
250
+ this._animatedIconListenerCleanup = () => nativeElement.removeEventListener('animationend', handler);
251
+ }
252
+ _restartAnimatedIconLoop(ref) {
253
+ if (this._animatedIconRef !== ref || !this._isPersistentAnimate()) {
254
+ return;
255
+ }
256
+ this._cancelAnimatedIconRestart();
257
+ ref.setInput('animate', false);
258
+ ref.changeDetectorRef.detectChanges();
259
+ this._animatedIconRestartTimeoutId = setTimeout(() => {
260
+ this._animatedIconRestartTimeoutId = null;
261
+ if (this._animatedIconRef !== ref || !this._isPersistentAnimate()) {
262
+ return;
263
+ }
264
+ ref.setInput('animate', true);
265
+ ref.changeDetectorRef.detectChanges();
266
+ }, 50);
267
+ }
268
+ _cancelAnimatedIconRestart() {
269
+ if (this._animatedIconRestartTimeoutId !== null) {
270
+ clearTimeout(this._animatedIconRestartTimeoutId);
271
+ this._animatedIconRestartTimeoutId = null;
272
+ }
273
+ }
274
+ ngOnDestroy() {
275
+ this._destroyAnimatedIconRef();
276
+ }
205
277
  _isRawSvg(value) {
206
278
  return value.startsWith('<svg');
207
279
  }
@@ -261,11 +333,11 @@ class ZIconComponent {
261
333
  }
262
334
  }
263
335
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
264
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: ZIconComponent, isStandalone: true, selector: "z-icon, [z-icon]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zAnimatedType: { classPropertyName: "zAnimatedType", publicName: "zAnimatedType", isSignal: true, isRequired: false, transformFunction: null }, zAnimate: { classPropertyName: "zAnimate", publicName: "zAnimate", isSignal: true, isRequired: false, transformFunction: null }, zAnimationTrigger: { classPropertyName: "zAnimationTrigger", publicName: "zAnimationTrigger", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zStrokeWidth: { classPropertyName: "zStrokeWidth", publicName: "zStrokeWidth", isSignal: true, isRequired: false, transformFunction: null }, zSvg: { classPropertyName: "zSvg", publicName: "zSvg", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "setHoverActive(true)", "mouseleave": "setHoverActive(false)", "focusin": "setFocusActive(true)", "focusout": "setFocusActive(false)", "touchstart": "setTouchActive(true)", "touchend": "setTouchActive(false)" }, properties: { "class": "zClasses()", "style.width": "normalizedSize() + \"px\"", "style.height": "normalizedSize() + \"px\"" } }, ngImport: i0, template: "@if (animatedIcon()) {\n <ng-container [ngComponentOutlet]=\"animatedIcon()\" [ngComponentOutletInputs]=\"animatedIconInputs()\" />\n} @else if (resolvedSvg()) {\n <ng-icon [svg]=\"resolvedSvg()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else if (!zSvg()) {\n <ng-icon [name]=\"zType()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n", dependencies: [{ kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
336
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: ZIconComponent, isStandalone: true, selector: "z-icon, [z-icon]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zType: { classPropertyName: "zType", publicName: "zType", isSignal: true, isRequired: false, transformFunction: null }, zAnimatedType: { classPropertyName: "zAnimatedType", publicName: "zAnimatedType", isSignal: true, isRequired: false, transformFunction: null }, zAnimate: { classPropertyName: "zAnimate", publicName: "zAnimate", isSignal: true, isRequired: false, transformFunction: null }, zAnimationTrigger: { classPropertyName: "zAnimationTrigger", publicName: "zAnimationTrigger", isSignal: true, isRequired: false, transformFunction: null }, zSize: { classPropertyName: "zSize", publicName: "zSize", isSignal: true, isRequired: false, transformFunction: null }, zStrokeWidth: { classPropertyName: "zStrokeWidth", publicName: "zStrokeWidth", isSignal: true, isRequired: false, transformFunction: null }, zSvg: { classPropertyName: "zSvg", publicName: "zSvg", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "setHoverActive(true)", "mouseleave": "setHoverActive(false)", "focusin": "setFocusActive(true)", "focusout": "setFocusActive(false)", "touchstart": "setTouchActive(true)", "touchend": "setTouchActive(false)" }, properties: { "class": "zClasses()", "style.width": "normalizedSize() + \"px\"", "style.height": "normalizedSize() + \"px\"" } }, viewQueries: [{ propertyName: "animatedIconHost", first: true, predicate: ["animatedIconHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "@if (animatedIcon()) {\n <ng-container #animatedIconHost />\n} @else if (resolvedSvg()) {\n <ng-icon [svg]=\"resolvedSvg()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else if (!zSvg()) {\n <ng-icon [name]=\"zType()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n", dependencies: [{ kind: "component", type: NgIconComponent, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
265
337
  }
266
338
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZIconComponent, decorators: [{
267
339
  type: Component,
268
- args: [{ selector: 'z-icon, [z-icon]', imports: [NgIconComponent, NgComponentOutlet], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
340
+ args: [{ selector: 'z-icon, [z-icon]', imports: [NgIconComponent], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
269
341
  '[class]': 'zClasses()',
270
342
  '[style.width]': 'normalizedSize() + "px"',
271
343
  '[style.height]': 'normalizedSize() + "px"',
@@ -275,8 +347,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImpor
275
347
  '(focusout)': 'setFocusActive(false)',
276
348
  '(touchstart)': 'setTouchActive(true)',
277
349
  '(touchend)': 'setTouchActive(false)',
278
- }, template: "@if (animatedIcon()) {\n <ng-container [ngComponentOutlet]=\"animatedIcon()\" [ngComponentOutletInputs]=\"animatedIconInputs()\" />\n} @else if (resolvedSvg()) {\n <ng-icon [svg]=\"resolvedSvg()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else if (!zSvg()) {\n <ng-icon [name]=\"zType()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n" }]
279
- }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zAnimatedType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAnimatedType", required: false }] }], zAnimate: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAnimate", required: false }] }], zAnimationTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAnimationTrigger", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zStrokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zStrokeWidth", required: false }] }], zSvg: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSvg", required: false }] }] } });
350
+ }, template: "@if (animatedIcon()) {\n <ng-container #animatedIconHost />\n} @else if (resolvedSvg()) {\n <ng-icon [svg]=\"resolvedSvg()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n} @else if (!zSvg()) {\n <ng-icon [name]=\"zType()\" [size]=\"normalizedSize()\" [strokeWidth]=\"zStrokeWidth()\" />\n}\n" }]
351
+ }], ctorParameters: () => [], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zType", required: false }] }], zAnimatedType: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAnimatedType", required: false }] }], zAnimate: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAnimate", required: false }] }], zAnimationTrigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "zAnimationTrigger", required: false }] }], zSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSize", required: false }] }], zStrokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zStrokeWidth", required: false }] }], zSvg: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSvg", required: false }] }], animatedIconHost: [{ type: i0.ViewChild, args: ['animatedIconHost', { ...{ read: ViewContainerRef }, isSignal: true }] }] } });
280
352
 
281
353
  const Z_ICONS = {};
282
354