@ng-nest/ui 20.1.6 → 20.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 (203) hide show
  1. package/attachments/index.d.ts +277 -0
  2. package/auto-complete/index.d.ts +11 -2
  3. package/card/index.d.ts +12 -2
  4. package/cascade/index.d.ts +2 -1
  5. package/collapse/index.d.ts +0 -3
  6. package/color-picker/index.d.ts +2 -1
  7. package/core/index.d.ts +41 -43
  8. package/date-picker/index.d.ts +20 -4
  9. package/dialog/index.d.ts +8 -10
  10. package/drawer/index.d.ts +10 -12
  11. package/dropdown/index.d.ts +32 -9
  12. package/fesm2022/ng-nest-ui-affix.mjs +11 -11
  13. package/fesm2022/ng-nest-ui-alert.mjs +13 -13
  14. package/fesm2022/ng-nest-ui-alert.mjs.map +1 -1
  15. package/fesm2022/ng-nest-ui-anchor.mjs +18 -18
  16. package/fesm2022/ng-nest-ui-anchor.mjs.map +1 -1
  17. package/fesm2022/ng-nest-ui-api.mjs +7 -7
  18. package/fesm2022/ng-nest-ui-api.mjs.map +1 -1
  19. package/fesm2022/ng-nest-ui-attachments.mjs +331 -0
  20. package/fesm2022/ng-nest-ui-attachments.mjs.map +1 -0
  21. package/fesm2022/ng-nest-ui-auto-complete.mjs +36 -26
  22. package/fesm2022/ng-nest-ui-auto-complete.mjs.map +1 -1
  23. package/fesm2022/ng-nest-ui-avatar.mjs +18 -18
  24. package/fesm2022/ng-nest-ui-avatar.mjs.map +1 -1
  25. package/fesm2022/ng-nest-ui-back-top.mjs +12 -12
  26. package/fesm2022/ng-nest-ui-back-top.mjs.map +1 -1
  27. package/fesm2022/ng-nest-ui-badge.mjs +13 -13
  28. package/fesm2022/ng-nest-ui-badge.mjs.map +1 -1
  29. package/fesm2022/ng-nest-ui-base-form.mjs +8 -8
  30. package/fesm2022/ng-nest-ui-bubble.mjs +20 -20
  31. package/fesm2022/ng-nest-ui-bubble.mjs.map +1 -1
  32. package/fesm2022/ng-nest-ui-button.mjs +19 -19
  33. package/fesm2022/ng-nest-ui-button.mjs.map +1 -1
  34. package/fesm2022/ng-nest-ui-calendar.mjs +11 -11
  35. package/fesm2022/ng-nest-ui-card.mjs +20 -14
  36. package/fesm2022/ng-nest-ui-card.mjs.map +1 -1
  37. package/fesm2022/ng-nest-ui-carousel.mjs +21 -21
  38. package/fesm2022/ng-nest-ui-carousel.mjs.map +1 -1
  39. package/fesm2022/ng-nest-ui-cascade.mjs +27 -25
  40. package/fesm2022/ng-nest-ui-cascade.mjs.map +1 -1
  41. package/fesm2022/ng-nest-ui-checkbox.mjs +12 -12
  42. package/fesm2022/ng-nest-ui-checkbox.mjs.map +1 -1
  43. package/fesm2022/ng-nest-ui-collapse.mjs +20 -28
  44. package/fesm2022/ng-nest-ui-collapse.mjs.map +1 -1
  45. package/fesm2022/ng-nest-ui-color-picker.mjs +31 -29
  46. package/fesm2022/ng-nest-ui-color-picker.mjs.map +1 -1
  47. package/fesm2022/ng-nest-ui-color.mjs +11 -11
  48. package/fesm2022/ng-nest-ui-color.mjs.map +1 -1
  49. package/fesm2022/ng-nest-ui-comment.mjs +18 -18
  50. package/fesm2022/ng-nest-ui-container.mjs +35 -35
  51. package/fesm2022/ng-nest-ui-container.mjs.map +1 -1
  52. package/fesm2022/ng-nest-ui-core.mjs +48 -148
  53. package/fesm2022/ng-nest-ui-core.mjs.map +1 -1
  54. package/fesm2022/ng-nest-ui-coversations.mjs +11 -11
  55. package/fesm2022/ng-nest-ui-crumb.mjs +11 -11
  56. package/fesm2022/ng-nest-ui-date-picker.mjs +92 -78
  57. package/fesm2022/ng-nest-ui-date-picker.mjs.map +1 -1
  58. package/fesm2022/ng-nest-ui-description.mjs +20 -20
  59. package/fesm2022/ng-nest-ui-description.mjs.map +1 -1
  60. package/fesm2022/ng-nest-ui-dialog.mjs +68 -67
  61. package/fesm2022/ng-nest-ui-dialog.mjs.map +1 -1
  62. package/fesm2022/ng-nest-ui-doc.mjs +7 -7
  63. package/fesm2022/ng-nest-ui-doc.mjs.map +1 -1
  64. package/fesm2022/ng-nest-ui-drag.mjs +11 -11
  65. package/fesm2022/ng-nest-ui-drawer.mjs +67 -84
  66. package/fesm2022/ng-nest-ui-drawer.mjs.map +1 -1
  67. package/fesm2022/ng-nest-ui-dropdown.mjs +182 -58
  68. package/fesm2022/ng-nest-ui-dropdown.mjs.map +1 -1
  69. package/fesm2022/ng-nest-ui-empty.mjs +11 -11
  70. package/fesm2022/ng-nest-ui-examples.mjs +7 -7
  71. package/fesm2022/ng-nest-ui-examples.mjs.map +1 -1
  72. package/fesm2022/ng-nest-ui-find.mjs +12 -12
  73. package/fesm2022/ng-nest-ui-find.mjs.map +1 -1
  74. package/fesm2022/ng-nest-ui-form.mjs +19 -19
  75. package/fesm2022/ng-nest-ui-form.mjs.map +1 -1
  76. package/fesm2022/ng-nest-ui-highlight.mjs +15 -15
  77. package/fesm2022/ng-nest-ui-highlight.mjs.map +1 -1
  78. package/fesm2022/ng-nest-ui-i18n.mjs +14 -14
  79. package/fesm2022/ng-nest-ui-icon.mjs +14 -14
  80. package/fesm2022/ng-nest-ui-icon.mjs.map +1 -1
  81. package/fesm2022/ng-nest-ui-image.mjs +22 -22
  82. package/fesm2022/ng-nest-ui-image.mjs.map +1 -1
  83. package/fesm2022/ng-nest-ui-inner.mjs +11 -11
  84. package/fesm2022/ng-nest-ui-inner.mjs.map +1 -1
  85. package/fesm2022/ng-nest-ui-input-number.mjs +12 -12
  86. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  87. package/fesm2022/ng-nest-ui-input.mjs +19 -19
  88. package/fesm2022/ng-nest-ui-input.mjs.map +1 -1
  89. package/fesm2022/ng-nest-ui-keyword.mjs +11 -11
  90. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  91. package/fesm2022/ng-nest-ui-layout.mjs +18 -18
  92. package/fesm2022/ng-nest-ui-layout.mjs.map +1 -1
  93. package/fesm2022/ng-nest-ui-link.mjs +12 -12
  94. package/fesm2022/ng-nest-ui-link.mjs.map +1 -1
  95. package/fesm2022/ng-nest-ui-list.mjs +52 -28
  96. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  97. package/fesm2022/ng-nest-ui-loading.mjs +12 -12
  98. package/fesm2022/ng-nest-ui-loading.mjs.map +1 -1
  99. package/fesm2022/ng-nest-ui-menu.mjs +18 -18
  100. package/fesm2022/ng-nest-ui-message-box.mjs +10 -10
  101. package/fesm2022/ng-nest-ui-message.mjs +10 -10
  102. package/fesm2022/ng-nest-ui-notification.mjs +10 -10
  103. package/fesm2022/ng-nest-ui-outlet.mjs +8 -8
  104. package/fesm2022/ng-nest-ui-page-header.mjs +11 -11
  105. package/fesm2022/ng-nest-ui-pagination.mjs +11 -11
  106. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  107. package/fesm2022/ng-nest-ui-pattern.mjs +7 -7
  108. package/fesm2022/ng-nest-ui-pattern.mjs.map +1 -1
  109. package/fesm2022/ng-nest-ui-popconfirm.mjs +11 -11
  110. package/fesm2022/ng-nest-ui-popover.mjs +25 -21
  111. package/fesm2022/ng-nest-ui-popover.mjs.map +1 -1
  112. package/fesm2022/ng-nest-ui-portal.mjs +7 -7
  113. package/fesm2022/ng-nest-ui-progress.mjs +11 -11
  114. package/fesm2022/ng-nest-ui-prompts.mjs +17 -12
  115. package/fesm2022/ng-nest-ui-prompts.mjs.map +1 -1
  116. package/fesm2022/ng-nest-ui-radio.mjs +12 -12
  117. package/fesm2022/ng-nest-ui-radio.mjs.map +1 -1
  118. package/fesm2022/ng-nest-ui-rate.mjs +12 -12
  119. package/fesm2022/ng-nest-ui-rate.mjs.map +1 -1
  120. package/fesm2022/ng-nest-ui-resizable.mjs +11 -11
  121. package/fesm2022/ng-nest-ui-resizable.mjs.map +1 -1
  122. package/fesm2022/ng-nest-ui-result.mjs +11 -11
  123. package/fesm2022/ng-nest-ui-ripple.mjs +11 -11
  124. package/fesm2022/ng-nest-ui-ripple.mjs.map +1 -1
  125. package/fesm2022/ng-nest-ui-scrollable.mjs +8 -8
  126. package/fesm2022/ng-nest-ui-scrollable.mjs.map +1 -1
  127. package/fesm2022/ng-nest-ui-select.mjs +37 -26
  128. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  129. package/fesm2022/ng-nest-ui-sender.mjs +19 -18
  130. package/fesm2022/ng-nest-ui-sender.mjs.map +1 -1
  131. package/fesm2022/ng-nest-ui-skeleton.mjs +11 -11
  132. package/fesm2022/ng-nest-ui-slider-select.mjs +13 -13
  133. package/fesm2022/ng-nest-ui-slider-select.mjs.map +1 -1
  134. package/fesm2022/ng-nest-ui-slider.mjs +12 -12
  135. package/fesm2022/ng-nest-ui-slider.mjs.map +1 -1
  136. package/fesm2022/ng-nest-ui-statistic.mjs +18 -18
  137. package/fesm2022/ng-nest-ui-steps.mjs +11 -11
  138. package/fesm2022/ng-nest-ui-suggestion.mjs +110 -0
  139. package/fesm2022/ng-nest-ui-suggestion.mjs.map +1 -0
  140. package/fesm2022/ng-nest-ui-switch.mjs +12 -12
  141. package/fesm2022/ng-nest-ui-switch.mjs.map +1 -1
  142. package/fesm2022/ng-nest-ui-table-view.mjs +60 -60
  143. package/fesm2022/ng-nest-ui-table-view.mjs.map +1 -1
  144. package/fesm2022/ng-nest-ui-table.mjs +58 -47
  145. package/fesm2022/ng-nest-ui-table.mjs.map +1 -1
  146. package/fesm2022/ng-nest-ui-tabs.mjs +30 -30
  147. package/fesm2022/ng-nest-ui-tabs.mjs.map +1 -1
  148. package/fesm2022/ng-nest-ui-tag.mjs +22 -18
  149. package/fesm2022/ng-nest-ui-tag.mjs.map +1 -1
  150. package/fesm2022/ng-nest-ui-text-retract.mjs +11 -11
  151. package/fesm2022/ng-nest-ui-textarea.mjs +12 -12
  152. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  153. package/fesm2022/ng-nest-ui-theme.mjs +11 -11
  154. package/fesm2022/ng-nest-ui-thought-chain.mjs +121 -0
  155. package/fesm2022/ng-nest-ui-thought-chain.mjs.map +1 -0
  156. package/fesm2022/ng-nest-ui-time-ago.mjs +7 -7
  157. package/fesm2022/ng-nest-ui-time-picker.mjs +31 -29
  158. package/fesm2022/ng-nest-ui-time-picker.mjs.map +1 -1
  159. package/fesm2022/ng-nest-ui-time-range.mjs +7 -7
  160. package/fesm2022/ng-nest-ui-timeline.mjs +36 -14
  161. package/fesm2022/ng-nest-ui-timeline.mjs.map +1 -1
  162. package/fesm2022/ng-nest-ui-tooltip.mjs +27 -74
  163. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  164. package/fesm2022/ng-nest-ui-transfer.mjs +12 -12
  165. package/fesm2022/ng-nest-ui-transfer.mjs.map +1 -1
  166. package/fesm2022/ng-nest-ui-tree-file.mjs +11 -11
  167. package/fesm2022/ng-nest-ui-tree-select.mjs +27 -25
  168. package/fesm2022/ng-nest-ui-tree-select.mjs.map +1 -1
  169. package/fesm2022/ng-nest-ui-tree.mjs +23 -23
  170. package/fesm2022/ng-nest-ui-tree.mjs.map +1 -1
  171. package/fesm2022/ng-nest-ui-typography.mjs +11 -11
  172. package/fesm2022/ng-nest-ui-upload.mjs +221 -24
  173. package/fesm2022/ng-nest-ui-upload.mjs.map +1 -1
  174. package/fesm2022/ng-nest-ui-welcome.mjs +11 -11
  175. package/fesm2022/ng-nest-ui.mjs +4 -0
  176. package/fesm2022/ng-nest-ui.mjs.map +1 -1
  177. package/index.d.ts +4 -0
  178. package/list/index.d.ts +30 -18
  179. package/package.json +44 -32
  180. package/popover/index.d.ts +2 -1
  181. package/prompts/index.d.ts +17 -2
  182. package/select/index.d.ts +12 -2
  183. package/sender/index.d.ts +1 -0
  184. package/style/animates/base.scss +32 -0
  185. package/style/animates/conect.scss +32 -0
  186. package/style/animates/fade.scss +32 -0
  187. package/style/animates/index.scss +11 -0
  188. package/style/animates/move.scss +129 -0
  189. package/style/animates/opacity.scss +26 -0
  190. package/style/animates/slide.scss +113 -0
  191. package/style/core/index.css +353 -0
  192. package/style/core/index.css.map +1 -1
  193. package/style/core/index.scss +1 -6
  194. package/suggestion/index.d.ts +96 -0
  195. package/table/index.d.ts +15 -4
  196. package/table-view/index.d.ts +1 -1
  197. package/tag/index.d.ts +2 -1
  198. package/thought-chain/index.d.ts +107 -0
  199. package/time-picker/index.d.ts +2 -1
  200. package/timeline/index.d.ts +35 -19
  201. package/tooltip/index.d.ts +2 -12
  202. package/tree-select/index.d.ts +2 -1
  203. package/upload/index.d.ts +39 -2
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, input, model, output, Component, viewChild, computed, inject, ViewContainerRef, signal, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, EventEmitter, HostListener, Directive, NgModule, TemplateRef, Injectable } from '@angular/core';
3
- import { XPropertyFunction, XToCssPixelValue, XToBoolean, XProperty, XIsEmpty, XSlideAnimation, XOpacityAnimation, XConfigService, XFillDefault } from '@ng-nest/ui/core';
2
+ import { InjectionToken, input, model, output, Component, viewChild, computed, inject, ViewContainerRef, signal, HostBinding, ChangeDetectionStrategy, ViewEncapsulation, HostListener, Directive, NgModule, TemplateRef, Injectable } from '@angular/core';
3
+ import { XPropertyFunction, XToCssPixelValue, XToBoolean, XProperty, XIsEmpty, XConfigService, XFillDefault } from '@ng-nest/ui/core';
4
4
  import { XPortalService } from '@ng-nest/ui/portal';
