@acorex/components 7.0.8 → 7.0.11

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 (258) hide show
  1. package/action-sheet/public-api.d.ts +1 -1
  2. package/action-sheet/src/action-sheet.component.d.ts +19 -13
  3. package/action-sheet/src/action-sheet.interface.d.ts +20 -0
  4. package/action-sheet/src/action-sheet.module.d.ts +8 -4
  5. package/action-sheet/src/action-sheet.service.d.ts +13 -0
  6. package/alert/src/alert.component.d.ts +2 -2
  7. package/badge/src/badge.component.d.ts +2 -2
  8. package/breadcrumbs/src/breadcrumbs-item.component.d.ts +6 -6
  9. package/button/src/button-group.component.d.ts +6 -6
  10. package/button/src/button-item.component.d.ts +6 -6
  11. package/color-picker/src/color-picker.component.d.ts +16 -16
  12. package/common/public-api.d.ts +12 -12
  13. package/common/src/{components.class.d.ts → classes/components.class.d.ts} +21 -1
  14. package/common/src/{drawing.class.d.ts → classes/drawing.class.d.ts} +0 -0
  15. package/common/src/{events.class.d.ts → classes/events.class.d.ts} +0 -0
  16. package/common/src/{styles.class.d.ts → classes/styles.class.d.ts} +0 -0
  17. package/common/src/common.module.d.ts +5 -5
  18. package/common/src/{auto-focus.directive.d.ts → directives/auto-focus.directive.d.ts} +1 -1
  19. package/common/src/{debounce-time.directive.d.ts → directives/debounce-time.directive.d.ts} +0 -0
  20. package/common/src/{hotkey.directive.d.ts → directives/hotkey.directive.d.ts} +2 -2
  21. package/common/src/{infinite-scroll.directive.d.ts → directives/infinite-scroll.directive.d.ts} +0 -0
  22. package/common/src/{responsive.directive.d.ts → directives/responsive.directive.d.ts} +0 -0
  23. package/common/src/{custom-cdk-overlay.service.d.ts → services/custom-cdk-overlay.service.d.ts} +0 -0
  24. package/common/src/{hotkey.service.d.ts → services/hotkey.service.d.ts} +0 -0
  25. package/common/src/{overlay.service.d.ts → services/overlay.service.d.ts} +4 -3
  26. package/context-menu/src/context-menu.component.d.ts +1 -1
  27. package/date-picker/src/datepicker.component.d.ts +14 -14
  28. package/dialog/src/dialog.class.d.ts +2 -1
  29. package/esm2020/action-sheet/public-api.mjs +2 -2
  30. package/esm2020/action-sheet/src/action-sheet.component.mjs +49 -74
  31. package/esm2020/action-sheet/src/action-sheet.interface.mjs +3 -0
  32. package/esm2020/action-sheet/src/action-sheet.module.mjs +12 -7
  33. package/esm2020/action-sheet/src/action-sheet.service.mjs +85 -0
  34. package/esm2020/button/src/button.component.mjs +2 -2
  35. package/esm2020/collapse/src/collapse.component.mjs +3 -3
  36. package/esm2020/common/public-api.mjs +13 -13
  37. package/esm2020/common/src/classes/components.class.mjs +71 -0
  38. package/esm2020/common/src/classes/drawing.class.mjs +2 -0
  39. package/esm2020/common/src/classes/events.class.mjs +58 -0
  40. package/esm2020/common/src/classes/styles.class.mjs +22 -0
  41. package/esm2020/common/src/common.module.mjs +6 -6
  42. package/esm2020/common/src/directives/auto-focus.directive.mjs +55 -0
  43. package/esm2020/common/src/directives/debounce-time.directive.mjs +47 -0
  44. package/esm2020/common/src/directives/hotkey.directive.mjs +79 -0
  45. package/esm2020/common/src/directives/infinite-scroll.directive.mjs +63 -0
  46. package/esm2020/common/src/directives/responsive.directive.mjs +34 -0
  47. package/esm2020/common/src/services/custom-cdk-overlay.service.mjs +48 -0
  48. package/esm2020/common/src/services/hotkey.service.mjs +38 -0
  49. package/esm2020/common/src/services/overlay.service.mjs +96 -0
  50. package/esm2020/context-menu/src/context-menu.component.mjs +4 -4
  51. package/esm2020/data-pager/src/data-pager-numeric-selector.component.mjs +3 -3
  52. package/esm2020/decorators/src/close-button.component.mjs +4 -4
  53. package/esm2020/dialog/src/dialog.class.mjs +1 -1
  54. package/esm2020/dialog/src/dialog.component.mjs +3 -3
  55. package/esm2020/dialog/src/dialog.service.mjs +2 -1
  56. package/esm2020/menu/src/menu.component.mjs +16 -16
  57. package/esm2020/mixin/src/base-menu-mixin.class.mjs +3 -3
  58. package/esm2020/notification/acorex-components-notification.mjs +5 -0
  59. package/esm2020/notification/public-api.mjs +5 -0
  60. package/esm2020/notification/src/notification.class.mjs +2 -0
  61. package/esm2020/notification/src/notification.component.mjs +63 -0
  62. package/esm2020/notification/src/notification.module.mjs +21 -0
  63. package/esm2020/notification/src/notification.service.mjs +136 -0
  64. package/esm2020/number-box/src/number-box.component.mjs +3 -3
  65. package/esm2020/page/src/base-page.class.mjs +1 -27
  66. package/esm2020/popup/src/popup.component.mjs +4 -5
  67. package/esm2020/popup/src/popup.service.mjs +3 -3
  68. package/esm2020/range-slider/src/range-slider.component.mjs +2 -2
  69. package/esm2020/select-box/src/selectbox.component.mjs +3 -3
  70. package/esm2020/tabs/src/tab-content.directive.mjs +1 -1
  71. package/esm2020/tabs/src/tab-item.component.mjs +1 -1
  72. package/esm2020/tabs/src/tabs.component.mjs +1 -1
  73. package/esm2020/toast/src/toast.class.mjs +1 -1
  74. package/esm2020/toast/src/toast.component.mjs +29 -21
  75. package/esm2020/toast/src/toast.module.mjs +3 -6
  76. package/fesm2015/acorex-components-action-sheet.mjs +140 -124
  77. package/fesm2015/acorex-components-action-sheet.mjs.map +1 -1
  78. package/fesm2015/acorex-components-alert.mjs +0 -1
  79. package/fesm2015/acorex-components-avatar.mjs +0 -1
  80. package/fesm2015/acorex-components-badge.mjs +0 -1
  81. package/fesm2015/acorex-components-breadcrumbs.mjs +0 -1
  82. package/fesm2015/acorex-components-button.mjs +2 -3
  83. package/fesm2015/acorex-components-button.mjs.map +1 -1
  84. package/fesm2015/acorex-components-calendar.mjs +0 -1
  85. package/fesm2015/acorex-components-checkbox.mjs +0 -1
  86. package/fesm2015/acorex-components-chips.mjs +0 -1
  87. package/fesm2015/acorex-components-collapse.mjs +2 -3
  88. package/fesm2015/acorex-components-collapse.mjs.map +1 -1
  89. package/fesm2015/acorex-components-color-palette.mjs +0 -1
  90. package/fesm2015/acorex-components-color-picker.mjs +0 -1
  91. package/fesm2015/acorex-components-common.mjs +149 -120
  92. package/fesm2015/acorex-components-common.mjs.map +1 -1
  93. package/fesm2015/acorex-components-context-menu.mjs +3 -4
  94. package/fesm2015/acorex-components-context-menu.mjs.map +1 -1
  95. package/fesm2015/acorex-components-data-pager.mjs +2 -3
  96. package/fesm2015/acorex-components-data-pager.mjs.map +1 -1
  97. package/fesm2015/acorex-components-data-table.mjs +0 -1
  98. package/fesm2015/acorex-components-date-picker.mjs +0 -1
  99. package/fesm2015/acorex-components-decorators.mjs +3 -4
  100. package/fesm2015/acorex-components-decorators.mjs.map +1 -1
  101. package/fesm2015/acorex-components-dialog.mjs +3 -3
  102. package/fesm2015/acorex-components-dialog.mjs.map +1 -1
  103. package/fesm2015/acorex-components-drawer.mjs +0 -1
  104. package/fesm2015/acorex-components-dropdown.mjs +0 -1
  105. package/fesm2015/acorex-components-form.mjs +0 -1
  106. package/fesm2015/acorex-components-image.mjs +0 -1
  107. package/fesm2015/acorex-components-label.mjs +0 -1
  108. package/fesm2015/acorex-components-loading.mjs +0 -1
  109. package/fesm2015/acorex-components-menu.mjs +15 -16
  110. package/fesm2015/acorex-components-menu.mjs.map +1 -1
  111. package/fesm2015/acorex-components-mixin.mjs +2 -3
  112. package/fesm2015/acorex-components-mixin.mjs.map +1 -1
  113. package/fesm2015/acorex-components-notification.mjs +221 -0
  114. package/fesm2015/acorex-components-notification.mjs.map +1 -0
  115. package/fesm2015/acorex-components-number-box.mjs +2 -3
  116. package/fesm2015/acorex-components-number-box.mjs.map +1 -1
  117. package/fesm2015/acorex-components-page.mjs +1 -28
  118. package/fesm2015/acorex-components-page.mjs.map +1 -1
  119. package/fesm2015/acorex-components-password-box.mjs +0 -1
  120. package/fesm2015/acorex-components-popover.mjs +0 -1
  121. package/fesm2015/acorex-components-popup.mjs +4 -6
  122. package/fesm2015/acorex-components-popup.mjs.map +1 -1
  123. package/fesm2015/acorex-components-progress-bar.mjs +0 -1
  124. package/fesm2015/acorex-components-radio.mjs +0 -1
  125. package/fesm2015/acorex-components-range-slider.mjs +2 -3
  126. package/fesm2015/acorex-components-range-slider.mjs.map +1 -1
  127. package/fesm2015/acorex-components-rating.mjs +0 -1
  128. package/fesm2015/acorex-components-result.mjs +0 -1
  129. package/fesm2015/acorex-components-search-box.mjs +0 -1
  130. package/fesm2015/acorex-components-select-box.mjs +2 -3
  131. package/fesm2015/acorex-components-select-box.mjs.map +1 -1
  132. package/fesm2015/acorex-components-selection-list.mjs +0 -1
  133. package/fesm2015/acorex-components-switch.mjs +0 -1
  134. package/fesm2015/acorex-components-tabs.mjs.map +1 -1
  135. package/fesm2015/acorex-components-tag.mjs +0 -1
  136. package/fesm2015/acorex-components-textarea.mjs +0 -1
  137. package/fesm2015/acorex-components-textbox.mjs +0 -1
  138. package/fesm2015/acorex-components-time-box.mjs +0 -1
  139. package/fesm2015/acorex-components-toast.mjs +30 -26
  140. package/fesm2015/acorex-components-toast.mjs.map +1 -1
  141. package/fesm2015/acorex-components-tooltip.mjs +0 -1
  142. package/fesm2015/acorex-components-tree-view.mjs +0 -1
  143. package/fesm2015/acorex-components-uploader.mjs +0 -1
  144. package/fesm2015/acorex-components.mjs +0 -1
  145. package/fesm2020/acorex-components-action-sheet.mjs +139 -124
  146. package/fesm2020/acorex-components-action-sheet.mjs.map +1 -1
  147. package/fesm2020/acorex-components-alert.mjs +0 -1
  148. package/fesm2020/acorex-components-avatar.mjs +0 -1
  149. package/fesm2020/acorex-components-badge.mjs +0 -1
  150. package/fesm2020/acorex-components-breadcrumbs.mjs +0 -1
  151. package/fesm2020/acorex-components-button.mjs +2 -3
  152. package/fesm2020/acorex-components-button.mjs.map +1 -1
  153. package/fesm2020/acorex-components-calendar.mjs +0 -1
  154. package/fesm2020/acorex-components-checkbox.mjs +0 -1
  155. package/fesm2020/acorex-components-chips.mjs +0 -1
  156. package/fesm2020/acorex-components-collapse.mjs +2 -3
  157. package/fesm2020/acorex-components-collapse.mjs.map +1 -1
  158. package/fesm2020/acorex-components-color-palette.mjs +0 -1
  159. package/fesm2020/acorex-components-color-picker.mjs +0 -1
  160. package/fesm2020/acorex-components-common.mjs +149 -120
  161. package/fesm2020/acorex-components-common.mjs.map +1 -1
  162. package/fesm2020/acorex-components-context-menu.mjs +3 -4
  163. package/fesm2020/acorex-components-context-menu.mjs.map +1 -1
  164. package/fesm2020/acorex-components-data-pager.mjs +2 -3
  165. package/fesm2020/acorex-components-data-pager.mjs.map +1 -1
  166. package/fesm2020/acorex-components-data-table.mjs +0 -1
  167. package/fesm2020/acorex-components-date-picker.mjs +0 -1
  168. package/fesm2020/acorex-components-decorators.mjs +3 -4
  169. package/fesm2020/acorex-components-decorators.mjs.map +1 -1
  170. package/fesm2020/acorex-components-dialog.mjs +3 -3
  171. package/fesm2020/acorex-components-dialog.mjs.map +1 -1
  172. package/fesm2020/acorex-components-drawer.mjs +0 -1
  173. package/fesm2020/acorex-components-dropdown.mjs +0 -1
  174. package/fesm2020/acorex-components-form.mjs +0 -1
  175. package/fesm2020/acorex-components-image.mjs +0 -1
  176. package/fesm2020/acorex-components-label.mjs +0 -1
  177. package/fesm2020/acorex-components-loading.mjs +0 -1
  178. package/fesm2020/acorex-components-menu.mjs +15 -16
  179. package/fesm2020/acorex-components-menu.mjs.map +1 -1
  180. package/fesm2020/acorex-components-mixin.mjs +2 -3
  181. package/fesm2020/acorex-components-mixin.mjs.map +1 -1
  182. package/fesm2020/acorex-components-notification.mjs +221 -0
  183. package/fesm2020/acorex-components-notification.mjs.map +1 -0
  184. package/fesm2020/acorex-components-number-box.mjs +2 -3
  185. package/fesm2020/acorex-components-number-box.mjs.map +1 -1
  186. package/fesm2020/acorex-components-page.mjs +1 -28
  187. package/fesm2020/acorex-components-page.mjs.map +1 -1
  188. package/fesm2020/acorex-components-password-box.mjs +0 -1
  189. package/fesm2020/acorex-components-popover.mjs +0 -1
  190. package/fesm2020/acorex-components-popup.mjs +4 -6
  191. package/fesm2020/acorex-components-popup.mjs.map +1 -1
  192. package/fesm2020/acorex-components-progress-bar.mjs +0 -1
  193. package/fesm2020/acorex-components-radio.mjs +0 -1
  194. package/fesm2020/acorex-components-range-slider.mjs +2 -3
  195. package/fesm2020/acorex-components-range-slider.mjs.map +1 -1
  196. package/fesm2020/acorex-components-rating.mjs +0 -1
  197. package/fesm2020/acorex-components-result.mjs +0 -1
  198. package/fesm2020/acorex-components-search-box.mjs +0 -1
  199. package/fesm2020/acorex-components-select-box.mjs +2 -3
  200. package/fesm2020/acorex-components-select-box.mjs.map +1 -1
  201. package/fesm2020/acorex-components-selection-list.mjs +0 -1
  202. package/fesm2020/acorex-components-switch.mjs +0 -1
  203. package/fesm2020/acorex-components-tabs.mjs.map +1 -1
  204. package/fesm2020/acorex-components-tag.mjs +0 -1
  205. package/fesm2020/acorex-components-textarea.mjs +0 -1
  206. package/fesm2020/acorex-components-textbox.mjs +0 -1
  207. package/fesm2020/acorex-components-time-box.mjs +0 -1
  208. package/fesm2020/acorex-components-toast.mjs +30 -26
  209. package/fesm2020/acorex-components-toast.mjs.map +1 -1
  210. package/fesm2020/acorex-components-tooltip.mjs +0 -1
  211. package/fesm2020/acorex-components-tree-view.mjs +0 -1
  212. package/fesm2020/acorex-components-uploader.mjs +0 -1
  213. package/fesm2020/acorex-components.mjs +0 -1
  214. package/menu/src/menu.component.d.ts +1 -1
  215. package/mixin/src/base-components.class.d.ts +2 -2
  216. package/mixin/src/base-menu-mixin.class.d.ts +6 -6
  217. package/mixin/src/button-mixin.class.d.ts +2 -2
  218. package/mixin/src/clickable-mixin.class.d.ts +2 -2
  219. package/mixin/src/color-look-mixing.class.d.ts +2 -2
  220. package/mixin/src/datalist-component.class.d.ts +10 -10
  221. package/mixin/src/dropdown-mixin.class.d.ts +2 -2
  222. package/mixin/src/interactive-mixin.class.d.ts +4 -4
  223. package/mixin/src/loading-mixin.class.d.ts +2 -2
  224. package/mixin/src/mixin.class.d.ts +62 -62
  225. package/mixin/src/page-component.class.d.ts +2 -2
  226. package/mixin/src/selection-component.class.d.ts +2 -2
  227. package/mixin/src/sizable-mixin.class.d.ts +2 -2
  228. package/mixin/src/textbox-mixin.class.d.ts +2 -2
  229. package/mixin/src/value-mixin.class.d.ts +8 -8
  230. package/notification/index.d.ts +5 -0
  231. package/notification/public-api.d.ts +4 -0
  232. package/notification/src/notification.class.d.ts +16 -0
  233. package/notification/src/notification.component.d.ts +25 -0
  234. package/notification/src/notification.module.d.ts +8 -0
  235. package/notification/src/notification.service.d.ts +21 -0
  236. package/package.json +9 -1
  237. package/page/src/base-page.class.d.ts +3 -23
  238. package/popup/src/popup.component.d.ts +2 -2
  239. package/popup/src/popup.service.d.ts +3 -4
  240. package/tabs/src/tab-content.directive.d.ts +2 -2
  241. package/tabs/src/tab-item.component.d.ts +4 -4
  242. package/toast/src/toast.class.d.ts +1 -0
  243. package/toast/src/toast.component.d.ts +1 -0
  244. package/toast/src/toast.module.d.ts +1 -4
  245. package/action-sheet/src/action-sheet-item.component.d.ts +0 -16
  246. package/esm2020/action-sheet/src/action-sheet-item.component.mjs +0 -47
  247. package/esm2020/common/src/auto-focus.directive.mjs +0 -55
  248. package/esm2020/common/src/components.class.mjs +0 -45
  249. package/esm2020/common/src/custom-cdk-overlay.service.mjs +0 -48
  250. package/esm2020/common/src/debounce-time.directive.mjs +0 -47
  251. package/esm2020/common/src/drawing.class.mjs +0 -2
  252. package/esm2020/common/src/events.class.mjs +0 -58
  253. package/esm2020/common/src/hotkey.directive.mjs +0 -79
  254. package/esm2020/common/src/hotkey.service.mjs +0 -38
  255. package/esm2020/common/src/infinite-scroll.directive.mjs +0 -63
  256. package/esm2020/common/src/overlay.service.mjs +0 -91
  257. package/esm2020/common/src/responsive.directive.mjs +0 -34
  258. package/esm2020/common/src/styles.class.mjs +0 -22
