@shival99/z-ui 2.1.32 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/fesm2022/shival99-z-ui-components-z-accordion.mjs +41 -25
  2. package/fesm2022/shival99-z-ui-components-z-accordion.mjs.map +1 -1
  3. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs +176 -97
  4. package/fesm2022/shival99-z-ui-components-z-autocomplete.mjs.map +1 -1
  5. package/fesm2022/shival99-z-ui-components-z-avatar.mjs +71 -40
  6. package/fesm2022/shival99-z-ui-components-z-avatar.mjs.map +1 -1
  7. package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs +26 -15
  8. package/fesm2022/shival99-z-ui-components-z-breadcrumb.mjs.map +1 -1
  9. package/fesm2022/shival99-z-ui-components-z-button-group.mjs +33 -21
  10. package/fesm2022/shival99-z-ui-components-z-button-group.mjs.map +1 -1
  11. package/fesm2022/shival99-z-ui-components-z-button.mjs +32 -19
  12. package/fesm2022/shival99-z-ui-components-z-button.mjs.map +1 -1
  13. package/fesm2022/shival99-z-ui-components-z-calendar.mjs +289 -172
  14. package/fesm2022/shival99-z-ui-components-z-calendar.mjs.map +1 -1
  15. package/fesm2022/shival99-z-ui-components-z-card.mjs +34 -24
  16. package/fesm2022/shival99-z-ui-components-z-card.mjs.map +1 -1
  17. package/fesm2022/shival99-z-ui-components-z-chat.mjs +85 -47
  18. package/fesm2022/shival99-z-ui-components-z-chat.mjs.map +1 -1
  19. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs +56 -31
  20. package/fesm2022/shival99-z-ui-components-z-checkbox.mjs.map +1 -1
  21. package/fesm2022/shival99-z-ui-components-z-code.mjs +29 -16
  22. package/fesm2022/shival99-z-ui-components-z-code.mjs.map +1 -1
  23. package/fesm2022/shival99-z-ui-components-z-command.mjs +34 -19
  24. package/fesm2022/shival99-z-ui-components-z-command.mjs.map +1 -1
  25. package/fesm2022/shival99-z-ui-components-z-drawer.mjs +310 -88
  26. package/fesm2022/shival99-z-ui-components-z-drawer.mjs.map +1 -1
  27. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs +32 -18
  28. package/fesm2022/shival99-z-ui-components-z-dropdown-menu.mjs.map +1 -1
  29. package/fesm2022/shival99-z-ui-components-z-editor.mjs +118 -62
  30. package/fesm2022/shival99-z-ui-components-z-editor.mjs.map +1 -1
  31. package/fesm2022/shival99-z-ui-components-z-empty.mjs +31 -17
  32. package/fesm2022/shival99-z-ui-components-z-empty.mjs.map +1 -1
  33. package/fesm2022/shival99-z-ui-components-z-filter.mjs +81 -54
  34. package/fesm2022/shival99-z-ui-components-z-filter.mjs.map +1 -1
  35. package/fesm2022/shival99-z-ui-components-z-gallery.mjs +240 -132
  36. package/fesm2022/shival99-z-ui-components-z-gallery.mjs.map +1 -1
  37. package/fesm2022/shival99-z-ui-components-z-icon.mjs +39 -21
  38. package/fesm2022/shival99-z-ui-components-z-icon.mjs.map +1 -1
  39. package/fesm2022/shival99-z-ui-components-z-input.mjs +173 -95
  40. package/fesm2022/shival99-z-ui-components-z-input.mjs.map +1 -1
  41. package/fesm2022/shival99-z-ui-components-z-kanban.mjs +88 -47
  42. package/fesm2022/shival99-z-ui-components-z-kanban.mjs.map +1 -1
  43. package/fesm2022/shival99-z-ui-components-z-loading.mjs +31 -19
  44. package/fesm2022/shival99-z-ui-components-z-loading.mjs.map +1 -1
  45. package/fesm2022/shival99-z-ui-components-z-marquee.mjs +42 -23
  46. package/fesm2022/shival99-z-ui-components-z-marquee.mjs.map +1 -1
  47. package/fesm2022/shival99-z-ui-components-z-media-player.mjs +87 -45
  48. package/fesm2022/shival99-z-ui-components-z-media-player.mjs.map +1 -1
  49. package/fesm2022/shival99-z-ui-components-z-menu.mjs +126 -67
  50. package/fesm2022/shival99-z-ui-components-z-menu.mjs.map +1 -1
  51. package/fesm2022/shival99-z-ui-components-z-metric-card.mjs +42 -23
  52. package/fesm2022/shival99-z-ui-components-z-metric-card.mjs.map +1 -1
  53. package/fesm2022/shival99-z-ui-components-z-modal.mjs +144 -80
  54. package/fesm2022/shival99-z-ui-components-z-modal.mjs.map +1 -1
  55. package/fesm2022/shival99-z-ui-components-z-pagination.mjs +45 -24
  56. package/fesm2022/shival99-z-ui-components-z-pagination.mjs.map +1 -1
  57. package/fesm2022/shival99-z-ui-components-z-popover.mjs +90 -57
  58. package/fesm2022/shival99-z-ui-components-z-popover.mjs.map +1 -1
  59. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs +51 -29
  60. package/fesm2022/shival99-z-ui-components-z-qrcode.mjs.map +1 -1
  61. package/fesm2022/shival99-z-ui-components-z-radio.mjs +36 -20
  62. package/fesm2022/shival99-z-ui-components-z-radio.mjs.map +1 -1
  63. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs +27 -15
  64. package/fesm2022/shival99-z-ui-components-z-scrollarea.mjs.map +1 -1
  65. package/fesm2022/shival99-z-ui-components-z-select.mjs +239 -138
  66. package/fesm2022/shival99-z-ui-components-z-select.mjs.map +1 -1
  67. package/fesm2022/shival99-z-ui-components-z-show-more.mjs +38 -21
  68. package/fesm2022/shival99-z-ui-components-z-show-more.mjs.map +1 -1
  69. package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs +42 -23
  70. package/fesm2022/shival99-z-ui-components-z-skeleton-auto.mjs.map +1 -1
  71. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs +35 -19
  72. package/fesm2022/shival99-z-ui-components-z-skeleton.mjs.map +1 -1
  73. package/fesm2022/shival99-z-ui-components-z-steps.mjs +55 -31
  74. package/fesm2022/shival99-z-ui-components-z-steps.mjs.map +1 -1
  75. package/fesm2022/shival99-z-ui-components-z-switch.mjs +60 -33
  76. package/fesm2022/shival99-z-ui-components-z-switch.mjs.map +1 -1
  77. package/fesm2022/shival99-z-ui-components-z-table.mjs +10875 -0
  78. package/fesm2022/shival99-z-ui-components-z-table.mjs.map +1 -0
  79. package/fesm2022/shival99-z-ui-components-z-tabs.mjs +534 -0
  80. package/fesm2022/shival99-z-ui-components-z-tabs.mjs.map +1 -0
  81. package/fesm2022/shival99-z-ui-components-z-tags.mjs +72 -46
  82. package/fesm2022/shival99-z-ui-components-z-tags.mjs.map +1 -1
  83. package/fesm2022/shival99-z-ui-components-z-timeline.mjs +254 -0
  84. package/fesm2022/shival99-z-ui-components-z-timeline.mjs.map +1 -0
  85. package/fesm2022/shival99-z-ui-components-z-toast.mjs +53 -31
  86. package/fesm2022/shival99-z-ui-components-z-toast.mjs.map +1 -1
  87. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs +133 -56
  88. package/fesm2022/shival99-z-ui-components-z-tooltip.mjs.map +1 -1
  89. package/fesm2022/shival99-z-ui-components-z-upload.mjs +63 -36
  90. package/fesm2022/shival99-z-ui-components-z-upload.mjs.map +1 -1
  91. package/fesm2022/shival99-z-ui-i18n.mjs +2 -0
  92. package/fesm2022/shival99-z-ui-i18n.mjs.map +1 -1
  93. package/fesm2022/shival99-z-ui-pipes.mjs +18 -18
  94. package/fesm2022/shival99-z-ui-services.mjs +35 -31
  95. package/fesm2022/shival99-z-ui-services.mjs.map +1 -1
  96. package/package.json +16 -16
  97. package/types/shival99-z-ui-components-z-autocomplete.d.ts +2 -2
  98. package/types/shival99-z-ui-components-z-card.d.ts +1 -2
  99. package/types/shival99-z-ui-components-z-drawer.d.ts +20 -2
  100. package/types/shival99-z-ui-components-z-gallery.d.ts +1 -2
  101. package/types/shival99-z-ui-components-z-select.d.ts +2 -2
  102. package/types/shival99-z-ui-components-z-table.d.ts +2293 -0
  103. package/types/shival99-z-ui-components-z-tabs.d.ts +92 -0
  104. package/types/shival99-z-ui-components-z-timeline.d.ts +71 -0
