@shival99/z-ui 1.3.3 → 1.3.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.
|
@@ -464,9 +464,9 @@ class ZDrawerComponent extends BasePortalOutlet {
|
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
466
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
467
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZDrawerComponent, isStandalone: true, selector: "z-drawer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zVisible: { classPropertyName: "zVisible", publicName: "zVisible", isSignal: true, isRequired: false, transformFunction: null }, zTitle: { classPropertyName: "zTitle", publicName: "zTitle", isSignal: true, isRequired: false, transformFunction: null }, zDescription: { classPropertyName: "zDescription", publicName: "zDescription", isSignal: true, isRequired: false, transformFunction: null }, zWidth: { classPropertyName: "zWidth", publicName: "zWidth", isSignal: true, isRequired: false, transformFunction: null }, zHeight: { classPropertyName: "zHeight", publicName: "zHeight", isSignal: true, isRequired: false, transformFunction: null }, zPlacement: { classPropertyName: "zPlacement", publicName: "zPlacement", isSignal: true, isRequired: false, transformFunction: null }, zClosable: { classPropertyName: "zClosable", publicName: "zClosable", isSignal: true, isRequired: false, transformFunction: null }, zMaskClosable: { classPropertyName: "zMaskClosable", publicName: "zMaskClosable", isSignal: true, isRequired: false, transformFunction: null }, zHideFooter: { classPropertyName: "zHideFooter", publicName: "zHideFooter", isSignal: true, isRequired: false, transformFunction: null }, zOkText: { classPropertyName: "zOkText", publicName: "zOkText", isSignal: true, isRequired: false, transformFunction: null }, zCancelText: { classPropertyName: "zCancelText", publicName: "zCancelText", isSignal: true, isRequired: false, transformFunction: null }, zOkDestructive: { classPropertyName: "zOkDestructive", publicName: "zOkDestructive", isSignal: true, isRequired: false, transformFunction: null }, zOkDisabled: { classPropertyName: "zOkDisabled", publicName: "zOkDisabled", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zOverlay: { classPropertyName: "zOverlay", publicName: "zOverlay", isSignal: true, isRequired: false, transformFunction: null }, zShadow: { classPropertyName: "zShadow", publicName: "zShadow", isSignal: true, isRequired: false, transformFunction: null }, zShape: { classPropertyName: "zShape", publicName: "zShape", isSignal: true, isRequired: false, transformFunction: null }, zContentLoading: { classPropertyName: "zContentLoading", publicName: "zContentLoading", isSignal: true, isRequired: false, transformFunction: null }, zSkeletonRows: { classPropertyName: "zSkeletonRows", publicName: "zSkeletonRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnOk: "zOnOk", zOnCancel: "zOnCancel", zScrollbar: "zScrollbar", zVisible: "zVisibleChange" }, host: { properties: { "class": "hostClasses()", "style.width": "effectiveWidth()", "style.height": "effectiveHeight()", "attr.data-placement": "effectivePlacement()" } }, providers: [TranslatePipe], queries: [{ propertyName: "customHeader", first: true, predicate: ZDrawerHeaderDirective, descendants: true, isSignal: true }, { propertyName: "customContent", first: true, predicate: ZDrawerContentDirective, descendants: true, isSignal: true }, { propertyName: "customFooter", first: true, predicate: ZDrawerFooterDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }, { propertyName: "dummyTemplateRef", first: true, predicate: ["dummyTemplate"], descendants: true, isSignal: true }, { propertyName: "mainContentRef", first: true, predicate: ["mainContent"], descendants: true, isSignal: true }], exportAs: ["zDrawer"], usesInheritance: true, ngImport: i0, template: "<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\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 {{ description }}\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar class=\"z-drawer-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\n </h4>\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar class=\"z-drawer-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n", styles: [":host.z-drawer-service-mode[data-placement=left],:host.z-drawer-template-mode[data-placement=left]{--z-enter-translate-x: -100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=left].drawer-leave,:host.z-drawer-template-mode[data-placement=left].drawer-leave{--z-exit-translate-x: -100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=right],:host.z-drawer-template-mode[data-placement=right]{--z-enter-translate-x: 100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=right].drawer-leave,:host.z-drawer-template-mode[data-placement=right].drawer-leave{--z-exit-translate-x: 100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=top],:host.z-drawer-template-mode[data-placement=top]{--z-enter-translate-y: -100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=top].drawer-leave,:host.z-drawer-template-mode[data-placement=top].drawer-leave{--z-exit-translate-y: -100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=bottom],:host.z-drawer-template-mode[data-placement=bottom]{--z-enter-translate-y: 100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=bottom].drawer-leave,:host.z-drawer-template-mode[data-placement=bottom].drawer-leave{--z-exit-translate-y: 100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-template-host{display:contents}::ng-deep .z-drawer-backdrop-dark{background-color:#0009}::ng-deep .z-drawer-backdrop-blur{background-color:#0000000d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.z-drawer-header-shadow{box-shadow:0 2px 8px -2px #0000001a;z-index:50}.z-drawer-footer-shadow{box-shadow:0 -2px 8px -2px #0000001a;z-index:50}:host header{padding-top:16px;padding-bottom:16px}:host footer{padding-top:16px;padding-bottom:16px}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out}.z-drawer-scrollbar{--scrollbar-padding: 2px}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), import('@shival99/z-ui/components/z-icon').then(m => m.ZIconComponent), import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe), TranslatePipe], () => [i1.CdkPortalOutlet, NgTemplateOutlet, import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), import('@shival99/z-ui/components/z-icon').then(m => m.ZIconComponent), import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe), TranslatePipe]] });
|
|
467
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZDrawerComponent, isStandalone: true, selector: "z-drawer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zVisible: { classPropertyName: "zVisible", publicName: "zVisible", isSignal: true, isRequired: false, transformFunction: null }, zTitle: { classPropertyName: "zTitle", publicName: "zTitle", isSignal: true, isRequired: false, transformFunction: null }, zDescription: { classPropertyName: "zDescription", publicName: "zDescription", isSignal: true, isRequired: false, transformFunction: null }, zWidth: { classPropertyName: "zWidth", publicName: "zWidth", isSignal: true, isRequired: false, transformFunction: null }, zHeight: { classPropertyName: "zHeight", publicName: "zHeight", isSignal: true, isRequired: false, transformFunction: null }, zPlacement: { classPropertyName: "zPlacement", publicName: "zPlacement", isSignal: true, isRequired: false, transformFunction: null }, zClosable: { classPropertyName: "zClosable", publicName: "zClosable", isSignal: true, isRequired: false, transformFunction: null }, zMaskClosable: { classPropertyName: "zMaskClosable", publicName: "zMaskClosable", isSignal: true, isRequired: false, transformFunction: null }, zHideFooter: { classPropertyName: "zHideFooter", publicName: "zHideFooter", isSignal: true, isRequired: false, transformFunction: null }, zOkText: { classPropertyName: "zOkText", publicName: "zOkText", isSignal: true, isRequired: false, transformFunction: null }, zCancelText: { classPropertyName: "zCancelText", publicName: "zCancelText", isSignal: true, isRequired: false, transformFunction: null }, zOkDestructive: { classPropertyName: "zOkDestructive", publicName: "zOkDestructive", isSignal: true, isRequired: false, transformFunction: null }, zOkDisabled: { classPropertyName: "zOkDisabled", publicName: "zOkDisabled", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zOverlay: { classPropertyName: "zOverlay", publicName: "zOverlay", isSignal: true, isRequired: false, transformFunction: null }, zShadow: { classPropertyName: "zShadow", publicName: "zShadow", isSignal: true, isRequired: false, transformFunction: null }, zShape: { classPropertyName: "zShape", publicName: "zShape", isSignal: true, isRequired: false, transformFunction: null }, zContentLoading: { classPropertyName: "zContentLoading", publicName: "zContentLoading", isSignal: true, isRequired: false, transformFunction: null }, zSkeletonRows: { classPropertyName: "zSkeletonRows", publicName: "zSkeletonRows", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnOk: "zOnOk", zOnCancel: "zOnCancel", zScrollbar: "zScrollbar", zVisible: "zVisibleChange" }, host: { properties: { "class": "hostClasses()", "style.width": "effectiveWidth()", "style.height": "effectiveHeight()", "attr.data-placement": "effectivePlacement()" } }, providers: [TranslatePipe], queries: [{ propertyName: "customHeader", first: true, predicate: ZDrawerHeaderDirective, descendants: true, isSignal: true }, { propertyName: "customContent", first: true, predicate: ZDrawerContentDirective, descendants: true, isSignal: true }, { propertyName: "customFooter", first: true, predicate: ZDrawerFooterDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }, { propertyName: "dummyTemplateRef", first: true, predicate: ["dummyTemplate"], descendants: true, isSignal: true }, { propertyName: "mainContentRef", first: true, predicate: ["mainContent"], descendants: true, isSignal: true }], exportAs: ["zDrawer"], usesInheritance: true, ngImport: i0, template: "<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\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 {{ description }}\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\n </h4>\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n", styles: [":host.z-drawer-service-mode[data-placement=left],:host.z-drawer-template-mode[data-placement=left]{--z-enter-translate-x: -100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=left].drawer-leave,:host.z-drawer-template-mode[data-placement=left].drawer-leave{--z-exit-translate-x: -100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=right],:host.z-drawer-template-mode[data-placement=right]{--z-enter-translate-x: 100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=right].drawer-leave,:host.z-drawer-template-mode[data-placement=right].drawer-leave{--z-exit-translate-x: 100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=top],:host.z-drawer-template-mode[data-placement=top]{--z-enter-translate-y: -100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=top].drawer-leave,:host.z-drawer-template-mode[data-placement=top].drawer-leave{--z-exit-translate-y: -100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=bottom],:host.z-drawer-template-mode[data-placement=bottom]{--z-enter-translate-y: 100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=bottom].drawer-leave,:host.z-drawer-template-mode[data-placement=bottom].drawer-leave{--z-exit-translate-y: 100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-template-host{display:contents}::ng-deep .z-drawer-backdrop-dark{background-color:#0009}::ng-deep .z-drawer-backdrop-blur{background-color:#0000000d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.z-drawer-header-shadow{box-shadow:0 2px 8px -2px #0000001a;z-index:50}.z-drawer-footer-shadow{box-shadow:0 -2px 8px -2px #0000001a;z-index:50}:host header{padding-top:16px;padding-bottom:16px}:host footer{padding-top:16px;padding-bottom:16px}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out}.z-drawer-scrollbar{--scrollbar-padding: 2px}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), import('@shival99/z-ui/components/z-icon').then(m => m.ZIconComponent), import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@angular/cdk/scrolling').then(m => m.CdkScrollable), import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe), TranslatePipe], () => [i1.CdkPortalOutlet, NgTemplateOutlet, import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), import('@shival99/z-ui/components/z-icon').then(m => m.ZIconComponent), import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@angular/cdk/scrolling').then(m => m.CdkScrollable), import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe), TranslatePipe]] });
|
|
468
468
|
}
|
|
469
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.6", ngImport: i0, type: ZDrawerComponent, resolveDeferredDeps: () => [import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), import('@shival99/z-ui/components/z-icon').then(m => m.ZIconComponent), import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe)], resolveMetadata: (ZButtonComponent, ZIconComponent, ZTooltipDirective, NgScrollbar, ZContentTypePipe, ZSafeHtmlPipe) => ({ decorators: [{
|
|
469
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.6", ngImport: i0, type: ZDrawerComponent, resolveDeferredDeps: () => [import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), import('@shival99/z-ui/components/z-icon').then(m => m.ZIconComponent), import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@angular/cdk/scrolling').then(m => m.CdkScrollable), import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe)], resolveMetadata: (ZButtonComponent, ZIconComponent, ZTooltipDirective, NgScrollbar, CdkScrollable, ZContentTypePipe, ZSafeHtmlPipe) => ({ decorators: [{
|
|
470
470
|
type: Component,
|
|
471
471
|
args: [{ selector: 'z-drawer', imports: [
|
|
472
472
|
PortalModule,
|
|
@@ -479,12 +479,13 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.6", ng
|
|
|
479
479
|
NgScrollbar,
|
|
480
480
|
ZSafeHtmlPipe,
|
|
481
481
|
TranslatePipe,
|
|
482
|
+
CdkScrollable,
|
|
482
483
|
], standalone: true, providers: [TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
483
484
|
'[class]': 'hostClasses()',
|
|
484
485
|
'[style.width]': 'effectiveWidth()',
|
|
485
486
|
'[style.height]': 'effectiveHeight()',
|
|
486
487
|
'[attr.data-placement]': 'effectivePlacement()',
|
|
487
|
-
}, exportAs: 'zDrawer', template: "<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\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 {{ description }}\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar class=\"z-drawer-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\n </h4>\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar class=\"z-drawer-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n", styles: [":host.z-drawer-service-mode[data-placement=left],:host.z-drawer-template-mode[data-placement=left]{--z-enter-translate-x: -100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=left].drawer-leave,:host.z-drawer-template-mode[data-placement=left].drawer-leave{--z-exit-translate-x: -100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=right],:host.z-drawer-template-mode[data-placement=right]{--z-enter-translate-x: 100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=right].drawer-leave,:host.z-drawer-template-mode[data-placement=right].drawer-leave{--z-exit-translate-x: 100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=top],:host.z-drawer-template-mode[data-placement=top]{--z-enter-translate-y: -100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=top].drawer-leave,:host.z-drawer-template-mode[data-placement=top].drawer-leave{--z-exit-translate-y: -100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=bottom],:host.z-drawer-template-mode[data-placement=bottom]{--z-enter-translate-y: 100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=bottom].drawer-leave,:host.z-drawer-template-mode[data-placement=bottom].drawer-leave{--z-exit-translate-y: 100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-template-host{display:contents}::ng-deep .z-drawer-backdrop-dark{background-color:#0009}::ng-deep .z-drawer-backdrop-blur{background-color:#0000000d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.z-drawer-header-shadow{box-shadow:0 2px 8px -2px #0000001a;z-index:50}.z-drawer-footer-shadow{box-shadow:0 -2px 8px -2px #0000001a;z-index:50}:host header{padding-top:16px;padding-bottom:16px}:host footer{padding-top:16px;padding-bottom:16px}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out}.z-drawer-scrollbar{--scrollbar-padding: 2px}\n"] }]
|
|
488
|
+
}, exportAs: 'zDrawer', template: "<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\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 {{ description }}\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\n </h4>\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n", styles: [":host.z-drawer-service-mode[data-placement=left],:host.z-drawer-template-mode[data-placement=left]{--z-enter-translate-x: -100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=left].drawer-leave,:host.z-drawer-template-mode[data-placement=left].drawer-leave{--z-exit-translate-x: -100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=right],:host.z-drawer-template-mode[data-placement=right]{--z-enter-translate-x: 100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=right].drawer-leave,:host.z-drawer-template-mode[data-placement=right].drawer-leave{--z-exit-translate-x: 100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=top],:host.z-drawer-template-mode[data-placement=top]{--z-enter-translate-y: -100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=top].drawer-leave,:host.z-drawer-template-mode[data-placement=top].drawer-leave{--z-exit-translate-y: -100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=bottom],:host.z-drawer-template-mode[data-placement=bottom]{--z-enter-translate-y: 100%;animation:z-enter .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-service-mode[data-placement=bottom].drawer-leave,:host.z-drawer-template-mode[data-placement=bottom].drawer-leave{--z-exit-translate-y: 100%;animation:z-exit .25s cubic-bezier(.16,1,.3,1) forwards}:host.z-drawer-template-host{display:contents}::ng-deep .z-drawer-backdrop-dark{background-color:#0009}::ng-deep .z-drawer-backdrop-blur{background-color:#0000000d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.z-drawer-header-shadow{box-shadow:0 2px 8px -2px #0000001a;z-index:50}.z-drawer-footer-shadow{box-shadow:0 -2px 8px -2px #0000001a;z-index:50}:host header{padding-top:16px;padding-bottom:16px}:host footer{padding-top:16px;padding-bottom:16px}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out}.z-drawer-scrollbar{--scrollbar-padding: 2px}\n"] }]
|
|
488
489
|
}], ctorParameters: () => [], propDecorators: { zOnOk: [{ type: i0.Output, args: ["zOnOk"] }], zOnCancel: [{ type: i0.Output, args: ["zOnCancel"] }], zScrollbar: [{ type: i0.Output, args: ["zScrollbar"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "zVisible", required: false }] }, { type: i0.Output, args: ["zVisibleChange"] }], zTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTitle", required: false }] }], zDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDescription", required: false }] }], zWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zWidth", required: false }] }], zHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHeight", required: false }] }], zPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "zPlacement", required: false }] }], zClosable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zClosable", required: false }] }], zMaskClosable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMaskClosable", required: false }] }], zHideFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHideFooter", required: false }] }], zOkText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOkText", required: false }] }], zCancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zCancelText", required: false }] }], zOkDestructive: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOkDestructive", required: false }] }], zOkDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOkDisabled", required: false }] }], zLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoading", required: false }] }], zOverlay: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOverlay", required: false }] }], zShadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShadow", required: false }] }], zShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "zShape", required: false }] }], zContentLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zContentLoading", required: false }] }], zSkeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSkeletonRows", required: false }] }], customHeader: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ZDrawerHeaderDirective), { isSignal: true }] }], customContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ZDrawerContentDirective), { isSignal: true }] }], customFooter: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ZDrawerFooterDirective), { isSignal: true }] }], portalOutlet: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }], dummyTemplateRef: [{ type: i0.ViewChild, args: ['dummyTemplate', { isSignal: true }] }], mainContentRef: [{ type: i0.ViewChild, args: ['mainContent', { isSignal: true }] }] } }) });
|
|
489
490
|
|
|
490
491
|
let ZDrawerRef = class ZDrawerRef {
|
|
@@ -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.types.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.utils.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.variants.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.component.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.component.html","../../../../libs/core-ui/components/z-drawer/z-drawer.ref.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.service.ts","../../../../libs/core-ui/components/z-drawer/shival99-z-ui-components-z-drawer.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-content], [zDrawerContent]',\n standalone: true,\n})\nexport class ZDrawerContentDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-footer], [zDrawerFooter]',\n standalone: true,\n})\nexport class ZDrawerFooterDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-header], [zDrawerHeader]',\n standalone: true,\n})\nexport class ZDrawerHeaderDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type ComponentType } from '@angular/cdk/overlay';\nimport {\n type EventEmitter,\n InjectionToken,\n type TemplateRef,\n type Type,\n type ViewContainerRef,\n type WritableSignal,\n} from '@angular/core';\nimport type { ZIcon } from '@shival99/z-ui/components/z-icon';\nimport type { ClassValue } from 'clsx';\nimport type { Observable } from 'rxjs';\n\nexport type ZDrawerContentType<T> = ComponentType<T> | TemplateRef<T> | string;\nexport type ZDrawerPlacement = 'left' | 'right' | 'top' | 'bottom';\n\nexport const Z_DRAWER_DATA = new InjectionToken<any>('Z_DRAWER_DATA');\nexport const Z_DRAWER_ANIMATION_DURATION = 250;\n\nexport enum ZDrawerTriggerAction {\n CANCEL = 'cancel',\n OK = 'ok',\n}\n\nexport type ZDrawerOnClickCallBack<T> = (instance: T, drawerRef?: unknown) => false | void | object;\n\nconst noopFun = (): void => {};\n\n/**\n * Configuration options for z-drawer component.\n *\n * @template T - The type of the content component\n * @template U - The type of the data passed to the drawer\n */\nexport class ZDrawerOptions<T, U> {\n /** Icon for the cancel button */\n public zCancelIcon?: ZIcon;\n /** Text for the cancel button. Set to null to hide the button */\n public zCancelText?: string | null;\n /** Whether the drawer is closable (shows close button) */\n public zClosable?: boolean;\n /** Drawer content - can be a component, template, or string */\n public zContent?: string | TemplateRef<T> | Type<T>;\n /** Custom CSS classes for the drawer */\n public class?: ClassValue;\n /** 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 hide the default footer */\n public zHideFooter?: boolean;\n /**\n * WritableSignal to control loading state of the OK button.\n * Use this when submitting forms or calling APIs.\n */\n public readonly zLoading?: WritableSignal<boolean>;\n /** Whether clicking mask closes the drawer */\n public zMaskClosable?: boolean;\n /** Whether OK button has destructive (red) style */\n public zOkDestructive?: boolean;\n /** Whether OK button is disabled */\n public zOkDisabled?: boolean;\n /** Overlay style: 'dark' (black overlay) or 'blur' (backdrop blur) */\n public zOverlay?: 'dark' | 'blur';\n /** Icon for the OK button */\n public zOkIcon?: ZIcon;\n /** Text for the OK button. Set to null to hide the button */\n public zOkText?: string | null;\n /** Callback or EventEmitter when cancel is clicked */\n public zOnCancel?: EventEmitter<T> | ZDrawerOnClickCallBack<T> = noopFun;\n /** Callback or EventEmitter when OK is clicked */\n public zOnOk?: EventEmitter<T> | ZDrawerOnClickCallBack<T> = noopFun;\n /** Drawer title - supports string, HTML string, or TemplateRef */\n public zTitle?: string | TemplateRef<T>;\n /** ViewContainerRef for the drawer portal */\n public zViewContainerRef?: ViewContainerRef;\n /** Drawer width for left/right placement (e.g., '400px', '80%') */\n public zWidth?: string;\n /** Drawer height for top/bottom placement (e.g., '400px', '50%') */\n public zHeight?: string;\n /** Placement of the drawer: 'left', 'right', 'top', 'bottom' */\n public zPlacement?: ZDrawerPlacement;\n /** Force shadow on header/footer regardless of scroll state */\n public zShadow?: boolean;\n /** Shape of the drawer: 'rounded' (with border-radius) or 'square' (no border-radius) */\n public zShape?: 'rounded' | 'square';\n /** WritableSignal to control content loading state (shows skeleton when true) */\n public readonly zContentLoading?: WritableSignal<boolean>;\n /** Number of skeleton rows to show when content is loading (default: 5 for left/right, 3 for top/bottom) */\n public zSkeletonRows?: number;\n}\n","import { zDetectBrowser } from '@shival99/z-ui/utils';\n\nexport type ZDrawerOverlayType = 'dark' | 'blur';\nexport const getOverlayType = (): ZDrawerOverlayType => {\n const browser = zDetectBrowser();\n return browser.name === 'Chrome' ? 'dark' : 'blur';\n};\n","import { cva } from 'class-variance-authority';\n\nexport type ZDrawerShape = 'rounded' | 'square';\n\nexport const zDrawerVariants = cva(['fixed z-50 flex flex-col bg-background overflow-hidden'].join(' '), {\n variants: {\n placement: {\n left: 'left-0 top-0 h-full max-w-[90vw] dark:border-r shadow-[3px_0_10px_rgba(0,0,0,0.08)]',\n right: 'right-0 top-0 h-full max-w-[90vw] dark:border-l shadow-[-3px_0_10px_rgba(0,0,0,0.08)]',\n top: 'top-0 left-0 w-full max-h-[90vh] dark:border-b shadow-[0_3px_10px_rgba(0,0,0,0.08)]',\n bottom: 'bottom-0 left-0 w-full max-h-[90vh] dark:border-t shadow-[0_-3px_10px_rgba(0,0,0,0.08)]',\n },\n shape: {\n rounded: '',\n square: '',\n },\n },\n compoundVariants: [\n { placement: 'left', shape: 'rounded', class: 'rounded-r-lg' },\n { placement: 'right', shape: 'rounded', class: 'rounded-l-lg' },\n { placement: 'top', shape: 'rounded', class: 'rounded-b-lg' },\n { placement: 'bottom', shape: 'rounded', class: 'rounded-t-lg' },\n ],\n defaultVariants: {\n placement: 'right',\n shape: 'rounded',\n },\n});\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n type ComponentPortal,\n PortalModule,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n type ComponentRef,\n computed,\n contentChild,\n effect,\n ElementRef,\n type EmbeddedViewRef,\n inject,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n type TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';\nimport { ZContentTypePipe, ZSafeHtmlPipe } from '@shival99/z-ui/pipes';\nimport { 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 { ZDrawerRef } from './z-drawer.ref';\nimport { Z_DRAWER_ANIMATION_DURATION, ZDrawerOptions, ZDrawerPlacement } from './z-drawer.types';\nimport { getOverlayType } from './z-drawer.utils';\nimport { type ZDrawerShape, zDrawerVariants } from './z-drawer.variants';\n\n@Component({\n selector: 'z-drawer',\n imports: [\n PortalModule,\n NgTemplateOutlet,\n ZButtonComponent,\n ZIconComponent,\n ZContentTypePipe,\n ZTooltipDirective,\n ZSkeletonComponent,\n NgScrollbar,\n ZSafeHtmlPipe,\n TranslatePipe,\n ],\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 },\n exportAs: 'zDrawer',\n})\nexport class ZDrawerComponent<T, U> extends BasePortalOutlet implements OnDestroy, AfterViewChecked {\n public readonly zOnOk = output<void>();\n public readonly zOnCancel = output<void>();\n public readonly zScrollbar = output<NgScrollbar>();\n\n public readonly class = 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 zHideFooter = 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\n protected readonly customHeader = contentChild(ZDrawerHeaderDirective);\n protected readonly customContent = contentChild(ZDrawerContentDirective);\n protected readonly customFooter = contentChild(ZDrawerFooterDirective);\n\n public drawerRef?: ZDrawerRef<T>;\n public readonly portalOutlet = viewChild(CdkPortalOutlet);\n protected readonly dummyTemplateRef = viewChild<TemplateRef<unknown>>('dummyTemplate');\n protected readonly mainContentRef = viewChild<NgScrollbar>('mainContent');\n\n protected readonly config = inject(ZDrawerOptions<T, U>, { optional: true }) || new ZDrawerOptions<T, U>();\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _host = inject(ElementRef<HTMLElement>);\n private readonly _overlay = inject(Overlay);\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _cdr = inject(ChangeDetectorRef);\n\n private _templateOverlayRef: OverlayRef | null = null;\n private _originalParent: HTMLElement | null = null;\n private _originalNextSibling: Node | null = null;\n private _backdropSubscription: Subscription | null = null;\n\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 protected readonly shouldShowShadow = computed(() => true);\n\n private _lastScrollHeight = 0;\n\n public ngAfterViewChecked(): void {\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(() => (this.isServiceMode() ? this.config.zTitle : this.zTitle()));\n\n protected readonly effectiveDescription = computed(() =>\n this.isServiceMode() ? this.config.zDescription : this.zDescription()\n );\n\n protected readonly effectiveClosable = computed(() =>\n this.isServiceMode() ? (this.config.zClosable ?? true) : this.zClosable()\n );\n\n protected readonly effectiveHideFooter = computed(() =>\n this.isServiceMode() ? this.config.zHideFooter : this.zHideFooter()\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 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 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 if (this.isServiceMode()) {\n return this.zHeight() || this.config.zHeight || null;\n }\n return this.shouldRenderContent() ? this.zHeight() : null;\n });\n\n protected readonly isDeferLoading = computed(() => {\n if (!this.isServiceMode()) {\n return false;\n }\n return !!this.config.zDefer && !this.portalOutlet()?.hasAttached();\n });\n\n protected readonly classes = computed(() =>\n zMergeClasses(\n zDrawerVariants({ placement: this.effectivePlacement(), shape: this.effectiveShape() }),\n this.isServiceMode() ? this.config.class : this.class()\n )\n );\n\n protected readonly hostClasses = computed(() => {\n const baseClasses = this.classes();\n if (this.isServiceMode()) {\n return `${baseClasses} z-drawer-service-mode`.trim();\n }\n if (this.shouldRenderContent()) {\n return `${baseClasses} z-drawer-template-mode`.trim();\n }\n return 'z-drawer-template-host';\n });\n\n constructor() {\n super();\n 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._disposeTemplateOverlay();\n }\n\n public getNativeElement(): HTMLElement {\n return this._host.nativeElement;\n }\n\n public attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._cdr.detectChanges();\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n return outlet?.attachComponentPortal(portal) as ComponentRef<T>;\n }\n\n public attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n return outlet?.attachTemplatePortal(portal) as EmbeddedViewRef<C>;\n }\n\n public onOkClick(): void {\n if (this.effectiveLoading()) {\n return;\n }\n this.zOnOk.emit();\n }\n\n public onCloseClick(): void {\n this.zOnCancel.emit();\n if (this.isTemplateMode() && !this.effectiveLoading()) {\n this._closeWithAnimation();\n }\n }\n\n public onBackdropClick(): void {\n if (this.zMaskClosable() && !this.effectiveLoading()) {\n this._closeWithAnimation();\n }\n }\n\n public open(): void {\n this.isLeaving.set(false);\n this.zVisible.set(true);\n }\n\n public close(): void {\n this._closeWithAnimation();\n }\n\n private _createOverlay(): OverlayRef | null {\n if (!isPlatformBrowser(this._platformId)) {\n return null;\n }\n\n const overlayType = this.zOverlay();\n const backdropClass = overlayType === 'blur' ? 'z-drawer-backdrop-blur' : 'z-drawer-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: this._overlay.scrollStrategies.block(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _openTemplateOverlay(): void {\n if (this._templateOverlayRef) {\n return;\n }\n\n const dummyRef = this.dummyTemplateRef();\n if (!dummyRef) {\n return;\n }\n\n this._templateOverlayRef = this._createOverlay();\n if (!this._templateOverlayRef) {\n return;\n }\n\n const hostElement = this._host.nativeElement;\n this._originalParent = hostElement.parentElement;\n this._originalNextSibling = hostElement.nextSibling;\n\n const portal = new TemplatePortal(dummyRef, this._viewContainerRef);\n this._templateOverlayRef.attach(portal);\n\n const overlayPane = this._templateOverlayRef.overlayElement;\n overlayPane.style.position = 'static';\n overlayPane.appendChild(hostElement);\n\n this._backdropSubscription = this._templateOverlayRef.backdropClick().subscribe(() => {\n this.onBackdropClick();\n });\n }\n\n private _closeWithAnimation(): void {\n if (this.isLeaving()) {\n return;\n }\n\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 setTimeout(() => {\n this.isLeaving.set(false);\n this._disposeTemplateOverlay();\n }, Z_DRAWER_ANIMATION_DURATION);\n }\n\n private _disposeTemplateOverlay(): void {\n const hostElement = this._host.nativeElement;\n\n if (this._originalParent && this._originalNextSibling) {\n this._originalParent.insertBefore(hostElement, this._originalNextSibling);\n }\n\n if (this._originalParent && !this._originalNextSibling) {\n this._originalParent.appendChild(hostElement);\n }\n\n hostElement.classList.remove('drawer-leave');\n if (this._templateOverlayRef) {\n this._templateOverlayRef.dispose();\n this._templateOverlayRef = null;\n }\n\n this._originalParent = null;\n this._originalNextSibling = null;\n\n if (this._backdropSubscription) {\n this._backdropSubscription.unsubscribe();\n this._backdropSubscription = null;\n }\n }\n}\n","<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\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 {{ description }}\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar class=\"z-drawer-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\n </h4>\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar class=\"z-drawer-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { isPlatformBrowser } from '@angular/common';\nimport { EventEmitter, Inject, PLATFORM_ID, signal } from '@angular/core';\nimport { filter, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ZDrawerComponent } from './z-drawer.component';\nimport { Z_DRAWER_ANIMATION_DURATION, ZDrawerOptions, ZDrawerTriggerAction } from './z-drawer.types';\n\nexport class ZDrawerRef<T = any, R = any, U = any> {\n private readonly _destroy$ = new Subject<void>();\n private _isClosing = false;\n private _result?: R;\n\n public componentInstance: T | null = null;\n public readonly loading = signal(false);\n\n public constructor(\n private readonly _overlayRef: OverlayRef,\n private readonly _config: ZDrawerOptions<T, U>,\n private readonly _containerInstance: ZDrawerComponent<T, U>,\n @Inject(PLATFORM_ID) private readonly _platformId: object\n ) {\n this._containerInstance.zOnCancel.subscribe(() => this._trigger(ZDrawerTriggerAction.CANCEL));\n this._containerInstance.zOnOk.subscribe(() => this._trigger(ZDrawerTriggerAction.OK));\n\n if ((this._config.zMaskClosable ?? true) && isPlatformBrowser(this._platformId)) {\n this._overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (!this.loading()) {\n this.close();\n }\n });\n }\n\n if (isPlatformBrowser(this._platformId)) {\n fromEvent<KeyboardEvent>(document, 'keydown')\n .pipe(\n filter(event => event.key === 'Escape'),\n takeUntil(this._destroy$)\n )\n .subscribe(() => {\n if (!this.loading()) {\n this.close();\n }\n });\n }\n }\n\n public setLoading(value: boolean): void {\n this.loading.set(value);\n }\n\n public close(result?: R): void {\n if (this._isClosing) {\n return;\n }\n\n this._isClosing = true;\n this._result = result;\n\n if (isPlatformBrowser(this._platformId)) {\n const hostElement = this._containerInstance.getNativeElement();\n hostElement.classList.add('drawer-leave');\n const { backdropElement } = this._overlayRef;\n if (backdropElement) {\n backdropElement.classList.add('z-backdrop-leaving');\n }\n }\n\n setTimeout(() => {\n if (this._overlayRef) {\n if (this._overlayRef.hasAttached()) {\n this._overlayRef.detachBackdrop();\n }\n this._overlayRef.dispose();\n }\n\n if (!this._destroy$.closed) {\n this._destroy$.next();\n this._destroy$.complete();\n }\n }, Z_DRAWER_ANIMATION_DURATION);\n }\n\n private _trigger(action: ZDrawerTriggerAction): void {\n if (this.loading()) {\n return;\n }\n\n const trigger = {\n ok: this._config.zOnOk,\n cancel: this._config.zOnCancel,\n }[action];\n\n if (trigger instanceof EventEmitter) {\n trigger.emit(this._getContentComponent());\n return;\n }\n\n if (typeof trigger === 'function') {\n const result = trigger(this._getContentComponent(), this) as R;\n this._closeWithResult(result);\n return;\n }\n\n this.close();\n }\n\n private _getContentComponent(): T {\n return this.componentInstance as T;\n }\n\n private _closeWithResult(result: R): void {\n if (result !== false) {\n this.close(result);\n }\n }\n}\n","import { type ComponentType, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, Injector, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { ZDrawerComponent } from './z-drawer.component';\nimport { ZDrawerRef } from './z-drawer.ref';\nimport { Z_DRAWER_DATA, ZDrawerContentType, ZDrawerOptions } from './z-drawer.types';\nimport { getOverlayType } from './z-drawer.utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZDrawerService {\n private readonly _overlay = inject(Overlay);\n private readonly _injector = inject(Injector);\n private readonly _platformId = inject(PLATFORM_ID);\n\n public create<T, U>(config: ZDrawerOptions<T, U>): ZDrawerRef<T> {\n return this._open<T, U>(config.zContent as ComponentType<T>, config);\n }\n\n private _open<T, U>(componentOrTemplateRef: ZDrawerContentType<T>, config: ZDrawerOptions<T, U>) {\n const overlayRef = this._createOverlay(config);\n\n if (!overlayRef) {\n return new ZDrawerRef(\n undefined as unknown as OverlayRef,\n config,\n undefined as unknown as ZDrawerComponent<T, U>,\n this._platformId\n );\n }\n\n const drawerContainer = this._attachDrawerContainer<T, U>(overlayRef, config);\n const drawerRef = this._attachDrawerContent<T, U>(componentOrTemplateRef, drawerContainer, overlayRef, config);\n\n return drawerRef;\n }\n\n private _createOverlay<T, U>(config: ZDrawerOptions<T, U>): OverlayRef | undefined {\n if (!isPlatformBrowser(this._platformId)) {\n return undefined;\n }\n\n const overlayType = config.zOverlay ?? getOverlayType();\n const backdropClass = overlayType === 'blur' ? 'z-drawer-backdrop-blur' : 'z-drawer-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _attachDrawerContainer<T, U>(overlayRef: OverlayRef, config: ZDrawerOptions<T, U>) {\n const injector = Injector.create({\n parent: this._injector,\n providers: [\n { provide: OverlayRef, useValue: overlayRef },\n { provide: ZDrawerOptions, useValue: config },\n ],\n });\n\n const containerPortal = new ComponentPortal<ZDrawerComponent<T, U>>(\n ZDrawerComponent,\n config.zViewContainerRef,\n injector\n );\n const containerRef = overlayRef.attach<ZDrawerComponent<T, U>>(containerPortal);\n\n return containerRef.instance;\n }\n\n private _attachDrawerContent<T, U>(\n componentOrTemplateRef: ZDrawerContentType<T>,\n drawerContainer: ZDrawerComponent<T, U>,\n overlayRef: OverlayRef,\n config: ZDrawerOptions<T, U>\n ) {\n const drawerRef = new ZDrawerRef<T>(overlayRef, config, drawerContainer, this._platformId);\n drawerContainer.drawerRef = drawerRef;\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n drawerContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null as unknown as ViewContainerRef, { drawerRef } as T)\n );\n return drawerRef;\n }\n\n if (typeof componentOrTemplateRef !== 'string') {\n const injector = this._createInjector<T, U>(drawerRef, config);\n const contentRef = drawerContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, config.zViewContainerRef, injector)\n );\n\n if (contentRef) {\n drawerRef.componentInstance = contentRef.instance;\n }\n }\n\n return drawerRef;\n }\n\n private _createInjector<T, U>(drawerRef: ZDrawerRef<T>, config: ZDrawerOptions<T, U>) {\n return Injector.create({\n parent: this._injector,\n providers: [\n { provide: ZDrawerRef, useValue: drawerRef },\n { provide: Z_DRAWER_DATA, useValue: config.zData },\n ],\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAMa,uBAAuB,CAAA;AAClB,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;uGAD/C,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sCAAsC;AAChD,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;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SAAS;IAClB;IAEQ,eAAe,CAAO,SAAwB,EAAE,MAA4B,EAAA;QAClF,OAAO,QAAQ,CAAC,MAAM,CAAC;YACrB,MAAM,EAAE,IAAI,CAAC,SAAS;AACtB,YAAA,SAAS,EAAE;AACT,gBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE;gBAC5C,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,EAAE;AACnD,aAAA;AACF,SAAA,CAAC;IACJ;uGApGW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-drawer.mjs","sources":["../../../../libs/core-ui/components/z-drawer/directives/z-drawer-content.directive.ts","../../../../libs/core-ui/components/z-drawer/directives/z-drawer-footer.directive.ts","../../../../libs/core-ui/components/z-drawer/directives/z-drawer-header.directive.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.types.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.utils.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.variants.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.component.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.component.html","../../../../libs/core-ui/components/z-drawer/z-drawer.ref.ts","../../../../libs/core-ui/components/z-drawer/z-drawer.service.ts","../../../../libs/core-ui/components/z-drawer/shival99-z-ui-components-z-drawer.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-content], [zDrawerContent]',\n standalone: true,\n})\nexport class ZDrawerContentDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-footer], [zDrawerFooter]',\n standalone: true,\n})\nexport class ZDrawerFooterDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-drawer-header], [zDrawerHeader]',\n standalone: true,\n})\nexport class ZDrawerHeaderDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type ComponentType } from '@angular/cdk/overlay';\nimport {\n type EventEmitter,\n InjectionToken,\n type TemplateRef,\n type Type,\n type ViewContainerRef,\n type WritableSignal,\n} from '@angular/core';\nimport type { ZIcon } from '@shival99/z-ui/components/z-icon';\nimport type { ClassValue } from 'clsx';\nimport type { Observable } from 'rxjs';\n\nexport type ZDrawerContentType<T> = ComponentType<T> | TemplateRef<T> | string;\nexport type ZDrawerPlacement = 'left' | 'right' | 'top' | 'bottom';\n\nexport const Z_DRAWER_DATA = new InjectionToken<any>('Z_DRAWER_DATA');\nexport const Z_DRAWER_ANIMATION_DURATION = 250;\n\nexport enum ZDrawerTriggerAction {\n CANCEL = 'cancel',\n OK = 'ok',\n}\n\nexport type ZDrawerOnClickCallBack<T> = (instance: T, drawerRef?: unknown) => false | void | object;\n\nconst noopFun = (): void => {};\n\n/**\n * Configuration options for z-drawer component.\n *\n * @template T - The type of the content component\n * @template U - The type of the data passed to the drawer\n */\nexport class ZDrawerOptions<T, U> {\n /** Icon for the cancel button */\n public zCancelIcon?: ZIcon;\n /** Text for the cancel button. Set to null to hide the button */\n public zCancelText?: string | null;\n /** Whether the drawer is closable (shows close button) */\n public zClosable?: boolean;\n /** Drawer content - can be a component, template, or string */\n public zContent?: string | TemplateRef<T> | Type<T>;\n /** Custom CSS classes for the drawer */\n public class?: ClassValue;\n /** 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 hide the default footer */\n public zHideFooter?: boolean;\n /**\n * WritableSignal to control loading state of the OK button.\n * Use this when submitting forms or calling APIs.\n */\n public readonly zLoading?: WritableSignal<boolean>;\n /** Whether clicking mask closes the drawer */\n public zMaskClosable?: boolean;\n /** Whether OK button has destructive (red) style */\n public zOkDestructive?: boolean;\n /** Whether OK button is disabled */\n public zOkDisabled?: boolean;\n /** Overlay style: 'dark' (black overlay) or 'blur' (backdrop blur) */\n public zOverlay?: 'dark' | 'blur';\n /** Icon for the OK button */\n public zOkIcon?: ZIcon;\n /** Text for the OK button. Set to null to hide the button */\n public zOkText?: string | null;\n /** Callback or EventEmitter when cancel is clicked */\n public zOnCancel?: EventEmitter<T> | ZDrawerOnClickCallBack<T> = noopFun;\n /** Callback or EventEmitter when OK is clicked */\n public zOnOk?: EventEmitter<T> | ZDrawerOnClickCallBack<T> = noopFun;\n /** Drawer title - supports string, HTML string, or TemplateRef */\n public zTitle?: string | TemplateRef<T>;\n /** ViewContainerRef for the drawer portal */\n public zViewContainerRef?: ViewContainerRef;\n /** Drawer width for left/right placement (e.g., '400px', '80%') */\n public zWidth?: string;\n /** Drawer height for top/bottom placement (e.g., '400px', '50%') */\n public zHeight?: string;\n /** Placement of the drawer: 'left', 'right', 'top', 'bottom' */\n public zPlacement?: ZDrawerPlacement;\n /** Force shadow on header/footer regardless of scroll state */\n public zShadow?: boolean;\n /** Shape of the drawer: 'rounded' (with border-radius) or 'square' (no border-radius) */\n public zShape?: 'rounded' | 'square';\n /** WritableSignal to control content loading state (shows skeleton when true) */\n public readonly zContentLoading?: WritableSignal<boolean>;\n /** Number of skeleton rows to show when content is loading (default: 5 for left/right, 3 for top/bottom) */\n public zSkeletonRows?: number;\n}\n","import { zDetectBrowser } from '@shival99/z-ui/utils';\n\nexport type ZDrawerOverlayType = 'dark' | 'blur';\nexport const getOverlayType = (): ZDrawerOverlayType => {\n const browser = zDetectBrowser();\n return browser.name === 'Chrome' ? 'dark' : 'blur';\n};\n","import { cva } from 'class-variance-authority';\n\nexport type ZDrawerShape = 'rounded' | 'square';\n\nexport const zDrawerVariants = cva(['fixed z-50 flex flex-col bg-background overflow-hidden'].join(' '), {\n variants: {\n placement: {\n left: 'left-0 top-0 h-full max-w-[90vw] dark:border-r shadow-[3px_0_10px_rgba(0,0,0,0.08)]',\n right: 'right-0 top-0 h-full max-w-[90vw] dark:border-l shadow-[-3px_0_10px_rgba(0,0,0,0.08)]',\n top: 'top-0 left-0 w-full max-h-[90vh] dark:border-b shadow-[0_3px_10px_rgba(0,0,0,0.08)]',\n bottom: 'bottom-0 left-0 w-full max-h-[90vh] dark:border-t shadow-[0_-3px_10px_rgba(0,0,0,0.08)]',\n },\n shape: {\n rounded: '',\n square: '',\n },\n },\n compoundVariants: [\n { placement: 'left', shape: 'rounded', class: 'rounded-r-lg' },\n { placement: 'right', shape: 'rounded', class: 'rounded-l-lg' },\n { placement: 'top', shape: 'rounded', class: 'rounded-b-lg' },\n { placement: 'bottom', shape: 'rounded', class: 'rounded-t-lg' },\n ],\n defaultVariants: {\n placement: 'right',\n shape: 'rounded',\n },\n});\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n type ComponentPortal,\n PortalModule,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n type ComponentRef,\n computed,\n contentChild,\n effect,\n ElementRef,\n type EmbeddedViewRef,\n inject,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n type TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';\nimport { ZContentTypePipe, ZSafeHtmlPipe } from '@shival99/z-ui/pipes';\nimport { 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 { ZDrawerRef } from './z-drawer.ref';\nimport { Z_DRAWER_ANIMATION_DURATION, ZDrawerOptions, ZDrawerPlacement } from './z-drawer.types';\nimport { getOverlayType } from './z-drawer.utils';\nimport { type ZDrawerShape, zDrawerVariants } from './z-drawer.variants';\n\n@Component({\n selector: 'z-drawer',\n imports: [\n PortalModule,\n NgTemplateOutlet,\n ZButtonComponent,\n ZIconComponent,\n ZContentTypePipe,\n ZTooltipDirective,\n ZSkeletonComponent,\n NgScrollbar,\n ZSafeHtmlPipe,\n TranslatePipe,\n CdkScrollable,\n ],\n standalone: true,\n templateUrl: './z-drawer.component.html',\n styleUrl: './z-drawer.component.scss',\n providers: [TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[style.width]': 'effectiveWidth()',\n '[style.height]': 'effectiveHeight()',\n '[attr.data-placement]': 'effectivePlacement()',\n },\n exportAs: 'zDrawer',\n})\nexport class ZDrawerComponent<T, U> extends BasePortalOutlet implements OnDestroy, AfterViewChecked {\n public readonly zOnOk = output<void>();\n public readonly zOnCancel = output<void>();\n public readonly zScrollbar = output<NgScrollbar>();\n\n public readonly class = 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 zHideFooter = 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\n protected readonly customHeader = contentChild(ZDrawerHeaderDirective);\n protected readonly customContent = contentChild(ZDrawerContentDirective);\n protected readonly customFooter = contentChild(ZDrawerFooterDirective);\n\n public drawerRef?: ZDrawerRef<T>;\n public readonly portalOutlet = viewChild(CdkPortalOutlet);\n protected readonly dummyTemplateRef = viewChild<TemplateRef<unknown>>('dummyTemplate');\n protected readonly mainContentRef = viewChild<NgScrollbar>('mainContent');\n\n protected readonly config = inject(ZDrawerOptions<T, U>, { optional: true }) || new ZDrawerOptions<T, U>();\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _host = inject(ElementRef<HTMLElement>);\n private readonly _overlay = inject(Overlay);\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _cdr = inject(ChangeDetectorRef);\n\n private _templateOverlayRef: OverlayRef | null = null;\n private _originalParent: HTMLElement | null = null;\n private _originalNextSibling: Node | null = null;\n private _backdropSubscription: Subscription | null = null;\n\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 protected readonly shouldShowShadow = computed(() => true);\n\n private _lastScrollHeight = 0;\n\n public ngAfterViewChecked(): void {\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(() => (this.isServiceMode() ? this.config.zTitle : this.zTitle()));\n\n protected readonly effectiveDescription = computed(() =>\n this.isServiceMode() ? this.config.zDescription : this.zDescription()\n );\n\n protected readonly effectiveClosable = computed(() =>\n this.isServiceMode() ? (this.config.zClosable ?? true) : this.zClosable()\n );\n\n protected readonly effectiveHideFooter = computed(() =>\n this.isServiceMode() ? this.config.zHideFooter : this.zHideFooter()\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 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 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 if (this.isServiceMode()) {\n return this.zHeight() || this.config.zHeight || null;\n }\n return this.shouldRenderContent() ? this.zHeight() : null;\n });\n\n protected readonly isDeferLoading = computed(() => {\n if (!this.isServiceMode()) {\n return false;\n }\n return !!this.config.zDefer && !this.portalOutlet()?.hasAttached();\n });\n\n protected readonly classes = computed(() =>\n zMergeClasses(\n zDrawerVariants({ placement: this.effectivePlacement(), shape: this.effectiveShape() }),\n this.isServiceMode() ? this.config.class : this.class()\n )\n );\n\n protected readonly hostClasses = computed(() => {\n const baseClasses = this.classes();\n if (this.isServiceMode()) {\n return `${baseClasses} z-drawer-service-mode`.trim();\n }\n if (this.shouldRenderContent()) {\n return `${baseClasses} z-drawer-template-mode`.trim();\n }\n return 'z-drawer-template-host';\n });\n\n constructor() {\n super();\n 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._disposeTemplateOverlay();\n }\n\n public getNativeElement(): HTMLElement {\n return this._host.nativeElement;\n }\n\n public attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._cdr.detectChanges();\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n return outlet?.attachComponentPortal(portal) as ComponentRef<T>;\n }\n\n public attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach drawer content after content is already attached');\n }\n return outlet?.attachTemplatePortal(portal) as EmbeddedViewRef<C>;\n }\n\n public onOkClick(): void {\n if (this.effectiveLoading()) {\n return;\n }\n this.zOnOk.emit();\n }\n\n public onCloseClick(): void {\n this.zOnCancel.emit();\n if (this.isTemplateMode() && !this.effectiveLoading()) {\n this._closeWithAnimation();\n }\n }\n\n public onBackdropClick(): void {\n if (this.zMaskClosable() && !this.effectiveLoading()) {\n this._closeWithAnimation();\n }\n }\n\n public open(): void {\n this.isLeaving.set(false);\n this.zVisible.set(true);\n }\n\n public close(): void {\n this._closeWithAnimation();\n }\n\n private _createOverlay(): OverlayRef | null {\n if (!isPlatformBrowser(this._platformId)) {\n return null;\n }\n\n const overlayType = this.zOverlay();\n const backdropClass = overlayType === 'blur' ? 'z-drawer-backdrop-blur' : 'z-drawer-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: this._overlay.scrollStrategies.block(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _openTemplateOverlay(): void {\n if (this._templateOverlayRef) {\n return;\n }\n\n const dummyRef = this.dummyTemplateRef();\n if (!dummyRef) {\n return;\n }\n\n this._templateOverlayRef = this._createOverlay();\n if (!this._templateOverlayRef) {\n return;\n }\n\n const hostElement = this._host.nativeElement;\n this._originalParent = hostElement.parentElement;\n this._originalNextSibling = hostElement.nextSibling;\n\n const portal = new TemplatePortal(dummyRef, this._viewContainerRef);\n this._templateOverlayRef.attach(portal);\n\n const overlayPane = this._templateOverlayRef.overlayElement;\n overlayPane.style.position = 'static';\n overlayPane.appendChild(hostElement);\n\n this._backdropSubscription = this._templateOverlayRef.backdropClick().subscribe(() => {\n this.onBackdropClick();\n });\n }\n\n private _closeWithAnimation(): void {\n if (this.isLeaving()) {\n return;\n }\n\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 setTimeout(() => {\n this.isLeaving.set(false);\n this._disposeTemplateOverlay();\n }, Z_DRAWER_ANIMATION_DURATION);\n }\n\n private _disposeTemplateOverlay(): void {\n const hostElement = this._host.nativeElement;\n\n if (this._originalParent && this._originalNextSibling) {\n this._originalParent.insertBefore(hostElement, this._originalNextSibling);\n }\n\n if (this._originalParent && !this._originalNextSibling) {\n this._originalParent.appendChild(hostElement);\n }\n\n hostElement.classList.remove('drawer-leave');\n if (this._templateOverlayRef) {\n this._templateOverlayRef.dispose();\n this._templateOverlayRef = null;\n }\n\n this._originalParent = null;\n this._originalNextSibling = null;\n\n if (this._backdropSubscription) {\n this._backdropSubscription.unsubscribe();\n this._backdropSubscription = null;\n }\n }\n}\n","<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\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 {{ description }}\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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]=\"title\">\n {{ title }}\n </h4>\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 [class.z-drawer-header-shadow]=\"shouldShowShadow()\">\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 <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-drawer-footer-shadow]=\"shouldShowShadow()\">\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 [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { isPlatformBrowser } from '@angular/common';\nimport { EventEmitter, Inject, PLATFORM_ID, signal } from '@angular/core';\nimport { filter, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ZDrawerComponent } from './z-drawer.component';\nimport { Z_DRAWER_ANIMATION_DURATION, ZDrawerOptions, ZDrawerTriggerAction } from './z-drawer.types';\n\nexport class ZDrawerRef<T = any, R = any, U = any> {\n private readonly _destroy$ = new Subject<void>();\n private _isClosing = false;\n private _result?: R;\n\n public componentInstance: T | null = null;\n public readonly loading = signal(false);\n\n public constructor(\n private readonly _overlayRef: OverlayRef,\n private readonly _config: ZDrawerOptions<T, U>,\n private readonly _containerInstance: ZDrawerComponent<T, U>,\n @Inject(PLATFORM_ID) private readonly _platformId: object\n ) {\n this._containerInstance.zOnCancel.subscribe(() => this._trigger(ZDrawerTriggerAction.CANCEL));\n this._containerInstance.zOnOk.subscribe(() => this._trigger(ZDrawerTriggerAction.OK));\n\n if ((this._config.zMaskClosable ?? true) && isPlatformBrowser(this._platformId)) {\n this._overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (!this.loading()) {\n this.close();\n }\n });\n }\n\n if (isPlatformBrowser(this._platformId)) {\n fromEvent<KeyboardEvent>(document, 'keydown')\n .pipe(\n filter(event => event.key === 'Escape'),\n takeUntil(this._destroy$)\n )\n .subscribe(() => {\n if (!this.loading()) {\n this.close();\n }\n });\n }\n }\n\n public setLoading(value: boolean): void {\n this.loading.set(value);\n }\n\n public close(result?: R): void {\n if (this._isClosing) {\n return;\n }\n\n this._isClosing = true;\n this._result = result;\n\n if (isPlatformBrowser(this._platformId)) {\n const hostElement = this._containerInstance.getNativeElement();\n hostElement.classList.add('drawer-leave');\n const { backdropElement } = this._overlayRef;\n if (backdropElement) {\n backdropElement.classList.add('z-backdrop-leaving');\n }\n }\n\n setTimeout(() => {\n if (this._overlayRef) {\n if (this._overlayRef.hasAttached()) {\n this._overlayRef.detachBackdrop();\n }\n this._overlayRef.dispose();\n }\n\n if (!this._destroy$.closed) {\n this._destroy$.next();\n this._destroy$.complete();\n }\n }, Z_DRAWER_ANIMATION_DURATION);\n }\n\n private _trigger(action: ZDrawerTriggerAction): void {\n if (this.loading()) {\n return;\n }\n\n const trigger = {\n ok: this._config.zOnOk,\n cancel: this._config.zOnCancel,\n }[action];\n\n if (trigger instanceof EventEmitter) {\n trigger.emit(this._getContentComponent());\n return;\n }\n\n if (typeof trigger === 'function') {\n const result = trigger(this._getContentComponent(), this) as R;\n this._closeWithResult(result);\n return;\n }\n\n this.close();\n }\n\n private _getContentComponent(): T {\n return this.componentInstance as T;\n }\n\n private _closeWithResult(result: R): void {\n if (result !== false) {\n this.close(result);\n }\n }\n}\n","import { type ComponentType, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, Injector, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { ZDrawerComponent } from './z-drawer.component';\nimport { ZDrawerRef } from './z-drawer.ref';\nimport { Z_DRAWER_DATA, ZDrawerContentType, ZDrawerOptions } from './z-drawer.types';\nimport { getOverlayType } from './z-drawer.utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZDrawerService {\n private readonly _overlay = inject(Overlay);\n private readonly _injector = inject(Injector);\n private readonly _platformId = inject(PLATFORM_ID);\n\n public create<T, U>(config: ZDrawerOptions<T, U>): ZDrawerRef<T> {\n return this._open<T, U>(config.zContent as ComponentType<T>, config);\n }\n\n private _open<T, U>(componentOrTemplateRef: ZDrawerContentType<T>, config: ZDrawerOptions<T, U>) {\n const overlayRef = this._createOverlay(config);\n\n if (!overlayRef) {\n return new ZDrawerRef(\n undefined as unknown as OverlayRef,\n config,\n undefined as unknown as ZDrawerComponent<T, U>,\n this._platformId\n );\n }\n\n const drawerContainer = this._attachDrawerContainer<T, U>(overlayRef, config);\n const drawerRef = this._attachDrawerContent<T, U>(componentOrTemplateRef, drawerContainer, overlayRef, config);\n\n return drawerRef;\n }\n\n private _createOverlay<T, U>(config: ZDrawerOptions<T, U>): OverlayRef | undefined {\n if (!isPlatformBrowser(this._platformId)) {\n return undefined;\n }\n\n const overlayType = config.zOverlay ?? getOverlayType();\n const backdropClass = overlayType === 'blur' ? 'z-drawer-backdrop-blur' : 'z-drawer-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _attachDrawerContainer<T, U>(overlayRef: OverlayRef, config: ZDrawerOptions<T, U>) {\n const injector = Injector.create({\n parent: this._injector,\n providers: [\n { provide: OverlayRef, useValue: overlayRef },\n { provide: ZDrawerOptions, useValue: config },\n ],\n });\n\n const containerPortal = new ComponentPortal<ZDrawerComponent<T, U>>(\n ZDrawerComponent,\n config.zViewContainerRef,\n injector\n );\n const containerRef = overlayRef.attach<ZDrawerComponent<T, U>>(containerPortal);\n\n return containerRef.instance;\n }\n\n private _attachDrawerContent<T, U>(\n componentOrTemplateRef: ZDrawerContentType<T>,\n drawerContainer: ZDrawerComponent<T, U>,\n overlayRef: OverlayRef,\n config: ZDrawerOptions<T, U>\n ) {\n const drawerRef = new ZDrawerRef<T>(overlayRef, config, drawerContainer, this._platformId);\n drawerContainer.drawerRef = drawerRef;\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n drawerContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null as unknown as ViewContainerRef, { drawerRef } as T)\n );\n return drawerRef;\n }\n\n if (typeof componentOrTemplateRef !== 'string') {\n const injector = this._createInjector<T, U>(drawerRef, config);\n const contentRef = drawerContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, config.zViewContainerRef, injector)\n );\n\n if (contentRef) {\n drawerRef.componentInstance = contentRef.instance;\n }\n }\n\n return drawerRef;\n }\n\n private _createInjector<T, U>(drawerRef: ZDrawerRef<T>, config: ZDrawerOptions<T, U>) {\n return Injector.create({\n parent: this._injector,\n providers: [\n { provide: ZDrawerRef, useValue: drawerRef },\n { provide: Z_DRAWER_DATA, useValue: config.zData },\n ],\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAMa,uBAAuB,CAAA;AAClB,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;uGAD/C,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sCAAsC;AAChD,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;MCCY,sBAAsB,CAAA;AACjB,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;uGAD/C,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oCAAoC;AAC9C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;MCCY,sBAAsB,CAAA;AACjB,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;uGAD/C,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,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AA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -487,17 +487,17 @@ class ZModalComponent extends BasePortalOutlet {
|
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
490
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZModalComponent, isStandalone: true, selector: "z-modal", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zVisible: { classPropertyName: "zVisible", publicName: "zVisible", isSignal: true, isRequired: false, transformFunction: null }, zTitle: { classPropertyName: "zTitle", publicName: "zTitle", isSignal: true, isRequired: false, transformFunction: null }, zDescription: { classPropertyName: "zDescription", publicName: "zDescription", isSignal: true, isRequired: false, transformFunction: null }, zWidth: { classPropertyName: "zWidth", publicName: "zWidth", isSignal: true, isRequired: false, transformFunction: null }, zClosable: { classPropertyName: "zClosable", publicName: "zClosable", isSignal: true, isRequired: false, transformFunction: null }, zMaskClosable: { classPropertyName: "zMaskClosable", publicName: "zMaskClosable", isSignal: true, isRequired: false, transformFunction: null }, zHideFooter: { classPropertyName: "zHideFooter", publicName: "zHideFooter", isSignal: true, isRequired: false, transformFunction: null }, zOkText: { classPropertyName: "zOkText", publicName: "zOkText", isSignal: true, isRequired: false, transformFunction: null }, zCancelText: { classPropertyName: "zCancelText", publicName: "zCancelText", isSignal: true, isRequired: false, transformFunction: null }, zOkDestructive: { classPropertyName: "zOkDestructive", publicName: "zOkDestructive", isSignal: true, isRequired: false, transformFunction: null }, zOkDisabled: { classPropertyName: "zOkDisabled", publicName: "zOkDisabled", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zContentLoading: { classPropertyName: "zContentLoading", publicName: "zContentLoading", isSignal: true, isRequired: false, transformFunction: null }, zSkeletonRows: { classPropertyName: "zSkeletonRows", publicName: "zSkeletonRows", isSignal: true, isRequired: false, transformFunction: null }, zOverlay: { classPropertyName: "zOverlay", publicName: "zOverlay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOk: "zOk", zCancel: "zCancel", zScrollbar: "zScrollbar", zVisible: "zVisibleChange" }, host: { properties: { "class": "hostClasses()", "style.width": "effectiveWidth()" } }, providers: [TranslatePipe], queries: [{ propertyName: "customHeader", first: true, predicate: ZModalHeaderDirective, descendants: true, isSignal: true }, { propertyName: "customContent", first: true, predicate: ZModalContentDirective, descendants: true, isSignal: true }, { propertyName: "customFooter", first: true, predicate: ZModalFooterDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }, { propertyName: "dummyTemplateRef", first: true, predicate: ["dummyTemplate"], descendants: true, isSignal: true }, { propertyName: "mainContentRef", first: true, predicate: ["mainContent"], descendants: true, isSignal: true }], exportAs: ["zModal"], usesInheritance: true, ngImport: i0, template: "<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\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-modal-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-modal-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ description }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar class=\"z-modal-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n <!-- Confirm Modal Layout (no skeleton) -->\n @if (isConfirmMode()) {\n <div class=\"flex flex-col items-center px-4 pt-2 text-center\">\n @if (config.zConfirmIcon) {\n <div class=\"relative mb-4 flex size-20 items-center justify-center\">\n <div class=\"absolute inset-0 rounded-full\" [class]=\"confirmIconColors().ring\"></div>\n <div class=\"relative flex size-14 items-center justify-center rounded-full\" [class]=\"confirmIconColors().bg\">\n <z-icon [zType]=\"config.zConfirmIcon\" zSize=\"30\" [zStrokeWidth]=\"2.6\" [class]=\"confirmIconColors().icon\" />\n </div>\n </div>\n }\n\n <!-- Title centered -->\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-modal-title\"\n class=\"m-0 text-lg leading-snug font-semibold\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4 data-testid=\"z-modal-title\" class=\"m-0 text-lg leading-snug font-semibold\">\n {{ title }}\n </h4>\n }\n }\n }\n\n <!-- Description centered -->\n @if (config.zContent; as content) {\n <p\n data-testid=\"z-modal-description\"\n class=\"text-muted-foreground m-0 mt-2 text-sm\"\n [innerHTML]=\"$any(content) | zSafeHtml\"></p>\n }\n </div>\n\n <!-- Footer centered -->\n @if (!effectiveHideFooter()) {\n <footer class=\"mt-4 flex flex-row justify-center gap-3 pb-2\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-ok-button\"\n z-button\n [zType]=\"effectiveTypeOk()\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? ('i18n_z_ui_common_ok' | translate) }}\n </button>\n }\n </footer>\n }\n } @else {\n <!-- Normal Modal Layout with defer -->\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\n </h4>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar class=\"z-modal-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-modal-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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-modal-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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n }\n}\n", styles: [":host.z-modal-service-mode,:host.z-modal-template-mode{--z-enter-opacity: 0;--z-enter-translate-y: -8px;--z-enter-scale: .95;animation:z-enter .18s cubic-bezier(.32,.72,0,1) forwards}:host.z-modal-service-mode.modal-leave,:host.z-modal-template-mode.modal-leave{--z-exit-opacity: 0;--z-exit-translate-y: -8px;--z-exit-scale: .95;animation:z-exit .15s cubic-bezier(.32,.72,0,1) forwards}:host.z-modal-template-host{display:contents}::ng-deep .z-modal-backdrop-dark{background-color:#0009;animation:z-backdrop-enter .15s ease-out forwards}::ng-deep .z-modal-backdrop-blur{background-color:#0000000d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:z-backdrop-enter .15s ease-out forwards}::ng-deep .z-modal-backdrop-dark.z-backdrop-leaving,::ng-deep .z-modal-backdrop-blur.z-backdrop-leaving{animation:z-backdrop-exit .12s ease-in forwards}.z-modal-header-shadow{padding-bottom:16px;box-shadow:0 2px 8px -2px #0000001a}.z-modal-footer-shadow{padding-top:16px;box-shadow:0 -2px 8px -2px #0000001a}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out,padding .2s ease-out}.z-modal-scrollbar{--scrollbar-padding: 2px}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }, { kind: "pipe", type: ZContentTypePipe, name: "zContentType" }, { kind: "pipe", type: ZSafeHtmlPipe, name: "zSafeHtml" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet,
|
|
490
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ZModalComponent, isStandalone: true, selector: "z-modal", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zVisible: { classPropertyName: "zVisible", publicName: "zVisible", isSignal: true, isRequired: false, transformFunction: null }, zTitle: { classPropertyName: "zTitle", publicName: "zTitle", isSignal: true, isRequired: false, transformFunction: null }, zDescription: { classPropertyName: "zDescription", publicName: "zDescription", isSignal: true, isRequired: false, transformFunction: null }, zWidth: { classPropertyName: "zWidth", publicName: "zWidth", isSignal: true, isRequired: false, transformFunction: null }, zClosable: { classPropertyName: "zClosable", publicName: "zClosable", isSignal: true, isRequired: false, transformFunction: null }, zMaskClosable: { classPropertyName: "zMaskClosable", publicName: "zMaskClosable", isSignal: true, isRequired: false, transformFunction: null }, zHideFooter: { classPropertyName: "zHideFooter", publicName: "zHideFooter", isSignal: true, isRequired: false, transformFunction: null }, zOkText: { classPropertyName: "zOkText", publicName: "zOkText", isSignal: true, isRequired: false, transformFunction: null }, zCancelText: { classPropertyName: "zCancelText", publicName: "zCancelText", isSignal: true, isRequired: false, transformFunction: null }, zOkDestructive: { classPropertyName: "zOkDestructive", publicName: "zOkDestructive", isSignal: true, isRequired: false, transformFunction: null }, zOkDisabled: { classPropertyName: "zOkDisabled", publicName: "zOkDisabled", isSignal: true, isRequired: false, transformFunction: null }, zLoading: { classPropertyName: "zLoading", publicName: "zLoading", isSignal: true, isRequired: false, transformFunction: null }, zContentLoading: { classPropertyName: "zContentLoading", publicName: "zContentLoading", isSignal: true, isRequired: false, transformFunction: null }, zSkeletonRows: { classPropertyName: "zSkeletonRows", publicName: "zSkeletonRows", isSignal: true, isRequired: false, transformFunction: null }, zOverlay: { classPropertyName: "zOverlay", publicName: "zOverlay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOk: "zOk", zCancel: "zCancel", zScrollbar: "zScrollbar", zVisible: "zVisibleChange" }, host: { properties: { "class": "hostClasses()", "style.width": "effectiveWidth()" } }, providers: [TranslatePipe], queries: [{ propertyName: "customHeader", first: true, predicate: ZModalHeaderDirective, descendants: true, isSignal: true }, { propertyName: "customContent", first: true, predicate: ZModalContentDirective, descendants: true, isSignal: true }, { propertyName: "customFooter", first: true, predicate: ZModalFooterDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }, { propertyName: "dummyTemplateRef", first: true, predicate: ["dummyTemplate"], descendants: true, isSignal: true }, { propertyName: "mainContentRef", first: true, predicate: ["mainContent"], descendants: true, isSignal: true }], exportAs: ["zModal"], usesInheritance: true, ngImport: i0, template: "<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\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-modal-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-modal-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ description }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar\n class=\"z-modal-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n <!-- Confirm Modal Layout (no skeleton) -->\n @if (isConfirmMode()) {\n <div class=\"flex flex-col items-center px-4 pt-2 text-center\">\n @if (config.zConfirmIcon) {\n <div class=\"relative mb-4 flex size-20 items-center justify-center\">\n <div class=\"absolute inset-0 rounded-full\" [class]=\"confirmIconColors().ring\"></div>\n <div class=\"relative flex size-14 items-center justify-center rounded-full\" [class]=\"confirmIconColors().bg\">\n <z-icon [zType]=\"config.zConfirmIcon\" zSize=\"30\" [zStrokeWidth]=\"2.6\" [class]=\"confirmIconColors().icon\" />\n </div>\n </div>\n }\n\n <!-- Title centered -->\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-modal-title\"\n class=\"m-0 text-lg leading-snug font-semibold\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4 data-testid=\"z-modal-title\" class=\"m-0 text-lg leading-snug font-semibold\">\n {{ title }}\n </h4>\n }\n }\n }\n\n <!-- Description centered -->\n @if (config.zContent; as content) {\n <p\n data-testid=\"z-modal-description\"\n class=\"text-muted-foreground m-0 mt-2 text-sm\"\n [innerHTML]=\"$any(content) | zSafeHtml\"></p>\n }\n </div>\n\n <!-- Footer centered -->\n @if (!effectiveHideFooter()) {\n <footer class=\"mt-4 flex flex-row justify-center gap-3 pb-2\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-ok-button\"\n z-button\n [zType]=\"effectiveTypeOk()\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? ('i18n_z_ui_common_ok' | translate) }}\n </button>\n }\n </footer>\n }\n } @else {\n <!-- Normal Modal Layout with defer -->\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\n </h4>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar\n class=\"z-modal-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-modal-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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-modal-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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n }\n}\n", styles: [":host.z-modal-service-mode,:host.z-modal-template-mode{--z-enter-opacity: 0;--z-enter-translate-y: -8px;--z-enter-scale: .95;animation:z-enter .18s cubic-bezier(.32,.72,0,1) forwards}:host.z-modal-service-mode.modal-leave,:host.z-modal-template-mode.modal-leave{--z-exit-opacity: 0;--z-exit-translate-y: -8px;--z-exit-scale: .95;animation:z-exit .15s cubic-bezier(.32,.72,0,1) forwards}:host.z-modal-template-host{display:contents}::ng-deep .z-modal-backdrop-dark{background-color:#0009;animation:z-backdrop-enter .15s ease-out forwards}::ng-deep .z-modal-backdrop-blur{background-color:#0000000d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:z-backdrop-enter .15s ease-out forwards}::ng-deep .z-modal-backdrop-dark.z-backdrop-leaving,::ng-deep .z-modal-backdrop-blur.z-backdrop-leaving{animation:z-backdrop-exit .12s ease-in forwards}.z-modal-header-shadow{padding-bottom:16px;box-shadow:0 2px 8px -2px #0000001a}.z-modal-footer-shadow{padding-top:16px;box-shadow:0 -2px 8px -2px #0000001a}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out,padding .2s ease-out}.z-modal-scrollbar{--scrollbar-padding: 2px}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ZButtonComponent, selector: "z-button, button[z-button], a[z-button]", inputs: ["class", "zType", "zSize", "zShape", "zLabel", "zLoading", "zDisabled", "zTypeIcon", "zSizeIcon", "zStrokeWidthIcon", "zWave"], exportAs: ["zButton"] }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }, { kind: "pipe", type: ZContentTypePipe, name: "zContentType" }, { kind: "pipe", type: ZSafeHtmlPipe, name: "zSafeHtml" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet,
|
|
491
491
|
ZButtonComponent,
|
|
492
|
-
ZIconComponent, import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), ZContentTypePipe,
|
|
492
|
+
ZIconComponent, import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@angular/cdk/scrolling').then(m => m.CdkScrollable), ZContentTypePipe,
|
|
493
493
|
ZSafeHtmlPipe,
|
|
494
494
|
TranslatePipe], () => [i1.CdkPortalOutlet, NgTemplateOutlet,
|
|
495
495
|
ZButtonComponent,
|
|
496
|
-
ZIconComponent, import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), ZContentTypePipe,
|
|
496
|
+
ZIconComponent, import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@angular/cdk/scrolling').then(m => m.CdkScrollable), ZContentTypePipe,
|
|
497
497
|
ZSafeHtmlPipe,
|
|
498
498
|
TranslatePipe]] });
|
|
499
499
|
}
|
|
500
|
-
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.6", ngImport: i0, type: ZModalComponent, resolveDeferredDeps: () => [import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar)], resolveMetadata: (ZTooltipDirective, NgScrollbar) => ({ decorators: [{
|
|
500
|
+
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.6", ngImport: i0, type: ZModalComponent, resolveDeferredDeps: () => [import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), import('ngx-scrollbar').then(m => m.NgScrollbar), import('@angular/cdk/scrolling').then(m => m.CdkScrollable)], resolveMetadata: (ZTooltipDirective, NgScrollbar, CdkScrollable) => ({ decorators: [{
|
|
501
501
|
type: Component,
|
|
502
502
|
args: [{ selector: 'z-modal', imports: [
|
|
503
503
|
PortalModule,
|
|
@@ -510,10 +510,11 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.6", ng
|
|
|
510
510
|
NgScrollbar,
|
|
511
511
|
ZSafeHtmlPipe,
|
|
512
512
|
TranslatePipe,
|
|
513
|
+
CdkScrollable,
|
|
513
514
|
], standalone: true, providers: [TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
514
515
|
'[class]': 'hostClasses()',
|
|
515
516
|
'[style.width]': 'effectiveWidth()',
|
|
516
|
-
}, exportAs: 'zModal', template: "<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\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-modal-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-modal-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ description }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar class=\"z-modal-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n <!-- Confirm Modal Layout (no skeleton) -->\n @if (isConfirmMode()) {\n <div class=\"flex flex-col items-center px-4 pt-2 text-center\">\n @if (config.zConfirmIcon) {\n <div class=\"relative mb-4 flex size-20 items-center justify-center\">\n <div class=\"absolute inset-0 rounded-full\" [class]=\"confirmIconColors().ring\"></div>\n <div class=\"relative flex size-14 items-center justify-center rounded-full\" [class]=\"confirmIconColors().bg\">\n <z-icon [zType]=\"config.zConfirmIcon\" zSize=\"30\" [zStrokeWidth]=\"2.6\" [class]=\"confirmIconColors().icon\" />\n </div>\n </div>\n }\n\n <!-- Title centered -->\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-modal-title\"\n class=\"m-0 text-lg leading-snug font-semibold\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4 data-testid=\"z-modal-title\" class=\"m-0 text-lg leading-snug font-semibold\">\n {{ title }}\n </h4>\n }\n }\n }\n\n <!-- Description centered -->\n @if (config.zContent; as content) {\n <p\n data-testid=\"z-modal-description\"\n class=\"text-muted-foreground m-0 mt-2 text-sm\"\n [innerHTML]=\"$any(content) | zSafeHtml\"></p>\n }\n </div>\n\n <!-- Footer centered -->\n @if (!effectiveHideFooter()) {\n <footer class=\"mt-4 flex flex-row justify-center gap-3 pb-2\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-ok-button\"\n z-button\n [zType]=\"effectiveTypeOk()\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? ('i18n_z_ui_common_ok' | translate) }}\n </button>\n }\n </footer>\n }\n } @else {\n <!-- Normal Modal Layout with defer -->\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\n </h4>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar class=\"z-modal-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-modal-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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-modal-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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n }\n}\n", styles: [":host.z-modal-service-mode,:host.z-modal-template-mode{--z-enter-opacity: 0;--z-enter-translate-y: -8px;--z-enter-scale: .95;animation:z-enter .18s cubic-bezier(.32,.72,0,1) forwards}:host.z-modal-service-mode.modal-leave,:host.z-modal-template-mode.modal-leave{--z-exit-opacity: 0;--z-exit-translate-y: -8px;--z-exit-scale: .95;animation:z-exit .15s cubic-bezier(.32,.72,0,1) forwards}:host.z-modal-template-host{display:contents}::ng-deep .z-modal-backdrop-dark{background-color:#0009;animation:z-backdrop-enter .15s ease-out forwards}::ng-deep .z-modal-backdrop-blur{background-color:#0000000d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:z-backdrop-enter .15s ease-out forwards}::ng-deep .z-modal-backdrop-dark.z-backdrop-leaving,::ng-deep .z-modal-backdrop-blur.z-backdrop-leaving{animation:z-backdrop-exit .12s ease-in forwards}.z-modal-header-shadow{padding-bottom:16px;box-shadow:0 2px 8px -2px #0000001a}.z-modal-footer-shadow{padding-top:16px;box-shadow:0 -2px 8px -2px #0000001a}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out,padding .2s ease-out}.z-modal-scrollbar{--scrollbar-padding: 2px}\n"] }]
|
|
517
|
+
}, exportAs: 'zModal', template: "<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\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-modal-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-modal-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ description }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar\n class=\"z-modal-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n <!-- Confirm Modal Layout (no skeleton) -->\n @if (isConfirmMode()) {\n <div class=\"flex flex-col items-center px-4 pt-2 text-center\">\n @if (config.zConfirmIcon) {\n <div class=\"relative mb-4 flex size-20 items-center justify-center\">\n <div class=\"absolute inset-0 rounded-full\" [class]=\"confirmIconColors().ring\"></div>\n <div class=\"relative flex size-14 items-center justify-center rounded-full\" [class]=\"confirmIconColors().bg\">\n <z-icon [zType]=\"config.zConfirmIcon\" zSize=\"30\" [zStrokeWidth]=\"2.6\" [class]=\"confirmIconColors().icon\" />\n </div>\n </div>\n }\n\n <!-- Title centered -->\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-modal-title\"\n class=\"m-0 text-lg leading-snug font-semibold\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4 data-testid=\"z-modal-title\" class=\"m-0 text-lg leading-snug font-semibold\">\n {{ title }}\n </h4>\n }\n }\n }\n\n <!-- Description centered -->\n @if (config.zContent; as content) {\n <p\n data-testid=\"z-modal-description\"\n class=\"text-muted-foreground m-0 mt-2 text-sm\"\n [innerHTML]=\"$any(content) | zSafeHtml\"></p>\n }\n </div>\n\n <!-- Footer centered -->\n @if (!effectiveHideFooter()) {\n <footer class=\"mt-4 flex flex-row justify-center gap-3 pb-2\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-ok-button\"\n z-button\n [zType]=\"effectiveTypeOk()\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? ('i18n_z_ui_common_ok' | translate) }}\n </button>\n }\n </footer>\n }\n } @else {\n <!-- Normal Modal Layout with defer -->\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\n </h4>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar\n class=\"z-modal-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-modal-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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-modal-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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n }\n}\n", styles: [":host.z-modal-service-mode,:host.z-modal-template-mode{--z-enter-opacity: 0;--z-enter-translate-y: -8px;--z-enter-scale: .95;animation:z-enter .18s cubic-bezier(.32,.72,0,1) forwards}:host.z-modal-service-mode.modal-leave,:host.z-modal-template-mode.modal-leave{--z-exit-opacity: 0;--z-exit-translate-y: -8px;--z-exit-scale: .95;animation:z-exit .15s cubic-bezier(.32,.72,0,1) forwards}:host.z-modal-template-host{display:contents}::ng-deep .z-modal-backdrop-dark{background-color:#0009;animation:z-backdrop-enter .15s ease-out forwards}::ng-deep .z-modal-backdrop-blur{background-color:#0000000d;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:z-backdrop-enter .15s ease-out forwards}::ng-deep .z-modal-backdrop-dark.z-backdrop-leaving,::ng-deep .z-modal-backdrop-blur.z-backdrop-leaving{animation:z-backdrop-exit .12s ease-in forwards}.z-modal-header-shadow{padding-bottom:16px;box-shadow:0 2px 8px -2px #0000001a}.z-modal-footer-shadow{padding-top:16px;box-shadow:0 -2px 8px -2px #0000001a}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out,padding .2s ease-out}.z-modal-scrollbar{--scrollbar-padding: 2px}\n"] }]
|
|
517
518
|
}], ctorParameters: () => [], propDecorators: { zOk: [{ type: i0.Output, args: ["zOk"] }], zCancel: [{ type: i0.Output, args: ["zCancel"] }], zScrollbar: [{ type: i0.Output, args: ["zScrollbar"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "zVisible", required: false }] }, { type: i0.Output, args: ["zVisibleChange"] }], zTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTitle", required: false }] }], zDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDescription", required: false }] }], zWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "zWidth", required: false }] }], zClosable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zClosable", required: false }] }], zMaskClosable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zMaskClosable", required: false }] }], zHideFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHideFooter", required: false }] }], zOkText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOkText", required: false }] }], zCancelText: [{ type: i0.Input, args: [{ isSignal: true, alias: "zCancelText", required: false }] }], zOkDestructive: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOkDestructive", required: false }] }], zOkDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOkDisabled", required: false }] }], zLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zLoading", required: false }] }], zContentLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "zContentLoading", required: false }] }], zSkeletonRows: [{ type: i0.Input, args: [{ isSignal: true, alias: "zSkeletonRows", required: false }] }], zOverlay: [{ type: i0.Input, args: [{ isSignal: true, alias: "zOverlay", required: false }] }], customHeader: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ZModalHeaderDirective), { isSignal: true }] }], customContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ZModalContentDirective), { isSignal: true }] }], customFooter: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ZModalFooterDirective), { isSignal: true }] }], portalOutlet: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }], dummyTemplateRef: [{ type: i0.ViewChild, args: ['dummyTemplate', { isSignal: true }] }], mainContentRef: [{ type: i0.ViewChild, args: ['mainContent', { isSignal: true }] }] } }) });
|
|
518
519
|
|
|
519
520
|
let ZModalRef = class ZModalRef {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shival99-z-ui-components-z-modal.mjs","sources":["../../../../libs/core-ui/components/z-modal/directives/z-modal-content.directive.ts","../../../../libs/core-ui/components/z-modal/directives/z-modal-footer.directive.ts","../../../../libs/core-ui/components/z-modal/directives/z-modal-header.directive.ts","../../../../libs/core-ui/components/z-modal/z-modal.types.ts","../../../../libs/core-ui/components/z-modal/z-modal.utils.ts","../../../../libs/core-ui/components/z-modal/z-modal.variants.ts","../../../../libs/core-ui/components/z-modal/z-modal.component.ts","../../../../libs/core-ui/components/z-modal/z-modal.component.html","../../../../libs/core-ui/components/z-modal/z-modal.ref.ts","../../../../libs/core-ui/components/z-modal/z-modal.service.ts","../../../../libs/core-ui/components/z-modal/shival99-z-ui-components-z-modal.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-modal-content], [zModalContent]',\n standalone: true,\n})\nexport class ZModalContentDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-modal-footer], [zModalFooter]',\n standalone: true,\n})\nexport class ZModalFooterDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-modal-header], [zModalHeader]',\n standalone: true,\n})\nexport class ZModalHeaderDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type ComponentType } from '@angular/cdk/overlay';\nimport {\n type EventEmitter,\n InjectionToken,\n type TemplateRef,\n type Type,\n type ViewContainerRef,\n type WritableSignal,\n} from '@angular/core';\nimport type { ZIcon } from '@shival99/z-ui/components/z-icon';\nimport type { ClassValue } from 'clsx';\nimport type { Observable } from 'rxjs';\n\nexport type ZModalContentType<T> = ComponentType<T> | TemplateRef<T> | string;\nexport const Z_MODAL_DATA = new InjectionToken<any>('Z_MODAL_DATA');\nexport const Z_MODAL_ANIMATION_DURATION = 200;\nexport enum ZModalTriggerAction {\n CANCEL = 'cancel',\n OK = 'ok',\n}\n\nexport type ZModalOnClickCallBack<T> = (instance: T, modalRef?: unknown) => false | void | object;\nexport type ZModalConfirmType = 'show' | 'info' | 'warning' | 'danger';\n\nconst noopFun = (): void => {};\n\n/**\n * Configuration options for z-modal component.\n *\n * @template T - The type of the content component\n * @template U - The type of the data passed to the modal\n */\nexport class ZModalOptions<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 modal is closable (shows close button) */\n public zClosable?: boolean;\n /** Confirm type for preset styling (show, info, warning, danger) */\n public zConfirmType?: 'show' | 'info' | 'warning' | 'danger';\n /** Icon for the confirm modal */\n public zConfirmIcon?: ZIcon;\n /** Modal content - can be a component, template, or string */\n public zContent?: string | TemplateRef<T> | Type<T>;\n /** Custom CSS classes for the modal */\n public class?: ClassValue;\n /** Data to be passed to the content component via Z_MODAL_DATA token */\n public zData?: U;\n /**\n * Observable for deferred data loading before showing modal content.\n * Modal will show a loading spinner until the Observable completes.\n * The resolved data will be available via Z_MODAL_DATA.\n *\n * @example\n * ```typescript\n * this.modalService.create({\n * zDefer: this.userService.getUser(userId),\n * zContent: UserFormComponent,\n * });\n * ```\n */\n public zDefer?: Observable<U>;\n /** Description text shown below the title */\n public zDescription?: string;\n /** Whether to hide the default footer */\n public zHideFooter?: boolean;\n /**\n * WritableSignal to control loading state of the OK button.\n * Use this when submitting forms or calling APIs.\n *\n * @example Using with confirm modal (delete action)\n * ```typescript\n * const modalRef = this.modalService.danger({\n * zTitle: 'Delete Item',\n * zContent: 'Are you sure you want to delete this item?',\n * zOkText: 'Delete',\n * zOnOk: () => {\n * modalRef.setLoading(true);\n * this.api.delete(itemId).subscribe({\n * next: () => {\n * modalRef.setLoading(false);\n * modalRef.close();\n * },\n * error: () => modalRef.setLoading(false),\n * });\n * return false; // Prevent auto-close\n * },\n * });\n * ```\n */\n public readonly zLoading?: WritableSignal<boolean>;\n /** Whether clicking mask closes the modal */\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> | ZModalOnClickCallBack<T> = noopFun;\n /** Callback or EventEmitter when OK is clicked */\n public zOnOk?: EventEmitter<T> | ZModalOnClickCallBack<T> = noopFun;\n /** Modal title - supports string, HTML string, or TemplateRef */\n public zTitle?: string | TemplateRef<T>;\n /** ViewContainerRef for the modal portal */\n public zViewContainerRef?: ViewContainerRef;\n /** Modal width (e.g., '425px', '80%') */\n public zWidth?: string;\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 */\n public zSkeletonRows?: number;\n}\n\nexport interface ZModalConfirmOptions<U = unknown> {\n zTitle: string;\n zContent?: string;\n zIcon?: ZIcon;\n zOkText?: string;\n zCancelText?: string | null;\n /** Callback when OK is clicked. Return false to prevent auto-close */\n zOnOk?: () => void | false | Promise<void>;\n zOnCancel?: () => void;\n zMaskClosable?: boolean;\n zWidth?: string;\n zData?: U;\n}\n\nexport interface ZModalConfirmIconColors {\n ring: string;\n bg: string;\n icon: string;\n}\n\nexport interface ZModalConfirmConfig {\n icon: ZIcon;\n okDestructive?: boolean;\n colors: ZModalConfirmIconColors;\n}\n","import { zDetectBrowser } from '@shival99/z-ui/utils';\nimport type { ZModalConfirmConfig, ZModalConfirmType } from './z-modal.types';\n\nexport type ZModalOverlayType = 'dark' | 'blur';\nexport const getOverlayType = (): ZModalOverlayType => {\n const browser = zDetectBrowser();\n return browser.name === 'Chrome' ? 'dark' : 'blur';\n};\n\nexport const Z_MODAL_CONFIRM_CONFIG: Record<ZModalConfirmType, ZModalConfirmConfig> = {\n show: {\n icon: 'lucideMessageCircleQuestion',\n colors: {\n ring: 'bg-gray-500/10',\n bg: 'bg-gray-500/15',\n icon: 'text-gray-600!',\n },\n },\n info: {\n icon: 'lucideInfo',\n colors: {\n ring: 'bg-blue-500/10',\n bg: 'bg-blue-500/15',\n icon: 'text-blue-500!',\n },\n },\n warning: {\n icon: 'lucideTriangleAlert',\n colors: {\n ring: 'bg-amber-500/10',\n bg: 'bg-amber-500/15',\n icon: 'text-amber-500!',\n },\n },\n danger: {\n icon: 'lucideX',\n okDestructive: true,\n colors: {\n ring: 'bg-red-500/10',\n bg: 'bg-red-500/15',\n icon: 'text-red-500!',\n },\n },\n};\n","import { cva } from 'class-variance-authority';\n\nexport const zModalVariants = cva(\n [\n 'fixed left-[50%] top-[50%] z-50 flex flex-col w-full translate-x-[-50%]',\n 'translate-y-[-50%] border bg-background py-4 shadow-lg rounded-lg',\n 'max-w-[calc(100%-2rem)] overflow-hidden',\n 'max-h-[80dvh]',\n ].join(' ')\n);\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n type ComponentPortal,\n PortalModule,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n type ComponentRef,\n computed,\n contentChild,\n effect,\n ElementRef,\n type EmbeddedViewRef,\n inject,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n type TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent, ZButtonVariants } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';\nimport { ZContentTypePipe, ZSafeHtmlPipe } from '@shival99/z-ui/pipes';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { NgScrollbar } from 'ngx-scrollbar';\nimport { Subscription } from 'rxjs';\nimport { ZModalContentDirective } from './directives/z-modal-content.directive';\nimport { ZModalFooterDirective } from './directives/z-modal-footer.directive';\nimport { ZModalHeaderDirective } from './directives/z-modal-header.directive';\nimport { ZModalRef } from './z-modal.ref';\nimport { Z_MODAL_ANIMATION_DURATION, ZModalOptions } from './z-modal.types';\nimport { getOverlayType, Z_MODAL_CONFIRM_CONFIG } from './z-modal.utils';\nimport { zModalVariants } from './z-modal.variants';\n\n@Component({\n selector: 'z-modal',\n imports: [\n PortalModule,\n NgTemplateOutlet,\n ZButtonComponent,\n ZIconComponent,\n ZContentTypePipe,\n ZTooltipDirective,\n ZSkeletonComponent,\n NgScrollbar,\n ZSafeHtmlPipe,\n TranslatePipe,\n ],\n standalone: true,\n templateUrl: './z-modal.component.html',\n styleUrl: './z-modal.component.scss',\n providers: [TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[style.width]': 'effectiveWidth()',\n },\n exportAs: 'zModal',\n})\nexport class ZModalComponent<T, U> extends BasePortalOutlet implements OnDestroy, AfterViewChecked {\n public zOk = output<void>();\n public zCancel = output<void>();\n public readonly zScrollbar = output<NgScrollbar>();\n\n public readonly class = 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>('500px');\n public readonly zClosable = input<boolean>(true);\n public readonly zMaskClosable = input<boolean>(true);\n public readonly zHideFooter = 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 zContentLoading = input<boolean>(false);\n public readonly zSkeletonRows = input<number>(3);\n public readonly zOverlay = input<'dark' | 'blur'>(getOverlayType());\n\n protected readonly customHeader = contentChild(ZModalHeaderDirective);\n protected readonly customContent = contentChild(ZModalContentDirective);\n protected readonly customFooter = contentChild(ZModalFooterDirective);\n\n public modalRef?: ZModalRef<T>;\n public readonly portalOutlet = viewChild(CdkPortalOutlet);\n protected readonly dummyTemplateRef = viewChild<TemplateRef<unknown>>('dummyTemplate');\n protected readonly mainContentRef = viewChild<NgScrollbar>('mainContent');\n\n protected readonly config = inject(ZModalOptions<T, U>, { optional: true }) || new ZModalOptions<T, U>();\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _host = inject(ElementRef<HTMLElement>);\n private readonly _overlay = inject(Overlay);\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _cdr = inject(ChangeDetectorRef);\n\n private _templateOverlayRef: OverlayRef | null = null;\n private _originalParent: HTMLElement | null = null;\n private _originalNextSibling: Node | null = null;\n private _backdropSubscription: Subscription | null = null;\n\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.modalRef);\n protected readonly isTemplateMode = computed(() => !this.isServiceMode());\n protected readonly isConfirmMode = computed(() => !!this.config.zConfirmType);\n protected readonly shouldRenderContent = computed(() => this.zVisible() || this.isLeaving());\n protected readonly isStringContent = computed(\n () => typeof this.config.zContent === 'string' && !this.isConfirmMode()\n );\n\n protected readonly shouldShowShadow = computed(() => true);\n\n private _lastScrollHeight = 0;\n\n public ngAfterViewChecked(): void {\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 confirmIconColors = computed(() => {\n const type = this.config.zConfirmType ?? 'show';\n return Z_MODAL_CONFIRM_CONFIG[type].colors;\n });\n\n protected readonly effectiveTitle = computed(() => (this.isServiceMode() ? this.config.zTitle : this.zTitle()));\n\n protected readonly effectiveDescription = computed(() =>\n this.isServiceMode() ? this.config.zDescription : this.zDescription()\n );\n\n protected readonly effectiveClosable = computed(() =>\n this.isServiceMode() ? (this.config.zClosable ?? true) : this.zClosable()\n );\n\n protected readonly effectiveHideFooter = computed(() =>\n this.isServiceMode() ? this.config.zHideFooter : this.zHideFooter()\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 effectiveTypeOk = computed((): ZButtonVariants['zType'] => {\n if (!this.isServiceMode()) {\n return 'default';\n }\n\n const typeMap: Record<string, ZButtonVariants['zType']> = {\n show: 'default',\n info: 'info',\n warning: 'warning',\n danger: 'error',\n };\n\n const confirmType = this.config.zConfirmType;\n return confirmType ? (typeMap[confirmType] ?? 'default') : 'default';\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.modalRef?.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()) {\n return this.config.zSkeletonRows ?? 3;\n }\n return this.zSkeletonRows();\n });\n\n protected readonly effectiveWidth = computed(() => {\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 isDeferLoading = computed(() => {\n if (!this.isServiceMode()) {\n return false;\n }\n return !!this.config.zDefer && !this.portalOutlet()?.hasAttached();\n });\n\n protected readonly classes = computed(() =>\n zMergeClasses(zModalVariants(), this.isServiceMode() ? this.config.class : this.class())\n );\n\n protected readonly hostClasses = computed(() => {\n const baseClasses = this.classes();\n if (this.isServiceMode()) {\n return `${baseClasses} z-modal-service-mode`.trim();\n }\n if (this.shouldRenderContent()) {\n return `${baseClasses} z-modal-template-mode`.trim();\n }\n return 'z-modal-template-host';\n });\n\n constructor() {\n super();\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._disposeTemplateOverlay();\n }\n\n public getNativeElement(): HTMLElement {\n return this._host.nativeElement;\n }\n\n public attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._cdr.detectChanges();\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach modal content after content is already attached');\n }\n return outlet?.attachComponentPortal(portal) as ComponentRef<T>;\n }\n\n public attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach modal content after content is already attached');\n }\n return outlet?.attachTemplatePortal(portal) as EmbeddedViewRef<C>;\n }\n\n public onOkClick(): void {\n if (this.effectiveLoading()) {\n return;\n }\n this.zOk.emit();\n }\n\n public onCloseClick(): void {\n this.zCancel.emit();\n if (this.isTemplateMode() && !this.effectiveLoading()) {\n this._closeWithAnimation();\n }\n }\n\n public onBackdropClick(): void {\n if (this.zMaskClosable() && !this.effectiveLoading()) {\n this._closeWithAnimation();\n }\n }\n\n public open(): void {\n this.isLeaving.set(false);\n this.zVisible.set(true);\n }\n\n public close(): void {\n this._closeWithAnimation();\n }\n\n private _createOverlay(): OverlayRef | null {\n if (!isPlatformBrowser(this._platformId)) {\n return null;\n }\n\n const overlayType = getOverlayType();\n const backdropClass = overlayType === 'blur' ? 'z-modal-backdrop-blur' : 'z-modal-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: this._overlay.scrollStrategies.block(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _openTemplateOverlay(): void {\n if (this._templateOverlayRef) {\n return;\n }\n\n const dummyRef = this.dummyTemplateRef();\n if (!dummyRef) {\n return;\n }\n\n this._templateOverlayRef = this._createOverlay();\n if (!this._templateOverlayRef) {\n return;\n }\n\n const hostElement = this._host.nativeElement;\n this._originalParent = hostElement.parentElement;\n this._originalNextSibling = hostElement.nextSibling;\n\n const portal = new TemplatePortal(dummyRef, this._viewContainerRef);\n this._templateOverlayRef.attach(portal);\n\n const overlayPane = this._templateOverlayRef.overlayElement;\n overlayPane.style.position = 'static';\n overlayPane.appendChild(hostElement);\n\n this._backdropSubscription = this._templateOverlayRef.backdropClick().subscribe(() => {\n this.onBackdropClick();\n });\n }\n\n private _closeWithAnimation(): void {\n if (this.isLeaving()) {\n return;\n }\n\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('modal-leave');\n\n setTimeout(() => {\n this.isLeaving.set(false);\n this._disposeTemplateOverlay();\n }, Z_MODAL_ANIMATION_DURATION);\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('modal-leave');\n if (this._templateOverlayRef) {\n this._templateOverlayRef.dispose();\n this._templateOverlayRef = null;\n }\n\n this._originalParent = null;\n this._originalNextSibling = null;\n\n if (this._backdropSubscription) {\n this._backdropSubscription.unsubscribe();\n this._backdropSubscription = null;\n }\n }\n}\n","<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\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-modal-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-modal-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ description }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar class=\"z-modal-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n <!-- Confirm Modal Layout (no skeleton) -->\n @if (isConfirmMode()) {\n <div class=\"flex flex-col items-center px-4 pt-2 text-center\">\n @if (config.zConfirmIcon) {\n <div class=\"relative mb-4 flex size-20 items-center justify-center\">\n <div class=\"absolute inset-0 rounded-full\" [class]=\"confirmIconColors().ring\"></div>\n <div class=\"relative flex size-14 items-center justify-center rounded-full\" [class]=\"confirmIconColors().bg\">\n <z-icon [zType]=\"config.zConfirmIcon\" zSize=\"30\" [zStrokeWidth]=\"2.6\" [class]=\"confirmIconColors().icon\" />\n </div>\n </div>\n }\n\n <!-- Title centered -->\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-modal-title\"\n class=\"m-0 text-lg leading-snug font-semibold\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4 data-testid=\"z-modal-title\" class=\"m-0 text-lg leading-snug font-semibold\">\n {{ title }}\n </h4>\n }\n }\n }\n\n <!-- Description centered -->\n @if (config.zContent; as content) {\n <p\n data-testid=\"z-modal-description\"\n class=\"text-muted-foreground m-0 mt-2 text-sm\"\n [innerHTML]=\"$any(content) | zSafeHtml\"></p>\n }\n </div>\n\n <!-- Footer centered -->\n @if (!effectiveHideFooter()) {\n <footer class=\"mt-4 flex flex-row justify-center gap-3 pb-2\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-ok-button\"\n z-button\n [zType]=\"effectiveTypeOk()\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? ('i18n_z_ui_common_ok' | translate) }}\n </button>\n }\n </footer>\n }\n } @else {\n <!-- Normal Modal Layout with defer -->\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\n </h4>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar class=\"z-modal-scrollbar flex-1\" #mainContent track=\"vertical\" (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-modal-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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-modal-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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { isPlatformBrowser } from '@angular/common';\nimport { EventEmitter, Inject, PLATFORM_ID, signal } from '@angular/core';\nimport { filter, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ZModalComponent } from './z-modal.component';\nimport { Z_MODAL_ANIMATION_DURATION, ZModalOptions, ZModalTriggerAction } from './z-modal.types';\n\nexport class ZModalRef<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\n public constructor(\n private readonly _overlayRef: OverlayRef,\n private readonly _config: ZModalOptions<T, U>,\n private readonly _containerInstance: ZModalComponent<T, U>,\n @Inject(PLATFORM_ID) private readonly _platformId: object\n ) {\n this._containerInstance.zCancel.subscribe(() => this._trigger(ZModalTriggerAction.CANCEL));\n this._containerInstance.zOk.subscribe(() => this._trigger(ZModalTriggerAction.OK));\n\n if ((this._config.zMaskClosable ?? true) && isPlatformBrowser(this._platformId)) {\n this._overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (!this.loading()) {\n this.close();\n }\n });\n }\n\n if (isPlatformBrowser(this._platformId)) {\n fromEvent<KeyboardEvent>(document, 'keydown')\n .pipe(\n filter(event => event.key === 'Escape'),\n takeUntil(this._destroy$)\n )\n .subscribe(() => {\n if (!this.loading()) {\n this.close();\n }\n });\n }\n }\n\n public setLoading(value: boolean): void {\n this.loading.set(value);\n }\n\n public close(result?: R): void {\n if (this._isClosing) {\n return;\n }\n\n this._isClosing = true;\n this._result = result;\n\n if (isPlatformBrowser(this._platformId)) {\n const hostElement = this._containerInstance.getNativeElement();\n hostElement.classList.add('modal-leave');\n const { backdropElement } = this._overlayRef;\n if (backdropElement) {\n backdropElement.classList.add('z-backdrop-leaving');\n }\n }\n\n setTimeout(() => {\n if (this._overlayRef) {\n if (this._overlayRef.hasAttached()) {\n this._overlayRef.detachBackdrop();\n }\n this._overlayRef.dispose();\n }\n\n if (!this._destroy$.closed) {\n this._destroy$.next();\n this._destroy$.complete();\n }\n }, Z_MODAL_ANIMATION_DURATION);\n }\n\n private _trigger(action: ZModalTriggerAction): void {\n if (this.loading()) {\n return;\n }\n\n const trigger = {\n ok: this._config.zOnOk,\n cancel: this._config.zOnCancel,\n }[action];\n\n if (trigger instanceof EventEmitter) {\n trigger.emit(this._getContentComponent());\n return;\n }\n\n if (typeof trigger === 'function') {\n const result = trigger(this._getContentComponent(), this) as R;\n this._closeWithResult(result);\n return;\n }\n\n this.close();\n }\n\n private _getContentComponent(): T {\n return this.componentInstance as T;\n }\n\n private _closeWithResult(result: R): void {\n if (result !== false) {\n this.close(result);\n }\n }\n}\n","import { type ComponentType, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, Injector, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { ZTranslateService } from '@shival99/z-ui/services';\nimport { ZModalComponent } from './z-modal.component';\nimport { ZModalRef } from './z-modal.ref';\nimport {\n Z_MODAL_DATA,\n ZModalConfirmOptions,\n ZModalConfirmType,\n ZModalContentType,\n ZModalOptions,\n} from './z-modal.types';\nimport { getOverlayType, Z_MODAL_CONFIRM_CONFIG } from './z-modal.utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZModalService {\n private readonly _overlay = inject(Overlay);\n private readonly _injector = inject(Injector);\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _zTranslate = inject(ZTranslateService);\n\n public create<T, U>(config: ZModalOptions<T, U>): ZModalRef<T> {\n return this._open<T, U>(config.zContent as ComponentType<T>, config);\n }\n\n public show<U = unknown>(options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n return this._confirmModal('show', options);\n }\n\n public info<U = unknown>(options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n return this._confirmModal('info', options);\n }\n\n public warning<U = unknown>(options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n return this._confirmModal('warning', options);\n }\n\n public danger<U = unknown>(options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n return this._confirmModal('danger', options);\n }\n\n private _confirmModal<U>(type: ZModalConfirmType, options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n const typeConfig = Z_MODAL_CONFIRM_CONFIG[type];\n this._zTranslate.currentLang();\n\n const config: ZModalOptions<unknown, U> = {\n zTitle: options.zTitle,\n zContent: options.zContent,\n zOkText: options.zOkText ?? this._zTranslate.instant('i18n_z_ui_modal_confirm'),\n zCancelText: options.zCancelText ?? this._zTranslate.instant('i18n_z_ui_modal_cancel'),\n zOkDestructive: typeConfig.okDestructive,\n zConfirmIcon: options.zIcon ?? typeConfig.icon,\n zMaskClosable: options.zMaskClosable ?? true,\n zWidth: options.zWidth ?? '500px',\n zConfirmType: type,\n zData: options.zData,\n zOnOk: () => options.zOnOk?.(),\n zOnCancel: () => {\n options.zOnCancel?.();\n },\n };\n\n return this.create(config);\n }\n\n private _open<T, U>(componentOrTemplateRef: ZModalContentType<T>, config: ZModalOptions<T, U>) {\n const overlayRef = this._createOverlay(config);\n\n if (!overlayRef) {\n return new ZModalRef(\n undefined as unknown as OverlayRef,\n config,\n undefined as unknown as ZModalComponent<T, U>,\n this._platformId\n );\n }\n\n const modalContainer = this._attachModalContainer<T, U>(overlayRef, config);\n const modalRef = this._attachModalContent<T, U>(componentOrTemplateRef, modalContainer, overlayRef, config);\n\n return modalRef;\n }\n\n private _createOverlay<T, U>(config: ZModalOptions<T, U>): OverlayRef | undefined {\n if (!isPlatformBrowser(this._platformId)) {\n return undefined;\n }\n\n const overlayType = config.zOverlay ?? getOverlayType();\n const backdropClass = overlayType === 'blur' ? 'z-modal-backdrop-blur' : 'z-modal-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _attachModalContainer<T, U>(overlayRef: OverlayRef, config: ZModalOptions<T, U>) {\n const injector = Injector.create({\n parent: this._injector,\n providers: [\n { provide: OverlayRef, useValue: overlayRef },\n { provide: ZModalOptions, useValue: config },\n ],\n });\n\n const containerPortal = new ComponentPortal<ZModalComponent<T, U>>(\n ZModalComponent,\n config.zViewContainerRef,\n injector\n );\n const containerRef = overlayRef.attach<ZModalComponent<T, U>>(containerPortal);\n\n return containerRef.instance;\n }\n\n private _attachModalContent<T, U>(\n componentOrTemplateRef: ZModalContentType<T>,\n modalContainer: ZModalComponent<T, U>,\n overlayRef: OverlayRef,\n config: ZModalOptions<T, U>\n ) {\n const modalRef = new ZModalRef<T>(overlayRef, config, modalContainer, this._platformId);\n modalContainer.modalRef = modalRef;\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n modalContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null as unknown as ViewContainerRef, { modalRef } as T)\n );\n return modalRef;\n }\n\n if (typeof componentOrTemplateRef !== 'string') {\n const injector = this._createInjector<T, U>(modalRef, config);\n const contentRef = modalContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, config.zViewContainerRef, injector)\n );\n\n if (contentRef) {\n modalRef.componentInstance = contentRef.instance;\n }\n }\n\n return modalRef;\n }\n\n private _createInjector<T, U>(modalRef: ZModalRef<T>, config: ZModalOptions<T, U>) {\n return Injector.create({\n parent: this._injector,\n providers: [\n { provide: ZModalRef, useValue: modalRef },\n { provide: Z_MODAL_DATA, useValue: config.zData },\n ],\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAM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Q,EAAE;gBAC1C,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,EAAE;AAClD,aAAA;AACF,SAAA,CAAC;IACJ;uGA7IW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AClBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shival99-z-ui-components-z-modal.mjs","sources":["../../../../libs/core-ui/components/z-modal/directives/z-modal-content.directive.ts","../../../../libs/core-ui/components/z-modal/directives/z-modal-footer.directive.ts","../../../../libs/core-ui/components/z-modal/directives/z-modal-header.directive.ts","../../../../libs/core-ui/components/z-modal/z-modal.types.ts","../../../../libs/core-ui/components/z-modal/z-modal.utils.ts","../../../../libs/core-ui/components/z-modal/z-modal.variants.ts","../../../../libs/core-ui/components/z-modal/z-modal.component.ts","../../../../libs/core-ui/components/z-modal/z-modal.component.html","../../../../libs/core-ui/components/z-modal/z-modal.ref.ts","../../../../libs/core-ui/components/z-modal/z-modal.service.ts","../../../../libs/core-ui/components/z-modal/shival99-z-ui-components-z-modal.ts"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-modal-content], [zModalContent]',\n standalone: true,\n})\nexport class ZModalContentDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-modal-footer], [zModalFooter]',\n standalone: true,\n})\nexport class ZModalFooterDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\n\n@Directive({\n selector: '[z-modal-header], [zModalHeader]',\n standalone: true,\n})\nexport class ZModalHeaderDirective {\n public readonly templateRef = inject(TemplateRef<unknown>);\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { type ComponentType } from '@angular/cdk/overlay';\nimport {\n type EventEmitter,\n InjectionToken,\n type TemplateRef,\n type Type,\n type ViewContainerRef,\n type WritableSignal,\n} from '@angular/core';\nimport type { ZIcon } from '@shival99/z-ui/components/z-icon';\nimport type { ClassValue } from 'clsx';\nimport type { Observable } from 'rxjs';\n\nexport type ZModalContentType<T> = ComponentType<T> | TemplateRef<T> | string;\nexport const Z_MODAL_DATA = new InjectionToken<any>('Z_MODAL_DATA');\nexport const Z_MODAL_ANIMATION_DURATION = 200;\nexport enum ZModalTriggerAction {\n CANCEL = 'cancel',\n OK = 'ok',\n}\n\nexport type ZModalOnClickCallBack<T> = (instance: T, modalRef?: unknown) => false | void | object;\nexport type ZModalConfirmType = 'show' | 'info' | 'warning' | 'danger';\n\nconst noopFun = (): void => {};\n\n/**\n * Configuration options for z-modal component.\n *\n * @template T - The type of the content component\n * @template U - The type of the data passed to the modal\n */\nexport class ZModalOptions<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 modal is closable (shows close button) */\n public zClosable?: boolean;\n /** Confirm type for preset styling (show, info, warning, danger) */\n public zConfirmType?: 'show' | 'info' | 'warning' | 'danger';\n /** Icon for the confirm modal */\n public zConfirmIcon?: ZIcon;\n /** Modal content - can be a component, template, or string */\n public zContent?: string | TemplateRef<T> | Type<T>;\n /** Custom CSS classes for the modal */\n public class?: ClassValue;\n /** Data to be passed to the content component via Z_MODAL_DATA token */\n public zData?: U;\n /**\n * Observable for deferred data loading before showing modal content.\n * Modal will show a loading spinner until the Observable completes.\n * The resolved data will be available via Z_MODAL_DATA.\n *\n * @example\n * ```typescript\n * this.modalService.create({\n * zDefer: this.userService.getUser(userId),\n * zContent: UserFormComponent,\n * });\n * ```\n */\n public zDefer?: Observable<U>;\n /** Description text shown below the title */\n public zDescription?: string;\n /** Whether to hide the default footer */\n public zHideFooter?: boolean;\n /**\n * WritableSignal to control loading state of the OK button.\n * Use this when submitting forms or calling APIs.\n *\n * @example Using with confirm modal (delete action)\n * ```typescript\n * const modalRef = this.modalService.danger({\n * zTitle: 'Delete Item',\n * zContent: 'Are you sure you want to delete this item?',\n * zOkText: 'Delete',\n * zOnOk: () => {\n * modalRef.setLoading(true);\n * this.api.delete(itemId).subscribe({\n * next: () => {\n * modalRef.setLoading(false);\n * modalRef.close();\n * },\n * error: () => modalRef.setLoading(false),\n * });\n * return false; // Prevent auto-close\n * },\n * });\n * ```\n */\n public readonly zLoading?: WritableSignal<boolean>;\n /** Whether clicking mask closes the modal */\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> | ZModalOnClickCallBack<T> = noopFun;\n /** Callback or EventEmitter when OK is clicked */\n public zOnOk?: EventEmitter<T> | ZModalOnClickCallBack<T> = noopFun;\n /** Modal title - supports string, HTML string, or TemplateRef */\n public zTitle?: string | TemplateRef<T>;\n /** ViewContainerRef for the modal portal */\n public zViewContainerRef?: ViewContainerRef;\n /** Modal width (e.g., '425px', '80%') */\n public zWidth?: string;\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 */\n public zSkeletonRows?: number;\n}\n\nexport interface ZModalConfirmOptions<U = unknown> {\n zTitle: string;\n zContent?: string;\n zIcon?: ZIcon;\n zOkText?: string;\n zCancelText?: string | null;\n /** Callback when OK is clicked. Return false to prevent auto-close */\n zOnOk?: () => void | false | Promise<void>;\n zOnCancel?: () => void;\n zMaskClosable?: boolean;\n zWidth?: string;\n zData?: U;\n}\n\nexport interface ZModalConfirmIconColors {\n ring: string;\n bg: string;\n icon: string;\n}\n\nexport interface ZModalConfirmConfig {\n icon: ZIcon;\n okDestructive?: boolean;\n colors: ZModalConfirmIconColors;\n}\n","import { zDetectBrowser } from '@shival99/z-ui/utils';\nimport type { ZModalConfirmConfig, ZModalConfirmType } from './z-modal.types';\n\nexport type ZModalOverlayType = 'dark' | 'blur';\nexport const getOverlayType = (): ZModalOverlayType => {\n const browser = zDetectBrowser();\n return browser.name === 'Chrome' ? 'dark' : 'blur';\n};\n\nexport const Z_MODAL_CONFIRM_CONFIG: Record<ZModalConfirmType, ZModalConfirmConfig> = {\n show: {\n icon: 'lucideMessageCircleQuestion',\n colors: {\n ring: 'bg-gray-500/10',\n bg: 'bg-gray-500/15',\n icon: 'text-gray-600!',\n },\n },\n info: {\n icon: 'lucideInfo',\n colors: {\n ring: 'bg-blue-500/10',\n bg: 'bg-blue-500/15',\n icon: 'text-blue-500!',\n },\n },\n warning: {\n icon: 'lucideTriangleAlert',\n colors: {\n ring: 'bg-amber-500/10',\n bg: 'bg-amber-500/15',\n icon: 'text-amber-500!',\n },\n },\n danger: {\n icon: 'lucideX',\n okDestructive: true,\n colors: {\n ring: 'bg-red-500/10',\n bg: 'bg-red-500/15',\n icon: 'text-red-500!',\n },\n },\n};\n","import { cva } from 'class-variance-authority';\n\nexport const zModalVariants = cva(\n [\n 'fixed left-[50%] top-[50%] z-50 flex flex-col w-full translate-x-[-50%]',\n 'translate-y-[-50%] border bg-background py-4 shadow-lg rounded-lg',\n 'max-w-[calc(100%-2rem)] overflow-hidden',\n 'max-h-[80dvh]',\n ].join(' ')\n);\n","import { Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport {\n BasePortalOutlet,\n CdkPortalOutlet,\n type ComponentPortal,\n PortalModule,\n TemplatePortal,\n} from '@angular/cdk/portal';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n type ComponentRef,\n computed,\n contentChild,\n effect,\n ElementRef,\n type EmbeddedViewRef,\n inject,\n input,\n model,\n OnDestroy,\n output,\n PLATFORM_ID,\n signal,\n type TemplateRef,\n viewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { ZButtonComponent, ZButtonVariants } from '@shival99/z-ui/components/z-button';\nimport { ZIconComponent } from '@shival99/z-ui/components/z-icon';\nimport { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';\nimport { ZTooltipDirective } from '@shival99/z-ui/components/z-tooltip';\nimport { ZContentTypePipe, ZSafeHtmlPipe } from '@shival99/z-ui/pipes';\nimport { zMergeClasses } from '@shival99/z-ui/utils';\nimport type { ClassValue } from 'clsx';\nimport { NgScrollbar } from 'ngx-scrollbar';\nimport { Subscription } from 'rxjs';\nimport { ZModalContentDirective } from './directives/z-modal-content.directive';\nimport { ZModalFooterDirective } from './directives/z-modal-footer.directive';\nimport { ZModalHeaderDirective } from './directives/z-modal-header.directive';\nimport { ZModalRef } from './z-modal.ref';\nimport { Z_MODAL_ANIMATION_DURATION, ZModalOptions } from './z-modal.types';\nimport { getOverlayType, Z_MODAL_CONFIRM_CONFIG } from './z-modal.utils';\nimport { zModalVariants } from './z-modal.variants';\n\n@Component({\n selector: 'z-modal',\n imports: [\n PortalModule,\n NgTemplateOutlet,\n ZButtonComponent,\n ZIconComponent,\n ZContentTypePipe,\n ZTooltipDirective,\n ZSkeletonComponent,\n NgScrollbar,\n ZSafeHtmlPipe,\n TranslatePipe,\n CdkScrollable,\n ],\n standalone: true,\n templateUrl: './z-modal.component.html',\n styleUrl: './z-modal.component.scss',\n providers: [TranslatePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'hostClasses()',\n '[style.width]': 'effectiveWidth()',\n },\n exportAs: 'zModal',\n})\nexport class ZModalComponent<T, U> extends BasePortalOutlet implements OnDestroy, AfterViewChecked {\n public zOk = output<void>();\n public zCancel = output<void>();\n public readonly zScrollbar = output<NgScrollbar>();\n\n public readonly class = 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>('500px');\n public readonly zClosable = input<boolean>(true);\n public readonly zMaskClosable = input<boolean>(true);\n public readonly zHideFooter = 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 zContentLoading = input<boolean>(false);\n public readonly zSkeletonRows = input<number>(3);\n public readonly zOverlay = input<'dark' | 'blur'>(getOverlayType());\n\n protected readonly customHeader = contentChild(ZModalHeaderDirective);\n protected readonly customContent = contentChild(ZModalContentDirective);\n protected readonly customFooter = contentChild(ZModalFooterDirective);\n\n public modalRef?: ZModalRef<T>;\n public readonly portalOutlet = viewChild(CdkPortalOutlet);\n protected readonly dummyTemplateRef = viewChild<TemplateRef<unknown>>('dummyTemplate');\n protected readonly mainContentRef = viewChild<NgScrollbar>('mainContent');\n\n protected readonly config = inject(ZModalOptions<T, U>, { optional: true }) || new ZModalOptions<T, U>();\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _host = inject(ElementRef<HTMLElement>);\n private readonly _overlay = inject(Overlay);\n private readonly _viewContainerRef = inject(ViewContainerRef);\n private readonly _cdr = inject(ChangeDetectorRef);\n\n private _templateOverlayRef: OverlayRef | null = null;\n private _originalParent: HTMLElement | null = null;\n private _originalNextSibling: Node | null = null;\n private _backdropSubscription: Subscription | null = null;\n\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.modalRef);\n protected readonly isTemplateMode = computed(() => !this.isServiceMode());\n protected readonly isConfirmMode = computed(() => !!this.config.zConfirmType);\n protected readonly shouldRenderContent = computed(() => this.zVisible() || this.isLeaving());\n protected readonly isStringContent = computed(\n () => typeof this.config.zContent === 'string' && !this.isConfirmMode()\n );\n\n protected readonly shouldShowShadow = computed(() => true);\n\n private _lastScrollHeight = 0;\n\n public ngAfterViewChecked(): void {\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 confirmIconColors = computed(() => {\n const type = this.config.zConfirmType ?? 'show';\n return Z_MODAL_CONFIRM_CONFIG[type].colors;\n });\n\n protected readonly effectiveTitle = computed(() => (this.isServiceMode() ? this.config.zTitle : this.zTitle()));\n\n protected readonly effectiveDescription = computed(() =>\n this.isServiceMode() ? this.config.zDescription : this.zDescription()\n );\n\n protected readonly effectiveClosable = computed(() =>\n this.isServiceMode() ? (this.config.zClosable ?? true) : this.zClosable()\n );\n\n protected readonly effectiveHideFooter = computed(() =>\n this.isServiceMode() ? this.config.zHideFooter : this.zHideFooter()\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 effectiveTypeOk = computed((): ZButtonVariants['zType'] => {\n if (!this.isServiceMode()) {\n return 'default';\n }\n\n const typeMap: Record<string, ZButtonVariants['zType']> = {\n show: 'default',\n info: 'info',\n warning: 'warning',\n danger: 'error',\n };\n\n const confirmType = this.config.zConfirmType;\n return confirmType ? (typeMap[confirmType] ?? 'default') : 'default';\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.modalRef?.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()) {\n return this.config.zSkeletonRows ?? 3;\n }\n return this.zSkeletonRows();\n });\n\n protected readonly effectiveWidth = computed(() => {\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 isDeferLoading = computed(() => {\n if (!this.isServiceMode()) {\n return false;\n }\n return !!this.config.zDefer && !this.portalOutlet()?.hasAttached();\n });\n\n protected readonly classes = computed(() =>\n zMergeClasses(zModalVariants(), this.isServiceMode() ? this.config.class : this.class())\n );\n\n protected readonly hostClasses = computed(() => {\n const baseClasses = this.classes();\n if (this.isServiceMode()) {\n return `${baseClasses} z-modal-service-mode`.trim();\n }\n if (this.shouldRenderContent()) {\n return `${baseClasses} z-modal-template-mode`.trim();\n }\n return 'z-modal-template-host';\n });\n\n constructor() {\n super();\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._disposeTemplateOverlay();\n }\n\n public getNativeElement(): HTMLElement {\n return this._host.nativeElement;\n }\n\n public attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\n this._cdr.detectChanges();\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach modal content after content is already attached');\n }\n return outlet?.attachComponentPortal(portal) as ComponentRef<T>;\n }\n\n public attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\n const outlet = this.portalOutlet();\n if (outlet?.hasAttached()) {\n throw new Error('Attempting to attach modal content after content is already attached');\n }\n return outlet?.attachTemplatePortal(portal) as EmbeddedViewRef<C>;\n }\n\n public onOkClick(): void {\n if (this.effectiveLoading()) {\n return;\n }\n this.zOk.emit();\n }\n\n public onCloseClick(): void {\n this.zCancel.emit();\n if (this.isTemplateMode() && !this.effectiveLoading()) {\n this._closeWithAnimation();\n }\n }\n\n public onBackdropClick(): void {\n if (this.zMaskClosable() && !this.effectiveLoading()) {\n this._closeWithAnimation();\n }\n }\n\n public open(): void {\n this.isLeaving.set(false);\n this.zVisible.set(true);\n }\n\n public close(): void {\n this._closeWithAnimation();\n }\n\n private _createOverlay(): OverlayRef | null {\n if (!isPlatformBrowser(this._platformId)) {\n return null;\n }\n\n const overlayType = getOverlayType();\n const backdropClass = overlayType === 'blur' ? 'z-modal-backdrop-blur' : 'z-modal-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n scrollStrategy: this._overlay.scrollStrategies.block(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _openTemplateOverlay(): void {\n if (this._templateOverlayRef) {\n return;\n }\n\n const dummyRef = this.dummyTemplateRef();\n if (!dummyRef) {\n return;\n }\n\n this._templateOverlayRef = this._createOverlay();\n if (!this._templateOverlayRef) {\n return;\n }\n\n const hostElement = this._host.nativeElement;\n this._originalParent = hostElement.parentElement;\n this._originalNextSibling = hostElement.nextSibling;\n\n const portal = new TemplatePortal(dummyRef, this._viewContainerRef);\n this._templateOverlayRef.attach(portal);\n\n const overlayPane = this._templateOverlayRef.overlayElement;\n overlayPane.style.position = 'static';\n overlayPane.appendChild(hostElement);\n\n this._backdropSubscription = this._templateOverlayRef.backdropClick().subscribe(() => {\n this.onBackdropClick();\n });\n }\n\n private _closeWithAnimation(): void {\n if (this.isLeaving()) {\n return;\n }\n\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('modal-leave');\n\n setTimeout(() => {\n this.isLeaving.set(false);\n this._disposeTemplateOverlay();\n }, Z_MODAL_ANIMATION_DURATION);\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('modal-leave');\n if (this._templateOverlayRef) {\n this._templateOverlayRef.dispose();\n this._templateOverlayRef = null;\n }\n\n this._originalParent = null;\n this._originalNextSibling = null;\n\n if (this._backdropSubscription) {\n this._backdropSubscription.unsubscribe();\n this._backdropSubscription = null;\n }\n }\n}\n","<!-- Dummy template to trigger CDK backdrop creation -->\n<ng-template #dummyTemplate />\n\n<!-- Template mode content (rendered in host element, which is moved to overlay) -->\n@if (isTemplateMode() && shouldRenderContent()) {\n @defer (when !effectiveContentLoading()) {\n @if (customHeader(); as headerDir) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\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-modal-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-modal-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ description }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar\n class=\"z-modal-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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 [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n <!-- Confirm Modal Layout (no skeleton) -->\n @if (isConfirmMode()) {\n <div class=\"flex flex-col items-center px-4 pt-2 text-center\">\n @if (config.zConfirmIcon) {\n <div class=\"relative mb-4 flex size-20 items-center justify-center\">\n <div class=\"absolute inset-0 rounded-full\" [class]=\"confirmIconColors().ring\"></div>\n <div class=\"relative flex size-14 items-center justify-center rounded-full\" [class]=\"confirmIconColors().bg\">\n <z-icon [zType]=\"config.zConfirmIcon\" zSize=\"30\" [zStrokeWidth]=\"2.6\" [class]=\"confirmIconColors().icon\" />\n </div>\n </div>\n }\n\n <!-- Title centered -->\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-modal-title\"\n class=\"m-0 text-lg leading-snug font-semibold\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4 data-testid=\"z-modal-title\" class=\"m-0 text-lg leading-snug font-semibold\">\n {{ title }}\n </h4>\n }\n }\n }\n\n <!-- Description centered -->\n @if (config.zContent; as content) {\n <p\n data-testid=\"z-modal-description\"\n class=\"text-muted-foreground m-0 mt-2 text-sm\"\n [innerHTML]=\"$any(content) | zSafeHtml\"></p>\n }\n </div>\n\n <!-- Footer centered -->\n @if (!effectiveHideFooter()) {\n <footer class=\"mt-4 flex flex-row justify-center gap-3 pb-2\">\n @if (effectiveCancelText() !== null) {\n <button type=\"button\" data-testid=\"z-modal-cancel-button\" z-button zType=\"outline\" (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-modal-ok-button\"\n z-button\n [zType]=\"effectiveTypeOk()\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? ('i18n_z_ui_common_ok' | translate) }}\n </button>\n }\n </footer>\n }\n } @else {\n <!-- Normal Modal Layout with defer -->\n @defer (when !effectiveContentLoading()) {\n @if (effectiveTitle()) {\n <header [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex w-full items-start justify-between overflow-hidden px-4\">\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-modal-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-modal-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\">\n {{ title }}\n </h4>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-modal-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 [class.z-modal-header-shadow]=\"shouldShowShadow()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-modal-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 <ng-scrollbar\n class=\"z-modal-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main class=\"flex min-h-0 flex-col gap-4 px-4 py-4\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-modal-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer [class.z-modal-footer-shadow]=\"shouldShowShadow()\">\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-modal-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-modal-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 h-[200px] flex-col gap-4 px-4\">\n <z-skeleton [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { OverlayRef } from '@angular/cdk/overlay';\nimport { isPlatformBrowser } from '@angular/common';\nimport { EventEmitter, Inject, PLATFORM_ID, signal } from '@angular/core';\nimport { filter, fromEvent, Subject, takeUntil } from 'rxjs';\nimport { ZModalComponent } from './z-modal.component';\nimport { Z_MODAL_ANIMATION_DURATION, ZModalOptions, ZModalTriggerAction } from './z-modal.types';\n\nexport class ZModalRef<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\n public constructor(\n private readonly _overlayRef: OverlayRef,\n private readonly _config: ZModalOptions<T, U>,\n private readonly _containerInstance: ZModalComponent<T, U>,\n @Inject(PLATFORM_ID) private readonly _platformId: object\n ) {\n this._containerInstance.zCancel.subscribe(() => this._trigger(ZModalTriggerAction.CANCEL));\n this._containerInstance.zOk.subscribe(() => this._trigger(ZModalTriggerAction.OK));\n\n if ((this._config.zMaskClosable ?? true) && isPlatformBrowser(this._platformId)) {\n this._overlayRef\n .outsidePointerEvents()\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n if (!this.loading()) {\n this.close();\n }\n });\n }\n\n if (isPlatformBrowser(this._platformId)) {\n fromEvent<KeyboardEvent>(document, 'keydown')\n .pipe(\n filter(event => event.key === 'Escape'),\n takeUntil(this._destroy$)\n )\n .subscribe(() => {\n if (!this.loading()) {\n this.close();\n }\n });\n }\n }\n\n public setLoading(value: boolean): void {\n this.loading.set(value);\n }\n\n public close(result?: R): void {\n if (this._isClosing) {\n return;\n }\n\n this._isClosing = true;\n this._result = result;\n\n if (isPlatformBrowser(this._platformId)) {\n const hostElement = this._containerInstance.getNativeElement();\n hostElement.classList.add('modal-leave');\n const { backdropElement } = this._overlayRef;\n if (backdropElement) {\n backdropElement.classList.add('z-backdrop-leaving');\n }\n }\n\n setTimeout(() => {\n if (this._overlayRef) {\n if (this._overlayRef.hasAttached()) {\n this._overlayRef.detachBackdrop();\n }\n this._overlayRef.dispose();\n }\n\n if (!this._destroy$.closed) {\n this._destroy$.next();\n this._destroy$.complete();\n }\n }, Z_MODAL_ANIMATION_DURATION);\n }\n\n private _trigger(action: ZModalTriggerAction): void {\n if (this.loading()) {\n return;\n }\n\n const trigger = {\n ok: this._config.zOnOk,\n cancel: this._config.zOnCancel,\n }[action];\n\n if (trigger instanceof EventEmitter) {\n trigger.emit(this._getContentComponent());\n return;\n }\n\n if (typeof trigger === 'function') {\n const result = trigger(this._getContentComponent(), this) as R;\n this._closeWithResult(result);\n return;\n }\n\n this.close();\n }\n\n private _getContentComponent(): T {\n return this.componentInstance as T;\n }\n\n private _closeWithResult(result: R): void {\n if (result !== false) {\n this.close(result);\n }\n }\n}\n","import { type ComponentType, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser } from '@angular/common';\nimport { inject, Injectable, Injector, PLATFORM_ID, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { ZTranslateService } from '@shival99/z-ui/services';\nimport { ZModalComponent } from './z-modal.component';\nimport { ZModalRef } from './z-modal.ref';\nimport {\n Z_MODAL_DATA,\n ZModalConfirmOptions,\n ZModalConfirmType,\n ZModalContentType,\n ZModalOptions,\n} from './z-modal.types';\nimport { getOverlayType, Z_MODAL_CONFIRM_CONFIG } from './z-modal.utils';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ZModalService {\n private readonly _overlay = inject(Overlay);\n private readonly _injector = inject(Injector);\n private readonly _platformId = inject(PLATFORM_ID);\n private readonly _zTranslate = inject(ZTranslateService);\n\n public create<T, U>(config: ZModalOptions<T, U>): ZModalRef<T> {\n return this._open<T, U>(config.zContent as ComponentType<T>, config);\n }\n\n public show<U = unknown>(options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n return this._confirmModal('show', options);\n }\n\n public info<U = unknown>(options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n return this._confirmModal('info', options);\n }\n\n public warning<U = unknown>(options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n return this._confirmModal('warning', options);\n }\n\n public danger<U = unknown>(options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n return this._confirmModal('danger', options);\n }\n\n private _confirmModal<U>(type: ZModalConfirmType, options: ZModalConfirmOptions<U>): ZModalRef<unknown> {\n const typeConfig = Z_MODAL_CONFIRM_CONFIG[type];\n this._zTranslate.currentLang();\n\n const config: ZModalOptions<unknown, U> = {\n zTitle: options.zTitle,\n zContent: options.zContent,\n zOkText: options.zOkText ?? this._zTranslate.instant('i18n_z_ui_modal_confirm'),\n zCancelText: options.zCancelText ?? this._zTranslate.instant('i18n_z_ui_modal_cancel'),\n zOkDestructive: typeConfig.okDestructive,\n zConfirmIcon: options.zIcon ?? typeConfig.icon,\n zMaskClosable: options.zMaskClosable ?? true,\n zWidth: options.zWidth ?? '500px',\n zConfirmType: type,\n zData: options.zData,\n zOnOk: () => options.zOnOk?.(),\n zOnCancel: () => {\n options.zOnCancel?.();\n },\n };\n\n return this.create(config);\n }\n\n private _open<T, U>(componentOrTemplateRef: ZModalContentType<T>, config: ZModalOptions<T, U>) {\n const overlayRef = this._createOverlay(config);\n\n if (!overlayRef) {\n return new ZModalRef(\n undefined as unknown as OverlayRef,\n config,\n undefined as unknown as ZModalComponent<T, U>,\n this._platformId\n );\n }\n\n const modalContainer = this._attachModalContainer<T, U>(overlayRef, config);\n const modalRef = this._attachModalContent<T, U>(componentOrTemplateRef, modalContainer, overlayRef, config);\n\n return modalRef;\n }\n\n private _createOverlay<T, U>(config: ZModalOptions<T, U>): OverlayRef | undefined {\n if (!isPlatformBrowser(this._platformId)) {\n return undefined;\n }\n\n const overlayType = config.zOverlay ?? getOverlayType();\n const backdropClass = overlayType === 'blur' ? 'z-modal-backdrop-blur' : 'z-modal-backdrop-dark';\n const overlayConfig = new OverlayConfig({\n hasBackdrop: true,\n backdropClass,\n positionStrategy: this._overlay.position().global(),\n });\n\n return this._overlay.create(overlayConfig);\n }\n\n private _attachModalContainer<T, U>(overlayRef: OverlayRef, config: ZModalOptions<T, U>) {\n const injector = Injector.create({\n parent: this._injector,\n providers: [\n { provide: OverlayRef, useValue: overlayRef },\n { provide: ZModalOptions, useValue: config },\n ],\n });\n\n const containerPortal = new ComponentPortal<ZModalComponent<T, U>>(\n ZModalComponent,\n config.zViewContainerRef,\n injector\n );\n const containerRef = overlayRef.attach<ZModalComponent<T, U>>(containerPortal);\n\n return containerRef.instance;\n }\n\n private _attachModalContent<T, U>(\n componentOrTemplateRef: ZModalContentType<T>,\n modalContainer: ZModalComponent<T, U>,\n overlayRef: OverlayRef,\n config: ZModalOptions<T, U>\n ) {\n const modalRef = new ZModalRef<T>(overlayRef, config, modalContainer, this._platformId);\n modalContainer.modalRef = modalRef;\n\n if (componentOrTemplateRef instanceof TemplateRef) {\n modalContainer.attachTemplatePortal(\n new TemplatePortal<T>(componentOrTemplateRef, null as unknown as ViewContainerRef, { modalRef } as T)\n );\n return modalRef;\n }\n\n if (typeof componentOrTemplateRef !== 'string') {\n const injector = this._createInjector<T, U>(modalRef, config);\n const contentRef = modalContainer.attachComponentPortal<T>(\n new ComponentPortal(componentOrTemplateRef, config.zViewContainerRef, injector)\n );\n\n if (contentRef) {\n modalRef.componentInstance = contentRef.instance;\n }\n }\n\n return modalRef;\n }\n\n private _createInjector<T, U>(modalRef: ZModalRef<T>, config: ZModalOptions<T, U>) {\n return Injector.create({\n parent: this._injector,\n providers: [\n { provide: ZModalRef, useValue: modalRef },\n { provide: Z_MODAL_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,sBAAsB,CAAA;AACjB,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoB,EAAC;uGAD/C,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oCAAoC;AAC9C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;MCC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AAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AClBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shival99/z-ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Z-UI: Modern Angular UI Component Library - A comprehensive, high-performance design system built with Angular 20+, featuring 40+ customizable components with dark mode, accessibility, and enterprise-ready features.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|