@@ -1,11 +1,8 @@
1
1
  import { AXClosbaleComponent } from '@acorex/components/common';
2
- import { Component, ViewEncapsulation, ChangeDetectionStrategy, } from '@angular/core';
2
+ import { Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, } from '@angular/core';
3
3
  import { AXBaseComponentMixin } from '@acorex/components/mixin';
4
4
  import * as i0 from "@angular/core";
5
5
  import * as i1 from "@angular/common";
6
- import * as i2 from "@acorex/components/button";
7
- import * as i3 from "@acorex/components/decorators";
8
- import * as i4 from "@acorex/components/alert";
9
6
  /**
10
7
  * The Button is a component which detects user interaction and triggers a corresponding event
11
8
  *
@@ -25,19 +22,24 @@ export class AXToastComponent extends AXBaseComponentMixin {
25
22
  this.close();
26
23
  }, this.options.timeOut);
27
24
  }
28
- switch (this.options.color) {
29
- case 'success':
30
- this._icon = 'ax-icon ax-icon-check-filled';
31
- break;
32
- case 'warning':
33
- this._icon = 'ax-icon ax-icon-warning-filled';
34
- break;
35
- case 'danger':
36
- this._icon = 'ax-icon ax-icon-error-filled';
37
- break;
38
- default:
39
- this._icon = '';
40
- break;
25
+ if (!this.options.icon) {
26
+ switch (this.options.color) {
27
+ case 'success':
28
+ this._icon = 'ax-icon ax-icon-check-circle-fill';
29
+ break;
30
+ case 'warning':
31
+ this._icon = 'ax-icon ax-icon-warning-fill';
32
+ break;
33
+ case 'danger':
34
+ this._icon = 'ax-icon ax-icon-error-fill';
35
+ break;
36
+ default:
37
+ this._icon = this.options.icon || 'ax-icon ax-icon-check-circle-fill';
38
+ break;
39
+ }
40
+ }
41
+ else {
42
+ this._icon = this.options.icon;
41
43
  }
42
44
  }
43
45
  _handleButtonClick(button) {
@@ -45,11 +47,17 @@ export class AXToastComponent extends AXBaseComponentMixin {
45
47
  button.onClick(this);
46
48
  }
47
49
  }
50
+ get __hostClass() {
51
+ return `ax-${this.options.color}`;
52
+ }
48
53
  }
49
54
  AXToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXToastComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
50
- AXToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AXToastComponent, selector: "ax-toast", providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], usesInheritance: true, ngImport: i0, template: "<ax-alert [color]=\"options.color\" [timeOut]=\"options.timeOut\">\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n <ax-content *ngIf=\"options.content\">\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\" class=\"ax-sm\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ax-footer>\r\n</ax-alert>", styles: ["ax-toast{width:max(20vw,350px)}@media (max-width: 599px){ax-toast{width:98vw}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }, { kind: "component", type: i3.AXDecoratorContentComponent, selector: "ax-content" }, { kind: "component", type: i3.AXDecoratorFooterComponent, selector: "ax-footer" }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorTitleComponent, selector: "ax-title", inputs: ["text"] }, { kind: "component", type: i3.AXDecoratorCloseButtonComponent, selector: "ax-close-button", inputs: ["icon"] }, { kind: "component", type: i4.AXAlertComponent, selector: "ax-alert", inputs: ["color", "timeOut", "visible"], outputs: ["onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
55
+ AXToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AXToastComponent, selector: "ax-toast", host: { properties: { "class": "this.__hostClass" } }, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], usesInheritance: true, ngImport: i0, template: "<!-- <ax-alert [color]=\"options.color\" [timeOut]=\"options.timeOut\">\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n <ax-content *ngIf=\"options.content\">\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\" class=\"ax-sm\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ax-footer>\r\n</ax-alert> -->\r\n<span [class]=\"'ax-toast-icon '+ _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\">{{options.title}}</div>\r\n <div [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>", styles: ["ax-toast{width:max(20vw,380px);display:flex;padding:.75rem 1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;border:1px solid;background-color:rgb(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden}ax-toast.ax-primary{background-color:rgb(var(--ax-color-primary-50));color:rgb(var(--ax-color-primary-700));border-color:rgb(var(--ax-color-primary-500))}ax-toast.ax-primary .ax-toast-title{color:rgb(var(--ax-color-primary-800))}ax-toast.ax-primary .ax-toast-progress{background-color:rgb(var(--ax-color-primary-500))}ax-toast.ax-secondary{background-color:rgb(var(--ax-color-secondary-50));color:rgb(var(--ax-color-secondary-700));border-color:rgb(var(--ax-color-secondary-500))}ax-toast.ax-secondary .ax-toast-title{color:rgb(var(--ax-color-secondary-800))}ax-toast.ax-secondary .ax-toast-progress{background-color:rgb(var(--ax-color-secondary-500))}ax-toast.ax-success{background-color:rgb(var(--ax-color-success-50));color:rgb(var(--ax-color-success-700));border-color:rgb(var(--ax-color-success-500))}ax-toast.ax-success .ax-toast-title{color:rgb(var(--ax-color-success-800))}ax-toast.ax-success .ax-toast-progress{background-color:rgb(var(--ax-color-success-500))}ax-toast.ax-warning{background-color:rgb(var(--ax-color-warning-50));color:rgb(var(--ax-color-warning-700));border-color:rgb(var(--ax-color-warning-500))}ax-toast.ax-warning .ax-toast-title{color:rgb(var(--ax-color-warning-800))}ax-toast.ax-warning .ax-toast-progress{background-color:rgb(var(--ax-color-warning-500))}ax-toast.ax-danger{background-color:rgb(var(--ax-color-danger-50));color:rgb(var(--ax-color-danger-700));border-color:rgb(var(--ax-color-danger-500))}ax-toast.ax-danger .ax-toast-title{color:rgb(var(--ax-color-danger-800))}ax-toast.ax-danger .ax-toast-progress{background-color:rgb(var(--ax-color-danger-500))}@media (max-width: 599px){ax-toast{width:98vw}}ax-toast .ax-toast-icon,ax-toast .ax-icon-close{font-size:1.25rem}ax-toast .ax-toast-icon{padding-inline-end:.75rem}ax-toast .ax-toast-content{display:flex;flex-direction:column;flex:1;gap:.5rem}ax-toast .ax-toast-content .ax-toast-title{font-weight:500;margin-bottom:.5rem}ax-toast .ax-toast-content .ax-toast-buttons{margin-top:.25rem}ax-toast .ax-toast-content .ax-toast-buttons button{font-weight:700}ax-toast .ax-toast-content .ax-toast-buttons button:hover{opacity:.6}ax-toast .ax-icon-close{cursor:pointer;height:-moz-fit-content;height:fit-content}ax-toast .ax-icon-close:hover{opacity:.6}ax-toast .ax-toast-progress{position:absolute;right:0;left:0;bottom:0;height:.25rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:rgba(var(--ax-color-border-default))}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
51
56
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXToastComponent, decorators: [{
52
57
  type: Component,
53
- args: [{ selector: 'ax-toast', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], template: "<ax-alert [color]=\"options.color\" [timeOut]=\"options.timeOut\">\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n <ax-content *ngIf=\"options.content\">\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\" class=\"ax-sm\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ax-footer>\r\n</ax-alert>", styles: ["ax-toast{width:max(20vw,350px)}@media (max-width: 599px){ax-toast{width:98vw}}\n"] }]
54
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; } });
55
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9hc3QuY29tcG9uZW50LmpzIiwic291cm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rKHRoaXMpO1xyXG4gICAgfVxyXG4gIH1cclxufVxyXG4iLCI8YXgtYWxlcnQgW2NvbG9yXT1cIm9wdGlvbnMuY29sb3JcIiAgW3RpbWVPdXRdPVwib3B0aW9ucy50aW1lT3V0XCI+XHJcbiAgICA8YXgtaWNvbiAqbmdJZj1cIl9pY29uXCIgW2ljb25dPVwiX2ljb25cIj48L2F4LWljb24+XHJcbiAgICA8YXgtdGl0bGUgW3RleHRdPVwib3B0aW9ucy50aXRsZVwiPjwvYXgtdGl0bGU+XHJcbiAgICA8YXgtY2xvc2UtYnV0dG9uICAqbmdJZj1cIm9wdGlvbnMuY2xvc2VhYmxlXCI+PC9heC1jbG9zZS1idXR0b24+XHJcbiAgICA8YXgtY29udGVudCAqbmdJZj1cIm9wdGlvbnMuY29udGVudFwiPlxyXG4gICAgICAgIDxkaXYgW2lubmVySFRNTF09XCJvcHRpb25zLmNvbnRlbnRcIj48L2Rpdj5cclxuICAgIDwvYXgtY29udGVudD5cclxuICAgIDxheC1mb290ZXIgKm5nSWY9XCJvcHRpb25zPy5idXR0b25zPy5sZW5ndGhcIj5cclxuICAgICAgICA8YXgtYnV0dG9uICpuZ0Zvcj1cImxldCBidXR0b24gb2Ygb3B0aW9ucy5idXR0b25zXCIgW3RleHRdPVwiYnV0dG9uLnRleHRcIiBjbGFzcz1cImF4LXNtXCJcclxuICAgICAgICAgICAgKG9uQ2xpY2spPVwiX2hhbmRsZUJ1dHRvbkNsaWNrKGJ1dHRvbilcIiBbY29sb3JdPVwib3B0aW9ucy5jb2xvclwiIFtsb29rXT1cIidkZWZhdWx0J1wiPjwvYXgtYnV0dG9uPlxyXG4gICAgPC9heC1mb290ZXI+XHJcbjwvYXgtYWxlcnQ+Il19
58
+ args: [{ selector: 'ax-toast', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }], template: "<!-- <ax-alert [color]=\"options.color\" [timeOut]=\"options.timeOut\">\r\n <ax-icon *ngIf=\"_icon\" [icon]=\"_icon\"></ax-icon>\r\n <ax-title [text]=\"options.title\"></ax-title>\r\n <ax-close-button *ngIf=\"options.closeable\"></ax-close-button>\r\n <ax-content *ngIf=\"options.content\">\r\n <div [innerHTML]=\"options.content\"></div>\r\n </ax-content>\r\n <ax-footer *ngIf=\"options?.buttons?.length\">\r\n <ax-button *ngFor=\"let button of options.buttons\" [text]=\"button.text\" class=\"ax-sm\"\r\n (onClick)=\"_handleButtonClick(button)\" [color]=\"options.color\" [look]=\"'default'\"></ax-button>\r\n </ax-footer>\r\n</ax-alert> -->\r\n<span [class]=\"'ax-toast-icon '+ _icon \"></span>\r\n<div class=\"ax-toast-content\">\r\n <div class=\"ax-toast-title\">{{options.title}}</div>\r\n <div [innerHTML]=\"options.content\"></div>\r\n <div class=\"ax-toast-buttons\" *ngIf=\"options?.buttons?.length\">\r\n <button *ngFor=\"let button of options.buttons\" (click)=\"_handleButtonClick(button)\">\r\n {{button.text}}\r\n </button>\r\n </div>\r\n</div>\r\n<span class=\"ax-icon ax-icon-close\" (click)=\"close()\"></span>\r\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"options.timeOut\" *ngIf=\"options.timeOut\"></div>", styles: ["ax-toast{width:max(20vw,380px);display:flex;padding:.75rem 1rem;border-radius:var(--ax-rounded-border-default);font-size:.875rem;border:1px solid;background-color:rgb(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));position:relative;overflow:hidden}ax-toast.ax-primary{background-color:rgb(var(--ax-color-primary-50));color:rgb(var(--ax-color-primary-700));border-color:rgb(var(--ax-color-primary-500))}ax-toast.ax-primary .ax-toast-title{color:rgb(var(--ax-color-primary-800))}ax-toast.ax-primary .ax-toast-progress{background-color:rgb(var(--ax-color-primary-500))}ax-toast.ax-secondary{background-color:rgb(var(--ax-color-secondary-50));color:rgb(var(--ax-color-secondary-700));border-color:rgb(var(--ax-color-secondary-500))}ax-toast.ax-secondary .ax-toast-title{color:rgb(var(--ax-color-secondary-800))}ax-toast.ax-secondary .ax-toast-progress{background-color:rgb(var(--ax-color-secondary-500))}ax-toast.ax-success{background-color:rgb(var(--ax-color-success-50));color:rgb(var(--ax-color-success-700));border-color:rgb(var(--ax-color-success-500))}ax-toast.ax-success .ax-toast-title{color:rgb(var(--ax-color-success-800))}ax-toast.ax-success .ax-toast-progress{background-color:rgb(var(--ax-color-success-500))}ax-toast.ax-warning{background-color:rgb(var(--ax-color-warning-50));color:rgb(var(--ax-color-warning-700));border-color:rgb(var(--ax-color-warning-500))}ax-toast.ax-warning .ax-toast-title{color:rgb(var(--ax-color-warning-800))}ax-toast.ax-warning .ax-toast-progress{background-color:rgb(var(--ax-color-warning-500))}ax-toast.ax-danger{background-color:rgb(var(--ax-color-danger-50));color:rgb(var(--ax-color-danger-700));border-color:rgb(var(--ax-color-danger-500))}ax-toast.ax-danger .ax-toast-title{color:rgb(var(--ax-color-danger-800))}ax-toast.ax-danger .ax-toast-progress{background-color:rgb(var(--ax-color-danger-500))}@media (max-width: 599px){ax-toast{width:98vw}}ax-toast .ax-toast-icon,ax-toast .ax-icon-close{font-size:1.25rem}ax-toast .ax-toast-icon{padding-inline-end:.75rem}ax-toast .ax-toast-content{display:flex;flex-direction:column;flex:1;gap:.5rem}ax-toast .ax-toast-content .ax-toast-title{font-weight:500;margin-bottom:.5rem}ax-toast .ax-toast-content .ax-toast-buttons{margin-top:.25rem}ax-toast .ax-toast-content .ax-toast-buttons button{font-weight:700}ax-toast .ax-toast-content .ax-toast-buttons button:hover{opacity:.6}ax-toast .ax-icon-close{cursor:pointer;height:-moz-fit-content;height:fit-content}ax-toast .ax-icon-close:hover{opacity:.6}ax-toast .ax-toast-progress{position:absolute;right:0;left:0;bottom:0;height:.25rem;width:100%;animation-duration:4s;animation-timing-function:linear;animation-name:progressBar;background-color:rgba(var(--ax-color-border-default))}@keyframes progressBar{0%{width:100%}to{width:0%}}\n"] }]
59
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { __hostClass: [{
60
+ type: HostBinding,
61
+ args: ['class']
62
+ }] } });
63
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9hc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWNvcmV4L2NvbXBvbmVudHMvdG9hc3Qvc3JjL3RvYXN0LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Fjb3JleC9jb21wb25lbnRzL3RvYXN0L3NyYy90b2FzdC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUVoRSxPQUFPLEVBQ0wsU0FBUyxFQUNULGlCQUFpQixFQUNqQix1QkFBdUIsRUFHdkIsV0FBVyxHQUNaLE1BQU0sZUFBZSxDQUFDO0FBRXZCLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBCQUEwQixDQUFDOzs7QUFFaEU7Ozs7R0FJRztBQVNILE1BQU0sT0FBTyxnQkFBaUIsU0FBUSxvQkFBb0I7SUFTeEQ7O09BRUc7SUFDSCxZQUFZLFVBQXNCLEVBQUUsR0FBc0I7UUFDeEQsS0FBSyxDQUFDLFVBQVUsRUFBRSxHQUFHLENBQUMsQ0FBQztRQVR6QixnQkFBVyxHQUFXLEdBQUcsQ0FBQztJQVUxQixDQUFDO0lBRUQsTUFBTTtRQUNKLElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxPQUFPLEVBQUU7WUFDeEIsVUFBVSxDQUFDLEdBQUcsRUFBRTtnQkFDZCxJQUFJLENBQUMsS0FBSyxFQUFFLENBQUM7WUFDZixDQUFDLEVBQUUsSUFBSSxDQUFDLE9BQU8sQ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PVwib3B0aW9ucy5jb250ZW50XCI+PC9kaXY+XHJcbiAgICA8ZGl2IGNsYXNzPVwiYXgtdG9hc3QtYnV0dG9uc1wiICpuZ0lmPVwib3B0aW9ucz8uYnV0dG9ucz8ubGVuZ3RoXCI+XHJcbiAgICAgICAgPGJ1dHRvbiAqbmdGb3I9XCJsZXQgYnV0dG9uIG9mIG9wdGlvbnMuYnV0dG9uc1wiIChjbGljayk9XCJfaGFuZGxlQnV0dG9uQ2xpY2soYnV0dG9uKVwiPlxyXG4gICAgICAgICAgICB7e2J1dHRvbi50ZXh0fX1cclxuICAgICAgICA8L2J1dHRvbj5cclxuICAgIDwvZGl2PlxyXG48L2Rpdj5cclxuPHNwYW4gY2xhc3M9XCJheC1pY29uIGF4LWljb24tY2xvc2VcIiAoY2xpY2spPVwiY2xvc2UoKVwiPjwvc3Bhbj5cclxuPGRpdiBjbGFzcz1cImF4LXRvYXN0LXByb2dyZXNzXCIgW3N0eWxlLmFuaW1hdGlvbi1kdXJhdGlvbi5tc109XCJvcHRpb25zLnRpbWVPdXRcIiAqbmdJZj1cIm9wdGlvbnMudGltZU91dFwiPjwvZGl2PiJdfQ==
@@ -1,16 +1,13 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { AXToastComponent } from './toast.component';
4
- import { AXAlertModule } from '@acorex/components/alert';
5
- import { AXButtonModule } from '@acorex/components/button';
6
- import { AXDecoratorModule } from '@acorex/components/decorators';
7
4
  import * as i0 from "@angular/core";
8
5
  const COMPONENT = [AXToastComponent];
9
- const MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXAlertModule];
6
+ const MODULES = [CommonModule];
10
7
  export class AXToastModule {
11
8
  }
12
9
  AXToastModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXToastModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
- AXToastModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AXToastModule, declarations: [AXToastComponent], imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXAlertModule], exports: [AXToastComponent] });
10
+ AXToastModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AXToastModule, declarations: [AXToastComponent], imports: [CommonModule], exports: [AXToastComponent] });
14
11
  AXToastModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXToastModule, imports: [MODULES] });
15
12
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXToastModule, decorators: [{
16
13
  type: NgModule,
@@ -21,4 +18,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
21
18
  providers: [],
22
19
  }]
23
20
  }] });
24
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9hc3QubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYWNvcmV4L2NvbXBvbmVudHMvdG9hc3Qvc3JjL3RvYXN0Lm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUMvQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNyRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDekQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzNELE9BQU8sRUFBRSxpQkFBaUIsRUFBR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EIsWUFBWSxhQURWLGdCQUFnQjsyR0FTdEIsYUFBYSxZQUpULE9BQU87MkZBSVgsYUFBYTtrQkFOekIsUUFBUTttQkFBQztvQkFDTixZQUFZLEVBQUUsQ0FBQyxHQUFHLFNBQVMsQ0FBQztvQkFDNUIsT0FBTyxFQUFFLENBQUMsR0FBRyxPQUFPLENBQUM7b0JBQ3JCLE9BQU8sRUFBRSxDQUFDLEdBQUcsU0FBUyxDQUFDO29CQUN2QixTQUFTLEVBQUUsRUFBRTtpQkFDaEIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBDb21tb25Nb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb21tb24nO1xyXG5pbXBvcnQgeyBBWFRvYXN0Q29tcG9uZW50IH0gZnJvbSAnLi90b2FzdC5jb21wb25lbnQnO1xyXG5cclxuY29uc3QgQ09NUE9ORU5UID0gW0FYVG9hc3RDb21wb25lbnRdO1xyXG5jb25zdCBNT0RVTEVTID0gW0NvbW1vbk1vZHVsZV07XHJcblxyXG5ATmdNb2R1bGUoe1xyXG4gICAgZGVjbGFyYXRpb25zOiBbLi4uQ09NUE9ORU5UXSxcclxuICAgIGltcG9ydHM6IFsuLi5NT0RVTEVTXSxcclxuICAgIGV4cG9ydHM6IFsuLi5DT01QT05FTlRdLFxyXG4gICAgcHJvdmlkZXJzOiBbXSxcclxufSlcclxuZXhwb3J0IGNsYXNzIEFYVG9hc3RNb2R1bGUge1xyXG4gIFxyXG59XHJcbiJdfQ==
@@ -1,156 +1,172 @@
1
+ import * as i2$1 from '@acorex/components/common';
2
+ import { TAB_META_KEY, AXCommonModule, AXComponentClosedPromise } from '@acorex/components/common';
1
3
  import { AXBaseComponent } from '@acorex/components/mixin';
2
- import { trigger, state, style, transition, animate } from '@angular/animations';
4
+ import * as i2 from '@angular/cdk/portal';
5
+ import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
3
6
  import * as i0 from '@angular/core';
4
- import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, EventEmitter, Output, NgModule } from '@angular/core';
7
+ import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, HostListener, NgModule, Injectable } from '@angular/core';
5
8
  import * as i1 from '@angular/common';
6
9
  import { CommonModule } from '@angular/common';
7
- import * as i1$1 from '@acorex/components/button';
10
+ import { A11yModule } from '@angular/cdk/a11y';
11
+ import { DragDropModule } from '@angular/cdk/drag-drop';
8
12
  import { AXButtonModule } from '@acorex/components/button';
13
+ import { AXDecoratorModule } from '@acorex/components/decorators';
14
+ import { AXTranslator } from '@acorex/core/translation';
15
+ import * as i1$1 from '@angular/cdk/overlay';
9
16
 
10
17
  class AXActionSheetComponent extends AXBaseComponent {
11
- /**
12
- * @ignore
13
- */
14
- constructor(_elementRef, _cdr) {
15
- super(_elementRef, _cdr);
16
- this.caption = '';
17
- this.closeOnBackdrop = true;
18
- this.isOpen = false;
19
- }
20
- _handleBackdropClick() {
21
- if (!this.closeOnBackdrop)
22
- return;
23
- this.close();
24
- }
25
- open() {
26
- this.isOpen = true;
18
+ constructor(elementRef, cdr, _viewContainerRef) {
19
+ super(elementRef, cdr);
20
+ this._viewContainerRef = _viewContainerRef;
21
+ this.items = [];
22
+ this.showCloseButton = true;
23
+ this.showHeader = true;
24
+ this.data = {};
25
+ this.onClosed = new EventEmitter();
27
26
  }
28
27
  close() {
29
- this.isOpen = false;
28
+ this.onClosed.emit({
29
+ component: this[TAB_META_KEY].component,
30
+ htmlElement: this._getHostElement(),
31
+ });
32
+ this._cdr.detectChanges();
30
33
  }
31
- toggle() {
32
- this.isOpen = !this.isOpen;
34
+ onInit() {
35
+ if (this.content) {
36
+ this._selectedPortal = new ComponentPortal(this.content);
37
+ this._cdr.markForCheck();
38
+ }
33
39
  }
34
- }
35
- AXActionSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
36
- AXActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AXActionSheetComponent, selector: "ax-action-sheet", inputs: { caption: "caption", closeOnBackdrop: "closeOnBackdrop" }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-action-sheet-backdrop\" [@backdrop]=\"isOpen ? 'show' : 'hide'\" (click)=\"_handleBackdropClick()\"></div>\r\n<div class=\"ax-action-sheet-container\" [@openClose]=\"isOpen ? 'open' : 'closed'\">\r\n <div class=\"ax-action-sheet-card\">\r\n <div class=\"ax-action-sheet-caption\" *ngIf=\"caption\">\r\n {{caption}}\r\n </div>\r\n <ng-content select=\"ax-content\"></ng-content>\r\n <div class=\"ax-action-sheet-items\">\r\n <ng-content select=\"ax-action-sheet-item\"></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: ["ax-action-sheet .ax-action-sheet-container{position:fixed;bottom:0;left:50%;transform:translate(-50%);z-index:9999;width:33.333333%;border-top-left-radius:var(--ax-rounded-border-default);border-top-right-radius:var(--ax-rounded-border-default);overflow:hidden}@media (max-width: 599px){ax-action-sheet .ax-action-sheet-container{width:100%}}ax-action-sheet .ax-action-sheet-container .ax-action-sheet-caption{font-size:.875rem;padding:1rem}ax-action-sheet .ax-action-sheet-container .ax-action-sheet-card{background-color:rgb(var(--ax-color-surface));height:100%}ax-action-sheet .ax-action-sheet-container .ax-action-sheet-items{@apply ax-flex ax-flex-col ax-pb-3 ax-overflow-x-hidden ax-overflow-y-auto;display:flex;flex-direction:column;padding-bottom:.75rem;overflow-x:hidden;overflow-y:auto}ax-action-sheet .ax-action-sheet-container .ax-action-sheet-items ax-button{border-radius:0!important;width:100%;text-align:start;justify-items:flex-start}ax-action-sheet .ax-action-sheet-backdrop{background-color:#0000004d;inset:0;position:fixed;z-index:9998}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
37
- trigger('backdrop', [
38
- state('show', style({
39
- opacity: 1,
40
- visibility: 'visible',
41
- })),
42
- state('hide', style({
43
- visibility: 'hidden',
44
- opacity: 0,
45
- })),
46
- transition('show <=> hide', [animate('0.2s')]),
47
- ]),
48
- trigger('openClose', [
49
- state('open', style({
50
- bottom: '0',
51
- opacity: 1,
52
- })),
53
- state('closed', style({
54
- bottom: '-100%',
55
- opacity: 0.5,
56
- })),
57
- transition('open <=> closed', [animate('0.2s')]),
58
- ]),
59
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetComponent, decorators: [{
61
- type: Component,
62
- args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [
63
- trigger('backdrop', [
64
- state('show', style({
65
- opacity: 1,
66
- visibility: 'visible',
67
- })),
68
- state('hide', style({
69
- visibility: 'hidden',
70
- opacity: 0,
71
- })),
72
- transition('show <=> hide', [animate('0.2s')]),
73
- ]),
74
- trigger('openClose', [
75
- state('open', style({
76
- bottom: '0',
77
- opacity: 1,
78
- })),
79
- state('closed', style({
80
- bottom: '-100%',
81
- opacity: 0.5,
82
- })),
83
- transition('open <=> closed', [animate('0.2s')]),
84
- ]),
85
- ], template: "<div class=\"ax-action-sheet-backdrop\" [@backdrop]=\"isOpen ? 'show' : 'hide'\" (click)=\"_handleBackdropClick()\"></div>\r\n<div class=\"ax-action-sheet-container\" [@openClose]=\"isOpen ? 'open' : 'closed'\">\r\n <div class=\"ax-action-sheet-card\">\r\n <div class=\"ax-action-sheet-caption\" *ngIf=\"caption\">\r\n {{caption}}\r\n </div>\r\n <ng-content select=\"ax-content\"></ng-content>\r\n <div class=\"ax-action-sheet-items\">\r\n <ng-content select=\"ax-action-sheet-item\"></ng-content>\r\n </div>\r\n </div>\r\n</div>", styles: ["ax-action-sheet .ax-action-sheet-container{position:fixed;bottom:0;left:50%;transform:translate(-50%);z-index:9999;width:33.333333%;border-top-left-radius:var(--ax-rounded-border-default);border-top-right-radius:var(--ax-rounded-border-default);overflow:hidden}@media (max-width: 599px){ax-action-sheet .ax-action-sheet-container{width:100%}}ax-action-sheet .ax-action-sheet-container .ax-action-sheet-caption{font-size:.875rem;padding:1rem}ax-action-sheet .ax-action-sheet-container .ax-action-sheet-card{background-color:rgb(var(--ax-color-surface));height:100%}ax-action-sheet .ax-action-sheet-container .ax-action-sheet-items{@apply ax-flex ax-flex-col ax-pb-3 ax-overflow-x-hidden ax-overflow-y-auto;display:flex;flex-direction:column;padding-bottom:.75rem;overflow-x:hidden;overflow-y:auto}ax-action-sheet .ax-action-sheet-container .ax-action-sheet-items ax-button{border-radius:0!important;width:100%;text-align:start;justify-items:flex-start}ax-action-sheet .ax-action-sheet-backdrop{background-color:#0000004d;inset:0;position:fixed;z-index:9998}\n"] }]
86
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { caption: [{
87
- type: Input
88
- }], closeOnBackdrop: [{
89
- type: Input
90
- }] } });
91
-
92
- class AXActionSheetItemComponent extends AXBaseComponent {
93
- /**
94
- * @ignore
95
- */
96
- constructor(_elementRef, _cdr) {
97
- super(_elementRef, _cdr);
98
- this.color = 'primary';
99
- this.onClick = new EventEmitter();
40
+ onKeydownHandler(event) {
41
+ let focusedOrHasFocused = this._getHostElement().matches(':focus-within');
42
+ if (this.showCloseButton && focusedOrHasFocused) {
43
+ this.close();
44
+ }
100
45
  }
101
- _handleOnClick(e) {
102
- this.onClick.emit(e);
46
+ _handleAttched(ref) {
47
+ ref = ref;
48
+ if (ref.instance) {
49
+ this[TAB_META_KEY].component = ref.instance;
50
+ Object.assign(this[TAB_META_KEY].component, this.data);
51
+ if (ref.instance.onClosed) {
52
+ ref.instance.onClosed.subscribe((e) => {
53
+ this.onClosed.emit(e);
54
+ });
55
+ }
56
+ }
57
+ }
58
+ _handleCloseClick() {
59
+ this.close();
103
60
  }
104
61
  }
105
- AXActionSheetItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
106
- AXActionSheetItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AXActionSheetItemComponent, selector: "ax-action-sheet-item", inputs: { text: "text", color: "color" }, outputs: { onClick: "onClick" }, usesInheritance: true, ngImport: i0, template: `
107
- <ax-button
108
- [color]="color"
109
- look="blank"
110
- [text]="text"
111
- (onClick)="_handleOnClick($event)"
112
- ></ax-button>
113
- `, isInline: true, dependencies: [{ kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange"] }] });
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetItemComponent, decorators: [{
62
+ AXActionSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
63
+ AXActionSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: AXActionSheetComponent, selector: "ax-action-sheet", host: { listeners: { "keydown.escape": "onKeydownHandler($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<ng-template [cdkPortalOutlet]=\"_selectedPortal\" ></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div class=\"ax-action-sheet-item ax-{{item.color}}\" [class.ax-state-disabled]=\"item.disabled\" (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{item.text}}</span>\r\n </div>\r\n </ng-container>\r\n</div>", styles: ["@media (max-width: 599px){ax-action-sheet{width:100vw}}@media (min-width: 600px){ax-action-sheet{width:75vw}}@media (min-width: 1200px){ax-action-sheet{width:30vw}}@media (min-width: 1800px){ax-action-sheet{width:25vw}}ax-action-sheet .ax-action-sheet-header{padding:1rem;display:flex;justify-content:space-between;border-bottom:1px solid;border-color:rgb(var(--ax-color-border-default))}ax-action-sheet .ax-action-sheet-header .ax-action-sheet-title{font-weight:500;font-size:1rem}ax-action-sheet .ax-action-sheet-header .ax-icon-close{font-size:1.5rem;cursor:pointer}ax-action-sheet .ax-action-sheet-header .ax-icon-close:hover{opacity:.5}ax-action-sheet .ax-action-sheet-items{padding:.5rem 0}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item{-webkit-user-select:none;user-select:none;cursor:pointer;padding:.75rem 1rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item:hover{background-color:rgba(var(--ax-color-ghost),.03)}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item .item-icon{font-size:1.5rem;margin-inline-end:.75rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-primary{color:rgb(var(--ax-color-primary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-secondary{color:rgb(var(--ax-color-secondary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-success{color:rgb(var(--ax-color-success-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-warning{color:rgb(var(--ax-color-warning-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-danger{color:rgb(var(--ax-color-danger-500))}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetComponent, decorators: [{
115
65
  type: Component,
116
- args: [{
117
- selector: 'ax-action-sheet-item',
118
- template: `
119
- <ax-button
120
- [color]="color"
121
- look="blank"
122
- [text]="text"
123
- (onClick)="_handleOnClick($event)"
124
- ></ax-button>
125
- `,
126
- }]
127
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { text: [{
128
- type: Input
129
- }], color: [{
130
- type: Input
131
- }], onClick: [{
132
- type: Output
66
+ args: [{ selector: 'ax-action-sheet', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<ng-template [cdkPortalOutlet]=\"_selectedPortal\" ></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div class=\"ax-action-sheet-item ax-{{item.color}}\" [class.ax-state-disabled]=\"item.disabled\" (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{item.text}}</span>\r\n </div>\r\n </ng-container>\r\n</div>", styles: ["@media (max-width: 599px){ax-action-sheet{width:100vw}}@media (min-width: 600px){ax-action-sheet{width:75vw}}@media (min-width: 1200px){ax-action-sheet{width:30vw}}@media (min-width: 1800px){ax-action-sheet{width:25vw}}ax-action-sheet .ax-action-sheet-header{padding:1rem;display:flex;justify-content:space-between;border-bottom:1px solid;border-color:rgb(var(--ax-color-border-default))}ax-action-sheet .ax-action-sheet-header .ax-action-sheet-title{font-weight:500;font-size:1rem}ax-action-sheet .ax-action-sheet-header .ax-icon-close{font-size:1.5rem;cursor:pointer}ax-action-sheet .ax-action-sheet-header .ax-icon-close:hover{opacity:.5}ax-action-sheet .ax-action-sheet-items{padding:.5rem 0}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item{-webkit-user-select:none;user-select:none;cursor:pointer;padding:.75rem 1rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item:hover{background-color:rgba(var(--ax-color-ghost),.03)}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item .item-icon{font-size:1.5rem;margin-inline-end:.75rem}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-primary{color:rgb(var(--ax-color-primary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-secondary{color:rgb(var(--ax-color-secondary-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-success{color:rgb(var(--ax-color-success-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-warning{color:rgb(var(--ax-color-warning-500))}ax-action-sheet .ax-action-sheet-items .ax-action-sheet-item.ax-danger{color:rgb(var(--ax-color-danger-500))}\n"] }]
67
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { onKeydownHandler: [{
68
+ type: HostListener,
69
+ args: ['keydown.escape', ['$event']]
133
70
  }] } });
134
71
 
72
+ const MODULES = [CommonModule, AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];
135
73
  class AXActionSheetModule {
136
74
  }
137
75
  AXActionSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
138
- AXActionSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetModule, declarations: [AXActionSheetComponent, AXActionSheetItemComponent], imports: [CommonModule, AXButtonModule], exports: [AXActionSheetComponent, AXActionSheetItemComponent] });
139
- AXActionSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetModule, imports: [CommonModule, AXButtonModule] });
76
+ AXActionSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetModule, declarations: [AXActionSheetComponent], imports: [CommonModule, AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule], exports: [AXActionSheetComponent] });
77
+ AXActionSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetModule, imports: [MODULES] });
140
78
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetModule, decorators: [{
141
79
  type: NgModule,
142
80
  args: [{
143
- declarations: [AXActionSheetComponent, AXActionSheetItemComponent],
144
- imports: [CommonModule, AXButtonModule],
145
- exports: [AXActionSheetComponent, AXActionSheetItemComponent],
81
+ declarations: [AXActionSheetComponent],
82
+ imports: [...MODULES],
83
+ exports: [AXActionSheetComponent],
146
84
  providers: [],
147
85
  }]
148
86
  }] });