@@ -3,10 +3,11 @@ import * as i1 from '@angular/cdk/portal';
3
3
  import { BasePortalOutlet, CdkPortalOutlet, TemplatePortal, PortalModule, ComponentPortal } from '@angular/cdk/portal';
4
4
  import { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
5
5
  import * as i0 from '@angular/core';
6
- import { inject, TemplateRef, Directive, InjectionToken, output, input, model, contentChild, viewChild, PLATFORM_ID, ElementRef, ViewContainerRef, ChangeDetectorRef, DestroyRef, signal, computed, effect, ChangeDetectionStrategy, Component, EventEmitter, Inject, Injector, Injectable } from '@angular/core';
6
+ import { inject, TemplateRef, Directive, InjectionToken, output, input, model, booleanAttribute, contentChild, signal, viewChild, PLATFORM_ID, ElementRef, ViewContainerRef, ChangeDetectorRef, DestroyRef, computed, effect, ChangeDetectionStrategy, Component, EventEmitter, Inject, Injector, Injectable } from '@angular/core';
7
7
  import { TranslatePipe } from '@ngx-translate/core';
8
+ import { ZIconComponent } from '@shival99/z-ui/components/z-icon';
8
9
  import { ZSkeletonComponent } from '@shival99/z-ui/components/z-skeleton';
9
- import { ZTranslateService, ZOverlayContainerService, ZOverlayZIndexService } from '@shival99/z-ui/services';
10
+ import { ZTranslateService, ZOverlayContainerService, ZOverlayZIndexService, ZIndexDbService } from '@shival99/z-ui/services';
10
11
  import { zDetectBrowser, zMergeClasses } from '@shival99/z-ui/utils';
11
12
  import { cva } from 'class-variance-authority';
12
13
  import { __decorate, __param, __metadata } from 'tslib';
@@ -14,10 +15,10 @@ import { Subject, takeUntil, fromEvent, filter } from 'rxjs';
14
15
 
15
16
  class ZDrawerContentDirective {
16
17
  templateRef = inject((TemplateRef));
17
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
18
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: ZDrawerContentDirective, isStandalone: true, selector: "[z-drawer-content], [zDrawerContent]", ngImport: i0 });
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
19
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: ZDrawerContentDirective, isStandalone: true, selector: "[z-drawer-content], [zDrawerContent]", ngImport: i0 });
19
20
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerContentDirective, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerContentDirective, decorators: [{
21
22
  type: Directive,
22
23
  args: [{
23
24
  selector: '[z-drawer-content], [zDrawerContent]',
@@ -27,10 +28,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
27
28
 
28
29
  class ZDrawerFooterDirective {
29
30
  templateRef = inject((TemplateRef));
30
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
31
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: ZDrawerFooterDirective, isStandalone: true, selector: "[z-drawer-footer], [zDrawerFooter]", ngImport: i0 });
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
32
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: ZDrawerFooterDirective, isStandalone: true, selector: "[z-drawer-footer], [zDrawerFooter]", ngImport: i0 });
32
33
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerFooterDirective, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerFooterDirective, decorators: [{
34
35
  type: Directive,
35
36
  args: [{
36
37
  selector: '[z-drawer-footer], [zDrawerFooter]',
@@ -40,10 +41,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
40
41
 
41
42
  class ZDrawerHeaderDirective {
42
43
  templateRef = inject((TemplateRef));
43
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
44
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.9", type: ZDrawerHeaderDirective, isStandalone: true, selector: "[z-drawer-header], [zDrawerHeader]", ngImport: i0 });
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
45
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.2", type: ZDrawerHeaderDirective, isStandalone: true, selector: "[z-drawer-header], [zDrawerHeader]", ngImport: i0 });
45
46
  }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerHeaderDirective, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerHeaderDirective, decorators: [{
47
48
  type: Directive,
48
49
  args: [{
49
50
  selector: '[z-drawer-header], [zDrawerHeader]',
@@ -51,6 +52,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
51
52
  }]
52
53
  }] });
53
54
 
55
+ const Z_DRAWER_RESIZE_MIN_SIZE = 240;
56
+ const Z_DRAWER_RESIZE_VIEWPORT_PADDING = 32;
57
+ const Z_DRAWER_RESIZE_KEY_PREFIX = 'z-drawer-resize';
58
+
54
59
  const Z_DRAWER_DATA = new InjectionToken('Z_DRAWER_DATA');
55
60
  const Z_DRAWER_ANIMATION_DURATION = 250;
56
61
  var ZDrawerTriggerAction;
@@ -137,6 +142,8 @@ class ZDrawerOptions {
137
142
  zContentLoading;
138
143
  /** Number of skeleton rows to show when content is loading (default: 5 for left/right, 3 for top/bottom) */
139
144
  zSkeletonRows;
145
+ /** Whether the drawer can be resized from its outer edge */
146
+ zExpand;
140
147
  }
141
148
 
142
149
  const getOverlayType = () => {
@@ -174,38 +181,77 @@ class ZDrawerComponent extends BasePortalOutlet {
174
181
  zOnCancel = output();
175
182
  zAfterClose = output();
176
183
  zScrollbar = output();
177
- class = input('', ...(ngDevMode ? [{ debugName: "class" }] : []));
178
- zBodyClass = input('', ...(ngDevMode ? [{ debugName: "zBodyClass" }] : []));
179
- zVisible = model(false, ...(ngDevMode ? [{ debugName: "zVisible" }] : []));
180
- zTitle = input(...(ngDevMode ? [undefined, { debugName: "zTitle" }] : []));
181
- zDescription = input(...(ngDevMode ? [undefined, { debugName: "zDescription" }] : []));
182
- zWidth = input('400px', ...(ngDevMode ? [{ debugName: "zWidth" }] : []));
183
- zHeight = input('400px', ...(ngDevMode ? [{ debugName: "zHeight" }] : []));
184
- zPlacement = input('right', ...(ngDevMode ? [{ debugName: "zPlacement" }] : []));
185
- zClosable = input(true, ...(ngDevMode ? [{ debugName: "zClosable" }] : []));
186
- zMaskClosable = input(true, ...(ngDevMode ? [{ debugName: "zMaskClosable" }] : []));
187
- zDisableShadow = input(false, ...(ngDevMode ? [{ debugName: "zDisableShadow" }] : []));
188
- zHeaderBorder = input(false, ...(ngDevMode ? [{ debugName: "zHeaderBorder" }] : []));
189
- zFooterBorder = input(false, ...(ngDevMode ? [{ debugName: "zFooterBorder" }] : []));
190
- zHideFooter = input(false, ...(ngDevMode ? [{ debugName: "zHideFooter" }] : []));
191
- zHideHeader = input(false, ...(ngDevMode ? [{ debugName: "zHideHeader" }] : []));
192
- zOkText = input(null, ...(ngDevMode ? [{ debugName: "zOkText" }] : []));
193
- zCancelText = input(null, ...(ngDevMode ? [{ debugName: "zCancelText" }] : []));
194
- zOkDestructive = input(false, ...(ngDevMode ? [{ debugName: "zOkDestructive" }] : []));
195
- zOkDisabled = input(false, ...(ngDevMode ? [{ debugName: "zOkDisabled" }] : []));
196
- zLoading = input(false, ...(ngDevMode ? [{ debugName: "zLoading" }] : []));
197
- zOverlay = input(getOverlayType(), ...(ngDevMode ? [{ debugName: "zOverlay" }] : []));
198
- zShadow = input(false, ...(ngDevMode ? [{ debugName: "zShadow" }] : []));
199
- zShape = input('rounded', ...(ngDevMode ? [{ debugName: "zShape" }] : []));
200
- zContentLoading = input(false, ...(ngDevMode ? [{ debugName: "zContentLoading" }] : []));
201
- zSkeletonRows = input(null, ...(ngDevMode ? [{ debugName: "zSkeletonRows" }] : []));
202
- customHeader = contentChild(ZDrawerHeaderDirective, ...(ngDevMode ? [{ debugName: "customHeader" }] : []));
203
- customContent = contentChild(ZDrawerContentDirective, ...(ngDevMode ? [{ debugName: "customContent" }] : []));
204
- customFooter = contentChild(ZDrawerFooterDirective, ...(ngDevMode ? [{ debugName: "customFooter" }] : []));
205
- drawerRef;
206
- portalOutlet = viewChild(CdkPortalOutlet, ...(ngDevMode ? [{ debugName: "portalOutlet" }] : []));
207
- dummyTemplateRef = viewChild('dummyTemplate', ...(ngDevMode ? [{ debugName: "dummyTemplateRef" }] : []));
208
- mainContentRef = viewChild('mainContent', ...(ngDevMode ? [{ debugName: "mainContentRef" }] : []));
184
+ class = input('', /* @ts-ignore */
185
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
186
+ zBodyClass = input('', /* @ts-ignore */
187
+ ...(ngDevMode ? [{ debugName: "zBodyClass" }] : /* istanbul ignore next */ []));
188
+ zVisible = model(false, /* @ts-ignore */
189
+ ...(ngDevMode ? [{ debugName: "zVisible" }] : /* istanbul ignore next */ []));
190
+ zTitle = input(/* @ts-ignore */
191
+ ...(ngDevMode ? [undefined, { debugName: "zTitle" }] : /* istanbul ignore next */ []));
192
+ zDescription = input(/* @ts-ignore */
193
+ ...(ngDevMode ? [undefined, { debugName: "zDescription" }] : /* istanbul ignore next */ []));
194
+ zWidth = input('400px', /* @ts-ignore */
195
+ ...(ngDevMode ? [{ debugName: "zWidth" }] : /* istanbul ignore next */ []));
196
+ zHeight = input('400px', /* @ts-ignore */
197
+ ...(ngDevMode ? [{ debugName: "zHeight" }] : /* istanbul ignore next */ []));
198
+ zPlacement = input('right', /* @ts-ignore */
199
+ ...(ngDevMode ? [{ debugName: "zPlacement" }] : /* istanbul ignore next */ []));
200
+ zClosable = input(true, /* @ts-ignore */
201
+ ...(ngDevMode ? [{ debugName: "zClosable" }] : /* istanbul ignore next */ []));
202
+ zMaskClosable = input(true, /* @ts-ignore */
203
+ ...(ngDevMode ? [{ debugName: "zMaskClosable" }] : /* istanbul ignore next */ []));
204
+ zDisableShadow = input(false, /* @ts-ignore */
205
+ ...(ngDevMode ? [{ debugName: "zDisableShadow" }] : /* istanbul ignore next */ []));
206
+ zHeaderBorder = input(false, /* @ts-ignore */
207
+ ...(ngDevMode ? [{ debugName: "zHeaderBorder" }] : /* istanbul ignore next */ []));
208
+ zFooterBorder = input(false, /* @ts-ignore */
209
+ ...(ngDevMode ? [{ debugName: "zFooterBorder" }] : /* istanbul ignore next */ []));
210
+ zHideFooter = input(false, /* @ts-ignore */
211
+ ...(ngDevMode ? [{ debugName: "zHideFooter" }] : /* istanbul ignore next */ []));
212
+ zHideHeader = input(false, /* @ts-ignore */
213
+ ...(ngDevMode ? [{ debugName: "zHideHeader" }] : /* istanbul ignore next */ []));
214
+ zOkText = input(null, /* @ts-ignore */
215
+ ...(ngDevMode ? [{ debugName: "zOkText" }] : /* istanbul ignore next */ []));
216
+ zCancelText = input(null, /* @ts-ignore */
217
+ ...(ngDevMode ? [{ debugName: "zCancelText" }] : /* istanbul ignore next */ []));
218
+ zOkDestructive = input(false, /* @ts-ignore */
219
+ ...(ngDevMode ? [{ debugName: "zOkDestructive" }] : /* istanbul ignore next */ []));
220
+ zOkDisabled = input(false, /* @ts-ignore */
221
+ ...(ngDevMode ? [{ debugName: "zOkDisabled" }] : /* istanbul ignore next */ []));
222
+ zLoading = input(false, /* @ts-ignore */
223
+ ...(ngDevMode ? [{ debugName: "zLoading" }] : /* istanbul ignore next */ []));
224
+ zOverlay = input(getOverlayType(), /* @ts-ignore */
225
+ ...(ngDevMode ? [{ debugName: "zOverlay" }] : /* istanbul ignore next */ []));
226
+ zShadow = input(false, /* @ts-ignore */
227
+ ...(ngDevMode ? [{ debugName: "zShadow" }] : /* istanbul ignore next */ []));
228
+ zShape = input('rounded', /* @ts-ignore */
229
+ ...(ngDevMode ? [{ debugName: "zShape" }] : /* istanbul ignore next */ []));
230
+ zContentLoading = input(false, /* @ts-ignore */
231
+ ...(ngDevMode ? [{ debugName: "zContentLoading" }] : /* istanbul ignore next */ []));
232
+ zSkeletonRows = input(null, /* @ts-ignore */
233
+ ...(ngDevMode ? [{ debugName: "zSkeletonRows" }] : /* istanbul ignore next */ []));
234
+ zExpand = input(false, { ...(ngDevMode ? { debugName: "zExpand" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
235
+ customHeader = contentChild(ZDrawerHeaderDirective, /* @ts-ignore */
236
+ ...(ngDevMode ? [{ debugName: "customHeader" }] : /* istanbul ignore next */ []));
237
+ customContent = contentChild(ZDrawerContentDirective, /* @ts-ignore */
238
+ ...(ngDevMode ? [{ debugName: "customContent" }] : /* istanbul ignore next */ []));
239
+ customFooter = contentChild(ZDrawerFooterDirective, /* @ts-ignore */
240
+ ...(ngDevMode ? [{ debugName: "customFooter" }] : /* istanbul ignore next */ []));
241
+ _drawerRef = signal(undefined, /* @ts-ignore */
242
+ ...(ngDevMode ? [{ debugName: "_drawerRef" }] : /* istanbul ignore next */ []));
243
+ get drawerRef() {
244
+ return this._drawerRef();
245
+ }
246
+ set drawerRef(value) {
247
+ this._drawerRef.set(value);
248
+ }
249
+ portalOutlet = viewChild(CdkPortalOutlet, /* @ts-ignore */
250
+ ...(ngDevMode ? [{ debugName: "portalOutlet" }] : /* istanbul ignore next */ []));
251
+ dummyTemplateRef = viewChild('dummyTemplate', /* @ts-ignore */
252
+ ...(ngDevMode ? [{ debugName: "dummyTemplateRef" }] : /* istanbul ignore next */ []));
253
+ mainContentRef = viewChild('mainContent', /* @ts-ignore */
254
+ ...(ngDevMode ? [{ debugName: "mainContentRef" }] : /* istanbul ignore next */ []));
209
255
  config = inject((ZDrawerOptions), { optional: true }) || new ZDrawerOptions();
210
256
  _platformId = inject(PLATFORM_ID);
211
257
  _host = inject((ElementRef));
@@ -216,21 +262,41 @@ class ZDrawerComponent extends BasePortalOutlet {
216
262
  _zTranslate = inject(ZTranslateService);
217
263
  _overlayContainerService = inject(ZOverlayContainerService);
218
264
  _zIndexService = inject(ZOverlayZIndexService);
265
+ _indexDb = inject(ZIndexDbService, { optional: true });
219
266
  _templateOverlayRef = null;
220
267
  _originalParent = null;
221
268
  _originalNextSibling = null;
222
269
  _backdropSubscription = null;
223
270
  _closeTimeout = null;
224
- isLeaving = signal(false, ...(ngDevMode ? [{ debugName: "isLeaving" }] : []));
225
- hasScrollableContent = signal(false, ...(ngDevMode ? [{ debugName: "hasScrollableContent" }] : []));
226
- isScrolledFromTop = signal(false, ...(ngDevMode ? [{ debugName: "isScrolledFromTop" }] : []));
227
- isScrolledToBottom = signal(false, ...(ngDevMode ? [{ debugName: "isScrolledToBottom" }] : []));
228
- isServiceMode = computed(() => !!this.drawerRef, ...(ngDevMode ? [{ debugName: "isServiceMode" }] : []));
229
- isTemplateMode = computed(() => !this.isServiceMode(), ...(ngDevMode ? [{ debugName: "isTemplateMode" }] : []));
230
- shouldRenderContent = computed(() => this.zVisible() || this.isLeaving(), ...(ngDevMode ? [{ debugName: "shouldRenderContent" }] : []));
231
- isStringContent = computed(() => typeof this.config.zContent === 'string', ...(ngDevMode ? [{ debugName: "isStringContent" }] : []));
271
+ _resizeCleanup = null;
272
+ _resizeStorageKey = null;
273
+ isResizing = signal(false, /* @ts-ignore */
274
+ ...(ngDevMode ? [{ debugName: "isResizing" }] : /* istanbul ignore next */ []));
275
+ isLeaving = signal(false, /* @ts-ignore */
276
+ ...(ngDevMode ? [{ debugName: "isLeaving" }] : /* istanbul ignore next */ []));
277
+ hasScrollableContent = signal(false, /* @ts-ignore */
278
+ ...(ngDevMode ? [{ debugName: "hasScrollableContent" }] : /* istanbul ignore next */ []));
279
+ isScrolledFromTop = signal(false, /* @ts-ignore */
280
+ ...(ngDevMode ? [{ debugName: "isScrolledFromTop" }] : /* istanbul ignore next */ []));
281
+ isScrolledToBottom = signal(false, /* @ts-ignore */
282
+ ...(ngDevMode ? [{ debugName: "isScrolledToBottom" }] : /* istanbul ignore next */ []));
283
+ isServiceMode = computed(() => !!this._drawerRef(), /* @ts-ignore */
284
+ ...(ngDevMode ? [{ debugName: "isServiceMode" }] : /* istanbul ignore next */ []));
285
+ isTemplateMode = computed(() => !this.isServiceMode(), /* @ts-ignore */
286
+ ...(ngDevMode ? [{ debugName: "isTemplateMode" }] : /* istanbul ignore next */ []));
287
+ shouldRenderContent = computed(() => this.zVisible() || this.isLeaving(), /* @ts-ignore */
288
+ ...(ngDevMode ? [{ debugName: "shouldRenderContent" }] : /* istanbul ignore next */ []));
289
+ isStringContent = computed(() => typeof this.config.zContent === 'string', /* @ts-ignore */
290
+ ...(ngDevMode ? [{ debugName: "isStringContent" }] : /* istanbul ignore next */ []));
232
291
  _lastScrollHeight = 0;
292
+ _resizedWidth = signal(null, /* @ts-ignore */
293
+ ...(ngDevMode ? [{ debugName: "_resizedWidth" }] : /* istanbul ignore next */ []));
294
+ _resizedHeight = signal(null, /* @ts-ignore */
295
+ ...(ngDevMode ? [{ debugName: "_resizedHeight" }] : /* istanbul ignore next */ []));
233
296
  ngAfterViewChecked() {
297
+ if (this.isServiceMode() && this._resizeStorageKey === null) {
298
+ void this._restoreResize();
299
+ }
234
300
  this._checkScrollState();
235
301
  }
236
302
  _checkScrollState() {
@@ -263,35 +329,54 @@ class ZDrawerComponent extends BasePortalOutlet {
263
329
  effectiveTitle = computed(() => {
264
330
  this._zTranslate.currentLang();
265
331
  return this.isServiceMode() ? this.config.zTitle : this.zTitle();
266
- }, ...(ngDevMode ? [{ debugName: "effectiveTitle" }] : []));
267
- effectiveDescription = computed(() => this.isServiceMode() ? this.config.zDescription : this.zDescription(), ...(ngDevMode ? [{ debugName: "effectiveDescription" }] : []));
268
- hasEffectiveDescription = computed(() => !!this.effectiveDescription(), ...(ngDevMode ? [{ debugName: "hasEffectiveDescription" }] : []));
269
- headerContentClasses = computed(() => zMergeClasses('flex w-full justify-between overflow-hidden px-4', this.hasEffectiveDescription() ? 'items-start' : 'items-center'), ...(ngDevMode ? [{ debugName: "headerContentClasses" }] : []));
270
- effectiveBodyClass = computed(() => this.isServiceMode() ? this.config.zBodyClass : this.zBodyClass(), ...(ngDevMode ? [{ debugName: "effectiveBodyClass" }] : []));
271
- bodyClasses = computed(() => zMergeClasses('flex min-h-0 flex-col gap-4 px-4 py-4', this.effectiveBodyClass()), ...(ngDevMode ? [{ debugName: "bodyClasses" }] : []));
272
- effectiveClosable = computed(() => this.isServiceMode() ? (this.config.zClosable ?? true) : this.zClosable(), ...(ngDevMode ? [{ debugName: "effectiveClosable" }] : []));
273
- effectiveDisableShadow = computed(() => this.isServiceMode() ? (this.config.zDisableShadow ?? false) : this.zDisableShadow(), ...(ngDevMode ? [{ debugName: "effectiveDisableShadow" }] : []));
274
- shouldShowShadow = computed(() => !this.effectiveDisableShadow(), ...(ngDevMode ? [{ debugName: "shouldShowShadow" }] : []));
275
- effectiveHeaderBorder = computed(() => this.isServiceMode() ? (this.config.zHeaderBorder ?? false) : this.zHeaderBorder(), ...(ngDevMode ? [{ debugName: "effectiveHeaderBorder" }] : []));
276
- effectiveFooterBorder = computed(() => this.isServiceMode() ? (this.config.zFooterBorder ?? false) : this.zFooterBorder(), ...(ngDevMode ? [{ debugName: "effectiveFooterBorder" }] : []));
277
- effectiveHideFooter = computed(() => this.isServiceMode() ? this.config.zHideFooter : this.zHideFooter(), ...(ngDevMode ? [{ debugName: "effectiveHideFooter" }] : []));
278
- effectiveHideHeader = computed(() => this.isServiceMode() ? (this.config.zHideHeader ?? false) : this.zHideHeader(), ...(ngDevMode ? [{ debugName: "effectiveHideHeader" }] : []));
279
- effectiveOkText = computed(() => (this.isServiceMode() ? this.config.zOkText : this.zOkText()), ...(ngDevMode ? [{ debugName: "effectiveOkText" }] : []));
280
- effectiveCancelText = computed(() => this.isServiceMode() ? this.config.zCancelText : this.zCancelText(), ...(ngDevMode ? [{ debugName: "effectiveCancelText" }] : []));
281
- effectiveOkDestructive = computed(() => this.isServiceMode() ? this.config.zOkDestructive : this.zOkDestructive(), ...(ngDevMode ? [{ debugName: "effectiveOkDestructive" }] : []));
282
- effectiveOkDisabled = computed(() => this.isServiceMode() ? this.config.zOkDisabled : this.zOkDisabled(), ...(ngDevMode ? [{ debugName: "effectiveOkDisabled" }] : []));
332
+ }, /* @ts-ignore */
333
+ ...(ngDevMode ? [{ debugName: "effectiveTitle" }] : /* istanbul ignore next */ []));
334
+ effectiveDescription = computed(() => this.isServiceMode() ? this.config.zDescription : this.zDescription(), /* @ts-ignore */
335
+ ...(ngDevMode ? [{ debugName: "effectiveDescription" }] : /* istanbul ignore next */ []));
336
+ hasEffectiveDescription = computed(() => !!this.effectiveDescription(), /* @ts-ignore */
337
+ ...(ngDevMode ? [{ debugName: "hasEffectiveDescription" }] : /* istanbul ignore next */ []));
338
+ headerContentClasses = computed(() => zMergeClasses('flex w-full justify-between overflow-hidden px-4', this.hasEffectiveDescription() ? 'items-start' : 'items-center'), /* @ts-ignore */
339
+ ...(ngDevMode ? [{ debugName: "headerContentClasses" }] : /* istanbul ignore next */ []));
340
+ effectiveBodyClass = computed(() => this.isServiceMode() ? this.config.zBodyClass : this.zBodyClass(), /* @ts-ignore */
341
+ ...(ngDevMode ? [{ debugName: "effectiveBodyClass" }] : /* istanbul ignore next */ []));
342
+ bodyClasses = computed(() => zMergeClasses('flex min-h-0 flex-col gap-4 px-4 py-4', this.effectiveBodyClass()), /* @ts-ignore */
343
+ ...(ngDevMode ? [{ debugName: "bodyClasses" }] : /* istanbul ignore next */ []));
344
+ effectiveClosable = computed(() => this.isServiceMode() ? (this.config.zClosable ?? true) : this.zClosable(), /* @ts-ignore */
345
+ ...(ngDevMode ? [{ debugName: "effectiveClosable" }] : /* istanbul ignore next */ []));
346
+ effectiveDisableShadow = computed(() => this.isServiceMode() ? (this.config.zDisableShadow ?? false) : this.zDisableShadow(), /* @ts-ignore */
347
+ ...(ngDevMode ? [{ debugName: "effectiveDisableShadow" }] : /* istanbul ignore next */ []));
348
+ shouldShowShadow = computed(() => !this.effectiveDisableShadow(), /* @ts-ignore */
349
+ ...(ngDevMode ? [{ debugName: "shouldShowShadow" }] : /* istanbul ignore next */ []));
350
+ effectiveHeaderBorder = computed(() => this.isServiceMode() ? (this.config.zHeaderBorder ?? false) : this.zHeaderBorder(), /* @ts-ignore */
351
+ ...(ngDevMode ? [{ debugName: "effectiveHeaderBorder" }] : /* istanbul ignore next */ []));
352
+ effectiveFooterBorder = computed(() => this.isServiceMode() ? (this.config.zFooterBorder ?? false) : this.zFooterBorder(), /* @ts-ignore */
353
+ ...(ngDevMode ? [{ debugName: "effectiveFooterBorder" }] : /* istanbul ignore next */ []));
354
+ effectiveHideFooter = computed(() => this.isServiceMode() ? this.config.zHideFooter : this.zHideFooter(), /* @ts-ignore */
355
+ ...(ngDevMode ? [{ debugName: "effectiveHideFooter" }] : /* istanbul ignore next */ []));
356
+ effectiveHideHeader = computed(() => this.isServiceMode() ? (this.config.zHideHeader ?? false) : this.zHideHeader(), /* @ts-ignore */
357
+ ...(ngDevMode ? [{ debugName: "effectiveHideHeader" }] : /* istanbul ignore next */ []));
358
+ effectiveOkText = computed(() => (this.isServiceMode() ? this.config.zOkText : this.zOkText()), /* @ts-ignore */
359
+ ...(ngDevMode ? [{ debugName: "effectiveOkText" }] : /* istanbul ignore next */ []));
360
+ effectiveCancelText = computed(() => this.isServiceMode() ? this.config.zCancelText : this.zCancelText(), /* @ts-ignore */
361
+ ...(ngDevMode ? [{ debugName: "effectiveCancelText" }] : /* istanbul ignore next */ []));
362
+ effectiveOkDestructive = computed(() => this.isServiceMode() ? this.config.zOkDestructive : this.zOkDestructive(), /* @ts-ignore */
363
+ ...(ngDevMode ? [{ debugName: "effectiveOkDestructive" }] : /* istanbul ignore next */ []));
364
+ effectiveOkDisabled = computed(() => this.isServiceMode() ? this.config.zOkDisabled : this.zOkDisabled(), /* @ts-ignore */
365
+ ...(ngDevMode ? [{ debugName: "effectiveOkDisabled" }] : /* istanbul ignore next */ []));
283
366
  effectiveLoading = computed(() => {
284
367
  if (this.isServiceMode()) {
285
368
  return this.drawerRef?.loading() || (this.config.zLoading?.() ?? false);
286
369
  }
287
370
  return this.zLoading();
288
- }, ...(ngDevMode ? [{ debugName: "effectiveLoading" }] : []));
371
+ }, /* @ts-ignore */
372
+ ...(ngDevMode ? [{ debugName: "effectiveLoading" }] : /* istanbul ignore next */ []));
289
373
  effectiveContentLoading = computed(() => {
290
374
  if (this.isServiceMode()) {
291
375
  return this.config.zContentLoading?.() ?? false;
292
376
  }
293
377
  return this.zContentLoading();
294
- }, ...(ngDevMode ? [{ debugName: "effectiveContentLoading" }] : []));
378
+ }, /* @ts-ignore */
379
+ ...(ngDevMode ? [{ debugName: "effectiveContentLoading" }] : /* istanbul ignore next */ []));
295
380
  effectiveSkeletonRows = computed(() => {
296
381
  if (this.isServiceMode() && this.config.zSkeletonRows != null) {
297
382
  return this.config.zSkeletonRows;
@@ -301,52 +386,75 @@ class ZDrawerComponent extends BasePortalOutlet {
301
386
  }
302
387
  const placement = this.effectivePlacement();
303
388
  return placement === 'left' || placement === 'right' ? 6 : 3;
304
- }, ...(ngDevMode ? [{ debugName: "effectiveSkeletonRows" }] : []));
389
+ }, /* @ts-ignore */
390
+ ...(ngDevMode ? [{ debugName: "effectiveSkeletonRows" }] : /* istanbul ignore next */ []));
305
391
  effectivePlacement = computed(() => {
306
392
  if (this.isServiceMode()) {
307
393
  return this.config.zPlacement ?? 'right';
308
394
  }
309
395
  return this.zPlacement();
310
- }, ...(ngDevMode ? [{ debugName: "effectivePlacement" }] : []));
396
+ }, /* @ts-ignore */
397
+ ...(ngDevMode ? [{ debugName: "effectivePlacement" }] : /* istanbul ignore next */ []));
398
+ effectiveExpand = computed(() => this.isServiceMode() ? (this.config.zExpand ?? false) : this.zExpand(), /* @ts-ignore */
399
+ ...(ngDevMode ? [{ debugName: "effectiveExpand" }] : /* istanbul ignore next */ []));
400
+ resizeIcon = computed(() => {
401
+ const placement = this.effectivePlacement();
402
+ return placement === 'left' || placement === 'right' ? 'lucideGripVertical' : 'lucideGripHorizontal';
403
+ }, /* @ts-ignore */
404
+ ...(ngDevMode ? [{ debugName: "resizeIcon" }] : /* istanbul ignore next */ []));
311
405
  effectiveShadow = computed(() => {
312
406
  if (this.isServiceMode()) {
313
407
  return this.config.zShadow ?? false;
314
408
  }
315
409
  return this.zShadow();
316
- }, ...(ngDevMode ? [{ debugName: "effectiveShadow" }] : []));
410
+ }, /* @ts-ignore */
411
+ ...(ngDevMode ? [{ debugName: "effectiveShadow" }] : /* istanbul ignore next */ []));
317
412
  effectiveShape = computed(() => {
318
413
  if (this.isServiceMode()) {
319
414
  return this.config.zShape ?? 'rounded';
320
415
  }
321
416
  return this.zShape();
322
- }, ...(ngDevMode ? [{ debugName: "effectiveShape" }] : []));
417
+ }, /* @ts-ignore */
418
+ ...(ngDevMode ? [{ debugName: "effectiveShape" }] : /* istanbul ignore next */ []));
323
419
  effectiveWidth = computed(() => {
324
420
  const placement = this.effectivePlacement();
325
421
  if (placement === 'top' || placement === 'bottom') {
326
422
  return null;
327
423
  }
424
+ const resized = this._resizedWidth();
425
+ if (resized) {
426
+ return resized;
427
+ }
328
428
  if (this.isServiceMode()) {
329
429
  return this.zWidth() || this.config.zWidth || null;
330
430
  }
331
431
  return this.shouldRenderContent() ? this.zWidth() : null;
332
- }, ...(ngDevMode ? [{ debugName: "effectiveWidth" }] : []));
432
+ }, /* @ts-ignore */
433
+ ...(ngDevMode ? [{ debugName: "effectiveWidth" }] : /* istanbul ignore next */ []));
333
434
  effectiveHeight = computed(() => {
334
435
  const placement = this.effectivePlacement();
335
436
  if (placement === 'left' || placement === 'right') {
336
437
  return null;
337
438
  }
439
+ const resized = this._resizedHeight();
440
+ if (resized) {
441
+ return resized;
442
+ }
338
443
  if (this.isServiceMode()) {
339
444
  return this.zHeight() || this.config.zHeight || null;
340
445
  }
341
446
  return this.shouldRenderContent() ? this.zHeight() : null;
342
- }, ...(ngDevMode ? [{ debugName: "effectiveHeight" }] : []));
447
+ }, /* @ts-ignore */
448
+ ...(ngDevMode ? [{ debugName: "effectiveHeight" }] : /* istanbul ignore next */ []));
343
449
  isDeferLoading = computed(() => {
344
450
  if (!this.isServiceMode()) {
345
451
  return false;
346
452
  }
347
453
  return !!this.config.zDefer && !this.portalOutlet()?.hasAttached();
348
- }, ...(ngDevMode ? [{ debugName: "isDeferLoading" }] : []));
349
- classes = computed(() => zMergeClasses(zDrawerVariants({ placement: this.effectivePlacement(), shape: this.effectiveShape() }), this.isServiceMode() ? this.config.class : this.class()), ...(ngDevMode ? [{ debugName: "classes" }] : []));
454
+ }, /* @ts-ignore */
455
+ ...(ngDevMode ? [{ debugName: "isDeferLoading" }] : /* istanbul ignore next */ []));
456
+ classes = computed(() => zMergeClasses(zDrawerVariants({ placement: this.effectivePlacement(), shape: this.effectiveShape() }), this.isServiceMode() ? this.config.class : this.class()), /* @ts-ignore */
457
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
350
458
  hostClasses = computed(() => {
351
459
  const baseClasses = this.classes();
352
460
  if (this.isServiceMode()) {
@@ -356,13 +464,17 @@ class ZDrawerComponent extends BasePortalOutlet {
356
464
  return `${baseClasses} z-drawer-template-mode`.trim();
357
465
  }
358
466
  return 'z-drawer-template-host';
359
- }, ...(ngDevMode ? [{ debugName: "hostClasses" }] : []));
467
+ }, /* @ts-ignore */
468
+ ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
360
469
  constructor() {
361
470
  super();
362
471
  effect(() => {
363
472
  this._zTranslate.currentLang();
364
473
  this._cdr.markForCheck();
365
474
  });
475
+ if (isPlatformBrowser(this._platformId) && this.isServiceMode()) {
476
+ void this._restoreResize();
477
+ }
366
478
  effect(() => {
367
479
  const scrollbar = this.mainContentRef();
368
480
  if (scrollbar) {
@@ -382,8 +494,63 @@ class ZDrawerComponent extends BasePortalOutlet {
382
494
  }
383
495
  ngOnDestroy() {
384
496
  this._clearCloseTimeout();
497
+ this._resizeCleanup?.();
385
498
  this._disposeTemplateOverlay();
386
499
  }
500
+ startResize(event) {
501
+ if (!this.effectiveExpand() || event.button !== 0) {
502
+ return;
503
+ }
504
+ event.preventDefault();
505
+ this.isResizing.set(true);
506
+ const host = this._host.nativeElement;
507
+ const placement = this.effectivePlacement();
508
+ const horizontal = placement === 'left' || placement === 'right';
509
+ const startCoordinate = horizontal ? event.clientX : event.clientY;
510
+ const startSize = horizontal ? host.getBoundingClientRect().width : host.getBoundingClientRect().height;
511
+ const direction = placement === 'left' || placement === 'top' ? 1 : -1;
512
+ const onMove = (moveEvent) => {
513
+ const delta = (horizontal ? moveEvent.clientX : moveEvent.clientY) - startCoordinate;
514
+ const maxSize = (horizontal ? window.innerWidth : window.innerHeight) - Z_DRAWER_RESIZE_VIEWPORT_PADDING;
515
+ const size = Math.min(maxSize, Math.max(Z_DRAWER_RESIZE_MIN_SIZE, startSize + delta * direction));
516
+ const value = `${Math.round(size)}px`;
517
+ if (horizontal) {
518
+ this._resizedWidth.set(value);
519
+ }
520
+ else {
521
+ this._resizedHeight.set(value);
522
+ }
523
+ };
524
+ const onUp = () => {
525
+ this._resizeCleanup?.();
526
+ this._resizeCleanup = null;
527
+ this.isResizing.set(false);
528
+ void this._persistResize();
529
+ };
530
+ window.addEventListener('pointermove', onMove);
531
+ window.addEventListener('pointerup', onUp, { once: true });
532
+ this._resizeCleanup = () => {
533
+ window.removeEventListener('pointermove', onMove);
534
+ window.removeEventListener('pointerup', onUp);
535
+ };
536
+ }
537
+ onHostPointerDown(event) {
538
+ if (!this.effectiveExpand() || event.button !== 0) {
539
+ return;
540
+ }
541
+ const rect = this._host.nativeElement.getBoundingClientRect();
542
+ const placement = this.effectivePlacement();
543
+ const distance = placement === 'left'
544
+ ? rect.right - event.clientX
545
+ : placement === 'right'
546
+ ? event.clientX - rect.left
547
+ : placement === 'top'
548
+ ? rect.bottom - event.clientY
549
+ : event.clientY - rect.top;
550
+ if (distance <= 16) {
551
+ this.startResize(event);
552
+ }
553
+ }
387
554
  isDestroyed() {
388
555
  return this._destroyRef.destroyed;
389
556
  }
@@ -460,6 +627,7 @@ class ZDrawerComponent extends BasePortalOutlet {
460
627
  if (!this._templateOverlayRef) {
461
628
  return;
462
629
  }
630
+ void this._restoreResize();
463
631
  this._zIndexService.applyToOverlay(this._templateOverlayRef);
464
632
  const hostElement = this._host.nativeElement;
465
633
  this._originalParent = hostElement.parentElement;
@@ -473,6 +641,39 @@ class ZDrawerComponent extends BasePortalOutlet {
473
641
  this.onBackdropClick();
474
642
  });
475
643
  }
644
+ _getResizeKey() {
645
+ const title = this.effectiveTitle();
646
+ const titleKey = typeof title === 'string' && title.trim() ? title.trim() : 'default';
647
+ return `${Z_DRAWER_RESIZE_KEY_PREFIX}:${this.effectivePlacement()}:${titleKey}`;
648
+ }
649
+ async _restoreResize() {
650
+ if (!this._indexDb) {
651
+ return;
652
+ }
653
+ const key = this._getResizeKey();
654
+ if (key === this._resizeStorageKey) {
655
+ return;
656
+ }
657
+ this._resizeStorageKey = key;
658
+ const saved = await this._indexDb.get(key);
659
+ if (saved?.width) {
660
+ this._resizedWidth.set(saved.width);
661
+ }
662
+ if (saved?.height) {
663
+ this._resizedHeight.set(saved.height);
664
+ }
665
+ }
666
+ async _persistResize() {
667
+ if (!this._indexDb) {
668
+ return;
669
+ }
670
+ const width = this._resizedWidth();
671
+ const height = this._resizedHeight();
672
+ if (!width && !height) {
673
+ return;
674
+ }
675
+ await this._indexDb.set(this._getResizeKey(), { width, height }).catch(() => undefined);
676
+ }
476
677
  _closeWithAnimation() {
477
678
  if (this.isLeaving()) {
478
679
  return;
@@ -523,10 +724,28 @@ class ZDrawerComponent extends BasePortalOutlet {
523
724
  this._backdropSubscription = null;
524
725
  }
525
726
  }
526
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
527
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.9", type: ZDrawerComponent, isStandalone: true, selector: "z-drawer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zBodyClass: { classPropertyName: "zBodyClass", publicName: "zBodyClass", 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 }, zDisableShadow: { classPropertyName: "zDisableShadow", publicName: "zDisableShadow", isSignal: true, isRequired: false, transformFunction: null }, zHeaderBorder: { classPropertyName: "zHeaderBorder", publicName: "zHeaderBorder", isSignal: true, isRequired: false, transformFunction: null }, zFooterBorder: { classPropertyName: "zFooterBorder", publicName: "zFooterBorder", isSignal: true, isRequired: false, transformFunction: null }, zHideFooter: { classPropertyName: "zHideFooter", publicName: "zHideFooter", isSignal: true, isRequired: false, transformFunction: null }, zHideHeader: { classPropertyName: "zHideHeader", publicName: "zHideHeader", 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", zAfterClose: "zAfterClose", 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\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n class=\"-mt-1 -mr-2 shrink-0\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n @if (customContent(); as contentDir) {\n <ng-container *ngTemplateOutlet=\"contentDir.templateRef\" />\n } @else {\n <ng-content />\n }\n </main>\n </ng-scrollbar>\n\n @if (customFooter(); as footerDir) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n <ng-container *ngTemplateOutlet=\"footerDir.templateRef\" />\n </div>\n </footer>\n } @else if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n @if (config.zCancelIcon) {\n <z-icon [zType]=\"config.zCancelIcon\" />\n }\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n @if (config.zOkIcon && !effectiveLoading()) {\n <z-icon [zType]=\"config.zOkIcon\" />\n }\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n", 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}.z-drawer-header-border{border-bottom:1px solid var(--border)}.z-drawer-footer-border{border-top:1px solid var(--border)}:host header{padding-top:1rem;padding-bottom:1rem}:host footer{padding-top:1rem;padding-bottom:1rem}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out}.z-drawer-scrollbar{--scrollbar-padding: .125rem}\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]] });
727
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
728
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.2", type: ZDrawerComponent, isStandalone: true, selector: "z-drawer", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, zBodyClass: { classPropertyName: "zBodyClass", publicName: "zBodyClass", 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 }, zDisableShadow: { classPropertyName: "zDisableShadow", publicName: "zDisableShadow", isSignal: true, isRequired: false, transformFunction: null }, zHeaderBorder: { classPropertyName: "zHeaderBorder", publicName: "zHeaderBorder", isSignal: true, isRequired: false, transformFunction: null }, zFooterBorder: { classPropertyName: "zFooterBorder", publicName: "zFooterBorder", isSignal: true, isRequired: false, transformFunction: null }, zHideFooter: { classPropertyName: "zHideFooter", publicName: "zHideFooter", isSignal: true, isRequired: false, transformFunction: null }, zHideHeader: { classPropertyName: "zHideHeader", publicName: "zHideHeader", 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 }, zExpand: { classPropertyName: "zExpand", publicName: "zExpand", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { zOnOk: "zOnOk", zOnCancel: "zOnCancel", zAfterClose: "zAfterClose", zScrollbar: "zScrollbar", zVisible: "zVisibleChange" }, host: { listeners: { "pointerdown": "onHostPointerDown($event)" }, properties: { "class": "hostClasses()", "style.width": "effectiveWidth()", "style.height": "effectiveHeight()", "attr.data-placement": "effectivePlacement()", "class.z-drawer-resizing": "isResizing()" } }, 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\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n class=\"-mt-1 -mr-2 shrink-0\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n @if (customContent(); as contentDir) {\n <ng-container *ngTemplateOutlet=\"contentDir.templateRef\" />\n } @else {\n <ng-content />\n }\n </main>\n </ng-scrollbar>\n\n @if (customFooter(); as footerDir) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n <ng-container *ngTemplateOutlet=\"footerDir.templateRef\" />\n </div>\n </footer>\n } @else if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n@if (effectiveExpand()) {\n <button\n type=\"button\"\n class=\"z-drawer-resize-handle\"\n [attr.data-placement]=\"effectivePlacement()\"\n [attr.aria-label]=\"'i18n_z_ui_drawer_resize' | translate\"\n (pointerdown)=\"$event.stopPropagation(); startResize($event)\">\n <z-icon [zType]=\"$any(resizeIcon())\" zSize=\"14\" />\n </button>\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n @if (config.zCancelIcon) {\n <z-icon [zType]=\"config.zCancelIcon\" />\n }\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n @if (config.zOkIcon && !effectiveLoading()) {\n <z-icon [zType]=\"config.zOkIcon\" />\n }\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n", 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;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}.z-drawer-header-border{border-bottom:1px solid var(--border)}.z-drawer-footer-border{border-top:1px solid var(--border)}:host header{padding-top:1rem;padding-bottom:1rem}:host footer{padding-top:1rem;padding-bottom:1rem}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out}.z-drawer-scrollbar{--scrollbar-padding: .125rem}.z-drawer-resize-handle{position:absolute;z-index:60;display:flex;align-items:center;justify-content:center;width:10px;height:100%;padding:0;color:var(--muted-foreground);cursor:col-resize;opacity:0;border:0;background:transparent;pointer-events:auto;transition:opacity .15s ease,border-color .15s ease}.z-drawer-resize-handle:after{position:absolute;content:\"\";background:var(--primary);opacity:0;transition:opacity .15s ease}.z-drawer-resize-handle>z-icon{position:absolute;z-index:1;opacity:0;transition:opacity .15s ease}.z-drawer-resize-handle:hover,.z-drawer-resize-handle:focus-visible{opacity:1;color:var(--primary);outline:none}.z-drawer-resize-handle:hover:after,.z-drawer-resize-handle:focus-visible:after{opacity:1}.z-drawer-resize-handle:hover>z-icon,.z-drawer-resize-handle:focus-visible>z-icon{opacity:1}.z-drawer-resize-handle[data-placement=left]{right:-7px;top:0;bottom:0;width:10px;cursor:col-resize}.z-drawer-resize-handle[data-placement=right]{left:-7px;top:0;bottom:0;width:16px;cursor:col-resize}.z-drawer-resize-handle[data-placement=top]{bottom:-7px;left:0;right:0;width:auto;height:16px;cursor:row-resize}.z-drawer-resize-handle[data-placement=bottom]{top:-7px;left:0;right:0;width:auto;height:16px;cursor:row-resize}.z-drawer-resize-handle[data-placement=left]:after,.z-drawer-resize-handle[data-placement=right]:after{top:50%;left:50%;width:2px;height:100px;transform:translate(-50%,-50%)}.z-drawer-resize-handle[data-placement=top]:after,.z-drawer-resize-handle[data-placement=bottom]:after{top:50%;left:50%;width:100px;height:2px;transform:translate(-50%,-50%)}.z-drawer-resize-handle[data-placement=left]>z-icon,.z-drawer-resize-handle[data-placement=right]>z-icon{top:50%;left:50%;transform:translate(-50%,-50%)}.z-drawer-resize-handle[data-placement=top]>z-icon,.z-drawer-resize-handle[data-placement=bottom]>z-icon{top:50%;left:50%;transform:translate(-50%,-50%)}:host.z-drawer-resizing .z-drawer-resize-handle{opacity:1;color:var(--primary)}:host.z-drawer-resizing .z-drawer-resize-handle:after,:host.z-drawer-resizing .z-drawer-resize-handle>z-icon{opacity:1}:host.z-drawer-service-mode,:host.z-drawer-template-mode{overflow:visible}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "component", type: ZIconComponent, selector: "z-icon, [z-icon]", inputs: ["class", "zType", "zAnimatedType", "zAnimate", "zAnimationTrigger", "zSize", "zStrokeWidth", "zSvg"] }, { kind: "component", type: ZSkeletonComponent, selector: "z-skeleton", inputs: ["class", "zType", "zSize", "zWidth", "zHeight", "zRows", "zGap", "zAnimated", "zRadius"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, /* @ts-ignore */
729
+ import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), ZIconComponent, /* @ts-ignore */
730
+ import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), /* @ts-ignore */
731
+ import('ngx-scrollbar').then(m => m.NgScrollbar), /* @ts-ignore */
732
+ import('@angular/cdk/scrolling').then(m => m.CdkScrollable), /* @ts-ignore */
733
+ import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), /* @ts-ignore */
734
+ import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe), TranslatePipe], () => [i1.CdkPortalOutlet, NgTemplateOutlet, /* @ts-ignore */
735
+ import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), ZIconComponent, /* @ts-ignore */
736
+ import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), /* @ts-ignore */
737
+ import('ngx-scrollbar').then(m => m.NgScrollbar), /* @ts-ignore */
738
+ import('@angular/cdk/scrolling').then(m => m.CdkScrollable), /* @ts-ignore */
739
+ import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), /* @ts-ignore */
740
+ import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe), TranslatePipe]] });
528
741
  }