5
- import { Subject, takeUntil, filter, take } from 'rxjs';
5
+ import { Subject, takeUntil } from 'rxjs';
6
6
  import { Overlay } from '@angular/cdk/overlay';
7
7
  import { XOutletDirective } from '@ng-nest/ui/outlet';
8
8
  import { XButtonComponent } from '@ng-nest/ui/button';
9
9
  import { NgClass, NgTemplateOutlet } from '@angular/common';
10
10
  import { toObservable } from '@angular/core/rxjs-interop';
11
11
  import * as i1 from '@angular/cdk/portal';
12
- import { BasePortalOutlet, CdkPortalOutlet, PortalModule, TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
12
+ import { CdkPortalOutlet, PortalModule, TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
13
13
 
14
14
  /**
15
15
  * Drawer
@@ -66,13 +66,13 @@ class XDrawerProperty extends XPropertyFunction(X_DRAWER_CONFIG_NAME) {
66
66
  */
67
67
  this.close = output();
68
68
  }
69
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
70
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.0", type: XDrawerProperty, isStandalone: true, selector: "x-drawer-property", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, backdropClose: { classPropertyName: "backdropClose", publicName: "backdropClose", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", close: "close" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
69
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
70
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.5", type: XDrawerProperty, isStandalone: true, selector: "x-drawer-property", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, backdropClose: { classPropertyName: "backdropClose", publicName: "backdropClose", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange", close: "close" }, usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
71
71
  }
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerProperty, decorators: [{
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerProperty, decorators: [{
73
73
  type: Component,
74
74
  args: [{ selector: `${XDrawerPrefix}-property`, template: '' }]
75
- }] });
75
+ }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }, { type: i0.Output, args: ["visibleChange"] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], backdropClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdropClose", required: false }] }], hasBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasBackdrop", required: false }] }], className: [{ type: i0.Input, args: [{ isSignal: true, alias: "className", required: false }] }], close: [{ type: i0.Output, args: ["close"] }] } });
76
76
  /**
77
77
  * Drawer Container
78
78
  * @selector x-drawer-container
@@ -84,10 +84,10 @@ const X_DRAWER_CONTAINER = new InjectionToken('X_DRAWER_CONTAINER');
84
84
  * Drawer Container Property
85
85
  */
86
86
  class XDrawerContainerProperty extends XProperty {
87
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerContainerProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
88
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: XDrawerContainerProperty, isStandalone: true, selector: "x-drawer-container-property", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
87
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerContainerProperty, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
88
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.5", type: XDrawerContainerProperty, isStandalone: true, selector: "x-drawer-container-property", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
89
89
  }
90
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerContainerProperty, decorators: [{
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerContainerProperty, decorators: [{
91
91
  type: Component,
92
92
  args: [{ selector: `${XDrawerContainerPrefix}-property`, template: '' }]
93
93
  }] });
@@ -154,72 +154,57 @@ class XDrawerComponent extends XDrawerProperty {
154
154
  return this.portal?.overlayRef?.hasAttached();
155
155
  }
