@shival99/z-ui 2.5.3 → 2.5.4

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 (35) hide show
  1. package/assets/css/features/media.css +14 -0
  2. package/assets/css/features/office.css +11 -0
  3. package/assets/css/global.css +5 -9
  4. package/assets/css/overlay.css +28 -3
  5. package/fesm2022/shival99-z-ui-components-z-command.mjs +2 -2
  6. package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +2 -2
  8. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-gallery.mjs +4 -3
  10. package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-components-z-loading.mjs +2 -2
  12. package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-menu.mjs +4 -4
  14. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
  15. package/fesm2022/shival99-z-ui-components-z-modal.mjs +2 -2
  16. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  17. package/fesm2022/shival99-z-ui-components-z-overlay.mjs +32 -29
  18. package/fesm2022/shival99-z-ui-components-z-overlay.mjs.map +1 -1
  19. package/fesm2022/shival99-z-ui-components-z-table.mjs +7 -7
  20. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -1
  21. package/fesm2022/shival99-z-ui-services-excel.mjs +672 -0
  22. package/fesm2022/shival99-z-ui-services-excel.mjs.map +1 -0
  23. package/fesm2022/shival99-z-ui-services-office.mjs +123 -0
  24. package/fesm2022/shival99-z-ui-services-office.mjs.map +1 -0
  25. package/fesm2022/shival99-z-ui-services.mjs +2 -778
  26. package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
  27. package/package.json +22 -6
  28. package/types/shival99-z-ui-components-z-autocomplete.d.ts +1 -1
  29. package/types/shival99-z-ui-components-z-calendar.d.ts +4 -4
  30. package/types/shival99-z-ui-components-z-overlay.d.ts +11 -12
  31. package/types/shival99-z-ui-components-z-select.d.ts +2 -2
  32. package/types/shival99-z-ui-components-z-table.d.ts +2 -2
  33. package/types/shival99-z-ui-services-excel.d.ts +36 -0
  34. package/types/shival99-z-ui-services-office.d.ts +15 -0
  35. package/types/shival99-z-ui-services.d.ts +151 -194