529
- i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.9", 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: [{
742
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerComponent, resolveDeferredDeps: () => [/* @ts-ignore */
743
+ import('@shival99/z-ui/components/z-button').then(m => m.ZButtonComponent), /* @ts-ignore */
744
+ import('@shival99/z-ui/components/z-tooltip').then(m => m.ZTooltipDirective), /* @ts-ignore */
745
+ import('ngx-scrollbar').then(m => m.NgScrollbar), /* @ts-ignore */
746
+ import('@angular/cdk/scrolling').then(m => m.CdkScrollable), /* @ts-ignore */
747
+ import('@shival99/z-ui/pipes').then(m => m.ZContentTypePipe), /* @ts-ignore */
748
+ import('@shival99/z-ui/pipes').then(m => m.ZSafeHtmlPipe)], resolveMetadata: (ZButtonComponent, ZTooltipDirective, NgScrollbar, CdkScrollable, ZContentTypePipe, ZSafeHtmlPipe) => ({ decorators: [{
530
749
  type: Component,
531
750
  args: [{ selector: 'z-drawer', imports: [
532
751
  PortalModule,
@@ -545,8 +764,10 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.0.9", ng
545
764
  '[style.width]': 'effectiveWidth()',
546
765
  '[style.height]': 'effectiveHeight()',
547
766
  '[attr.data-placement]': 'effectivePlacement()',
548
- }, 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\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n class=\"-mt-1 -mr-2 shrink-0\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n @if (customContent(); as contentDir) {\n <ng-container *ngTemplateOutlet=\"contentDir.templateRef\" />\n } @else {\n <ng-content />\n }\n </main>\n </ng-scrollbar>\n\n @if (customFooter(); as footerDir) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n <ng-container *ngTemplateOutlet=\"footerDir.templateRef\" />\n </div>\n </footer>\n } @else if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n @if (config.zCancelIcon) {\n <z-icon [zType]=\"config.zCancelIcon\" />\n }\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n @if (config.zOkIcon && !effectiveLoading()) {\n <z-icon [zType]=\"config.zOkIcon\" />\n }\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n", 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}.z-drawer-header-border{border-bottom:1px solid var(--border)}.z-drawer-footer-border{border-top:1px solid var(--border)}:host header{padding-top:1rem;padding-bottom:1rem}:host footer{padding-top:1rem;padding-bottom:1rem}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out}.z-drawer-scrollbar{--scrollbar-padding: .125rem}\n"] }]
549
- }], ctorParameters: () => [], propDecorators: { zOnOk: [{ type: i0.Output, args: ["zOnOk"] }], zOnCancel: [{ type: i0.Output, args: ["zOnCancel"] }], zAfterClose: [{ type: i0.Output, args: ["zAfterClose"] }], zScrollbar: [{ type: i0.Output, args: ["zScrollbar"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zBodyClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zBodyClass", 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 }] }], zDisableShadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisableShadow", required: false }] }], zHeaderBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHeaderBorder", required: false }] }], zFooterBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFooterBorder", required: false }] }], zHideFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHideFooter", required: false }] }], zHideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHideHeader", 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 }] }] } }) });
767
+ '(pointerdown)': 'onHostPointerDown($event)',
768
+ '[class.z-drawer-resizing]': 'isResizing()',
769
+ }, 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\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex items-start justify-between px-4\">\n <ng-container *ngTemplateOutlet=\"headerDir.templateRef\" />\n </div>\n </header>\n } @else if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n class=\"-mt-1 -mr-2 shrink-0\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n @if (customContent(); as contentDir) {\n <ng-container *ngTemplateOutlet=\"contentDir.templateRef\" />\n } @else {\n <ng-content />\n }\n </main>\n </ng-scrollbar>\n\n @if (customFooter(); as footerDir) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n <ng-container *ngTemplateOutlet=\"footerDir.templateRef\" />\n </div>\n </footer>\n } @else if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n\n@if (effectiveExpand()) {\n <button\n type=\"button\"\n class=\"z-drawer-resize-handle\"\n [attr.data-placement]=\"effectivePlacement()\"\n [attr.aria-label]=\"'i18n_z_ui_drawer_resize' | translate\"\n (pointerdown)=\"$event.stopPropagation(); startResize($event)\">\n <z-icon [zType]=\"$any(resizeIcon())\" zSize=\"14\" />\n </button>\n}\n\n<!-- Service mode content -->\n@if (isServiceMode()) {\n @defer (when !effectiveContentLoading()) {\n @if (!effectiveHideHeader()) {\n @if (effectiveTitle()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div [class]=\"headerContentClasses()\">\n <div class=\"min-w-0 flex-1 overflow-hidden pr-2\">\n @if (effectiveTitle(); as title) {\n @switch (title | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(title)\" />\n }\n @case ('html') {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"title\"\n [innerHTML]=\"$any(title) | zSafeHtml\"></h4>\n }\n @default {\n <h4\n data-testid=\"z-drawer-title\"\n class=\"m-0 truncate text-base leading-snug font-semibold\"\n z-tooltip\n [zContent]=\"$any(title) | translate\">\n {{ $any(title) | translate }}\n </h4>\n }\n }\n }\n @if (effectiveDescription(); as description) {\n @switch (description | zContentType) {\n @case ('template') {\n <ng-container *ngTemplateOutlet=\"$any(description)\" />\n }\n @case ('html') {\n <p\n data-testid=\"z-drawer-description\"\n class=\"text-muted-foreground m-0 mt-1 text-sm\"\n [innerHTML]=\"$any(description) | zSafeHtml\"></p>\n }\n @default {\n <p data-testid=\"z-drawer-description\" class=\"text-muted-foreground m-0 mt-1 text-sm\">\n {{ $any(description) | translate }}\n </p>\n }\n }\n }\n </div>\n @if (effectiveClosable()) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n }\n </div>\n </header>\n } @else if (effectiveClosable()) {\n <header\n [class.z-drawer-header-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-header-border]=\"effectiveHeaderBorder()\">\n <div class=\"flex justify-end px-4\">\n <button\n type=\"button\"\n data-testid=\"z-drawer-close-header-button\"\n z-button\n zType=\"subtle\"\n zSize=\"xs\"\n [zWave]=\"false\"\n (click)=\"onCloseClick()\">\n <z-icon zType=\"lucideX\" />\n </button>\n </div>\n </header>\n }\n }\n\n <ng-scrollbar\n class=\"z-drawer-scrollbar flex-1\"\n #mainContent\n track=\"vertical\"\n cdkScrollable\n (scroll)=\"onContentScroll($event)\">\n <main [class]=\"bodyClasses()\">\n <ng-template cdkPortalOutlet />\n\n @if (isStringContent()) {\n <div data-testid=\"z-drawer-content\" [innerHTML]=\"$any(config.zContent) | zSafeHtml\"></div>\n }\n </main>\n </ng-scrollbar>\n\n @if (!effectiveHideFooter()) {\n <footer\n [class.z-drawer-footer-shadow]=\"shouldShowShadow()\"\n [class.z-drawer-footer-border]=\"effectiveFooterBorder()\">\n <div class=\"flex flex-row justify-end gap-2 px-4\">\n @if (effectiveCancelText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-cancel-button\"\n z-button\n zType=\"outline\"\n (click)=\"onCloseClick()\">\n @if (config.zCancelIcon) {\n <z-icon [zType]=\"config.zCancelIcon\" />\n }\n {{ effectiveCancelText() ?? 'i18n_z_ui_modal_cancel' | translate }}\n </button>\n }\n\n @if (effectiveOkText() !== null) {\n <button\n type=\"button\"\n data-testid=\"z-drawer-ok-button\"\n z-button\n [zType]=\"effectiveOkDestructive() ? 'destructive' : 'default'\"\n [disabled]=\"effectiveOkDisabled() || effectiveLoading()\"\n [zLoading]=\"effectiveLoading()\"\n (click)=\"onOkClick()\">\n @if (config.zOkIcon && !effectiveLoading()) {\n <z-icon [zType]=\"config.zOkIcon\" />\n }\n {{ effectiveOkText() ?? 'i18n_z_ui_common_ok' | translate }}\n </button>\n }\n </div>\n </footer>\n }\n } @placeholder {\n <div class=\"flex flex-1 flex-col gap-4 p-4\">\n <z-skeleton class=\"h-full\" [zRows]=\"effectiveSkeletonRows()\" />\n </div>\n }\n}\n", 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;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}.z-drawer-header-border{border-bottom:1px solid var(--border)}.z-drawer-footer-border{border-top:1px solid var(--border)}:host header{padding-top:1rem;padding-bottom:1rem}:host footer{padding-top:1rem;padding-bottom:1rem}:host main{overscroll-behavior:contain}:host header,:host footer{transition:box-shadow .2s ease-out}.z-drawer-scrollbar{--scrollbar-padding: .125rem}.z-drawer-resize-handle{position:absolute;z-index:60;display:flex;align-items:center;justify-content:center;width:10px;height:100%;padding:0;color:var(--muted-foreground);cursor:col-resize;opacity:0;border:0;background:transparent;pointer-events:auto;transition:opacity .15s ease,border-color .15s ease}.z-drawer-resize-handle:after{position:absolute;content:\"\";background:var(--primary);opacity:0;transition:opacity .15s ease}.z-drawer-resize-handle>z-icon{position:absolute;z-index:1;opacity:0;transition:opacity .15s ease}.z-drawer-resize-handle:hover,.z-drawer-resize-handle:focus-visible{opacity:1;color:var(--primary);outline:none}.z-drawer-resize-handle:hover:after,.z-drawer-resize-handle:focus-visible:after{opacity:1}.z-drawer-resize-handle:hover>z-icon,.z-drawer-resize-handle:focus-visible>z-icon{opacity:1}.z-drawer-resize-handle[data-placement=left]{right:-7px;top:0;bottom:0;width:10px;cursor:col-resize}.z-drawer-resize-handle[data-placement=right]{left:-7px;top:0;bottom:0;width:16px;cursor:col-resize}.z-drawer-resize-handle[data-placement=top]{bottom:-7px;left:0;right:0;width:auto;height:16px;cursor:row-resize}.z-drawer-resize-handle[data-placement=bottom]{top:-7px;left:0;right:0;width:auto;height:16px;cursor:row-resize}.z-drawer-resize-handle[data-placement=left]:after,.z-drawer-resize-handle[data-placement=right]:after{top:50%;left:50%;width:2px;height:100px;transform:translate(-50%,-50%)}.z-drawer-resize-handle[data-placement=top]:after,.z-drawer-resize-handle[data-placement=bottom]:after{top:50%;left:50%;width:100px;height:2px;transform:translate(-50%,-50%)}.z-drawer-resize-handle[data-placement=left]>z-icon,.z-drawer-resize-handle[data-placement=right]>z-icon{top:50%;left:50%;transform:translate(-50%,-50%)}.z-drawer-resize-handle[data-placement=top]>z-icon,.z-drawer-resize-handle[data-placement=bottom]>z-icon{top:50%;left:50%;transform:translate(-50%,-50%)}:host.z-drawer-resizing .z-drawer-resize-handle{opacity:1;color:var(--primary)}:host.z-drawer-resizing .z-drawer-resize-handle:after,:host.z-drawer-resizing .z-drawer-resize-handle>z-icon{opacity:1}:host.z-drawer-service-mode,:host.z-drawer-template-mode{overflow:visible}\n"] }]
770
+ }], ctorParameters: () => [], propDecorators: { zOnOk: [{ type: i0.Output, args: ["zOnOk"] }], zOnCancel: [{ type: i0.Output, args: ["zOnCancel"] }], zAfterClose: [{ type: i0.Output, args: ["zAfterClose"] }], zScrollbar: [{ type: i0.Output, args: ["zScrollbar"] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], zBodyClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "zBodyClass", 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 }] }], zDisableShadow: [{ type: i0.Input, args: [{ isSignal: true, alias: "zDisableShadow", required: false }] }], zHeaderBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHeaderBorder", required: false }] }], zFooterBorder: [{ type: i0.Input, args: [{ isSignal: true, alias: "zFooterBorder", required: false }] }], zHideFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHideFooter", required: false }] }], zHideHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "zHideHeader", 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 }] }], zExpand: [{ type: i0.Input, args: [{ isSignal: true, alias: "zExpand", 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 }] }] } }) });
550
771
 
551
772
  let ZDrawerRef = class ZDrawerRef {
552
773
  _overlayRef;
@@ -557,7 +778,8 @@ let ZDrawerRef = class ZDrawerRef {
557
778
  _isClosing = false;
558
779
  _result;
559
780
  componentInstance = null;
560
- loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
781
+ loading = signal(false, /* @ts-ignore */
782
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
561
783
  zAfterClose = new EventEmitter();
562
784
  constructor(_overlayRef, _config, _containerInstance, _platformId) {
563
785
  this._overlayRef = _overlayRef;
@@ -724,10 +946,10 @@ class ZDrawerService {
724
946
  ],
725
947
  });
726
948
  }
727
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
728
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerService, providedIn: 'root' });
949
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
950
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerService, providedIn: 'root' });
729
951
  }
730
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: ZDrawerService, decorators: [{
952
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.2", ngImport: i0, type: ZDrawerService, decorators: [{
731
953
  type: Injectable,
732
954
  args: [{
733
955
  providedIn: 'root',