156
156
  closePortal() {
157
- if (this.container) {
157
+ if (this.portalAttached()) {
158
+ this.portal?.overlayRef?.detach();
159
+ this.back$?.unsubscribe();
158
160
  this.close.emit();
159
161
  }
160
- else {
161
- if (this.portalAttached()) {
162
- this.portal?.overlayRef?.detach();
163
- this.back$?.unsubscribe();
164
- this.close.emit();
165
- }
162
+ else if (this.container && this.visible()) {
163
+ this.visible.set(false);
166
164
  }
167
165
  }
168
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
169
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: XDrawerComponent, isStandalone: true, selector: "x-drawer", host: { properties: { "class.x-drawer-visible": "this.getVisible" } }, viewQueries: [{ propertyName: "drawerTpl", first: true, predicate: ["drawerTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #drawerTpl>\r\n @if (hasContainer() && hasBackdrop()) {\r\n <div class=\"x-drawer-backdrop\" (click)=\"closePortal()\"></div>\r\n }\r\n <div\r\n class=\"x-drawer\"\r\n [ngClass]=\"classMap()\"\r\n [style.width]=\"hasContainer() ? width() : '100%'\"\r\n [style.height]=\"hasContainer() ? height() : '100%'\"\r\n [class.x-drawer-visible]=\"visible()\"\r\n [@x-slide-animation]=\"placement()\"\r\n >\r\n @if (title()) {\r\n <div class=\"x-drawer-header\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title()\">{{ title() }}</ng-container>\r\n </div>\r\n <x-button\r\n size=\"small\"\r\n class=\"x-drawer-close\"\r\n icon=\"fto-x\"\r\n type=\"text\"\r\n (click)=\"closePortal()\"\r\n closable\r\n ></x-button>\r\n </div>\r\n }\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n@if (hasContainer()) {\r\n <ng-container *ngTemplateOutlet=\"drawerTpl\"></ng-container>\r\n}\r\n", styles: [".x-drawer{margin:0;padding:0}.x-drawer{background-color:var(--x-background);position:relative;box-shadow:var(--x-box-shadow)}.x-drawer-header{padding:1rem 1rem .5rem}.x-drawer-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-close{position:absolute;top:.425rem;right:.425rem}.x-drawer-title{padding:0}.x-drawer-content{padding:0 1rem 1rem;height:calc(100% - 3rem);overflow:auto}.x-drawer-no-title .x-drawer-content{padding:.5rem 1rem}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XButtonComponent, selector: "x-button" }], animations: [XSlideAnimation, XOpacityAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
166
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
167
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.5", type: XDrawerComponent, isStandalone: true, selector: "x-drawer", host: { properties: { "class.x-drawer-visible": "this.getVisible" } }, viewQueries: [{ propertyName: "drawerTpl", first: true, predicate: ["drawerTpl"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #drawerTpl>\r\n @if (visible()) {\r\n @if (hasContainer() && hasBackdrop()) {\r\n <div\r\n class=\"x-drawer-backdrop\"\r\n [animate.enter]=\"`x-opacity-enter`\"\r\n [animate.leave]=\"`x-opacity-leave`\"\r\n (click)=\"closePortal()\"\r\n ></div>\r\n }\r\n\r\n <div\r\n class=\"x-drawer\"\r\n [ngClass]=\"classMap()\"\r\n [style.width]=\"hasContainer() ? width() : '100%'\"\r\n [style.height]=\"hasContainer() ? height() : '100%'\"\r\n [animate.enter]=\"`x-slide-${placement()}-enter`\"\r\n [animate.leave]=\"`x-slide-${placement()}-leave`\"\r\n >\r\n @if (title()) {\r\n {{ hasContainer() }} {{ hasBackdrop() }}\r\n <div class=\"x-drawer-header\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title()\">{{ title() }}</ng-container>\r\n </div>\r\n <x-button\r\n size=\"small\"\r\n class=\"x-drawer-close\"\r\n icon=\"fto-x\"\r\n type=\"text\"\r\n (click)=\"closePortal()\"\r\n closable\r\n ></x-button>\r\n </div>\r\n }\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n@if (hasContainer()) {\r\n <ng-container *ngTemplateOutlet=\"drawerTpl\"></ng-container>\r\n}\r\n", styles: [".x-drawer{margin:0;padding:0}.x-drawer{background-color:var(--x-background);position:relative;box-shadow:var(--x-box-shadow)}.x-drawer-header{padding:1rem 1rem .5rem}.x-drawer-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-close{position:absolute;top:.425rem;right:.425rem}.x-drawer-title{padding:0}.x-drawer-content{padding:0 1rem 1rem;height:calc(100% - 3rem);overflow:auto}.x-drawer-no-title .x-drawer-content{padding:.5rem 1rem}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { kind: "component", type: XButtonComponent, selector: "x-button" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
170
168
  }
171
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerComponent, decorators: [{
169
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerComponent, decorators: [{
172
170
  type: Component,
173
- args: [{ selector: `${XDrawerPrefix}`, imports: [NgClass, NgTemplateOutlet, XOutletDirective, XButtonComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XSlideAnimation, XOpacityAnimation], template: "<ng-template #drawerTpl>\r\n @if (hasContainer() && hasBackdrop()) {\r\n <div class=\"x-drawer-backdrop\" (click)=\"closePortal()\"></div>\r\n }\r\n <div\r\n class=\"x-drawer\"\r\n [ngClass]=\"classMap()\"\r\n [style.width]=\"hasContainer() ? width() : '100%'\"\r\n [style.height]=\"hasContainer() ? height() : '100%'\"\r\n [class.x-drawer-visible]=\"visible()\"\r\n [@x-slide-animation]=\"placement()\"\r\n >\r\n @if (title()) {\r\n <div class=\"x-drawer-header\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title()\">{{ title() }}</ng-container>\r\n </div>\r\n <x-button\r\n size=\"small\"\r\n class=\"x-drawer-close\"\r\n icon=\"fto-x\"\r\n type=\"text\"\r\n (click)=\"closePortal()\"\r\n closable\r\n ></x-button>\r\n </div>\r\n }\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n@if (hasContainer()) {\r\n <ng-container *ngTemplateOutlet=\"drawerTpl\"></ng-container>\r\n}\r\n", styles: [".x-drawer{margin:0;padding:0}.x-drawer{background-color:var(--x-background);position:relative;box-shadow:var(--x-box-shadow)}.x-drawer-header{padding:1rem 1rem .5rem}.x-drawer-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-close{position:absolute;top:.425rem;right:.425rem}.x-drawer-title{padding:0}.x-drawer-content{padding:0 1rem 1rem;height:calc(100% - 3rem);overflow:auto}.x-drawer-no-title .x-drawer-content{padding:.5rem 1rem}\n"] }]
171
+ args: [{ selector: `${XDrawerPrefix}`, imports: [NgClass, NgTemplateOutlet, XOutletDirective, XButtonComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template #drawerTpl>\r\n @if (visible()) {\r\n @if (hasContainer() && hasBackdrop()) {\r\n <div\r\n class=\"x-drawer-backdrop\"\r\n [animate.enter]=\"`x-opacity-enter`\"\r\n [animate.leave]=\"`x-opacity-leave`\"\r\n (click)=\"closePortal()\"\r\n ></div>\r\n }\r\n\r\n <div\r\n class=\"x-drawer\"\r\n [ngClass]=\"classMap()\"\r\n [style.width]=\"hasContainer() ? width() : '100%'\"\r\n [style.height]=\"hasContainer() ? height() : '100%'\"\r\n [animate.enter]=\"`x-slide-${placement()}-enter`\"\r\n [animate.leave]=\"`x-slide-${placement()}-leave`\"\r\n >\r\n @if (title()) {\r\n {{ hasContainer() }} {{ hasBackdrop() }}\r\n <div class=\"x-drawer-header\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title()\">{{ title() }}</ng-container>\r\n </div>\r\n <x-button\r\n size=\"small\"\r\n class=\"x-drawer-close\"\r\n icon=\"fto-x\"\r\n type=\"text\"\r\n (click)=\"closePortal()\"\r\n closable\r\n ></x-button>\r\n </div>\r\n }\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n@if (hasContainer()) {\r\n <ng-container *ngTemplateOutlet=\"drawerTpl\"></ng-container>\r\n}\r\n", styles: [".x-drawer{margin:0;padding:0}.x-drawer{background-color:var(--x-background);position:relative;box-shadow:var(--x-box-shadow)}.x-drawer-header{padding:1rem 1rem .5rem}.x-drawer-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-close{position:absolute;top:.425rem;right:.425rem}.x-drawer-title{padding:0}.x-drawer-content{padding:0 1rem 1rem;height:calc(100% - 3rem);overflow:auto}.x-drawer-no-title .x-drawer-content{padding:.5rem 1rem}\n"] }]
174
172
  }], ctorParameters: () => [], propDecorators: { getVisible: [{
175
173
  type: HostBinding,
176
174
  args: ['class.x-drawer-visible']
177
- }] } });
175
+ }], drawerTpl: [{ type: i0.ViewChild, args: ['drawerTpl', { isSignal: true }] }] } });
178
176
 
179
- class XDrawerPortalComponent extends BasePortalOutlet {
177
+ class XDrawerPortalComponent {
180
178
  constructor() {
181
- super(...arguments);
182
179
  this._has = true;
180
+ this.placement = input(...(ngDevMode ? [undefined, { debugName: "placement" }] : []));
183
181
  this.portalOutlet = viewChild.required(CdkPortalOutlet);
184
- this.animationChanged = new EventEmitter();
185
- }
186
- done({ toState, totalTime }) {
187
- this.animationChanged.next({ action: 'done', state: toState, totalTime });
188
182
  }
189
- start({ toState, totalTime }) {
190
- this.animationChanged.next({ action: 'start', state: toState, totalTime });
183
+ get animateEnter() {
184
+ return `x-slide-${this.placement()}-enter`;
191
185
  }
192
- attachComponentPortal(portal) {
193
- if (this.portalOutlet().hasAttached()) {
194
- throw Error('drawer portal has attached');
195
- }
196
- return this.portalOutlet().attachComponentPortal(portal);
186
+ get animateLeave() {
187
+ return `x-slide-${this.placement()}-leave`;
197
188
  }
198
- attachTemplatePortal(portal) {
199
- if (this.portalOutlet().hasAttached()) {
200
- throw Error('drawer portal has attached');
201
- }
202
- return this.portalOutlet().attachTemplatePortal(portal);
189
+ ngAfterViewInit() {
190
+ this.portalOutlet().setDisposeFn(() => { });
203
191
  }
204
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerPortalComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
205
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.0", type: XDrawerPortalComponent, isStandalone: true, selector: "x-drawer-portal", host: { listeners: { "@x-slide-animation.done": "done($event)", "@x-slide-animation.start": "start($event)" }, properties: { "class.x-drawer-portal": "this._has", "@x-slide-animation": "this.placement" } }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\r\n", styles: [".x-drawer-portal{margin:0;padding:0}.x-drawer-portal{height:100%;width:100%;background-color:var(--x-background-100);position:relative;box-shadow:var(--x-box-shadow);overflow:auto;padding:1rem}.x-drawer-portal-title{display:block;margin:0 0 .5rem;font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-portal-content{display:block;margin:0 -1rem;padding:0 1rem;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [XSlideAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
192
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerPortalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
193
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.5", type: XDrawerPortalComponent, isStandalone: true, selector: "x-drawer-portal", inputs: { placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.x-drawer-portal": "this._has", "animate.enter": "this.animateEnter", "animate.leave": "this.animateLeave" } }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\r\n", styles: [".x-drawer-portal{margin:0;padding:0}.x-drawer-portal{height:100%;width:100%;background-color:var(--x-background-100);position:relative;box-shadow:var(--x-box-shadow);overflow:auto;padding:1rem}.x-drawer-portal-title{display:block;margin:0 0 .5rem;font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-portal-content{display:block;margin:0 -1rem;padding:0 1rem;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
206
194
  }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerPortalComponent, decorators: [{
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerPortalComponent, decorators: [{
208
196
  type: Component,
209
- args: [{ selector: 'x-drawer-portal', imports: [PortalModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XSlideAnimation], template: "<ng-template cdkPortalOutlet></ng-template>\r\n", styles: [".x-drawer-portal{margin:0;padding:0}.x-drawer-portal{height:100%;width:100%;background-color:var(--x-background-100);position:relative;box-shadow:var(--x-box-shadow);overflow:auto;padding:1rem}.x-drawer-portal-title{display:block;margin:0 0 .5rem;font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-portal-content{display:block;margin:0 -1rem;padding:0 1rem;overflow:auto}\n"] }]
197
+ args: [{ selector: 'x-drawer-portal', imports: [PortalModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\r\n", styles: [".x-drawer-portal{margin:0;padding:0}.x-drawer-portal{height:100%;width:100%;background-color:var(--x-background-100);position:relative;box-shadow:var(--x-box-shadow);overflow:auto;padding:1rem}.x-drawer-portal-title{display:block;margin:0 0 .5rem;font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-drawer-portal-content{display:block;margin:0 -1rem;padding:0 1rem;overflow:auto}\n"] }]
210
198
  }], propDecorators: { _has: [{
211
199
  type: HostBinding,
212
200
  args: ['class.x-drawer-portal']
213
- }], placement: [{
201
+ }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], animateEnter: [{
214
202
  type: HostBinding,
215
- args: ['@x-slide-animation']
216
- }], done: [{
217
- type: HostListener,
218
- args: ['@x-slide-animation.done', ['$event']]
219
- }], start: [{
220
- type: HostListener,
221
- args: ['@x-slide-animation.start', ['$event']]
222
- }] } });
203
+ args: ['animate.enter']
204
+ }], animateLeave: [{
205
+ type: HostBinding,
206
+ args: ['animate.leave']
207
+ }], portalOutlet: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }] } });
223
208
 
224
209
  // TODO: add more function
225
210
  class XDrawerRef {
@@ -228,12 +213,7 @@ class XDrawerRef {
228
213
  this.containerInstance = containerInstance;
229
214
  }
230
215
  close() {
231
- this.containerInstance.animationChanged
232
- .pipe(filter((event) => event.state === 'void' && event.action === 'done'), take(1))
233
- .subscribe(() => {
234
- this.overlayRef.dispose();
235
- });
236
- this.containerInstance.placement = 'void';
216
+ this.overlayRef.detach();
237
217
  }
238
218
  }
239
219
 
@@ -244,10 +224,10 @@ class XDrawerCloseDirective {
244
224
  onCloseClick() {
245
225
  this.drawerRef && this.drawerRef.close();
246
226
  }
247
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
248
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: XDrawerCloseDirective, isStandalone: true, selector: "[x-drawer-close]", host: { listeners: { "click": "onCloseClick($event)" } }, ngImport: i0 }); }
227
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
228
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.5", type: XDrawerCloseDirective, isStandalone: true, selector: "[x-drawer-close]", host: { listeners: { "click": "onCloseClick($event)" } }, ngImport: i0 }); }
249
229
  }
250
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerCloseDirective, decorators: [{
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerCloseDirective, decorators: [{
251
231
  type: Directive,
252
232
  args: [{
253
233
  selector: `[x-drawer-close]`
@@ -260,10 +240,10 @@ class XDrawerTitleDirective {
260
240
  constructor() {
261
241
  this._has = true;
262
242
  }
263
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
264
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: XDrawerTitleDirective, isStandalone: true, selector: "[x-drawer-title]", host: { properties: { "class.x-drawer-portal-title": "this._has" } }, ngImport: i0 }); }
243
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
244
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.5", type: XDrawerTitleDirective, isStandalone: true, selector: "[x-drawer-title]", host: { properties: { "class.x-drawer-portal-title": "this._has" } }, ngImport: i0 }); }
265
245
  }
266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerTitleDirective, decorators: [{
246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerTitleDirective, decorators: [{
267
247
  type: Directive,
268
248
  args: [{
269
249
  selector: `[x-drawer-title]`
@@ -276,10 +256,10 @@ class XDrawerContentDirective {
276
256
  constructor() {
277
257
  this._has = true;
278
258
  }
279
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
280
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: XDrawerContentDirective, isStandalone: true, selector: "[x-drawer-content], x-drawer-content", host: { properties: { "class.x-drawer-portal-content": "this._has" } }, ngImport: i0 }); }
259
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
260
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.5", type: XDrawerContentDirective, isStandalone: true, selector: "[x-drawer-content], x-drawer-content", host: { properties: { "class.x-drawer-portal-content": "this._has" } }, ngImport: i0 }); }
281
261
  }
282
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerContentDirective, decorators: [{
262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerContentDirective, decorators: [{
283
263
  type: Directive,
284
264
  args: [{
285
265
  selector: `[x-drawer-content], x-drawer-content`
@@ -294,30 +274,30 @@ class XDrawerContainerComponent extends XDrawerContainerProperty {
294
274
  super(...arguments);
295
275
  this.className = XDrawerContainerPrefix;
296
276
  }
297
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
298
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: XDrawerContainerComponent, isStandalone: true, selector: "x-drawer-container", host: { properties: { "class": "this.className" } }, providers: [
277
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
278
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.5", type: XDrawerContainerComponent, isStandalone: true, selector: "x-drawer-container", host: { properties: { "class": "this.className" } }, providers: [
299
279
  {
300
280
  provide: X_DRAWER_CONTAINER,
301
281
  useExisting: XDrawerContainerComponent
302
282
  }
303
- ], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [".x-drawer-container{margin:0;padding:0}.x-drawer-container{position:relative;z-index:1;box-sizing:border-box;display:block;overflow:hidden}.x-drawer-container .x-drawer{position:absolute;display:block;outline:0;z-index:2;transition:transform .2s ease-in,visibility .2s ease-in;visibility:hidden}.x-drawer-container .x-drawer-left{transform:translate3d(-100%,0,0);left:0;top:0}.x-drawer-container .x-drawer-right{transform:translate3d(100%,0,0);right:0;top:0}.x-drawer-container .x-drawer-top{transform:translate3d(0,-100%,0);top:0;left:0}.x-drawer-container .x-drawer-bottom{transform:translate3d(0,100%,0);bottom:0;left:0}.x-drawer-container .x-drawer-visible{transform:translateZ(0);visibility:inherit}.x-drawer-container .x-drawer-visible .x-drawer-backdrop{opacity:1;z-index:1}.x-drawer-container .x-drawer-backdrop{position:absolute;inset:0;z-index:-1;pointer-events:auto;background:#00000052;transition:opacity .4s cubic-bezier(.25,.8,.25,1),z-index 0 ease-in .4s;opacity:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
283
+ ], usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\r\n", styles: [".x-drawer-container{margin:0;padding:0}.x-drawer-container{position:relative;z-index:1;box-sizing:border-box;display:block;overflow:hidden}.x-drawer-container .x-drawer{position:absolute;display:block;outline:0;z-index:1001;width:initial;height:initial}.x-drawer-container .x-drawer-left{left:0;top:0}.x-drawer-container .x-drawer-right{right:0;top:0}.x-drawer-container .x-drawer-top{top:0;left:0}.x-drawer-container .x-drawer-bottom{bottom:0;left:0}.x-drawer-container .x-drawer-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;background:#00000052}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
304
284
  }
305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerContainerComponent, decorators: [{
285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerContainerComponent, decorators: [{
306
286
  type: Component,
307
287
  args: [{ selector: XDrawerContainerPrefix, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
308
288
  {
309
289
  provide: X_DRAWER_CONTAINER,
310
290
  useExisting: XDrawerContainerComponent
311
291
  }
312
- ], template: "<ng-content></ng-content>\r\n", styles: [".x-drawer-container{margin:0;padding:0}.x-drawer-container{position:relative;z-index:1;box-sizing:border-box;display:block;overflow:hidden}.x-drawer-container .x-drawer{position:absolute;display:block;outline:0;z-index:2;transition:transform .2s ease-in,visibility .2s ease-in;visibility:hidden}.x-drawer-container .x-drawer-left{transform:translate3d(-100%,0,0);left:0;top:0}.x-drawer-container .x-drawer-right{transform:translate3d(100%,0,0);right:0;top:0}.x-drawer-container .x-drawer-top{transform:translate3d(0,-100%,0);top:0;left:0}.x-drawer-container .x-drawer-bottom{transform:translate3d(0,100%,0);bottom:0;left:0}.x-drawer-container .x-drawer-visible{transform:translateZ(0);visibility:inherit}.x-drawer-container .x-drawer-visible .x-drawer-backdrop{opacity:1;z-index:1}.x-drawer-container .x-drawer-backdrop{position:absolute;inset:0;z-index:-1;pointer-events:auto;background:#00000052;transition:opacity .4s cubic-bezier(.25,.8,.25,1),z-index 0 ease-in .4s;opacity:0}\n"] }]
292
+ ], template: "<ng-content></ng-content>\r\n", styles: [".x-drawer-container{margin:0;padding:0}.x-drawer-container{position:relative;z-index:1;box-sizing:border-box;display:block;overflow:hidden}.x-drawer-container .x-drawer{position:absolute;display:block;outline:0;z-index:1001;width:initial;height:initial}.x-drawer-container .x-drawer-left{left:0;top:0}.x-drawer-container .x-drawer-right{right:0;top:0}.x-drawer-container .x-drawer-top{top:0;left:0}.x-drawer-container .x-drawer-bottom{bottom:0;left:0}.x-drawer-container .x-drawer-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;background:#00000052}\n"] }]
313
293
  }], propDecorators: { className: [{
314
294
  type: HostBinding,
315
295
  args: ['class']
316
296
  }] } });
317
297
 
318
298
  class XDrawerModule {
319
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
320
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: XDrawerModule, imports: [XDrawerComponent,
299
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
300
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.5", ngImport: i0, type: XDrawerModule, imports: [XDrawerComponent,
321
301
  XDrawerCloseDirective,
322
302
  XDrawerTitleDirective,
323
303
  XDrawerContentDirective,
@@ -326,9 +306,9 @@ class XDrawerModule {
326
306
  XDrawerTitleDirective,
327
307
  XDrawerContentDirective,
328
308
  XDrawerContainerComponent] }); }
329
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerModule, imports: [XDrawerComponent] }); }
309
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerModule, imports: [XDrawerComponent] }); }
330
310
  }
331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerModule, decorators: [{
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerModule, decorators: [{
332
312
  type: NgModule,
333
313
  args: [{
334
314
  exports: [
@@ -378,17 +358,20 @@ class XDrawerService {
378
358
  });
379
359
  const { overlayRef, componentRef } = portal || {};
380
360
  const { instance } = componentRef || {};
381
- instance.placement = option.placement;
361
+ componentRef?.setInput('placement', option.placement);
382
362
  const drawerRef = new XDrawerRef(overlayRef, instance);
383
363
  if (content instanceof TemplateRef) {
384
- instance.attachTemplatePortal(new TemplatePortal(content, option.viewContainerRef, { $implicit: option.data, drawerRef: drawerRef }));
364
+ instance.portal = new TemplatePortal(content, option.viewContainerRef, {
365
+ $implicit: option.data,
366
+ drawerRef: drawerRef
367
+ });
385
368
  }
386
369
  else {
387
370
  const injector = this.portalService.createInjector([
388
371
  { provide: X_DRAWER_DATA, useValue: option.data },
389
372
  { provide: XDrawerRef, useValue: drawerRef }
390
373
  ]);
391
- instance.attachComponentPortal(new ComponentPortal(content, option.viewContainerRef, injector));
374
+ instance.portal = new ComponentPortal(content, option.viewContainerRef, injector);
392
375
  }
393
376
  if (option.hasBackdrop && option.backdropClose && overlayRef)
394
377
  overlayRef.backdropClick().subscribe(() => {
@@ -396,10 +379,10 @@ class XDrawerService {
396
379
  });
397
380
  return drawerRef;
398
381
  }
399
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
400
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerService, providedIn: 'root' }); }
382
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
383
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerService, providedIn: 'root' }); }
401
384
  }
402
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: XDrawerService, decorators: [{
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.5", ngImport: i0, type: XDrawerService, decorators: [{
403
386
  type: Injectable,
404
387
  args: [{ providedIn: 'root' }]
405
388
  }], ctorParameters: () => [] });
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-drawer.mjs","sources":["../../../../lib/ng-nest/ui/drawer/drawer.property.ts","../../../../lib/ng-nest/ui/drawer/drawer.component.ts","../../../../lib/ng-nest/ui/drawer/drawer.component.html","../../../../lib/ng-nest/ui/drawer/drawer-portal.component.ts","../../../../lib/ng-nest/ui/drawer/drawer-portal.component.html","../../../../lib/ng-nest/ui/drawer/drawer-ref.ts","../../../../lib/ng-nest/ui/drawer/drawer-portal.directives.ts","../../../../lib/ng-nest/ui/drawer/drawer-container.component.ts","../../../../lib/ng-nest/ui/drawer/drawer-container.component.html","../../../../lib/ng-nest/ui/drawer/drawer.module.ts","../../../../lib/ng-nest/ui/drawer/drawer.service.ts","../../../../lib/ng-nest/ui/drawer/ng-nest-ui-drawer.ts"],"sourcesContent":["import { XPropertyFunction, XProperty, XToCssPixelValue, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, InjectionToken, ViewContainerRef, input, model, output } from '@angular/core';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { XDrawerPortalComponent } from './drawer-portal.component';\r\nimport type { XDrawerRef } from './drawer-ref';\r\nimport type { XTemplate, XPosition, XBoolean, XNumber } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Drawer\r\n * @selector x-drawer\r\n * @decorator component\r\n */\r\nexport const XDrawerPrefix = 'x-drawer';\r\nexport const X_DRAWER_CONFIG_NAME = 'drawer';\r\nexport const X_DRAWER_DATA = new InjectionToken<any>('XDrawerData');\r\n\r\n/**\r\n * Drawer Property\r\n */\r\n@Component({ selector: `${XDrawerPrefix}-property`, template: '' })\r\nexport class XDrawerProperty extends XPropertyFunction(X_DRAWER_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 标题\r\n * @en_US Title\r\n */\r\n readonly title = input<XTemplate>();\r\n /**\r\n * @zh_CN 显示/隐藏\r\n * @en_US Show/hide\r\n */\r\n readonly visible = model<boolean>(false);\r\n /**\r\n * @zh_CN 展示方向\r\n * @en_US Display direction\r\n */\r\n readonly placement = input<XPosition>(this.config?.placement ?? 'right');\r\n /**\r\n * @zh_CN 尺寸,支持固定值\r\n * @en_US Size, supports fixed value\r\n */\r\n readonly size = input<string, XNumber>(this.config?.size ?? '30%', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 点击遮罩关闭\r\n * @en_US Click the mask to close\r\n */\r\n readonly backdropClose = input<boolean, XBoolean>(this.config?.backdropClose ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 是否显示背景遮罩\r\n * @en_US Whether to display the background mask\r\n */\r\n readonly hasBackdrop = input<boolean, XBoolean>(this.config?.hasBackdrop ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 自定义样式名\r\n * @en_US Custom style name\r\n */\r\n readonly className = input<string>(this.config?.className ?? '');\r\n /**\r\n * @zh_CN 关闭的事件\r\n * @en_US Closed event\r\n */\r\n readonly close = output();\r\n}\r\n\r\n/**\r\n * Drawer Option\r\n */\r\nexport interface XDrawerOption {\r\n /**\r\n * @zh_CN 展示方向\r\n * @en_US Display direction\r\n * @default 'right'\r\n * @withConfig true\r\n */\r\n placement?: XPosition;\r\n /**\r\n * @zh_CN 尺寸,支持固定值\r\n * @en_US Size, supports fixed value\r\n * @default '30%'\r\n * @withConfig true\r\n */\r\n size?: string;\r\n /**\r\n * @zh_CN 自定义样式名\r\n * @en_US Custom style name\r\n */\r\n className?: string;\r\n /**\r\n * @zh_CN 点击遮罩关闭\r\n * @en_US Click the mask to close\r\n * @default true\r\n * @withConfig true\r\n */\r\n backdropClose?: boolean;\r\n /**\r\n * @zh_CN 是否显示背景遮罩\r\n * @en_US Whether to display the background mask\r\n * @default true\r\n * @withConfig true\r\n */\r\n hasBackdrop?: boolean;\r\n /**\r\n * @zh_CN 数据,通过 \"@Inject(X_DRAWER_DATA)\" 来接收数据\r\n * @en_US Data. Receive data by \"@Inject(X_DRAWER_DATA)\"\r\n */\r\n data?: any;\r\n /**\r\n * @zh_CN 视图容器实例可以包含其他视图容器。\r\n * @en_US A view container instance can contain other view containers.\r\n */\r\n viewContainerRef?: ViewContainerRef;\r\n}\r\n\r\n/**\r\n * Drawer Container\r\n * @selector x-drawer-container\r\n * @decorator component\r\n */\r\nexport const XDrawerContainerPrefix = 'x-drawer-container';\r\nexport const X_DRAWER_CONTAINER = new InjectionToken('X_DRAWER_CONTAINER');\r\n\r\n/**\r\n * Drawer Container Property\r\n */\r\n@Component({ selector: `${XDrawerContainerPrefix}-property`, template: '' })\r\nexport class XDrawerContainerProperty extends XProperty {}\r\n\r\n/**\r\n * @zh_CN 创建的抽屉对象\r\n * @en_US Drawer object created\r\n */\r\nexport interface XDrawerPortalOverlayRef extends XPortalOverlayRef<XDrawerPortalComponent> {\r\n drawerRef?: XDrawerRef<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 抽屉动画状态\r\n * @en_US Drawer animation status\r\n */\r\nexport type XDrawerAnimationState = XPosition | 'void';\r\n\r\n/**\r\n * @zh_CN 抽屉动画事件\r\n * @en_US Drawer animation event\r\n */\r\nexport interface XDrawerAnimationEvent {\r\n state: XDrawerAnimationState;\r\n action: 'start' | 'done';\r\n totalTime: number;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n TemplateRef,\r\n ViewContainerRef,\r\n HostBinding,\r\n inject,\r\n OnDestroy,\r\n computed,\r\n signal,\r\n AfterViewInit,\r\n viewChild\r\n} from '@angular/core';\r\nimport { XDrawerPrefix, XDrawerProperty, X_DRAWER_CONTAINER } from './drawer.property';\r\nimport { XIsEmpty, XOpacityAnimation, XSlideAnimation } from '@ng-nest/ui/core';\r\nimport { XPortalService, XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { Subject, Subscription, takeUntil } from 'rxjs';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { XDrawerContainerComponent } from './drawer-container.component';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\r\nimport { toObservable } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: `${XDrawerPrefix}`,\r\n imports: [NgClass, NgTemplateOutlet, XOutletDirective, XButtonComponent],\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XSlideAnimation, XOpacityAnimation]\r\n})\r\nexport class XDrawerComponent extends XDrawerProperty implements AfterViewInit, OnDestroy {\r\n @HostBinding('class.x-drawer-visible') get getVisible() {\r\n return this.visible();\r\n }\r\n drawerTpl = viewChild.required<TemplateRef<void>>('drawerTpl');\r\n portal!: XPortalOverlayRef<any>;\r\n back$: Subscription | null = null;\r\n width = computed(() => {\r\n return ['left', 'right'].includes(this.placement()) ? this.size() : '100%';\r\n });\r\n height = computed(() => {\r\n return ['top', 'bottom'].includes(this.placement()) ? this.size() : '100%';\r\n });\r\n\r\n private overlay = inject(Overlay);\r\n private portalService = inject(XPortalService);\r\n private viewContainerRef = inject(ViewContainerRef);\r\n private unSubject = new Subject<void>();\r\n container = inject<XDrawerContainerComponent>(X_DRAWER_CONTAINER, { optional: true });\r\n hasContainer = signal(false);\r\n classMap = computed(() => ({\r\n [`${XDrawerPrefix}-${this.placement()}`]: !XIsEmpty(this.placement()),\r\n [`${XDrawerPrefix}-no-title`]: XIsEmpty(this.title())\r\n }));\r\n visibleChanged = toObservable(this.visible);\r\n\r\n constructor() {\r\n super();\r\n this.visibleChanged.pipe(takeUntil(this.unSubject)).subscribe(() => this.setVisible());\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.hasContainer.set(!!this.container);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.back$?.unsubscribe();\r\n }\r\n\r\n setVisible() {\r\n if (this.visible()) {\r\n this.createPortal();\r\n } else {\r\n this.closePortal();\r\n }\r\n }\r\n\r\n createPortal() {\r\n if (this.hasContainer()) return;\r\n this.portal = this.portalService.attach({\r\n content: this.drawerTpl(),\r\n viewContainerRef: this.viewContainerRef,\r\n overlayConfig: {\r\n panelClass: this.className(),\r\n hasBackdrop: this.hasBackdrop(),\r\n scrollStrategy: this.overlay.scrollStrategies.block(),\r\n positionStrategy: this.portalService.setPosition(this.placement(), this.width(), this.height())\r\n }\r\n });\r\n if (this.portal.overlayRef && this.backdropClose()) {\r\n this.back$ = this.portal.overlayRef.backdropClick().subscribe(() => this.closePortal());\r\n }\r\n }\r\n\r\n portalAttached() {\r\n return this.portal?.overlayRef?.hasAttached();\r\n }\r\n\r\n closePortal() {\r\n if (this.container) {\r\n this.close.emit();\r\n } else {\r\n if (this.portalAttached()) {\r\n this.portal?.overlayRef?.detach();\r\n this.back$?.unsubscribe();\r\n this.close.emit();\r\n }\r\n }\r\n }\r\n}\r\n","<ng-template #drawerTpl>\r\n @if (hasContainer() && hasBackdrop()) {\r\n <div class=\"x-drawer-backdrop\" (click)=\"closePortal()\"></div>\r\n }\r\n <div\r\n class=\"x-drawer\"\r\n [ngClass]=\"classMap()\"\r\n [style.width]=\"hasContainer() ? width() : '100%'\"\r\n [style.height]=\"hasContainer() ? height() : '100%'\"\r\n [class.x-drawer-visible]=\"visible()\"\r\n [@x-slide-animation]=\"placement()\"\r\n >\r\n @if (title()) {\r\n <div class=\"x-drawer-header\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title()\">{{ title() }}</ng-container>\r\n </div>\r\n <x-button\r\n size=\"small\"\r\n class=\"x-drawer-close\"\r\n icon=\"fto-x\"\r\n type=\"text\"\r\n (click)=\"closePortal()\"\r\n closable\r\n ></x-button>\r\n </div>\r\n }\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</ng-template>\r\n@if (hasContainer()) {\r\n <ng-container *ngTemplateOutlet=\"drawerTpl\"></ng-container>\r\n}\r\n","import { BasePortalOutlet, PortalModule, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ComponentRef,\r\n EmbeddedViewRef,\r\n EventEmitter,\r\n HostBinding,\r\n HostListener,\r\n ViewEncapsulation,\r\n viewChild\r\n} from '@angular/core';\r\nimport { XSlideAnimation } from '@ng-nest/ui/core';\r\nimport { XDrawerAnimationEvent, XDrawerAnimationState } from './drawer.property';\r\nimport { AnimationEvent } from '@angular/animations';\r\n\r\n@Component({\r\n selector: 'x-drawer-portal',\r\n imports: [PortalModule],\r\n templateUrl: './drawer-portal.component.html',\r\n styleUrls: ['./drawer-portal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XSlideAnimation]\r\n})\r\nexport class XDrawerPortalComponent extends BasePortalOutlet {\r\n @HostBinding('class.x-drawer-portal') _has = true;\r\n @HostBinding('@x-slide-animation') public placement?: XDrawerAnimationState;\r\n @HostListener('@x-slide-animation.done', ['$event']) done({ toState, totalTime }: AnimationEvent) {\r\n this.animationChanged.next({ action: 'done', state: toState as XDrawerAnimationState, totalTime });\r\n }\r\n @HostListener('@x-slide-animation.start', ['$event']) start({ toState, totalTime }: AnimationEvent) {\r\n this.animationChanged.next({ action: 'start', state: toState as XDrawerAnimationState, totalTime });\r\n }\r\n portalOutlet = viewChild.required(CdkPortalOutlet);\r\n\r\n animationChanged = new EventEmitter<XDrawerAnimationEvent>();\r\n\r\n attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T> {\r\n if (this.portalOutlet().hasAttached()) {\r\n throw Error('drawer portal has attached');\r\n }\r\n return this.portalOutlet().attachComponentPortal(portal);\r\n }\r\n attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C> {\r\n if (this.portalOutlet().hasAttached()) {\r\n throw Error('drawer portal has attached');\r\n }\r\n return this.portalOutlet().attachTemplatePortal(portal);\r\n }\r\n}\r\n","<ng-template cdkPortalOutlet></ng-template>\r\n","import { OverlayRef } from '@angular/cdk/overlay';\r\nimport { filter, take } from 'rxjs';\r\nimport { XDrawerPortalComponent } from './drawer-portal.component';\r\n\r\n// TODO: add more function\r\nexport class XDrawerRef<C> {\r\n componentInstance!: C;\r\n constructor(\r\n public overlayRef: OverlayRef,\r\n public containerInstance: XDrawerPortalComponent\r\n ) {}\r\n close() {\r\n this.containerInstance.animationChanged\r\n .pipe(\r\n filter((event) => event.state === 'void' && event.action === 'done'),\r\n take(1)\r\n )\r\n .subscribe(() => {\r\n this.overlayRef.dispose();\r\n });\r\n this.containerInstance.placement = 'void';\r\n }\r\n}\r\n","import { Directive, HostBinding, HostListener, inject } from '@angular/core';\r\nimport { XDrawerRef } from './drawer-ref';\r\n\r\n@Directive({\r\n selector: `[x-drawer-close]`\r\n})\r\nexport class XDrawerCloseDirective {\r\n @HostListener('click', ['$event']) onCloseClick() {\r\n this.drawerRef && this.drawerRef.close();\r\n }\r\n drawerRef = inject(XDrawerRef, { optional: true });\r\n}\r\n\r\n@Directive({\r\n selector: `[x-drawer-title]`\r\n})\r\nexport class XDrawerTitleDirective {\r\n @HostBinding('class.x-drawer-portal-title') _has = true;\r\n}\r\n\r\n@Directive({\r\n selector: `[x-drawer-content], x-drawer-content`\r\n})\r\nexport class XDrawerContentDirective {\r\n @HostBinding('class.x-drawer-portal-content') _has = true;\r\n}\r\n","import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\r\nimport { XDrawerContainerPrefix, XDrawerContainerProperty, X_DRAWER_CONTAINER } from './drawer.property';\r\n\r\n@Component({\r\n selector: XDrawerContainerPrefix,\r\n templateUrl: './drawer-container.component.html',\r\n styleUrls: ['./drawer-container.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n {\r\n provide: X_DRAWER_CONTAINER,\r\n useExisting: XDrawerContainerComponent\r\n }\r\n ]\r\n})\r\nexport class XDrawerContainerComponent extends XDrawerContainerProperty {\r\n @HostBinding('class') className = XDrawerContainerPrefix;\r\n}\r\n","<ng-content></ng-content>\r\n","import { NgModule } from '@angular/core';\r\nimport { XDrawerComponent } from './drawer.component';\r\nimport { XDrawerCloseDirective, XDrawerContentDirective, XDrawerTitleDirective } from './drawer-portal.directives';\r\nimport { XDrawerContainerComponent } from './drawer-container.component';\r\n\r\n@NgModule({\r\n exports: [\r\n XDrawerComponent,\r\n XDrawerCloseDirective,\r\n XDrawerTitleDirective,\r\n XDrawerContentDirective,\r\n XDrawerContainerComponent\r\n ],\r\n imports: [\r\n XDrawerComponent,\r\n XDrawerCloseDirective,\r\n XDrawerTitleDirective,\r\n XDrawerContentDirective,\r\n XDrawerContainerComponent\r\n ]\r\n})\r\nexport class XDrawerModule {}\r\n","import { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal, ComponentType, TemplatePortal } from '@angular/cdk/portal';\r\nimport { Injectable, TemplateRef, inject } from '@angular/core';\r\nimport { XFillDefault, XConfigService, XDrawerConfig } from '@ng-nest/ui/core';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\nimport { XDrawerPortalComponent } from './drawer-portal.component';\r\nimport { XDrawerRef } from './drawer-ref';\r\nimport { XDrawerOption, X_DRAWER_CONFIG_NAME, X_DRAWER_DATA } from './drawer.property';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XDrawerService {\r\n default: XDrawerOption = {\r\n placement: 'right',\r\n size: '30%',\r\n hasBackdrop: true,\r\n backdropClose: true\r\n };\r\n configDefault?: XDrawerConfig;\r\n private portalService = inject(XPortalService);\r\n private configService = inject(XConfigService);\r\n private overlay = inject(Overlay);\r\n\r\n constructor() {\r\n this.configDefault = this.configService.getConfigForComponent(X_DRAWER_CONFIG_NAME);\r\n Object.assign(this.default, this.configDefault);\r\n }\r\n\r\n create<T>(content: TemplateRef<any> | ComponentType<T>, option: XDrawerOption = {}): XDrawerRef<T> {\r\n XFillDefault(option, this.default);\r\n const width = ['left', 'right'].includes(option.placement as string) ? option.size : '100%';\r\n const height = ['top', 'bottom'].includes(option.placement as string) ? option.size : '100%';\r\n const portal = this.portalService.attach<XDrawerPortalComponent>({\r\n content: XDrawerPortalComponent,\r\n viewContainerRef: option.viewContainerRef,\r\n overlayConfig: {\r\n hasBackdrop: option.hasBackdrop,\r\n panelClass: option.className,\r\n scrollStrategy: this.overlay.scrollStrategies.block(),\r\n positionStrategy: this.portalService.setPosition(option.placement, width, height)\r\n }\r\n });\r\n const { overlayRef, componentRef } = portal || {};\r\n const { instance } = componentRef! || {};\r\n instance.placement = option.placement;\r\n const drawerRef = new XDrawerRef<T>(overlayRef!, instance);\r\n if (content instanceof TemplateRef) {\r\n instance.attachTemplatePortal(\r\n new TemplatePortal(content, option.viewContainerRef!, { $implicit: option.data, drawerRef: drawerRef })\r\n );\r\n } else {\r\n const injector = this.portalService.createInjector([\r\n { provide: X_DRAWER_DATA, useValue: option.data },\r\n { provide: XDrawerRef, useValue: drawerRef }\r\n ]);\r\n\r\n instance.attachComponentPortal(new ComponentPortal(content, option.viewContainerRef, injector));\r\n }\r\n if (option.hasBackdrop && option.backdropClose && overlayRef)\r\n overlayRef.backdropClick().subscribe(() => {\r\n drawerRef.close();\r\n });\r\n\r\n return drawerRef;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAOA;;;;AAIG;AACI,MAAM,aAAa,GAAG;AACtB,MAAM,oBAAoB,GAAG;MACvB,aAAa,GAAG,IAAI,cAAc,CAAM,aAAa;AAElE;;AAEG;MAEU,eAAgB,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC,CAAA;AAD5E,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AACnC;;;AAGG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;AACxC;;;AAGG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAY,IAAI,CAAC,MAAM,EAAE,SAAS,IAAI,OAAO,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,WAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;AACxE;;;AAGG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAkB,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,KAAK,wCAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA,CAAA,CAAC;AACnG;;;AAGG;QACM,IAAA,CAAA,aAAa,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C,SAAS,CAAC,MAAK;gBACxC,SAAS,CAAC,KAAK,EAAE;AACnB,YAAA,CAAC,CAAC;AAEJ,QAAA,OAAO,SAAS;IAClB;iIArDW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA,CAAA;;2FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACTlC;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-drawer.mjs","sources":["../../../../lib/ng-nest/ui/drawer/drawer.property.ts","../../../../lib/ng-nest/ui/drawer/drawer.component.ts","../../../../lib/ng-nest/ui/drawer/drawer.component.html","../../../../lib/ng-nest/ui/drawer/drawer-portal.component.ts","../../../../lib/ng-nest/ui/drawer/drawer-portal.component.html","../../../../lib/ng-nest/ui/drawer/drawer-ref.ts","../../../../lib/ng-nest/ui/drawer/drawer-portal.directives.ts","../../../../lib/ng-nest/ui/drawer/drawer-container.component.ts","../../../../lib/ng-nest/ui/drawer/drawer-container.component.html","../../../../lib/ng-nest/ui/drawer/drawer.module.ts","../../../../lib/ng-nest/ui/drawer/drawer.service.ts","../../../../lib/ng-nest/ui/drawer/ng-nest-ui-drawer.ts"],"sourcesContent":["import { XPropertyFunction, XProperty, XToCssPixelValue, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, InjectionToken, ViewContainerRef, input, model, output } from '@angular/core';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { XDrawerPortalComponent } from './drawer-portal.component';\r\nimport type { XDrawerRef } from './drawer-ref';\r\nimport type { XTemplate, XPosition, XBoolean, XNumber } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Drawer\r\n * @selector x-drawer\r\n * @decorator component\r\n */\r\nexport const XDrawerPrefix = 'x-drawer';\r\nexport const X_DRAWER_CONFIG_NAME = 'drawer';\r\nexport const X_DRAWER_DATA = new InjectionToken<any>('XDrawerData');\r\n\r\n/**\r\n * Drawer Property\r\n */\r\n@Component({ selector: `${XDrawerPrefix}-property`, template: '' })\r\nexport class XDrawerProperty extends XPropertyFunction(X_DRAWER_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 标题\r\n * @en_US Title\r\n */\r\n readonly title = input<XTemplate>();\r\n /**\r\n * @zh_CN 显示/隐藏\r\n * @en_US Show/hide\r\n */\r\n readonly visible = model<boolean>(false);\r\n /**\r\n * @zh_CN 展示方向\r\n * @en_US Display direction\r\n */\r\n readonly placement = input<XPosition>(this.config?.placement ?? 'right');\r\n /**\r\n * @zh_CN 尺寸,支持固定值\r\n * @en_US Size, supports fixed value\r\n */\r\n readonly size = input<string, XNumber>(this.config?.size ?? '30%', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 点击遮罩关闭\r\n * @en_US Click the mask to close\r\n */\r\n readonly backdropClose = input<boolean, XBoolean>(this.config?.backdropClose ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 是否显示背景遮罩\r\n * @en_US Whether to display the background mask\r\n */\r\n readonly hasBackdrop = input<boolean, XBoolean>(this.config?.hasBackdrop ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 自定义样式名\r\n * @en_US Custom style name\r\n */\r\n readonly className = input<string>(this.config?.className ?? '');\r\n /**\r\n * @zh_CN 关闭的事件\r\n * @en_US Closed event\r\n */\r\n readonly close = output();\r\n}\r\n\r\n/**\r\n * Drawer Option\r\n */\r\nexport interface XDrawerOption {\r\n /**\r\n * @zh_CN 展示方向\r\n * @en_US Display direction\r\n * @default 'right'\r\n * @withConfig true\r\n */\r\n placement?: XPosition;\r\n /**\r\n * @zh_CN 尺寸,支持固定值\r\n * @en_US Size, supports fixed value\r\n * @default '30%'\r\n * @withConfig true\r\n */\r\n size?: string;\r\n /**\r\n * @zh_CN 自定义样式名\r\n * @en_US Custom style name\r\n */\r\n className?: string;\r\n /**\r\n * @zh_CN 点击遮罩关闭\r\n * @en_US Click the mask to close\r\n * @default true\r\n * @withConfig true\r\n */\r\n backdropClose?: boolean;\r\n /**\r\n * @zh_CN 是否显示背景遮罩\r\n * @en_US Whether to display the background mask\r\n * @default true\r\n * @withConfig true\r\n */\r\n hasBackdrop?: boolean;\r\n /**\r\n * @zh_CN 数据,通过 \"@Inject(X_DRAWER_DATA)\" 来接收数据\r\n * @en_US Data. Receive data by \"@Inject(X_DRAWER_DATA)\"\r\n */\r\n data?: any;\r\n /**\r\n * @zh_CN 视图容器实例可以包含其他视图容器。\r\n * @en_US A view container instance can contain other view containers.\r\n */\r\n viewContainerRef?: ViewContainerRef;\r\n}\r\n\r\n/**\r\n * Drawer Container\r\n * @selector x-drawer-container\r\n * @decorator component\r\n */\r\nexport const XDrawerContainerPrefix = 'x-drawer-container';\r\nexport const X_DRAWER_CONTAINER = new InjectionToken('X_DRAWER_CONTAINER');\r\n\r\n/**\r\n * Drawer Container Property\r\n */\r\n@Component({ selector: `${XDrawerContainerPrefix}-property`, template: '' })\r\nexport class XDrawerContainerProperty extends XProperty {}\r\n\r\n/**\r\n * @zh_CN 创建的抽屉对象\r\n * @en_US Drawer object created\r\n */\r\nexport interface XDrawerPortalOverlayRef extends XPortalOverlayRef<XDrawerPortalComponent> {\r\n drawerRef?: XDrawerRef<any>;\r\n}\r\n\r\n/**\r\n * @zh_CN 抽屉动画状态\r\n * @en_US Drawer animation status\r\n */\r\nexport type XDrawerAnimationState = XPosition | 'void';\r\n\r\n/**\r\n * @zh_CN 抽屉动画事件\r\n * @en_US Drawer animation event\r\n */\r\nexport interface XDrawerAnimationEvent {\r\n state: XDrawerAnimationState;\r\n action: 'start' | 'done';\r\n totalTime: number;\r\n}\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n TemplateRef,\r\n ViewContainerRef,\r\n HostBinding,\r\n inject,\r\n OnDestroy,\r\n computed,\r\n signal,\r\n AfterViewInit,\r\n viewChild\r\n} from '@angular/core';\r\nimport { XDrawerPrefix, XDrawerProperty, X_DRAWER_CONTAINER } from './drawer.property';\r\nimport { XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XPortalService, XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { Subject, Subscription, takeUntil } from 'rxjs';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { XDrawerContainerComponent } from './drawer-container.component';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\r\nimport { toObservable } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: `${XDrawerPrefix}`,\r\n imports: [NgClass, NgTemplateOutlet, XOutletDirective, XButtonComponent],\r\n templateUrl: './drawer.component.html',\r\n styleUrls: ['./drawer.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDrawerComponent extends XDrawerProperty implements AfterViewInit, OnDestroy {\r\n @HostBinding('class.x-drawer-visible') get getVisible() {\r\n return this.visible();\r\n }\r\n drawerTpl = viewChild.required<TemplateRef<void>>('drawerTpl');\r\n portal!: XPortalOverlayRef<any>;\r\n back$: Subscription | null = null;\r\n width = computed(() => {\r\n return ['left', 'right'].includes(this.placement()) ? this.size() : '100%';\r\n });\r\n height = computed(() => {\r\n return ['top', 'bottom'].includes(this.placement()) ? this.size() : '100%';\r\n });\r\n\r\n private overlay = inject(Overlay);\r\n private portalService = inject(XPortalService);\r\n private viewContainerRef = inject(ViewContainerRef);\r\n private unSubject = new Subject<void>();\r\n container = inject<XDrawerContainerComponent>(X_DRAWER_CONTAINER, { optional: true });\r\n hasContainer = signal(false);\r\n classMap = computed(() => ({\r\n [`${XDrawerPrefix}-${this.placement()}`]: !XIsEmpty(this.placement()),\r\n [`${XDrawerPrefix}-no-title`]: XIsEmpty(this.title())\r\n }));\r\n visibleChanged = toObservable(this.visible);\r\n\r\n constructor() {\r\n super();\r\n this.visibleChanged.pipe(takeUntil(this.unSubject)).subscribe(() => this.setVisible());\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.hasContainer.set(!!this.container);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.back$?.unsubscribe();\r\n }\r\n\r\n setVisible() {\r\n if (this.visible()) {\r\n this.createPortal();\r\n } else {\r\n this.closePortal();\r\n }\r\n }\r\n\r\n createPortal() {\r\n if (this.hasContainer()) return;\r\n this.portal = this.portalService.attach({\r\n content: this.drawerTpl(),\r\n viewContainerRef: this.viewContainerRef,\r\n overlayConfig: {\r\n panelClass: this.className(),\r\n hasBackdrop: this.hasBackdrop(),\r\n scrollStrategy: this.overlay.scrollStrategies.block(),\r\n positionStrategy: this.portalService.setPosition(this.placement(), this.width(), this.height())\r\n }\r\n });\r\n if (this.portal.overlayRef && this.backdropClose()) {\r\n this.back$ = this.portal.overlayRef.backdropClick().subscribe(() => this.closePortal());\r\n }\r\n }\r\n\r\n portalAttached() {\r\n return this.portal?.overlayRef?.hasAttached();\r\n }\r\n\r\n closePortal() {\r\n if (this.portalAttached()) {\r\n this.portal?.overlayRef?.detach();\r\n this.back$?.unsubscribe();\r\n this.close.emit();\r\n } else if (this.container && this.visible()) {\r\n this.visible.set(false);\r\n }\r\n }\r\n}\r\n","<ng-template #drawerTpl>\r\n @if (visible()) {\r\n @if (hasContainer() && hasBackdrop()) {\r\n <div\r\n class=\"x-drawer-backdrop\"\r\n [animate.enter]=\"`x-opacity-enter`\"\r\n [animate.leave]=\"`x-opacity-leave`\"\r\n (click)=\"closePortal()\"\r\n ></div>\r\n }\r\n\r\n <div\r\n class=\"x-drawer\"\r\n [ngClass]=\"classMap()\"\r\n [style.width]=\"hasContainer() ? width() : '100%'\"\r\n [style.height]=\"hasContainer() ? height() : '100%'\"\r\n [animate.enter]=\"`x-slide-${placement()}-enter`\"\r\n [animate.leave]=\"`x-slide-${placement()}-leave`\"\r\n >\r\n @if (title()) {\r\n {{ hasContainer() }} {{ hasBackdrop() }}\r\n <div class=\"x-drawer-header\">\r\n <div class=\"x-drawer-title\">\r\n <ng-container *xOutlet=\"title()\">{{ title() }}</ng-container>\r\n </div>\r\n <x-button\r\n size=\"small\"\r\n class=\"x-drawer-close\"\r\n icon=\"fto-x\"\r\n type=\"text\"\r\n (click)=\"closePortal()\"\r\n closable\r\n ></x-button>\r\n </div>\r\n }\r\n <div class=\"x-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n }\r\n</ng-template>\r\n@if (hasContainer()) {\r\n <ng-container *ngTemplateOutlet=\"drawerTpl\"></ng-container>\r\n}\r\n","import { PortalModule, CdkPortalOutlet, Portal } from '@angular/cdk/portal';\r\nimport { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation, input, viewChild } from '@angular/core';\r\nimport { XPosition } from '@ng-nest/ui/core';\r\n\r\n@Component({\r\n selector: 'x-drawer-portal',\r\n imports: [PortalModule],\r\n templateUrl: './drawer-portal.component.html',\r\n styleUrls: ['./drawer-portal.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDrawerPortalComponent {\r\n @HostBinding('class.x-drawer-portal') _has = true;\r\n\r\n placement = input<XPosition>();\r\n portal!: Portal<any>;\r\n\r\n @HostBinding('animate.enter') get animateEnter() {\r\n return `x-slide-${this.placement()}-enter`;\r\n }\r\n @HostBinding('animate.leave') get animateLeave() {\r\n return `x-slide-${this.placement()}-leave`;\r\n }\r\n\r\n portalOutlet = viewChild.required(CdkPortalOutlet);\r\n\r\n ngAfterViewInit() {\r\n this.portalOutlet().setDisposeFn(() => {});\r\n }\r\n}\r\n","<ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\r\n","import { OverlayRef } from '@angular/cdk/overlay';\r\nimport { XDrawerPortalComponent } from './drawer-portal.component';\r\n\r\n// TODO: add more function\r\nexport class XDrawerRef<C> {\r\n componentInstance!: C;\r\n constructor(\r\n public overlayRef: OverlayRef,\r\n public containerInstance: XDrawerPortalComponent\r\n ) {}\r\n close() {\r\n this.overlayRef.detach();\r\n }\r\n}\r\n","import { Directive, HostBinding, HostListener, inject } from '@angular/core';\r\nimport { XDrawerRef } from './drawer-ref';\r\n\r\n@Directive({\r\n selector: `[x-drawer-close]`\r\n})\r\nexport class XDrawerCloseDirective {\r\n @HostListener('click', ['$event']) onCloseClick() {\r\n this.drawerRef && this.drawerRef.close();\r\n }\r\n drawerRef = inject(XDrawerRef, { optional: true });\r\n}\r\n\r\n@Directive({\r\n selector: `[x-drawer-title]`\r\n})\r\nexport class XDrawerTitleDirective {\r\n @HostBinding('class.x-drawer-portal-title') _has = true;\r\n}\r\n\r\n@Directive({\r\n selector: `[x-drawer-content], x-drawer-content`\r\n})\r\nexport class XDrawerContentDirective {\r\n @HostBinding('class.x-drawer-portal-content') _has = true;\r\n}\r\n","import { ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation } from '@angular/core';\r\nimport { XDrawerContainerPrefix, XDrawerContainerProperty, X_DRAWER_CONTAINER } from './drawer.property';\r\n\r\n@Component({\r\n selector: XDrawerContainerPrefix,\r\n templateUrl: './drawer-container.component.html',\r\n styleUrls: ['./drawer-container.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n {\r\n provide: X_DRAWER_CONTAINER,\r\n useExisting: XDrawerContainerComponent\r\n }\r\n ]\r\n})\r\nexport class XDrawerContainerComponent extends XDrawerContainerProperty {\r\n @HostBinding('class') className = XDrawerContainerPrefix;\r\n}\r\n","<ng-content></ng-content>\r\n","import { NgModule } from '@angular/core';\r\nimport { XDrawerComponent } from './drawer.component';\r\nimport { XDrawerCloseDirective, XDrawerContentDirective, XDrawerTitleDirective } from './drawer-portal.directives';\r\nimport { XDrawerContainerComponent } from './drawer-container.component';\r\n\r\n@NgModule({\r\n exports: [\r\n XDrawerComponent,\r\n XDrawerCloseDirective,\r\n XDrawerTitleDirective,\r\n XDrawerContentDirective,\r\n XDrawerContainerComponent\r\n ],\r\n imports: [\r\n XDrawerComponent,\r\n XDrawerCloseDirective,\r\n XDrawerTitleDirective,\r\n XDrawerContentDirective,\r\n XDrawerContainerComponent\r\n ]\r\n})\r\nexport class XDrawerModule {}\r\n","import { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal, ComponentType, TemplatePortal } from '@angular/cdk/portal';\r\nimport { Injectable, TemplateRef, inject } from '@angular/core';\r\nimport { XFillDefault, XConfigService, XDrawerConfig } from '@ng-nest/ui/core';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\nimport { XDrawerPortalComponent } from './drawer-portal.component';\r\nimport { XDrawerRef } from './drawer-ref';\r\nimport { XDrawerOption, X_DRAWER_CONFIG_NAME, X_DRAWER_DATA } from './drawer.property';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XDrawerService {\r\n default: XDrawerOption = {\r\n placement: 'right',\r\n size: '30%',\r\n hasBackdrop: true,\r\n backdropClose: true\r\n };\r\n configDefault?: XDrawerConfig;\r\n private portalService = inject(XPortalService);\r\n private configService = inject(XConfigService);\r\n private overlay = inject(Overlay);\r\n\r\n constructor() {\r\n this.configDefault = this.configService.getConfigForComponent(X_DRAWER_CONFIG_NAME);\r\n Object.assign(this.default, this.configDefault);\r\n }\r\n\r\n create<T>(content: TemplateRef<any> | ComponentType<T>, option: XDrawerOption = {}): XDrawerRef<T> {\r\n XFillDefault(option, this.default);\r\n const width = ['left', 'right'].includes(option.placement as string) ? option.size : '100%';\r\n const height = ['top', 'bottom'].includes(option.placement as string) ? option.size : '100%';\r\n const portal = this.portalService.attach<XDrawerPortalComponent>({\r\n content: XDrawerPortalComponent,\r\n viewContainerRef: option.viewContainerRef,\r\n overlayConfig: {\r\n hasBackdrop: option.hasBackdrop,\r\n panelClass: option.className,\r\n scrollStrategy: this.overlay.scrollStrategies.block(),\r\n positionStrategy: this.portalService.setPosition(option.placement, width, height)\r\n }\r\n });\r\n const { overlayRef, componentRef } = portal || {};\r\n const { instance } = componentRef! || {};\r\n componentRef?.setInput('placement', option.placement);\r\n const drawerRef = new XDrawerRef<T>(overlayRef!, instance);\r\n if (content instanceof TemplateRef) {\r\n instance.portal = new TemplatePortal(content, option.viewContainerRef!, {\r\n $implicit: option.data,\r\n drawerRef: drawerRef\r\n });\r\n } else {\r\n const injector = this.portalService.createInjector([\r\n { provide: X_DRAWER_DATA, useValue: option.data },\r\n { provide: XDrawerRef, useValue: drawerRef }\r\n ]);\r\n\r\n instance.portal = new ComponentPortal(content, option.viewContainerRef, injector);\r\n }\r\n if (option.hasBackdrop && option.backdropClose && overlayRef)\r\n overlayRef.backdropClick().subscribe(() => {\r\n drawerRef.close();\r\n });\r\n\r\n return drawerRef;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAOA;;;;AAIG;AACI,MAAM,aAAa,GAAG;AACtB,MAAM,oBAAoB,GAAG;MACvB,aAAa,GAAG,IAAI,cAAc,CAAM,aAAa;AAElE;;AAEG;MAEU,eAAgB,SAAQ,iBAAiB,CAAC,oBAAoB,CAAC,CAAA;AAD5E,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAa;AACnC;;;AAGG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAU,KAAK,mDAAC;AACxC;;;AAGG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAY,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