@@ -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.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 = 450;\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 { 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 type Injector,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n type TemplateRef,\n type Type,\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 { ZOverlayService, type ZOverlayRef } from '@shival99/z-ui/components/z-overlay';\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 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> 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 protected readonly contentOutlet = viewChild('contentOutlet', { read: ViewContainerRef });\n protected readonly mainContentRef = viewChild<NgScrollbar>('mainContent');\n\n /**\n * Nội dung được yêu cầu gắn khi `#contentOutlet` chưa tồn tại. `@defer` bọc outlet chỉ render sau\n * khi Angular nạp xong dependency của block, nên lần mở drawer ĐẦU TIÊN outlet vẫn còn ở\n * `@placeholder` — giữ lại đây rồi gắn ngay khi outlet xuất hiện. Xem `_attachPendingContent`.\n */\n private _pendingContent:\n | { kind: 'component'; component: Type<unknown>; injector?: Injector }\n | { kind: 'template'; templateRef: TemplateRef<unknown>; context: unknown }\n | null = null;\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 _overlayService = inject(ZOverlayService);\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: ZOverlayRef | 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 const hideHeader = this.effectiveHideHeader();\n const hideFooter = this.effectiveHideFooter();\n const bodySpacingClass = hideHeader && hideFooter ? 'py-0' : hideHeader ? 'pt-0' : hideFooter ? 'pb-0' : '';\n\n return zMergeClasses('flex min-h-0 flex-col gap-4 px-4 py-4', this.effectiveBodyClass(), bodySpacingClass);\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.contentOutlet()?.length;\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 effect(() => {\n this._zTranslate.currentLang();\n this._cdr.markForCheck();\n });\n\n // `contentOutlet` là signal query nên effect này chạy lại đúng lúc `@defer` render xong outlet.\n effect(() => {\n this._attachPendingContent(this.contentOutlet());\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<C>(component: Type<C>, injector?: Injector): ComponentRef<C> {\n this._cdr.detectChanges();\n const outlet = this.contentOutlet();\n if (outlet && outlet.length > 0) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n if (!outlet) {\n this._pendingContent = { kind: 'component', component: component as Type<unknown>, injector };\n\n return undefined as unknown as ComponentRef<C>;\n }\n\n return outlet.createComponent(component, { injector });\n }\n\n public attachTemplatePortal<C>(templateRef: TemplateRef<C>, context: C): EmbeddedViewRef<C> {\n const outlet = this.contentOutlet();\n if (outlet && outlet.length > 0) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n if (!outlet) {\n this._pendingContent = { kind: 'template', templateRef: templateRef as TemplateRef<unknown>, context };\n\n return undefined as unknown as EmbeddedViewRef<C>;\n }\n\n return outlet.createEmbeddedView(templateRef, context);\n }\n\n /**\n * Gắn nội dung đã bị hoãn ở `_pendingContent` ngay khi outlet có thật, và cập nhật\n * `drawerRef.componentInstance` — thứ mà `ZDrawerService` không set được vì lúc nó gọi\n * `attachComponentPortal` thì chưa có ref nào để trả về.\n */\n private _attachPendingContent(outlet: ViewContainerRef | undefined): void {\n const pending = this._pendingContent;\n if (!outlet || !pending || outlet.length > 0) {\n return;\n }\n\n this._pendingContent = null;\n\n if (pending.kind === 'component') {\n const contentRef = outlet.createComponent(pending.component, { injector: pending.injector });\n const { drawerRef } = this;\n if (drawerRef) {\n drawerRef.componentInstance = contentRef.instance as T;\n }\n contentRef.changeDetectorRef.detectChanges();\n\n return;\n }\n\n outlet.createEmbeddedView(pending.templateRef, pending.context).detectChanges();\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(): ZOverlayRef | 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\n return this._overlayService.createGlobal({\n hasBackdrop: true,\n backdropClass,\n panelClass: 'z-drawer-overlay-pane',\n scrollLock: true,\n });\n }\n\n private _openTemplateOverlay(): void {\n if (this._templateOverlayRef) {\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 this._templateOverlayRef.overlayElement.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","<!-- 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 #contentOutlet />\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 { isPlatformBrowser } from '@angular/common';\nimport { EventEmitter, Inject, PLATFORM_ID, signal } from '@angular/core';\nimport type { ZOverlayRef } from '@shival99/z-ui/components/z-overlay';\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: ZOverlayRef,\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 .backdropClick()\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 // Chỉ overlay trên cùng phản hồi Escape — drawer bên dưới modal không đóng theo.\n if (!this.loading() && this._overlayRef.isTopmost()) {\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 this._overlayRef?.markClosing();\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 this._overlayRef?.dispose();\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 { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, Injector, PLATFORM_ID, TemplateRef, type Type } from '@angular/core';\nimport { ZOverlayService, type ZOverlayRef } from '@shival99/z-ui/components/z-overlay';\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 _overlayService = inject(ZOverlayService);\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 Type<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 ZOverlayRef,\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>): ZOverlayRef | 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 overlayRef = this._overlayService.createGlobal({\n hasBackdrop: true,\n backdropClass,\n scrollLock: true,\n });\n\n this._zIndexService.applyToOverlay(overlayRef);\n\n return overlayRef;\n }\n\n private _attachDrawerContainer<T, U>(overlayRef: ZOverlayRef, config: ZDrawerOptions<T, U>) {\n const injector = Injector.create({\n parent: this._injector,\n providers: [{ provide: ZDrawerOptions, useValue: config }],\n });\n\n const containerRef = overlayRef.attach<ZDrawerComponent<T, U>>(ZDrawerComponent, {\n injector,\n viewContainerRef: config.zViewContainerRef,\n });\n\n return containerRef.instance;\n }\n\n private _attachDrawerContent<T, U>(\n componentOrTemplateRef: ZDrawerContentType<T>,\n drawerContainer: ZDrawerComponent<T, U>,\n overlayRef: ZOverlayRef,\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(componentOrTemplateRef, { drawerRef } as T);\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>(componentOrTemplateRef, injector);\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,EA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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 = 450;\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 { 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 type Injector,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n type TemplateRef,\n type Type,\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 { ZOverlayService, type ZOverlayRef } from '@shival99/z-ui/components/z-overlay';\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 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> 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 protected readonly contentOutlet = viewChild('contentOutlet', { read: ViewContainerRef });\n protected readonly mainContentRef = viewChild<NgScrollbar>('mainContent');\n\n /**\n * Nội dung được yêu cầu gắn khi `#contentOutlet` chưa tồn tại. `@defer` bọc outlet chỉ render sau\n * khi Angular nạp xong dependency của block, nên lần mở drawer ĐẦU TIÊN outlet vẫn còn ở\n * `@placeholder` — giữ lại đây rồi gắn ngay khi outlet xuất hiện. Xem `_attachPendingContent`.\n */\n private _pendingContent:\n | { kind: 'component'; component: Type<unknown>; injector?: Injector }\n | { kind: 'template'; templateRef: TemplateRef<unknown>; context: unknown }\n | null = null;\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 _overlayService = inject(ZOverlayService);\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: ZOverlayRef | 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 const hideHeader = this.effectiveHideHeader();\n const hideFooter = this.effectiveHideFooter();\n const bodySpacingClass = hideHeader && hideFooter ? 'py-0' : hideHeader ? 'pt-0' : hideFooter ? 'pb-0' : '';\n\n return zMergeClasses('flex min-h-0 flex-col gap-4 px-4 py-4', this.effectiveBodyClass(), bodySpacingClass);\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.contentOutlet()?.length;\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 effect(() => {\n this._zTranslate.currentLang();\n this._cdr.markForCheck();\n });\n\n // `contentOutlet` là signal query nên effect này chạy lại đúng lúc `@defer` render xong outlet.\n effect(() => {\n this._attachPendingContent(this.contentOutlet());\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<C>(component: Type<C>, injector?: Injector): ComponentRef<C> {\n this._cdr.detectChanges();\n const outlet = this.contentOutlet();\n if (outlet && outlet.length > 0) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n if (!outlet) {\n this._pendingContent = { kind: 'component', component: component as Type<unknown>, injector };\n\n return undefined as unknown as ComponentRef<C>;\n }\n\n return outlet.createComponent(component, { injector });\n }\n\n public attachTemplatePortal<C>(templateRef: TemplateRef<C>, context: C): EmbeddedViewRef<C> {\n const outlet = this.contentOutlet();\n if (outlet && outlet.length > 0) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n if (!outlet) {\n this._pendingContent = { kind: 'template', templateRef: templateRef as TemplateRef<unknown>, context };\n\n return undefined as unknown as EmbeddedViewRef<C>;\n }\n\n return outlet.createEmbeddedView(templateRef, context);\n }\n\n /**\n * Gắn nội dung đã bị hoãn ở `_pendingContent` ngay khi outlet có thật, và cập nhật\n * `drawerRef.componentInstance` — thứ mà `ZDrawerService` không set được vì lúc nó gọi\n * `attachComponentPortal` thì chưa có ref nào để trả về.\n */\n private _attachPendingContent(outlet: ViewContainerRef | undefined): void {\n const pending = this._pendingContent;\n if (!outlet || !pending || outlet.length > 0) {\n return;\n }\n\n this._pendingContent = null;\n\n if (pending.kind === 'component') {\n const contentRef = outlet.createComponent(pending.component, { injector: pending.injector });\n const { drawerRef } = this;\n if (drawerRef) {\n drawerRef.componentInstance = contentRef.instance as T;\n }\n contentRef.changeDetectorRef.detectChanges();\n\n return;\n }\n\n outlet.createEmbeddedView(pending.templateRef, pending.context).detectChanges();\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(): ZOverlayRef | 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\n return this._overlayService.createGlobal({\n hasBackdrop: true,\n backdropClass,\n panelClass: 'z-drawer-overlay-pane',\n scrollLock: true,\n });\n }\n\n private _openTemplateOverlay(): void {\n if (this._templateOverlayRef) {\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 this._templateOverlayRef.overlayElement.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","<!-- 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 #contentOutlet />\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 { isPlatformBrowser } from '@angular/common';\nimport { EventEmitter, Inject, PLATFORM_ID, signal } from '@angular/core';\nimport type { ZOverlayRef } from '@shival99/z-ui/components/z-overlay';\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: ZOverlayRef,\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 .backdropClick()\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 // Chỉ overlay trên cùng phản hồi Escape — drawer bên dưới modal không đóng theo.\n if (!this.loading() && this._overlayRef.isTopmost()) {\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 this._overlayRef?.markClosing();\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 this._overlayRef?.dispose();\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 { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, Injector, PLATFORM_ID, TemplateRef, type Type } from '@angular/core';\nimport { ZOverlayService, type ZOverlayRef } from '@shival99/z-ui/components/z-overlay';\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 _overlayService = inject(ZOverlayService);\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 Type<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 ZOverlayRef,\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>): ZOverlayRef | 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 overlayRef = this._overlayService.createGlobal({\n hasBackdrop: true,\n backdropClass,\n scrollLock: true,\n });\n\n this._zIndexService.applyToOverlay(overlayRef);\n\n return overlayRef;\n }\n\n private _attachDrawerContainer<T, U>(overlayRef: ZOverlayRef, config: ZDrawerOptions<T, U>) {\n const injector = Injector.create({\n parent: this._injector,\n providers: [{ provide: ZDrawerOptions, useValue: config }],\n });\n\n const containerRef = overlayRef.attach<ZDrawerComponent<T, U>>(ZDrawerComponent, {\n injector,\n viewContainerRef: config.zViewContainerRef,\n });\n\n return containerRef.instance;\n }\n\n private _attachDrawerContent<T, U>(\n componentOrTemplateRef: ZDrawerContentType<T>,\n drawerContainer: ZDrawerComponent<T, U>,\n overlayRef: ZOverlayRef,\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(componentOrTemplateRef, { drawerRef } as T);\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>(componentOrTemplateRef, injector);\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,EAA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