149
87
 
88
+ class AXActionSheetService {
89
+ // _overlayRef: OverlayRef;
90
+ // _templatePortal!: ComponentPortal<any>;
91
+ constructor(_overlay, overlayService) {
92
+ this._overlay = _overlay;
93
+ this.overlayService = overlayService;
94
+ }
95
+ //open(items: AXActionSheetItem[],options?:AXActionSheetOptions);
96
+ //open(content:AXActionSheetContentType, options?: AXActionSheetOptions);
97
+ open(options) {
98
+ const opt = {
99
+ title: AXTranslator.get('action-sheet.title'),
100
+ showCloseButton: true,
101
+ closeOnBackdrop: true,
102
+ showHeader: true
103
+ };
104
+ Object.assign(opt, options);
105
+ const lastActiveElement = document.activeElement;
106
+ const com = this.overlayService.show(AXActionSheetComponent, opt, {
107
+ hasBackdrop: true,
108
+ closeOnClickOutside: opt.closeOnBackdrop,
109
+ transparentBackdrop: false,
110
+ panelClass: ['ax-actionsheet-panel'],
111
+ position: this._overlay.position().global().bottom().centerHorizontally(),
112
+ });
113
+ const actionSheet = com.instance;
114
+ actionSheet[TAB_META_KEY] = {};
115
+ actionSheet.onClosed.subscribe(c => {
116
+ this.closePopup(actionSheet, com, c, lastActiveElement);
117
+ });
118
+ const promise = new AXComponentClosedPromise((resolve) => {
119
+ actionSheet[TAB_META_KEY].close = (e) => {
120
+ if (resolve) {
121
+ resolve(e);
122
+ }
123
+ };
124
+ });
125
+ promise['closeMethod'] = () => { actionSheet.close(); };
126
+ return promise;
127
+ }
128
+ closePopup(popup, com, result, lastActiveElement) {
129
+ var _a;
130
+ const closeFunc = (e) => {
131
+ com.dispose();
132
+ delete e.cancel;
133
+ popup[TAB_META_KEY].close(e);
134
+ if (lastActiveElement === null || lastActiveElement === void 0 ? void 0 : lastActiveElement.focus) {
135
+ lastActiveElement.focus();
136
+ }
137
+ };
138
+ const e = { cancel: false };
139
+ const closingFunc = (_a = popup[TAB_META_KEY].component) === null || _a === void 0 ? void 0 : _a.onClosing;
140
+ if (closingFunc) {
141
+ const res = closingFunc(e);
142
+ if (res instanceof Promise) {
143
+ res.then(() => {
144
+ if (e == null || e.cancel !== true) {
145
+ closeFunc(result);
146
+ }
147
+ });
148
+ }
149
+ else {
150
+ if (e == null || e.cancel !== true) {
151
+ closeFunc(result);
152
+ }
153
+ }
154
+ }
155
+ else {
156
+ closeFunc(result);
157
+ }
158
+ }
159
+ }
160
+ AXActionSheetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetService, deps: [{ token: i1$1.Overlay }, { token: i2$1.AXOverlayService }], target: i0.ɵɵFactoryTarget.Injectable });
161
+ AXActionSheetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetService, providedIn: 'root' });
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AXActionSheetService, decorators: [{
163
+ type: Injectable,
164
+ args: [{ providedIn: 'root' }]
165
+ }], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i2$1.AXOverlayService }]; } });
166
+
150
167
  /**
151
168
  * Generated bundle index. Do not edit.
152
169
  */
153
170
 
154
- export { AXActionSheetComponent, AXActionSheetItemComponent, AXActionSheetModule };
155
- //# sourceMappingURL=acorex-components-action-sheet.mjs.map
171
+ export { AXActionSheetComponent, AXActionSheetModule, AXActionSheetService };
156
172
  //# sourceMappingURL=acorex-components-action-sheet.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet-item.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXBaseComponent } from '@acorex/components/mixin';\r\nimport {\r\n trigger,\r\n state,\r\n style,\r\n transition,\r\n animate,\r\n} from '@angular/animations';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Input, ViewEncapsulation } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n styleUrls: ['./action-sheet.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n animations: [\r\n trigger('backdrop', [\r\n state(\r\n 'show',\r\n style({\r\n opacity: 1,\r\n visibility: 'visible',\r\n })\r\n ),\r\n state(\r\n 'hide',\r\n style({\r\n visibility: 'hidden',\r\n opacity: 0,\r\n })\r\n ),\r\n transition('show <=> hide', [animate('0.2s')]),\r\n ]),\r\n\r\n trigger('openClose', [\r\n state(\r\n 'open',\r\n style({\r\n bottom: '0',\r\n opacity: 1,\r\n })\r\n ),\r\n state(\r\n 'closed',\r\n style({\r\n bottom: '-100%',\r\n opacity: 0.5,\r\n })\r\n ),\r\n transition('open <=> closed', [animate('0.2s')]),\r\n ]),\r\n ]\r\n})\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n @Input() caption = '';\r\n @Input() closeOnBackdrop = true;\r\n isOpen = false;\r\n\r\n _backdrop: HTMLElement;\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleBackdropClick() {\r\n if (!this.closeOnBackdrop) return;\r\n this.close();\r\n }\r\n\r\n open() {\r\n this.isOpen = true;\r\n }\r\n\r\n close() {\r\n this.isOpen = false;\r\n }\r\n\r\n toggle() {\r\n this.isOpen = !this.isOpen;\r\n }\r\n}\r\n","<div class=\"ax-action-sheet-backdrop\" [@backdrop]=\"isOpen ? 'show' : 'hide'\" (click)=\"_handleBackdropClick()\"></div>\r\n<div class=\"ax-action-sheet-container\" [@openClose]=\"isOpen ? 'open' : 'closed'\">\r\n <div class=\"ax-action-sheet-card\">\r\n <div class=\"ax-action-sheet-caption\" *ngIf=\"caption\">\r\n {{caption}}\r\n </div>\r\n <ng-content select=\"ax-content\"></ng-content>\r\n <div class=\"ax-action-sheet-items\">\r\n <ng-content select=\"ax-action-sheet-item\"></ng-content>\r\n </div>\r\n </div>\r\n</div>","import {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n} from '@angular/core';\r\nimport {\r\n AXButtonClickEvent,\r\n AXStyleColorType,\r\n} from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet-item',\r\n template: `\r\n <ax-button\r\n [color]=\"color\"\r\n look=\"blank\"\r\n [text]=\"text\"\r\n (onClick)=\"_handleOnClick($event)\"\r\n ></ax-button>\r\n `,\r\n})\r\nexport class AXActionSheetItemComponent extends AXBaseComponent {\r\n @Input()\r\n text: string;\r\n\r\n @Input()\r\n color: AXStyleColorType = 'primary';\r\n\r\n @Output()\r\n onClick: EventEmitter<AXButtonClickEvent> = new EventEmitter<AXButtonClickEvent>();\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(_elementRef: ElementRef, _cdr: ChangeDetectorRef) {\r\n super(_elementRef, _cdr);\r\n }\r\n\r\n _handleOnClick(e: any) {\r\n this.onClick.emit(e);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetItemComponent } from './action-sheet-item.component';\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n imports: [CommonModule, AXButtonModule],\r\n exports: [AXActionSheetComponent, AXActionSheetItemComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;AAsDM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAMzD;;AAEG;IACH,WAAY,CAAA,WAAuB,EAAE,IAAuB,EAAA;AAC1D,QAAA,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AATlB,QAAA,IAAO,CAAA,OAAA,GAAG,EAAE,CAAC;AACb,QAAA,IAAe,CAAA,eAAA,GAAG,IAAI,CAAC;AAChC,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;KAQd;IAED,oBAAoB,GAAA;QAClB,IAAI,CAAC,IAAI,CAAC,eAAe;YAAE,OAAO;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;KACd;IAED,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;KACpB;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;KACrB;IAED,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;KAC5B;;mHA5BU,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;uGAAtB,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtDnC,klBAWM,EDKQ,MAAA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CAAA;;;;;;;AAOT,EAAA,CAAA;iBACF,CAAA;iIAGC,IAAI,EAAA,CAAA;sBADH,KAAK;gBAIN,KAAK,EAAA,CAAA;sBADJ,KAAK;gBAIN,OAAO,EAAA,CAAA;sBADN,MAAM;;;MCpBI,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAnB,mBAAmB,EAAA,YAAA,EAAA,CALf,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,OAAA,EAAA,CACvD,YAAY,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAC5B,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;iHAGjD,mBAAmB,EAAA,OAAA,EAAA,CAJpB,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;2FAI3B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;AACvC,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAC7D,oBAAA,SAAS,EAAE,EAAE;iBACd,CAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-action-sheet.mjs","sources":["../../../../projects/acorex/components/action-sheet/src/action-sheet.component.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.component.html","../../../../projects/acorex/components/action-sheet/src/action-sheet.module.ts","../../../../projects/acorex/components/action-sheet/src/action-sheet.service.ts","../../../../projects/acorex/components/action-sheet/acorex-components-action-sheet.ts"],"sourcesContent":["import { AXComponentCloseEvent, TAB_META_KEY } from '@acorex/components/common';\r\nimport { AXBaseComponent } from '@acorex/components/mixin';\r\nimport { CdkPortalOutletAttachedRef, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\r\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, ElementRef, EventEmitter, HostListener, Input, ViewContainerRef, ViewEncapsulation } from '@angular/core';\r\nimport { AXActionSheetItem } from './action-sheet.interface';\r\n\r\n@Component({\r\n selector: 'ax-action-sheet',\r\n templateUrl: './action-sheet.component.html',\r\n styleUrls: ['./action-sheet.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n})\r\n\r\nexport class AXActionSheetComponent extends AXBaseComponent {\r\n\r\n _selectedPortal: Portal<any>;\r\n title: string;\r\n items: AXActionSheetItem[] = [];\r\n content: any;\r\n showCloseButton: boolean = true;\r\n showHeader: boolean = true;\r\n data: any = {};\r\n\r\n onClosed: EventEmitter<AXComponentCloseEvent> = new EventEmitter<AXComponentCloseEvent>();\r\n\r\n constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, private _viewContainerRef: ViewContainerRef,) {\r\n super(elementRef, cdr);\r\n }\r\n\r\n close(): void {\r\n this.onClosed.emit({\r\n component: this[TAB_META_KEY].component,\r\n htmlElement: this._getHostElement(),\r\n });\r\n this._cdr.detectChanges();\r\n }\r\n\r\n onInit(): void {\r\n if (this.content) {\r\n this._selectedPortal = new ComponentPortal(this.content);\r\n this._cdr.markForCheck();\r\n }\r\n }\r\n\r\n @HostListener('keydown.escape', ['$event'])\r\n onKeydownHandler(event: KeyboardEvent) {\r\n let focusedOrHasFocused = this._getHostElement().matches(':focus-within');\r\n if (this.showCloseButton && focusedOrHasFocused) {\r\n this.close();\r\n }\r\n }\r\n\r\n _handleAttched(ref: CdkPortalOutletAttachedRef) {\r\n ref = ref as ComponentRef<any>;\r\n if (ref.instance) {\r\n this[TAB_META_KEY].component = ref.instance;\r\n Object.assign(this[TAB_META_KEY].component, this.data);\r\n if (ref.instance.onClosed) {\r\n ref.instance.onClosed.subscribe((e: AXComponentCloseEvent) => {\r\n this.onClosed.emit(e);\r\n });\r\n }\r\n }\r\n }\r\n\r\n _handleCloseClick() {\r\n this.close();\r\n }\r\n}\r\n","<div class=\"ax-action-sheet-header\">\r\n <span class=\"ax-action-sheet-title\">{{title}}</span>\r\n <span class=\"ax-icon ax-icon-close\" (click)=\"_handleCloseClick()\" tabindex=\"1\"></span>\r\n</div>\r\n<ng-template *ngIf=\"_selectedPortal\">\r\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\" (attached)=\"_handleAttched($event)\"></ng-template>\r\n</ng-template>\r\n<ng-template [cdkPortalOutlet]=\"_selectedPortal\" ></ng-template>\r\n<div class=\"ax-action-sheet-items\">\r\n <ng-container *ngFor=\"let item of items\">\r\n <div class=\"ax-action-sheet-item ax-{{item.color}}\" [class.ax-state-disabled]=\"item.disabled\" (click)=\"item.onClick()\">\r\n <span class=\"item-icon\" *ngIf=\"item.icon\" [class]=\"item.icon\"></span>\r\n <span class=\"item-text\">{{item.text}}</span>\r\n </div>\r\n </ng-container>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\nimport { DragDropModule } from '@angular/cdk/drag-drop';\r\nimport { PortalModule } from '@angular/cdk/portal';\r\nimport { AXButtonModule } from '@acorex/components/button';\r\n\r\nimport { AXDecoratorModule } from '@acorex/components/decorators';\r\nimport { AXCommonModule } from '@acorex/components/common';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\n\r\n\r\nconst MODULES = [CommonModule,AXCommonModule, DragDropModule, A11yModule, AXButtonModule, PortalModule, AXDecoratorModule];\r\n\r\n\r\n@NgModule({\r\n declarations: [AXActionSheetComponent],\r\n imports: [...MODULES],\r\n exports: [AXActionSheetComponent],\r\n providers: [],\r\n})\r\nexport class AXActionSheetModule { }\r\n","import { AXComponentClosedPromise, AXComponentCloseEvent, AXOverlayService, AXOverlayViewRef, TAB_META_KEY } from '@acorex/components/common';\r\nimport { AXTranslator } from '@acorex/core/translation';\r\nimport { Overlay } from '@angular/cdk/overlay';\r\nimport { Injectable } from '@angular/core';\r\nimport { AXActionSheetComponent } from './action-sheet.component';\r\nimport { AXActionSheetOptions } from './action-sheet.interface';\r\n\r\n\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class AXActionSheetService {\r\n\r\n // _overlayRef: OverlayRef;\r\n // _templatePortal!: ComponentPortal<any>;\r\n\r\n constructor(private _overlay: Overlay, private overlayService: AXOverlayService) { }\r\n\r\n //open(items: AXActionSheetItem[],options?:AXActionSheetOptions);\r\n //open(content:AXActionSheetContentType, options?: AXActionSheetOptions);\r\n open(options: AXActionSheetOptions): AXComponentClosedPromise {\r\n const opt: any = {\r\n title: AXTranslator.get('action-sheet.title'),\r\n showCloseButton: true,\r\n closeOnBackdrop: true,\r\n showHeader: true\r\n };\r\n Object.assign(opt, options);\r\n const lastActiveElement = document.activeElement as HTMLElement;\r\n const com = this.overlayService.show(AXActionSheetComponent, opt,\r\n {\r\n hasBackdrop: true,\r\n closeOnClickOutside: opt.closeOnBackdrop,\r\n transparentBackdrop: false,\r\n panelClass: ['ax-actionsheet-panel'],\r\n position: this._overlay.position().global().bottom().centerHorizontally(),\r\n });\r\n const actionSheet = com.instance as AXActionSheetComponent;\r\n actionSheet[TAB_META_KEY] = {};\r\n actionSheet.onClosed.subscribe(c => {\r\n this.closePopup(actionSheet, com, c, lastActiveElement);\r\n });\r\n const promise = new AXComponentClosedPromise((resolve) => {\r\n actionSheet[TAB_META_KEY].close = (e) => {\r\n if (resolve) {\r\n resolve(e);\r\n }\r\n };\r\n });\r\n promise['closeMethod'] = () => { actionSheet.close(); };\r\n return promise;\r\n }\r\n\r\n private closePopup(popup: AXActionSheetComponent, com: AXOverlayViewRef, result: AXComponentCloseEvent, lastActiveElement?: HTMLElement) {\r\n const closeFunc = (e) => {\r\n com.dispose();\r\n delete e.cancel;\r\n popup[TAB_META_KEY].close(e);\r\n if (lastActiveElement?.focus) {\r\n lastActiveElement.focus()\r\n }\r\n };\r\n const e = { cancel: false };\r\n const closingFunc = popup[TAB_META_KEY].component?.onClosing;\r\n if (closingFunc) {\r\n const res = closingFunc(e);\r\n if (res instanceof Promise) {\r\n res.then(() => {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n });\r\n }\r\n else {\r\n if (e == null || e.cancel !== true) {\r\n closeFunc(result);\r\n }\r\n }\r\n } else {\r\n closeFunc(result);\r\n }\r\n }\r\n\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAcM,MAAO,sBAAuB,SAAQ,eAAe,CAAA;AAYzD,IAAA,WAAA,CAAY,UAAsB,EAAE,GAAsB,EAAU,iBAAmC,EAAA;AACrG,QAAA,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAD2C,QAAA,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAkB;AARvG,QAAA,IAAK,CAAA,KAAA,GAAwB,EAAE,CAAC;AAEhC,QAAA,IAAe,CAAA,eAAA,GAAY,IAAI,CAAC;AAChC,QAAA,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;AAC3B,QAAA,IAAI,CAAA,IAAA,GAAQ,EAAE,CAAC;AAEf,QAAA,IAAA,CAAA,QAAQ,GAAwC,IAAI,YAAY,EAAyB,CAAC;KAIzF;IAED,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;AACjB,YAAA,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,SAAS;AACvC,YAAA,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE;AACpC,SAAA,CAAC,CAAC;AACH,QAAA,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;KAC3B;IAED,MAAM,GAAA;QACJ,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,eAAe,GAAG,IAAI,eAAe,CAAC,IAAI,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SAAS,CAAC,MAAM,CAAC,CAAC;AACnB,SAAA;KACF;;iHAtEQ,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACTlC;;AAEG;;;;"}
@@ -221,4 +221,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
221
221
 
222
222
  export { AXAlertButtonDirective, AXAlertComponent, AXAlertModule, AXBaseAlertMixin };
223
223
  //# sourceMappingURL=acorex-components-alert.mjs.map
224
- //# sourceMappingURL=acorex-components-alert.mjs.map
@@ -75,4 +75,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
75
75
 
76
76
  export { AXAvatarComponent, AXAvatarGroup, AXAvatarModule };
77
77
  //# sourceMappingURL=acorex-components-avatar.mjs.map
78
- //# sourceMappingURL=acorex-components-avatar.mjs.map
@@ -51,4 +51,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
51
51
 
52
52
  export { AXBadgeComponent, AXBadgeModule, AXBaseBadgeMixin };
53
53
  //# sourceMappingURL=acorex-components-badge.mjs.map
54
- //# sourceMappingURL=acorex-components-badge.mjs.map
@@ -86,4 +86,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
86
86
 
87
87
  export { AXBaseItemBreadCrumbMixin, AXBreadCrumbsComponent, AXBreadCrumbsItemComponent, AXBreadcrumbsModule };
88
88
  //# sourceMappingURL=acorex-components-breadcrumbs.mjs.map
89
- //# sourceMappingURL=acorex-components-breadcrumbs.mjs.map