@acorex/components 7.5.0 → 7.5.1

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 (399) hide show
  1. package/action-sheet/index.d.ts +1 -1
  2. package/action-sheet/lib/action-sheet.component.d.ts +3 -3
  3. package/avatar/index.d.ts +1 -1
  4. package/breadcrumbs/index.d.ts +2 -2
  5. package/breadcrumbs/lib/breadcrumbs-item.component.d.ts +1 -1
  6. package/button/lib/button-item.class.d.ts +1 -1
  7. package/button/lib/button.component.d.ts +1 -1
  8. package/calendar/lib/calendar.class.d.ts +1 -1
  9. package/calendar/lib/calendar.component.d.ts +1 -1
  10. package/collapse/lib/collapse-group.component.d.ts +9 -6
  11. package/collapse/lib/collapse.component.d.ts +6 -6
  12. package/color-box/lib/color-box.component.d.ts +2 -2
  13. package/color-palette/lib/color-palette-input.component.d.ts +3 -3
  14. package/color-palette/lib/color-palette-picker.component.d.ts +1 -1
  15. package/color-palette/lib/color-palette.class.d.ts +4 -4
  16. package/common/index.d.ts +0 -1
  17. package/common/lib/classes/datalist.class.d.ts +31 -0
  18. package/common/lib/classes/styles.class.d.ts +2 -3
  19. package/common/lib/components/colorlook-component.class.d.ts +2 -2
  20. package/common/lib/components/input-base-value-component.class.d.ts +12 -12
  21. package/common/lib/components/selection-base.component.class.d.ts +2 -1
  22. package/common/lib/directives/delayed-value-changed.directive.d.ts +5 -5
  23. package/common/lib/directives/hotkey.directive.d.ts +2 -2
  24. package/common/lib/directives/responsive.directive.d.ts +1 -1
  25. package/context-menu/lib/context-menu.component.d.ts +1 -1
  26. package/data-table/lib/data-table.component.d.ts +2 -2
  27. package/datetime-box/lib/datetime-box.component.d.ts +3 -3
  28. package/datetime-input/lib/datetime-input.component.d.ts +1 -1
  29. package/datetime-picker/index.d.ts +1 -1
  30. package/datetime-picker/lib/datetime-picker.component.d.ts +1 -2
  31. package/dropdown/lib/dropdown-box.component.d.ts +5 -3
  32. package/dropdown/lib/dropdown-panel.component.d.ts +1 -0
  33. package/esm2022/action-sheet/index.mjs +2 -2
  34. package/esm2022/action-sheet/lib/action-sheet.class.mjs +1 -1
  35. package/esm2022/action-sheet/lib/action-sheet.component.mjs +22 -14
  36. package/esm2022/action-sheet/lib/action-sheet.module.mjs +3 -3
  37. package/esm2022/action-sheet/lib/action-sheet.service.mjs +5 -5
  38. package/esm2022/avatar/index.mjs +2 -2
  39. package/esm2022/avatar/lib/avatar-group.component.mjs +1 -1
  40. package/esm2022/avatar/lib/avatar.component.mjs +2 -2
  41. package/esm2022/badge/lib/badge.component.mjs +3 -3
  42. package/esm2022/badge/lib/badge.module.mjs +2 -2
  43. package/esm2022/breadcrumbs/index.mjs +3 -3
  44. package/esm2022/breadcrumbs/lib/breadcrumbs-item.class.mjs +1 -1
  45. package/esm2022/breadcrumbs/lib/breadcrumbs-item.component.mjs +2 -2
  46. package/esm2022/breadcrumbs/lib/breadcrumbs.component.mjs +1 -1
  47. package/esm2022/breadcrumbs/lib/breadcrumbs.module.mjs +3 -3
  48. package/esm2022/button/lib/button-item.class.mjs +1 -1
  49. package/esm2022/button/lib/button-item.component.mjs +1 -1
  50. package/esm2022/button/lib/button.component.mjs +3 -3
  51. package/esm2022/button-group/lib/button-group.component.mjs +3 -3
  52. package/esm2022/button-group/lib/button-group.module.mjs +2 -2
  53. package/esm2022/calendar/lib/calendar-range.component.mjs +4 -7
  54. package/esm2022/calendar/lib/calendar.class.mjs +3 -11
  55. package/esm2022/calendar/lib/calendar.component.mjs +28 -29
  56. package/esm2022/calendar/lib/calendar.module.mjs +4 -4
  57. package/esm2022/check-box/lib/check-box.component.mjs +9 -9
  58. package/esm2022/check-box/lib/check-box.module.mjs +3 -3
  59. package/esm2022/chips/lib/chips.component.mjs +5 -5
  60. package/esm2022/chips/lib/chips.module.mjs +2 -2
  61. package/esm2022/collapse/lib/collapse-group.component.mjs +17 -12
  62. package/esm2022/collapse/lib/collapse.component.mjs +9 -9
  63. package/esm2022/collapse/lib/collapse.module.mjs +3 -3
  64. package/esm2022/color-box/lib/color-box.component.mjs +7 -7
  65. package/esm2022/color-box/lib/color-box.module.mjs +4 -4
  66. package/esm2022/color-palette/lib/color-palette-input.component.mjs +10 -14
  67. package/esm2022/color-palette/lib/color-palette-picker.component.mjs +29 -31
  68. package/esm2022/color-palette/lib/color-palette-preview.component.mjs +8 -16
  69. package/esm2022/color-palette/lib/color-palette-swatches.component.mjs +5 -5
  70. package/esm2022/color-palette/lib/color-palette.class.mjs +2 -2
  71. package/esm2022/color-palette/lib/color-palette.component.mjs +14 -6
  72. package/esm2022/color-palette/lib/color-palette.module.mjs +12 -12
  73. package/esm2022/common/index.mjs +1 -2
  74. package/esm2022/common/lib/classes/components.class.mjs +1 -1
  75. package/esm2022/common/lib/classes/datalist.class.mjs +41 -54
  76. package/esm2022/common/lib/classes/styles.class.mjs +2 -10
  77. package/esm2022/common/lib/common.module.mjs +4 -2
  78. package/esm2022/common/lib/components/button-base-component.class.mjs +4 -4
  79. package/esm2022/common/lib/components/color-component.class.mjs +2 -2
  80. package/esm2022/common/lib/components/colorlook-component.class.mjs +4 -4
  81. package/esm2022/common/lib/components/input-base-value-component.class.mjs +15 -15
  82. package/esm2022/common/lib/components/interactive-component.class.mjs +1 -1
  83. package/esm2022/common/lib/components/look-component.class.mjs +2 -2
  84. package/esm2022/common/lib/components/selection-base.component.class.mjs +10 -4
  85. package/esm2022/common/lib/components/value-component.class.mjs +3 -3
  86. package/esm2022/common/lib/directives/auto-focus.directive.mjs +4 -12
  87. package/esm2022/common/lib/directives/delayed-value-changed.directive.mjs +16 -14
  88. package/esm2022/common/lib/directives/hotkey.directive.mjs +14 -15
  89. package/esm2022/common/lib/directives/infinite-scroll.directive.mjs +7 -9
  90. package/esm2022/common/lib/directives/responsive.directive.mjs +12 -10
  91. package/esm2022/common/lib/directives/ripple.directive.mjs +1 -1
  92. package/esm2022/common/lib/services/dom.service.mjs +2 -2
  93. package/esm2022/common/lib/services/hotkey.service.mjs +4 -5
  94. package/esm2022/common/lib/types/direction.mjs +1 -1
  95. package/esm2022/common/lib/types/orientation.mjs +1 -1
  96. package/esm2022/common/lib/types/placement.mjs +23 -23
  97. package/esm2022/common/lib/types/range.mjs +1 -1
  98. package/esm2022/context-menu/lib/context-menu.component.mjs +3 -3
  99. package/esm2022/context-menu/lib/context-menu.module.mjs +7 -17
  100. package/esm2022/data-pager/lib/data-pager-info.component.mjs +3 -3
  101. package/esm2022/data-pager/lib/data-pager-input-selector.component.mjs +1 -1
  102. package/esm2022/data-pager/lib/data-pager-next-buttons.components.mjs +21 -8
  103. package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +3 -3
  104. package/esm2022/data-pager/lib/data-pager-pagesize-dropdown.component.mjs +17 -5
  105. package/esm2022/data-pager/lib/data-pager-prev-buttons.component.mjs +19 -7
  106. package/esm2022/data-pager/lib/data-pager.component.mjs +2 -2
  107. package/esm2022/data-pager/lib/data-pager.module.mjs +30 -16
  108. package/esm2022/data-table/lib/data-column.directive.mjs +2 -2
  109. package/esm2022/data-table/lib/data-table.component.mjs +2 -2
  110. package/esm2022/data-table/lib/data-table.module.mjs +7 -7
  111. package/esm2022/datetime-box/lib/datetime-box.component.mjs +7 -7
  112. package/esm2022/datetime-box/lib/datetime-box.module.mjs +7 -7
  113. package/esm2022/datetime-input/lib/datetime-input.component.mjs +134 -134
  114. package/esm2022/datetime-input/lib/datetime-input.module.mjs +4 -4
  115. package/esm2022/datetime-picker/index.mjs +2 -2
  116. package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +4 -4
  117. package/esm2022/datetime-picker/lib/datetime-picker.config.mjs +4 -4
  118. package/esm2022/decorators/lib/components/clear-button.component.mjs +2 -2
  119. package/esm2022/decorators/lib/components/close-button.component.mjs +8 -4
  120. package/esm2022/decorators/lib/components/generic-content.component.mjs +1 -1
  121. package/esm2022/decorators/lib/components/icon.component.mjs +2 -2
  122. package/esm2022/dialog/lib/dialog.component.mjs +3 -3
  123. package/esm2022/dialog/lib/dialog.module.mjs +26 -10
  124. package/esm2022/drawer/lib/drawer-container.component.mjs +2 -2
  125. package/esm2022/drawer/lib/drawer.component.mjs +2 -2
  126. package/esm2022/drawer/lib/drawer.module.mjs +3 -3
  127. package/esm2022/dropdown/lib/dropdown-box.class.mjs +1 -1
  128. package/esm2022/dropdown/lib/dropdown-box.component.mjs +14 -11
  129. package/esm2022/dropdown/lib/dropdown-panel.component.mjs +5 -4
  130. package/esm2022/dropdown/lib/dropdown.module.mjs +29 -9
  131. package/esm2022/form/index.mjs +2 -2
  132. package/esm2022/form/lib/form-field.component.mjs +4 -4
  133. package/esm2022/form/lib/form.component.mjs +3 -4
  134. package/esm2022/form/lib/form.config.mjs +6 -6
  135. package/esm2022/form/lib/form.module.mjs +3 -11
  136. package/esm2022/form/lib/validation-summary.component.mjs +40 -30
  137. package/esm2022/form/lib/validation.class.mjs +1 -1
  138. package/esm2022/image/lib/image.component.mjs +1 -1
  139. package/esm2022/image/lib/image.module.mjs +2 -2
  140. package/esm2022/label/lib/label.component.mjs +4 -8
  141. package/esm2022/label/lib/label.module.mjs +2 -2
  142. package/esm2022/list/lib/list.component.mjs +67 -44
  143. package/esm2022/list/lib/list.module.mjs +3 -3
  144. package/esm2022/loading/index.mjs +2 -2
  145. package/esm2022/loading/lib/loading-spinner.component.mjs +13 -7
  146. package/esm2022/loading/lib/loading.component.mjs +8 -16
  147. package/esm2022/loading/lib/loading.config.mjs +2 -2
  148. package/esm2022/loading/lib/loading.directive.mjs +2 -2
  149. package/esm2022/menu/lib/menu-item/menu-item.component.mjs +1 -2
  150. package/esm2022/menu/lib/menu.component.mjs +2 -2
  151. package/esm2022/menu/lib/menu2.component.mjs +2 -2
  152. package/esm2022/mixin/lib/base-components.class.mjs +2 -3
  153. package/esm2022/mixin/lib/base-menu-mixin.class.mjs +1 -1
  154. package/esm2022/mixin/lib/button-mixin.class.mjs +1 -1
  155. package/esm2022/mixin/lib/clickable-mixin.class.mjs +8 -8
  156. package/esm2022/mixin/lib/color-look-mixing.class.mjs +3 -3
  157. package/esm2022/mixin/lib/constratctor.mjs +1 -1
  158. package/esm2022/mixin/lib/datalist-component.class.mjs +3 -5
  159. package/esm2022/mixin/lib/datalist.class.mjs +5 -6
  160. package/esm2022/mixin/lib/dropdown-mixin.class.mjs +2 -4
  161. package/esm2022/mixin/lib/interactive-mixin.class.mjs +29 -28
  162. package/esm2022/mixin/lib/mixin.class.mjs +13 -13
  163. package/esm2022/mixin/lib/page-component.class.mjs +3 -3
  164. package/esm2022/mixin/lib/selection-component.class.mjs +1 -1
  165. package/esm2022/mixin/lib/textbox-mixin.class.mjs +29 -20
  166. package/esm2022/mixin/lib/value-mixin.class.mjs +1 -1
  167. package/esm2022/notification/index.mjs +2 -2
  168. package/esm2022/notification/lib/notification.class.mjs +1 -1
  169. package/esm2022/notification/lib/notification.config.mjs +1 -1
  170. package/esm2022/notification/lib/notification.module.mjs +21 -9
  171. package/esm2022/notification/lib/notification.service.mjs +11 -11
  172. package/esm2022/number-box/lib/number-box.component.mjs +6 -6
  173. package/esm2022/number-box/lib/number-box.module.mjs +6 -16
  174. package/esm2022/otp/lib/otp.component.mjs +5 -5
  175. package/esm2022/otp/lib/otp.module.mjs +2 -2
  176. package/esm2022/page/lib/base-page.class.mjs +6 -4
  177. package/esm2022/page/lib/page.component.mjs +3 -3
  178. package/esm2022/page/lib/page.module.mjs +1 -1
  179. package/esm2022/password-box/lib/password-box.component.mjs +6 -6
  180. package/esm2022/password-box/lib/password-box.module.mjs +7 -15
  181. package/esm2022/picker/lib/picker-column.directive.mjs +9 -16
  182. package/esm2022/picker/lib/picker.component.mjs +2 -2
  183. package/esm2022/picker/lib/picker.module.mjs +3 -3
  184. package/esm2022/popover/lib/popover.component.mjs +1 -1
  185. package/esm2022/popover/lib/popover.module.mjs +2 -2
  186. package/esm2022/popup/index.mjs +2 -2
  187. package/esm2022/popup/lib/popup.interface.mjs +1 -1
  188. package/esm2022/popup/lib/popup.module.mjs +2 -2
  189. package/esm2022/progress-bar/lib/progress-bar.component.mjs +5 -5
  190. package/esm2022/progress-bar/lib/progress-bar.module.mjs +2 -2
  191. package/esm2022/radio/lib/radio.component.mjs +8 -8
  192. package/esm2022/radio/lib/radio.module.mjs +2 -2
  193. package/esm2022/range-slider/lib/range-slider.component.mjs +9 -9
  194. package/esm2022/range-slider/lib/range-slider.module.mjs +4 -4
  195. package/esm2022/result/lib/result.component.mjs +4 -4
  196. package/esm2022/result/lib/result.module.mjs +2 -2
  197. package/esm2022/routing-progress/acorex-components-routing-progress.mjs +5 -0
  198. package/esm2022/routing-progress/index.mjs +3 -0
  199. package/esm2022/routing-progress/lib/routing-progress.component.mjs +58 -0
  200. package/esm2022/routing-progress/lib/routing-progress.module.mjs +21 -0
  201. package/esm2022/scheduler/lib/scheduler-month-view.component.mjs +4 -2
  202. package/esm2022/scheduler/lib/scheduler.component.mjs +1 -1
  203. package/esm2022/search-box/lib/search-box.component.mjs +43 -19
  204. package/esm2022/search-box/lib/search-box.module.mjs +8 -8
  205. package/esm2022/select-box/index.mjs +2 -2
  206. package/esm2022/select-box/lib/select-box.component.mjs +4 -4
  207. package/esm2022/select-box/lib/select-box.module.mjs +9 -9
  208. package/esm2022/select-box/lib/select-box2.component.mjs +110 -16
  209. package/esm2022/selection-list/lib/selection-list.component.mjs +10 -10
  210. package/esm2022/selection-list/lib/selection-list.module.mjs +6 -6
  211. package/esm2022/switch/lib/switch-content.component.mjs +1 -1
  212. package/esm2022/switch/lib/switch.component.mjs +11 -18
  213. package/esm2022/switch/lib/switch.module.mjs +4 -4
  214. package/esm2022/tabs/lib/tab-content.directive.mjs +1 -1
  215. package/esm2022/tabs/lib/tabs.component.mjs +2 -2
  216. package/esm2022/tabs/lib/tabs.module.mjs +5 -5
  217. package/esm2022/tag/lib/tag.component.mjs +4 -4
  218. package/esm2022/tag/lib/tag.module.mjs +2 -2
  219. package/esm2022/text-area/lib/text-area.component.mjs +14 -16
  220. package/esm2022/text-area/lib/text-area.module.mjs +2 -2
  221. package/esm2022/text-box/lib/text-box.component.mjs +6 -6
  222. package/esm2022/text-box/lib/text-box.module.mjs +4 -18
  223. package/esm2022/toast/index.mjs +2 -2
  224. package/esm2022/toast/lib/toast.class.mjs +1 -1
  225. package/esm2022/toast/lib/toast.component.mjs +4 -4
  226. package/esm2022/toast/lib/toast.config.mjs +3 -3
  227. package/esm2022/toast/lib/toast.module.mjs +6 -10
  228. package/esm2022/toast/lib/toast.service.mjs +16 -14
  229. package/esm2022/tooltip/lib/tooltip.component.mjs +2 -2
  230. package/esm2022/tooltip/lib/tooltip.directive.mjs +4 -4
  231. package/esm2022/tooltip/lib/tooltip.module.mjs +3 -3
  232. package/esm2022/uploader/index.mjs +3 -1
  233. package/esm2022/uploader/lib/uploader-drop-zone.component.mjs +3 -3
  234. package/esm2022/uploader/lib/uploader-list.component.mjs +41 -7
  235. package/esm2022/uploader/lib/uploader-overlay.component.mjs +2 -2
  236. package/esm2022/uploader/lib/uploader-zone.directive.mjs +53 -0
  237. package/esm2022/uploader/lib/uploader.module.mjs +26 -7
  238. package/esm2022/uploader/lib/uploader.service.mjs +30 -0
  239. package/fesm2022/acorex-components-action-sheet.mjs +23 -15
  240. package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
  241. package/fesm2022/acorex-components-avatar.mjs +15 -15
  242. package/fesm2022/acorex-components-avatar.mjs.map +1 -1
  243. package/fesm2022/acorex-components-badge.mjs +2 -2
  244. package/fesm2022/acorex-components-badge.mjs.map +1 -1
  245. package/fesm2022/acorex-components-breadcrumbs.mjs.map +1 -1
  246. package/fesm2022/acorex-components-button-group.mjs +2 -2
  247. package/fesm2022/acorex-components-button-group.mjs.map +1 -1
  248. package/fesm2022/acorex-components-button.mjs +2 -2
  249. package/fesm2022/acorex-components-button.mjs.map +1 -1
  250. package/fesm2022/acorex-components-calendar.mjs +26 -38
  251. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  252. package/fesm2022/acorex-components-check-box.mjs +9 -9
  253. package/fesm2022/acorex-components-check-box.mjs.map +1 -1
  254. package/fesm2022/acorex-components-chips.mjs +4 -4
  255. package/fesm2022/acorex-components-chips.mjs.map +1 -1
  256. package/fesm2022/acorex-components-collapse.mjs +23 -18
  257. package/fesm2022/acorex-components-collapse.mjs.map +1 -1
  258. package/fesm2022/acorex-components-color-box.mjs +6 -6
  259. package/fesm2022/acorex-components-color-box.mjs.map +1 -1
  260. package/fesm2022/acorex-components-color-palette.mjs +53 -59
  261. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  262. package/fesm2022/acorex-components-common.mjs +136 -181
  263. package/fesm2022/acorex-components-common.mjs.map +1 -1
  264. package/fesm2022/acorex-components-context-menu.mjs +6 -16
  265. package/fesm2022/acorex-components-context-menu.mjs.map +1 -1
  266. package/fesm2022/acorex-components-data-pager.mjs +70 -19
  267. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  268. package/fesm2022/acorex-components-data-table.mjs +1 -1
  269. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  270. package/fesm2022/acorex-components-datetime-box.mjs +7 -7
  271. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  272. package/fesm2022/acorex-components-datetime-input.mjs +133 -133
  273. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  274. package/fesm2022/acorex-components-datetime-picker.mjs +9 -9
  275. package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
  276. package/fesm2022/acorex-components-decorators.mjs +8 -4
  277. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  278. package/fesm2022/acorex-components-dialog.mjs +20 -4
  279. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  280. package/fesm2022/acorex-components-drawer.mjs +1 -1
  281. package/fesm2022/acorex-components-drawer.mjs.map +1 -1
  282. package/fesm2022/acorex-components-dropdown.mjs +43 -19
  283. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  284. package/fesm2022/acorex-components-form.mjs +76 -75
  285. package/fesm2022/acorex-components-form.mjs.map +1 -1
  286. package/fesm2022/acorex-components-image.mjs.map +1 -1
  287. package/fesm2022/acorex-components-label.mjs +2 -6
  288. package/fesm2022/acorex-components-label.mjs.map +1 -1
  289. package/fesm2022/acorex-components-list.mjs +66 -43
  290. package/fesm2022/acorex-components-list.mjs.map +1 -1
  291. package/fesm2022/acorex-components-loading.mjs +19 -21
  292. package/fesm2022/acorex-components-loading.mjs.map +1 -1
  293. package/fesm2022/acorex-components-menu.mjs +4 -5
  294. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  295. package/fesm2022/acorex-components-mixin.mjs +70 -66
  296. package/fesm2022/acorex-components-mixin.mjs.map +1 -1
  297. package/fesm2022/acorex-components-notification.mjs +43 -31
  298. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  299. package/fesm2022/acorex-components-number-box.mjs +7 -17
  300. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  301. package/fesm2022/acorex-components-otp.mjs +4 -4
  302. package/fesm2022/acorex-components-otp.mjs.map +1 -1
  303. package/fesm2022/acorex-components-page.mjs +6 -4
  304. package/fesm2022/acorex-components-page.mjs.map +1 -1
  305. package/fesm2022/acorex-components-password-box.mjs +7 -15
  306. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  307. package/fesm2022/acorex-components-picker.mjs +10 -17
  308. package/fesm2022/acorex-components-picker.mjs.map +1 -1
  309. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  310. package/fesm2022/acorex-components-popup.mjs +1 -1
  311. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  312. package/fesm2022/acorex-components-progress-bar.mjs +3 -3
  313. package/fesm2022/acorex-components-progress-bar.mjs.map +1 -1
  314. package/fesm2022/acorex-components-radio.mjs +6 -6
  315. package/fesm2022/acorex-components-radio.mjs.map +1 -1
  316. package/fesm2022/acorex-components-range-slider.mjs +7 -7
  317. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  318. package/fesm2022/acorex-components-result.mjs +2 -2
  319. package/fesm2022/acorex-components-result.mjs.map +1 -1
  320. package/fesm2022/acorex-components-routing-progress.mjs +83 -0
  321. package/fesm2022/acorex-components-routing-progress.mjs.map +1 -0
  322. package/fesm2022/acorex-components-scheduler.mjs +3 -1
  323. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  324. package/fesm2022/acorex-components-search-box.mjs +47 -24
  325. package/fesm2022/acorex-components-search-box.mjs.map +1 -1
  326. package/fesm2022/acorex-components-select-box.mjs +197 -106
  327. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  328. package/fesm2022/acorex-components-selection-list.mjs +12 -12
  329. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  330. package/fesm2022/acorex-components-switch.mjs +9 -16
  331. package/fesm2022/acorex-components-switch.mjs.map +1 -1
  332. package/fesm2022/acorex-components-tabs.mjs +3 -3
  333. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  334. package/fesm2022/acorex-components-tag.mjs +2 -2
  335. package/fesm2022/acorex-components-tag.mjs.map +1 -1
  336. package/fesm2022/acorex-components-text-area.mjs +13 -15
  337. package/fesm2022/acorex-components-text-area.mjs.map +1 -1
  338. package/fesm2022/acorex-components-text-box.mjs +8 -22
  339. package/fesm2022/acorex-components-text-box.mjs.map +1 -1
  340. package/fesm2022/acorex-components-toast.mjs +43 -45
  341. package/fesm2022/acorex-components-toast.mjs.map +1 -1
  342. package/fesm2022/acorex-components-tooltip.mjs +2 -2
  343. package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
  344. package/fesm2022/acorex-components-uploader.mjs +146 -18
  345. package/fesm2022/acorex-components-uploader.mjs.map +1 -1
  346. package/form/index.d.ts +1 -1
  347. package/form/lib/form.component.d.ts +2 -2
  348. package/form/lib/validation-summary.component.d.ts +3 -3
  349. package/list/lib/list.component.d.ts +18 -7
  350. package/loading/index.d.ts +1 -1
  351. package/loading/lib/loading.component.d.ts +1 -1
  352. package/mixin/lib/base-components.class.d.ts +2 -2
  353. package/mixin/lib/base-menu-mixin.class.d.ts +5 -5
  354. package/mixin/lib/button-mixin.class.d.ts +2 -2
  355. package/mixin/lib/clickable-mixin.class.d.ts +9 -9
  356. package/mixin/lib/color-look-mixing.class.d.ts +2 -2
  357. package/mixin/lib/datalist-component.class.d.ts +10 -10
  358. package/mixin/lib/datalist.class.d.ts +1 -1
  359. package/mixin/lib/dropdown-mixin.class.d.ts +3 -3
  360. package/mixin/lib/interactive-mixin.class.d.ts +25 -22
  361. package/mixin/lib/mixin.class.d.ts +62 -62
  362. package/mixin/lib/page-component.class.d.ts +4 -4
  363. package/mixin/lib/selection-component.class.d.ts +3 -3
  364. package/mixin/lib/sizable-mixin.class.d.ts +2 -2
  365. package/mixin/lib/textbox-mixin.class.d.ts +20 -20
  366. package/mixin/lib/value-mixin.class.d.ts +9 -9
  367. package/notification/index.d.ts +1 -1
  368. package/notification/lib/notification.class.d.ts +3 -3
  369. package/notification/lib/notification.config.d.ts +1 -1
  370. package/number-box/lib/number-box.component.d.ts +3 -3
  371. package/otp/lib/otp.component.d.ts +3 -3
  372. package/package.json +7 -1
  373. package/page/lib/base-page.class.d.ts +1 -1
  374. package/page/lib/page.component.d.ts +1 -1
  375. package/password-box/lib/password-box.component.d.ts +4 -4
  376. package/popup/index.d.ts +1 -1
  377. package/popup/lib/popup.interface.d.ts +2 -2
  378. package/routing-progress/README.md +3 -0
  379. package/routing-progress/index.d.ts +2 -0
  380. package/routing-progress/lib/routing-progress.component.d.ts +14 -0
  381. package/routing-progress/lib/routing-progress.module.d.ts +8 -0
  382. package/search-box/lib/search-box.component.d.ts +10 -4
  383. package/select-box/index.d.ts +1 -1
  384. package/select-box/lib/select-box2.component.d.ts +26 -7
  385. package/selection-list/lib/selection-list.component.d.ts +3 -3
  386. package/text-area/lib/text-area.component.d.ts +3 -3
  387. package/text-box/lib/text-box.component.d.ts +3 -3
  388. package/toast/index.d.ts +1 -1
  389. package/toast/lib/toast.class.d.ts +1 -1
  390. package/toast/lib/toast.component.d.ts +2 -1
  391. package/toast/lib/toast.config.d.ts +1 -1
  392. package/tooltip/lib/tooltip.directive.d.ts +1 -1
  393. package/uploader/index.d.ts +2 -0
  394. package/uploader/lib/uploader-list.component.d.ts +14 -1
  395. package/uploader/lib/uploader-zone.directive.d.ts +18 -0
  396. package/uploader/lib/uploader.module.d.ts +6 -4
  397. package/uploader/lib/uploader.service.d.ts +10 -0
  398. package/common/lib/components/appearance-component.class.d.ts +0 -12
  399. package/esm2022/common/lib/components/appearance-component.class.mjs +0 -25
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-notification.mjs","sources":["../../../../libs/components/notification/src/lib/notification.config.ts","../../../../libs/components/notification/src/lib/notification.component.ts","../../../../libs/components/notification/src/lib/notification.component.html","../../../../libs/components/notification/src/lib/notification.service.ts","../../../../libs/components/notification/src/lib/notification.module.ts","../../../../libs/components/notification/src/acorex-components-notification.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { AXLocation } from '@acorex/components/common';\n\n\nexport interface AXNotificationConfig {\n gap: number,\n timeOut: number,\n timeOutProgress: boolean,\n location: AXLocation,\n closeButton: boolean\n}\n\nexport const AX_NOTIFICATION_CONFIG = new InjectionToken<AXNotificationConfig>(\n 'AX_NOTIFICATION_CONFIG',\n {\n providedIn: 'root',\n factory: () => AXNotificationDefaultConfig,\n }\n);\n\n\nexport const AXNotificationDefaultConfig: AXNotificationConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n closeButton: true,\n location: 'top-end',\n};\n\n\nexport type PartialNotificationConfig = Partial<AXNotificationConfig>;\n\nexport function notificationConfig(config: PartialNotificationConfig = {}): AXNotificationConfig {\n const result = {\n ...AXNotificationDefaultConfig,\n ...config,\n };\n return result\n}","import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ComponentPortal, ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXNotificationButtonItem, AXNotificationData } from './notification.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent }],\n})\nexport class AXNotificationComponent extends MXBaseComponent {\n _selectedPortal: Portal<unknown>;\n _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXNotificationData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n this._initContent();\n this._initIcon();\n this._handleTimeOut();\n }\n\n private _handleTimeOut() {\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\n }\n\n private _initContent() {\n if (this.config.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(\n this.config.content as TemplateRef<unknown>,\n this.getViewContainer(),\n );\n this.cdr.markForCheck();\n } else if (typeof this.config.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.config.content as ComponentType<unknown>);\n this.cdr.markForCheck();\n }\n }\n\n private _initIcon() {\n if (!this.config.icon) {\n switch (this.config.color) {\n case 'success':\n this._icon = 'ax-icon ax-icon-check-circle-fill';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error-fill';\n break;\n case 'warning':\n this._icon = 'ax-icon ax-icon-warning-fill';\n break;\n case 'info':\n this._icon = 'ax-icon ax-icon-info';\n break;\n default:\n this._icon = this.config.icon || 'ax-icon ax-icon-check-circle-fill';\n break;\n }\n } else {\n this._icon = this.config.icon;\n }\n }\n\n protected _handleButtonClick(button: AXNotificationButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span class=\"ax-notification-icon {{_icon}}\"></span>\n<div class=\"ax-notification-content\">\n <div class=\"ax-notification-title\">{{ config.title }}</div>\n <ng-template *ngIf=\"_selectedPortal\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\n </ng-template>\n <div *ngIf=\"!_selectedPortal\">{{ config.content }}</div>\n <div class=\"ax-notification-buttons\" *ngIf=\"config.buttons?.length\">\n <ng-container *ngFor=\"let button of config.buttons\">\n <ax-button class=\"ax-xs\" [text]=\"button.text\" [color]=\"button.color\" [look]=\"button.look\"\n [disabled]=\"button.disabled\" (onClick)=\"_handleButtonClick(button)\">\n <ax-loading *ngIf=\"button.loading\"></ax-loading>\n </ax-button>\n </ng-container>\n\n </div>\n</div>\n<ax-close-button *ngIf=\"config.closeButton\"></ax-close-button>\n<div class=\"ax-notification-progress\" [style.animation-duration.ms]=\"config.timeOut\"\n *ngIf=\"config.timeOutProgress && config.timeOut\"></div>","import { Injectable, inject } from '@angular/core';\nimport { AXNotificationOptions as AXNotificationDisplayConfig, AXNotificationRef } from './notification.class';\nimport { AXNotificationComponent } from './notification.component';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { AXComponentCloseEvent } from '@acorex/components/common';\nimport { AXNotificationConfig, AX_NOTIFICATION_CONFIG } from './notification.config';\n\n@Injectable()\nexport class AXNotificationService {\n\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXNotificationConfig = inject(AX_NOTIFICATION_CONFIG);\n\n\n show(config: AXNotificationDisplayConfig): AXNotificationRef {\n config = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location,\n },\n config\n );\n const gap = this.defaultConfig.gap;\n\n let positionStrategy = new GlobalPositionStrategy();\n const pos = this.getPosition(config.location) + gap + 'px';\n switch (config.location) {\n case 'bottom-center':\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally();\n break;\n case 'bottom-end':\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\n break;\n case 'bottom-start':\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\n break;\n case 'top-center':\n positionStrategy = positionStrategy.top(pos).centerHorizontally();\n break;\n case 'top-end':\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\n break;\n case 'top-start':\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\n break;\n case 'center-start':\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\n break;\n case 'center-end':\n positionStrategy = positionStrategy\n .centerVertically()\n .right(gap + 'px');\n break;\n default:\n break;\n }\n\n const dialogRef = this.dialog.open(AXNotificationComponent, {\n data: config,\n autoFocus: \"__no_element__\",\n restoreFocus: false,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy: positionStrategy\n });\n\n const toastRef = dialogRef.componentInstance as AXNotificationComponent;\n dialogRef.closed.subscribe(() => {\n this.reposition();\n })\n\n return {\n close: () => {\n toastRef.close();\n }\n }\n }\n\n public hideAll() {\n this.dialog.closeAll();\n }\n\n private reposition(): void {\n //TODO: reposition vertically afer close toast\n\n }\n\n private getPosition(location: string) {\n const list = this.dialog.openDialogs.map(c => c.componentInstance as AXNotificationComponent).filter(c => c.config.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return window.innerHeight - list[list.length - 1].getHostElement().offsetTop;\n }\n else {\n return list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight;\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXNotificationComponent } from './notification.component';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXNotificationService } from './notification.service';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\n\nconst COMPONENT = [AXNotificationComponent];\nconst MODULES = [CommonModule, PortalModule, AXButtonModule, DialogModule, AXLoadingModule, AXDecoratorModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXNotificationService],\n})\nexport class AXNotificationModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAYa,sBAAsB,GAAG,IAAI,cAAc,CACpD,wBAAwB,EACxB;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,2BAA2B;AAC7C,CAAA,EACH;AAGW,MAAA,2BAA2B,GAAyB;AAC7D,IAAA,GAAG,EAAE,CAAC;AACN,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,SAAS;EACrB;AAKc,SAAA,kBAAkB,CAAC,MAAA,GAAoC,EAAE,EAAA;AACrE,IAAA,MAAM,MAAM,GAAG;AACX,QAAA,GAAG,2BAA2B;AAC9B,QAAA,GAAG,MAAM;KACZ,CAAC;AACF,IAAA,OAAO,MAAM,CAAA;AACjB;;ACzBA;;;;AAIG;AASG,MAAO,uBAAwB,SAAQ,eAAe,CAAA;AAI1D;;AAEG;IACH,WAES,CAAA,MAA0B,EACzB,SAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE,CAAC;QAHD,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoB;QACzB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkC;KAGpD;IAED,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,EAAE,CAAC;Q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AD1F,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;AAS7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAFpB,SAAA,EAAA,CAAC,qBAAqB,CAAC,YAFrB,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-notification.mjs","sources":["../../../../libs/components/notification/src/lib/notification.component.ts","../../../../libs/components/notification/src/lib/notification.component.html","../../../../libs/components/notification/src/lib/notification.config.ts","../../../../libs/components/notification/src/lib/notification.service.ts","../../../../libs/components/notification/src/lib/notification.module.ts","../../../../libs/components/notification/src/acorex-components-notification.ts"],"sourcesContent":["import { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport { ComponentPortal, ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXNotificationButtonItem, AXNotificationData } from './notification.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-notification',\n templateUrl: './notification.component.html',\n styleUrls: ['./notification.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXNotificationComponent }],\n})\nexport class AXNotificationComponent extends MXBaseComponent {\n _selectedPortal: Portal<unknown>;\n _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXNotificationData,\n private dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n this._initContent();\n this._initIcon();\n this._handleTimeOut();\n }\n\n private _handleTimeOut() {\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\n }\n\n private _initContent() {\n if (this.config.content instanceof TemplateRef) {\n this._selectedPortal = new TemplatePortal(\n this.config.content as TemplateRef<unknown>,\n this.getViewContainer(),\n );\n this.cdr.markForCheck();\n } else if (typeof this.config.content === 'function') {\n this._selectedPortal = new ComponentPortal(this.config.content as ComponentType<unknown>);\n this.cdr.markForCheck();\n }\n }\n\n private _initIcon() {\n if (!this.config.icon) {\n switch (this.config.color) {\n case 'success':\n this._icon = 'ax-icon ax-icon-check-circle-fill';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error-fill';\n break;\n case 'warning':\n this._icon = 'ax-icon ax-icon-warning-fill';\n break;\n case 'info':\n this._icon = 'ax-icon ax-icon-info';\n break;\n default:\n this._icon = this.config.icon || 'ax-icon ax-icon-check-circle-fill';\n break;\n }\n } else {\n this._icon = this.config.icon;\n }\n }\n\n protected _handleButtonClick(button: AXNotificationButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span class=\"ax-notification-icon {{_icon}}\"></span>\n<div class=\"ax-notification-content\">\n <div class=\"ax-notification-title\">{{ config.title }}</div>\n <ng-template *ngIf=\"_selectedPortal\">\n <ng-template [cdkPortalOutlet]=\"_selectedPortal\"></ng-template>\n </ng-template>\n <div *ngIf=\"!_selectedPortal\">{{ config.content }}</div>\n <div class=\"ax-notification-buttons\" *ngIf=\"config.buttons?.length\">\n <ng-container *ngFor=\"let button of config.buttons\">\n <ax-button class=\"ax-xs\" [text]=\"button.text\" [color]=\"button.color\" [look]=\"button.look\"\n [disabled]=\"button.disabled\" (onClick)=\"_handleButtonClick(button)\">\n <ax-loading *ngIf=\"button.loading\"></ax-loading>\n </ax-button>\n </ng-container>\n\n </div>\n</div>\n<ax-close-button *ngIf=\"config.closeButton\"></ax-close-button>\n<div class=\"ax-notification-progress\" [style.animation-duration.ms]=\"config.timeOut\"\n *ngIf=\"config.timeOutProgress && config.timeOut\"></div>","import { AXLocation } from '@acorex/components/common';\nimport { InjectionToken } from '@angular/core';\n\nexport interface AXNotificationConfig {\n gap: number;\n timeOut: number;\n timeOutProgress: boolean;\n location: AXLocation;\n closeButton: boolean;\n}\n\nexport const AX_NOTIFICATION_CONFIG = new InjectionToken<AXNotificationConfig>('AX_NOTIFICATION_CONFIG', {\n providedIn: 'root',\n factory: () => AXNotificationDefaultConfig,\n});\n\nexport const AXNotificationDefaultConfig: AXNotificationConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n closeButton: true,\n location: 'top-end',\n};\n\nexport type PartialNotificationConfig = Partial<AXNotificationConfig>;\n\nexport function notificationConfig(config: PartialNotificationConfig = {}): AXNotificationConfig {\n const result = {\n ...AXNotificationDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy } from '@angular/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport {\n AXNotificationOptions as AXNotificationDisplayConfig,\n AXNotificationRef,\n} from './notification.class';\nimport { AXNotificationComponent } from './notification.component';\nimport { AXNotificationConfig, AX_NOTIFICATION_CONFIG } from './notification.config';\n\n@Injectable()\nexport class AXNotificationService {\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXNotificationConfig = inject(AX_NOTIFICATION_CONFIG);\n\n show(config: AXNotificationDisplayConfig): AXNotificationRef {\n config = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location,\n },\n config,\n );\n const gap = this.defaultConfig.gap;\n\n let positionStrategy = new GlobalPositionStrategy();\n const pos = this.getPosition(config.location) + gap + 'px';\n switch (config.location) {\n case 'bottom-center':\n positionStrategy = positionStrategy.bottom(pos).centerHorizontally();\n break;\n case 'bottom-end':\n positionStrategy = positionStrategy.bottom(pos).right(gap + 'px');\n break;\n case 'bottom-start':\n positionStrategy = positionStrategy.bottom(pos).left(gap + 'px');\n break;\n case 'top-center':\n positionStrategy = positionStrategy.top(pos).centerHorizontally();\n break;\n case 'top-end':\n positionStrategy = positionStrategy.top(pos).right(gap + 'px');\n break;\n case 'top-start':\n positionStrategy = positionStrategy.top(pos).left(gap + 'px');\n break;\n case 'center-start':\n positionStrategy = positionStrategy.centerVertically().left(gap + 'px');\n break;\n case 'center-end':\n positionStrategy = positionStrategy.centerVertically().right(gap + 'px');\n break;\n default:\n break;\n }\n\n const dialogRef = this.dialog.open(AXNotificationComponent, {\n data: config,\n autoFocus: '__no_element__',\n restoreFocus: false,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy: positionStrategy,\n });\n\n const toastRef = dialogRef.componentInstance as AXNotificationComponent;\n dialogRef.closed.subscribe(() => {\n this.reposition();\n });\n\n return {\n close: () => {\n toastRef.close();\n },\n };\n }\n\n public hideAll() {\n this.dialog.closeAll();\n }\n\n private reposition(): void {\n //TODO: reposition vertically afer close toast\n }\n\n private getPosition(location: string) {\n const list = this.dialog.openDialogs\n .map((c) => c.componentInstance as AXNotificationComponent)\n .filter((c) => c.config.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return window.innerHeight - list[list.length - 1].getHostElement().offsetTop;\n } else {\n return (\n list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight\n );\n }\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXNotificationComponent } from './notification.component';\nimport { AXNotificationService } from './notification.service';\n\nconst COMPONENT = [AXNotificationComponent];\nconst MODULES = [\n CommonModule,\n PortalModule,\n AXButtonModule,\n DialogModule,\n AXLoadingModule,\n AXDecoratorModule,\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXNotificationService],\n})\nexport class AXNotificationModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAaA;;;;AAIG;AASG,MAAO,uBAAwB,SAAQ,eAAe,CAAA;AAI1D;;AAEG;IACH,WAES,CAAA,MAA0B,EACzB,SAA2C,EAAA;AAEnD,QAAA,KAAK,EAAE,CAAC;QAHD,IAAM,CAAA,MAAA,GAAN,MAAM,CAAoB;QACzB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAkC;KAGpD;IAED,QAAQ,GAAA;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,SAAS,EAAE,CAAC;QACjB,IAAI,CAAC,cAAc,EAAE,CAAC;KACvB;IAEO,cAAc,GAAA;AACpB,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACvB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE,CAAC;AACf,aAAC,EAAE,IAAI,CA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,CAAA,EAAA;+GAApB,oBAAoB,EAAA,YAAA,EAAA,CAhBd,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAExC,YAAY;YACZ,YAAY;YACZ,cAAc;YACd,YAAY;YACZ,eAAe;AACf,YAAA,iBAAiB,aAPA,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;AAgB7B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EAFpB,SAAA,EAAA,CAAC,qBAAqB,CAAC,YAFrB,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,qBAAqB,CAAC;AACnC,iBAAA,CAAA;;;ACzBD;;AAEG;;;;"}
@@ -3,7 +3,7 @@ import { forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, View
3
3
  import * as i3 from 'angular-imask';
4
4
  import { IMaskDirective, IMaskModule } from 'angular-imask';
5
5
  import { createMask } from 'imask';
6
- import { MXInputBaseValueComponent, MXAppearanceComponent, AXComponent, AXFocusableComponent, AXClearableComponent } from '@acorex/components/common';
6
+ import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent } from '@acorex/components/common';
7
7
  import * as i2 from '@angular/forms';
8
8
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
9
9
  import { toNumber } from 'lodash-es';
@@ -18,7 +18,7 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
18
18
  *
19
19
  * @category Components
20
20
  */
21
- class AXNumberBoxComponent extends classes((MXInputBaseValueComponent), MXAppearanceComponent) {
21
+ class AXNumberBoxComponent extends classes((MXInputBaseValueComponent), MXLookComponent) {
22
22
  constructor() {
23
23
  super(...arguments);
24
24
  this._padDecimalZeros = false;
@@ -207,10 +207,10 @@ class AXNumberBoxComponent extends classes((MXInputBaseValueComponent), MXAppear
207
207
  this.commitValue(this.value - toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep), u);
208
208
  }
209
209
  get __hostClass() {
210
- return `ax-editor-container ax-appearance-${this.appearance}`;
210
+ return `ax-editor-container ax-look-${this.look}`;
211
211
  }
212
212
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXNumberBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
213
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", placeholder: "placeholder", value: "value", state: "state", name: "name", id: "id", appearance: "appearance", thousandsSeparator: "thousandsSeparator", padDecimalZeros: "padDecimalZeros", step: "step", decimals: "decimals", decimalStep: "decimalStep", showSpinButtons: "showSpinButtons", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", readonlyChange: "readonlyChange", disabledChange: "disabledChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
213
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXNumberBoxComponent, selector: "ax-number-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", placeholder: "placeholder", value: "value", state: "state", name: "name", id: "id", look: "look", thousandsSeparator: "thousandsSeparator", padDecimalZeros: "padDecimalZeros", step: "step", decimals: "decimals", decimalStep: "decimalStep", showSpinButtons: "showSpinButtons", minValue: "minValue", maxValue: "maxValue" }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", readonlyChange: "readonlyChange", disabledChange: "disabledChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
214
214
  { provide: AXComponent, useExisting: AXNumberBoxComponent },
215
215
  { provide: AXFocusableComponent, useExisting: AXNumberBoxComponent },
216
216
  { provide: AXClearableComponent, useExisting: AXNumberBoxComponent },
@@ -223,7 +223,7 @@ class AXNumberBoxComponent extends classes((MXInputBaseValueComponent), MXAppear
223
223
  }
224
224
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXNumberBoxComponent, decorators: [{
225
225
  type: Component,
226
- args: [{ selector: 'ax-number-box', inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'appearance'], outputs: [
226
+ args: [{ selector: 'ax-number-box', inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'look'], outputs: [
227
227
  'valueChange',
228
228
  'stateChange',
229
229
  'onValueChanged',
@@ -269,20 +269,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
269
269
  }] } });
270
270
 
271
271
  const COMPONENT = [AXNumberBoxComponent];
272
- const MODULES = [
273
- CommonModule,
274
- FormsModule,
275
- AXButtonModule,
276
- AXDecoratorModule,
277
- IMaskModule
278
- ];
272
+ const MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, IMaskModule];
279
273
  class AXNumberBoxModule {
280
274
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXNumberBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
281
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXNumberBoxModule, declarations: [AXNumberBoxComponent], imports: [CommonModule,
282
- FormsModule,
283
- AXButtonModule,
284
- AXDecoratorModule,
285
- IMaskModule], exports: [AXNumberBoxComponent] }); }
275
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXNumberBoxModule, declarations: [AXNumberBoxComponent], imports: [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, IMaskModule], exports: [AXNumberBoxComponent] }); }
286
276
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXNumberBoxModule, imports: [MODULES] }); }
287
277
  }
288
278
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXNumberBoxModule, decorators: [{
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../libs/components/number-box/src/lib/number-box.component.ts","../../../../libs/components/number-box/src/lib/number-box.component.html","../../../../libs/components/number-box/src/lib/number-box.module.ts","../../../../libs/components/number-box/src/acorex-components-number-box.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Input,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { IMaskDirective } from 'angular-imask';\nimport { MaskedNumber, createMask } from 'imask';\n\nimport {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n MXAppearanceComponent,\n MXInputBaseValueComponent,\n} from '@acorex/components/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { toNumber } from 'lodash-es';\nimport { classes } from 'polytype';\n\n/**\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-number-box',\n templateUrl: './number-box.component.html',\n styleUrls: ['./number-box.component.scss'],\n inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'appearance'],\n outputs: [\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'onBlur',\n 'onFocus',\n 'readonlyChange',\n 'disabledChange',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n\n providers: [\n { provide: AXComponent, useExisting: AXNumberBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXNumberBoxComponent },\n { provide: AXClearableComponent, useExisting: AXNumberBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXNumberBoxComponent),\n multi: true,\n },\n ],\n})\nexport class AXNumberBoxComponent\n extends classes(MXInputBaseValueComponent<number>, MXAppearanceComponent)\n implements AfterViewInit\n{\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n private _thousandsSeparator: string;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n public get thousandsSeparator(): string {\n return this._thousandsSeparator;\n }\n public set thousandsSeparator(v: string) {\n this.setOption({\n name: 'thousandsSeparator',\n value: v ?? '',\n });\n }\n\n private _padDecimalZeros = false;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n public get padDecimalZeros(): boolean {\n return this._padDecimalZeros;\n }\n public set padDecimalZeros(v: boolean) {\n this.setOption({\n name: 'padDecimalZeros',\n value: v,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Integer** part of number\n */\n @Input()\n step = 1;\n\n private _decimals = 0;\n /**\n * Specifies the number of decimals that the user can enter\n */\n @Input()\n public get decimals(): number {\n return this._decimals;\n }\n public set decimals(v: number) {\n this.setOption({\n name: 'decimals',\n value: v ?? 0,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\n */\n @Input()\n decimalStep: number | 'auto' = 'auto';\n\n /**\n * Specifies whether the Up and Down spin buttons will be rendered or not\n */\n @Input()\n showSpinButtons = true;\n\n private _minValue: number = Number.MIN_SAFE_INTEGER;\n /**\n * Specifies the smallest value that is valid\n */\n @Input()\n public get minValue(): number {\n return this._minValue;\n }\n public set minValue(v: number) {\n this.setOption({\n name: 'minValue',\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\n });\n }\n\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\n /**\n * Specifies the greatest value that is valid\n */\n @Input()\n public get maxValue(): number {\n return this._maxValue;\n }\n public set maxValue(v: number) {\n this.setOption({\n name: 'maxValue',\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\n });\n }\n\n /**\n * @ignore\n */\n _maskObj: MaskedNumber;\n\n @ViewChild(IMaskDirective)\n private _maskDirective: IMaskDirective<MaskedNumber>;\n\n override ngAfterViewInit(): void {\n this._updateMask();\n }\n\n override internalOptionChanged(): void {\n this._updateMask();\n }\n\n override internalSetValue(value: any): number {\n // || (value == 0 && !this._maskObj.value)\n if (value == null) {\n return this.defaultValue;\n }\n const v = toNumber(value);\n if (v < this.minValue) return this.minValue;\n if (v > this.maxValue) return this.maxValue;\n return v;\n }\n\n private _updateMask() {\n if (!this._maskObj) {\n this._maskObj = createMask({\n mask: Number,\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n\n this._maskObj.format = (v: number, m) => {\n return !isNaN(v)\n ? v.toLocaleString('en-US', {\n useGrouping: false,\n maximumFractionDigits: 20,\n })\n : '';\n };\n } else {\n this._maskObj.updateOptions({\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n }\n this._maskDirective?.maskRef?.updateValue();\n this._maskDirective?.maskRef?.updateControl();\n }\n\n _handleModelChange(value: number) {\n this.commitValue(value, true);\n }\n\n _handleOnKeydownEvent(e: KeyboardEvent) {\n if (this.disabled || this.readonly) return;\n const ignore = () => {\n e.preventDefault();\n e.stopPropagation();\n };\n const input = e.target as HTMLInputElement;\n const valStr = input.value;\n const decimalPointIndex = valStr.indexOf('.');\n const _cursorPos = input.selectionStart!;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n if (decimalPointIndex > 0 && _cursorPos > decimalPointIndex && this.decimals > 0) {\n e.key === 'ArrowDown' ? this.decimalStepDown(true) : this.decimalStepUp(true);\n } else {\n e.key === 'ArrowDown' ? this.stepDown(true) : this.stepUp(true);\n }\n ignore();\n setTimeout(() => {\n input.setSelectionRange(_cursorPos, _cursorPos);\n }, 5);\n }\n super.emitOnKeydownEvent(e);\n }\n\n _handleUpDownClick(v: -1 | 1) {\n if (this.disabled || this.readonly) return;\n v == 1 ? this.stepUp(true) : this.stepDown(true);\n }\n\n stepUp(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value + toNumber(this.step), u);\n }\n\n stepDown(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value - toNumber(this.step), u);\n }\n\n decimalStepUp(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(\n this.value + toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep),\n u,\n );\n }\n\n decimalStepDown(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(\n this.value - toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep),\n u,\n );\n }\n\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-editor-container ax-appearance-${this.appearance}`;\n }\n}\n","<ng-content select=\"ax-prefix\"> </ng-content>\n<input\n #input\n class=\"ax-input\"\n type=\"text\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"'off'\"\n [imask]=\"_maskObj\"\n [unmask]=\"'typed'\"\n [attr.min]=\"minValue\"\n [attr.max]=\"maxValue\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [ngModel]=\"value\"\n (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"_handleOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n/>\n<ng-content select=\"ax-clear-button\"></ng-content>\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\n <button\n type=\"button\"\n class=\"ax-general-button ax-button-icon ax-number-box-increment\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"_handleUpDownClick(1)\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\n </button>\n <button\n type=\"button\"\n class=\"ax-general-button ax-button-icon ax-number-box-decrement\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"_handleUpDownClick(-1)\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-arrow-down\" tabindex=\"-1\"></span>\n </button>\n</div>\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n","import { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport {IMaskModule} from 'angular-imask';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXNumberBoxComponent } from './number-box.component';\n\nconst COMPONENT = [AXNumberBoxComponent];\nconst MODULES = [\n CommonModule,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n IMaskModule\n];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class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AiB;IACjB,WAAW;CACd,CAAC;MAQW,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CAfX,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAEnC,YAAY;YACZ,WAAW;YACX,cAAc;YACd,iBAAiB;AACjB,YAAA,WAAW,aANI,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;AAe1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJb,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAN7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AAChB,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-number-box.mjs","sources":["../../../../libs/components/number-box/src/lib/number-box.component.ts","../../../../libs/components/number-box/src/lib/number-box.component.html","../../../../libs/components/number-box/src/lib/number-box.module.ts","../../../../libs/components/number-box/src/acorex-components-number-box.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n Input,\n ViewChild,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { IMaskDirective } from 'angular-imask';\nimport { MaskedNumber, createMask } from 'imask';\n\nimport {\n AXClearableComponent,\n AXComponent,\n AXFocusableComponent,\n MXInputBaseValueComponent,\n MXLookComponent,\n} from '@acorex/components/common';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { toNumber } from 'lodash-es';\nimport { classes } from 'polytype';\n\n/**\n * The NumberBox is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-number-box',\n templateUrl: './number-box.component.html',\n styleUrls: ['./number-box.component.scss'],\n inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'look'],\n outputs: [\n 'valueChange',\n 'stateChange',\n 'onValueChanged',\n 'onBlur',\n 'onFocus',\n 'readonlyChange',\n 'disabledChange',\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n\n providers: [\n { provide: AXComponent, useExisting: AXNumberBoxComponent },\n { provide: AXFocusableComponent, useExisting: AXNumberBoxComponent },\n { provide: AXClearableComponent, useExisting: AXNumberBoxComponent },\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AXNumberBoxComponent),\n multi: true,\n },\n ],\n})\nexport class AXNumberBoxComponent\n extends classes(MXInputBaseValueComponent<number>, MXLookComponent)\n implements AfterViewInit\n{\n @ViewChild('input') input: ElementRef<HTMLInputElement>;\n\n private _thousandsSeparator: string;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n public get thousandsSeparator(): string {\n return this._thousandsSeparator;\n }\n public set thousandsSeparator(v: string) {\n this.setOption({\n name: 'thousandsSeparator',\n value: v ?? '',\n });\n }\n\n private _padDecimalZeros = false;\n /**\n * A character value that specifies the separator character.\n */\n @Input()\n public get padDecimalZeros(): boolean {\n return this._padDecimalZeros;\n }\n public set padDecimalZeros(v: boolean) {\n this.setOption({\n name: 'padDecimalZeros',\n value: v,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Integer** part of number\n */\n @Input()\n step = 1;\n\n private _decimals = 0;\n /**\n * Specifies the number of decimals that the user can enter\n */\n @Input()\n public get decimals(): number {\n return this._decimals;\n }\n public set decimals(v: number) {\n this.setOption({\n name: 'decimals',\n value: v ?? 0,\n });\n }\n\n /**\n * Specifies the value that is used to increment or decrement the **Deciaml** part of number\n */\n @Input()\n decimalStep: number | 'auto' = 'auto';\n\n /**\n * Specifies whether the Up and Down spin buttons will be rendered or not\n */\n @Input()\n showSpinButtons = true;\n\n private _minValue: number = Number.MIN_SAFE_INTEGER;\n /**\n * Specifies the smallest value that is valid\n */\n @Input()\n public get minValue(): number {\n return this._minValue;\n }\n public set minValue(v: number) {\n this.setOption({\n name: 'minValue',\n value: v != null ? Number(v) : Number.MIN_SAFE_INTEGER,\n });\n }\n\n private _maxValue: number = Number.MAX_SAFE_INTEGER;\n /**\n * Specifies the greatest value that is valid\n */\n @Input()\n public get maxValue(): number {\n return this._maxValue;\n }\n public set maxValue(v: number) {\n this.setOption({\n name: 'maxValue',\n value: v != null ? Number(v) : Number.MAX_SAFE_INTEGER,\n });\n }\n\n /**\n * @ignore\n */\n _maskObj: MaskedNumber;\n\n @ViewChild(IMaskDirective)\n private _maskDirective: IMaskDirective<MaskedNumber>;\n\n override ngAfterViewInit(): void {\n this._updateMask();\n }\n\n override internalOptionChanged(): void {\n this._updateMask();\n }\n\n override internalSetValue(value: any): number {\n // || (value == 0 && !this._maskObj.value)\n if (value == null) {\n return this.defaultValue;\n }\n const v = toNumber(value);\n if (v < this.minValue) return this.minValue;\n if (v > this.maxValue) return this.maxValue;\n return v;\n }\n\n private _updateMask() {\n if (!this._maskObj) {\n this._maskObj = createMask({\n mask: Number,\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n\n this._maskObj.format = (v: number, m) => {\n return !isNaN(v)\n ? v.toLocaleString('en-US', {\n useGrouping: false,\n maximumFractionDigits: 20,\n })\n : '';\n };\n } else {\n this._maskObj.updateOptions({\n min: this.minValue,\n max: this.maxValue,\n thousandsSeparator: this.thousandsSeparator || '',\n scale: this.decimals,\n radix: '.',\n padFractionalZeros: this.decimals > 0 && this.padDecimalZeros,\n });\n }\n this._maskDirective?.maskRef?.updateValue();\n this._maskDirective?.maskRef?.updateControl();\n }\n\n _handleModelChange(value: number) {\n this.commitValue(value, true);\n }\n\n _handleOnKeydownEvent(e: KeyboardEvent) {\n if (this.disabled || this.readonly) return;\n const ignore = () => {\n e.preventDefault();\n e.stopPropagation();\n };\n const input = e.target as HTMLInputElement;\n const valStr = input.value;\n const decimalPointIndex = valStr.indexOf('.');\n const _cursorPos = input.selectionStart!;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n if (decimalPointIndex > 0 && _cursorPos > decimalPointIndex && this.decimals > 0) {\n e.key === 'ArrowDown' ? this.decimalStepDown(true) : this.decimalStepUp(true);\n } else {\n e.key === 'ArrowDown' ? this.stepDown(true) : this.stepUp(true);\n }\n ignore();\n setTimeout(() => {\n input.setSelectionRange(_cursorPos, _cursorPos);\n }, 5);\n }\n super.emitOnKeydownEvent(e);\n }\n\n _handleUpDownClick(v: -1 | 1) {\n if (this.disabled || this.readonly) return;\n v == 1 ? this.stepUp(true) : this.stepDown(true);\n }\n\n stepUp(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value + toNumber(this.step), u);\n }\n\n stepDown(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(this.value - toNumber(this.step), u);\n }\n\n decimalStepUp(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(\n this.value + toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep),\n u,\n );\n }\n\n decimalStepDown(u = false) {\n if (!this.value) {\n this.commitValue(Math.max(this.minValue, 0), u);\n }\n this.commitValue(\n this.value - toNumber(this.decimalStep == 'auto' ? 1 / Math.pow(10, this.decimals) : this.decimalStep),\n u,\n );\n }\n\n @HostBinding('class')\n get __hostClass(): string {\n return `ax-editor-container ax-look-${this.look}`;\n }\n}\n","<ng-content select=\"ax-prefix\"> </ng-content>\n<input\n #input\n class=\"ax-input\"\n type=\"text\"\n [id]=\"id\"\n [name]=\"name\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"'off'\"\n [imask]=\"_maskObj\"\n [unmask]=\"'typed'\"\n [attr.min]=\"minValue\"\n [attr.max]=\"maxValue\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [tabindex]=\"tabIndex\"\n [ngModel]=\"value\"\n (ngModelChange)=\"_handleModelChange($event)\"\n (keydown)=\"_handleOnKeydownEvent($event)\"\n (keyup)=\"emitOnKeyupEvent($event)\"\n (keypress)=\"emitOnKeypressEvent($event)\"\n (focus)=\"emitOnFocusEvent($event)\"\n (blur)=\"emitOnBlurEvent($event)\"\n/>\n<ng-content select=\"ax-clear-button\"></ng-content>\n<div class=\"ax-number-box-control\" *ngIf=\"showSpinButtons\">\n <button\n type=\"button\"\n class=\"ax-general-button ax-button-icon ax-number-box-increment\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"_handleUpDownClick(1)\"\n tabindex=\"-1\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-arrow-up\"></span>\n </button>\n <button\n type=\"button\"\n class=\"ax-general-button ax-button-icon ax-number-box-decrement\"\n [class.ax-state-disabled]=\"disabled\"\n (click)=\"_handleUpDownClick(-1)\"\n [disabled]=\"disabled\"\n >\n <span class=\"ax-icon ax-icon-arrow-down\" tabindex=\"-1\"></span>\n </button>\n</div>\n<ng-content select=\"ax-suffix\"> </ng-content>\n<ng-content select=\"ax-validation-rule\"> </ng-content>\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { IMaskModule } from 'angular-imask';\nimport { AXNumberBoxComponent } from './number-box.component';\n\nconst COMPONENT = [AXNumberBoxComponent];\nconst MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, IMaskModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXNumberBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyBA;;;;AAIG;AA6BG,MAAO,oBACX,SAAQ,OAAO,EAAC,yBAAiC,GAAE,eAAe,CAAC,CAAA;AA7BrE,IAAA,WAAA,GAAA;;QAiDU,IAAgB,CAAA,gBAAA,GAAG,KAAK,CAAC;AAejC;;AAEG;QAEH,IAAI,CAAA,IAAA,GAAG,CAAC,CAAC;QAED,IAAS,CAAA,SAAA,GAAG,CAAC,CAAC;AAetB;;AAEG;QAEH,IAAW,CAAA,WAAA,GAAoB,MAAM,CAAC;AAEtC;;AAEG;QAEH,IAAe,CAAA,eAAA,GAAG,IAAI,CAAC;AAEf,QAAA,IAAA,CAAA,SAAS,GAAW,MAAM,CAAC,gBAAgB,CAAC;AAe5C,QAAA,IAAA,CAAA,SAAS,GAAW,MAAM,CAAC,gBAAgB,CAAC;AAoJrD,KAAA;AAjOC;;AAEG;AACH,IAAA,IACW,kBAAkB,GAAA;QAC3B,OAAO,IAAI,CAAC,mBAAmB,CAAC;KACjC;IACD,IAAW,kBAAkB,CAAC,CAAS,EAAA;QACrC,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,CAAC,IAAI,EAAE;AACf,SAAA,CAAC,CAAC;KACJ;AAGD;;AAEG;AACH,IAAA,IACW,eAAe,GAAA;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC;KAC9B;IACD,IAAW,eAAe,CAAC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E;AACd,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- import { AXEvent, MXValueComponent, MXAppearanceComponent } from '@acorex/components/common';
1
+ import { AXEvent, MXValueComponent, MXLookComponent } from '@acorex/components/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, Input, NgModule } from '@angular/core';
4
4
  import { classes } from 'polytype';
@@ -8,7 +8,7 @@ import { CommonModule } from '@angular/common';
8
8
  class AXOtpCompletedEvent extends AXEvent {
9
9
  }
10
10
 
11
- class AXOtpComponent extends classes((MXValueComponent), MXAppearanceComponent) {
11
+ class AXOtpComponent extends classes((MXValueComponent), MXLookComponent) {
12
12
  constructor() {
13
13
  super(...arguments);
14
14
  this.lenghtChange = new EventEmitter();
@@ -115,11 +115,11 @@ class AXOtpComponent extends classes((MXValueComponent), MXAppearanceComponent)
115
115
  inputs[i].select();
116
116
  }
117
117
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXOtpComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
118
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXOtpComponent, selector: "ax-otp", inputs: { state: "state", disabled: "disabled", readonly: "readonly", appearance: "appearance", length: "length" }, outputs: { stateChange: "stateChange", disabledChange: "disabledChange", lenghtChange: "lenghtChange", onCompleted: "onCompleted" }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"ax-otp-input-container ax-editor-container ax-appearance-{{ appearance }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\"\n>\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input\n class=\"ax-input\"\n type=\"number\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\"\n [class.ax-state-error]=\"state === 'error'\"\n maxlength=\"1\"\n [value]=\"_numbers[i]\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n disabled=\"disabled\"\n />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n", styles: [".ax-otp-input-container{display:grid;gap:.5rem}.ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial;background-color:transparent}.ax-otp-input-container.ax-editor-container:focus-within,.ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input{background-color:rgba(var(--ax-color-input-surface));border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input:focus-within,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-error,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-error:focus-within,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-error .ax-input::placeholder,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-success,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-success:focus-within,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-success .ax-input::placeholder,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input{background-color:transparent!important}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input{background-color:rgba(var(--ax-color-input-surface-fill));border-radius:var(--ax-rounded-border-default)}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-success{background-color:rgba(var(--ax-color-success-50))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1}.ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}.ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 599px){.ax-otp-input-container.ax-editor-container .ax-input{font-size:100%}}.ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}.ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,.ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
118
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXOtpComponent, selector: "ax-otp", inputs: { state: "state", disabled: "disabled", readonly: "readonly", look: "look", length: "length" }, outputs: { stateChange: "stateChange", disabledChange: "disabledChange", lenghtChange: "lenghtChange", onCompleted: "onCompleted" }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\"\n>\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input\n class=\"ax-input\"\n type=\"number\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\"\n [class.ax-state-error]=\"state === 'error'\"\n maxlength=\"1\"\n [value]=\"_numbers[i]\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n disabled=\"disabled\"\n />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem}ax-otp .ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial;background-color:transparent}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:rgba(var(--ax-color-input-surface));border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:0}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{background-color:rgba(var(--ax-color-on-surface));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success{background-color:rgba(var(--ax-color-success-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 599px){ax-otp .ax-otp-input-container.ax-editor-container .ax-input{font-size:100%}}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
119
119
  }
120
120
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXOtpComponent, decorators: [{
121
121
  type: Component,
122
- args: [{ selector: 'ax-otp', inputs: ['state', 'disabled', 'readonly', 'appearance'], outputs: ['stateChange', 'disabledChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ax-otp-input-container ax-editor-container ax-appearance-{{ appearance }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\"\n>\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input\n class=\"ax-input\"\n type=\"number\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\"\n [class.ax-state-error]=\"state === 'error'\"\n maxlength=\"1\"\n [value]=\"_numbers[i]\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n disabled=\"disabled\"\n />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n", styles: [".ax-otp-input-container{display:grid;gap:.5rem}.ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial;background-color:transparent}.ax-otp-input-container.ax-editor-container:focus-within,.ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input{background-color:rgba(var(--ax-color-input-surface));border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input:focus-within,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-error,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-error:focus-within,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-error .ax-input::placeholder,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-success,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-success:focus-within,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-solid .ax-input.ax-state-success .ax-input::placeholder,.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-flat .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-outline .ax-input{background-color:transparent!important}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input{background-color:rgba(var(--ax-color-input-surface-fill));border-radius:var(--ax-rounded-border-default)}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-success{background-color:rgba(var(--ax-color-success-50))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container.ax-appearance-fill .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}.ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1}.ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}.ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 599px){.ax-otp-input-container.ax-editor-container .ax-input{font-size:100%}}.ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}.ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,.ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"] }]
122
+ args: [{ selector: 'ax-otp', inputs: ['state', 'disabled', 'readonly', 'look'], outputs: ['stateChange', 'disabledChange'], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\"\n>\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input\n class=\"ax-input\"\n type=\"number\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\"\n [class.ax-state-error]=\"state === 'error'\"\n maxlength=\"1\"\n [value]=\"_numbers[i]\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n disabled=\"disabled\"\n />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n", styles: ["ax-otp{display:block}ax-otp .ax-otp-input-container{display:grid;gap:.5rem}ax-otp .ax-otp-input-container.ax-editor-container{border:none;height:auto;outline-color:transparent;overflow:initial;background-color:transparent}ax-otp .ax-otp-input-container.ax-editor-container:focus-within,ax-otp .ax-otp-input-container.ax-editor-container:focus{border:none!important;box-shadow:none!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:rgba(var(--ax-color-input-surface));border:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500));box-shadow:0 0 0 1px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-error .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success:focus-within,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 1px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-solid .ax-input.ax-state-success .ax-input::placeholder,ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input{border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));border-radius:0}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input:focus-within{border-color:rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error{border-color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success{outline-color:rgba(var(--ax-color-success-500));border-color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-flat .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-outline .ax-input{background-color:transparent!important}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input{background-color:rgba(var(--ax-color-on-surface));border-radius:var(--ax-rounded-border-default)}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-primary-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error{background-color:rgba(var(--ax-color-danger-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-error .ax-input::placeholder{color:rgba(var(--ax-color-danger-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success{background-color:rgba(var(--ax-color-success-50))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success:focus-within{box-shadow:0 0 0 2px rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container.ax-look-fill .ax-input.ax-state-success .ax-input::placeholder{color:rgba(var(--ax-color-success-500))}ax-otp .ax-otp-input-container.ax-editor-container .ax-input{text-align:center;font-size:200%;overflow:hidden;aspect-ratio:1}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:read-only{opacity:.8;cursor:text}ax-otp .ax-otp-input-container.ax-editor-container .ax-input:disabled{opacity:.5;cursor:not-allowed}@media (max-width: 599px){ax-otp .ax-otp-input-container.ax-editor-container .ax-input{font-size:100%}}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]{-moz-appearance:textfield}ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-inner-spin-button,ax-otp .ax-otp-input-container.ax-editor-container .ax-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}\n"] }]
123
123
  }], propDecorators: { lenghtChange: [{
124
124
  type: Output
125
125
  }], length: [{
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../libs/components/otp/src/lib/otp.class.ts","../../../../libs/components/otp/src/lib/otp.component.ts","../../../../libs/components/otp/src/lib/otp.component.html","../../../../libs/components/otp/src/lib/otp.module.ts","../../../../libs/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/components/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n}\n","import { MXAppearanceComponent, MXValueComponent } from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.scss'],\n inputs: ['state', 'disabled', 'readonly', 'appearance'],\n outputs: ['stateChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXOtpComponent\n extends classes(MXValueComponent<string>, MXAppearanceComponent)\n implements OnInit, AfterViewInit\n{\n @Output()\n lenghtChange: EventEmitter<number> = new EventEmitter();\n\n private _length: number;\n\n @Input()\n public get length(): number {\n return this._length;\n }\n public set length(v: number) {\n this.setOption({\n name: 'length',\n afterCallback: () => {\n this._render();\n },\n value: v,\n });\n }\n\n inputs: number[] = [];\n\n @Output() onCompleted: EventEmitter<AXOtpCompletedEvent> = new EventEmitter<AXOtpCompletedEvent>();\n\n protected _numbers: number[] = [];\n\n override ngOnInit(): void {\n super.ngOnInit();\n this._render();\n }\n\n private _render() {\n this.inputs = Array(this.length)\n .fill(1)\n .map((x, i) => i);\n }\n\n clear() {\n this._numbers = [];\n this.setState('clear');\n }\n\n override ngAfterViewInit(): void {\n this.getHostElement().querySelector<HTMLInputElement>('.ax-input').focus();\n }\n\n protected _handleOnInput(event: any, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n this._numbers[i] = event.target.value;\n if (this._numbers.filter((c) => c).length === this.length) {\n this.setState('success');\n this.onCompleted.emit({\n component: AXOtpComponent,\n value: this._numbers.join(''),\n });\n }\n }\n\n protected _handleOnKeyDown(event: KeyboardEvent, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n switch (event.key) {\n case 'Backspace':\n inputs[i].value = '';\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n event.preventDefault();\n }\n this._numbers[i] = NaN;\n break;\n case 'ArrowRight':\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n break;\n\n case 'ArrowLeft':\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n }\n break;\n case 'Home':\n inputs[0].focus();\n break;\n case 'End':\n inputs[this.length - 1].select();\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n protected _handleOnPaste(event: any) {\n const data = event.clipboardData.getData('text');\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[inputs.length - 1].focus();\n this._numbers = [];\n for (let i = 0; i < data.length; i++) {\n this._numbers[i] = data[i];\n }\n }\n\n protected _handleOnClick(event: any, i) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[i].select();\n }\n}\n","<div\n class=\"ax-otp-input-container ax-editor-container ax-appearance-{{ appearance }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\"\n>\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input\n class=\"ax-input\"\n type=\"number\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\"\n [class.ax-state-error]=\"state === 'error'\"\n maxlength=\"1\"\n [value]=\"_numbers[i]\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n disabled=\"disabled\"\n />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { AXOtpComponent } from './otp.component';\n\nconst COMPONENT = [AXOtpComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAE/C;;ACmBK,MAAO,cACX,SAAQ,OAAO,EAAC,gBAAwB,GAAE,qBAAqB,CAAC,CAAA;AAVlE,IAAA,WAAA,GAAA;;AAcE,QAAA,IAAA,CAAA,YAAY,GAAyB,IAAI,YAAY,EAAE,CAAC;QAkBxD,IAAM,CAAA,MAAA,GAAa,EAAE,CAAC;AAEZ,QAAA,IAAA,C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,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-otp.mjs","sources":["../../../../libs/components/otp/src/lib/otp.class.ts","../../../../libs/components/otp/src/lib/otp.component.ts","../../../../libs/components/otp/src/lib/otp.component.html","../../../../libs/components/otp/src/lib/otp.module.ts","../../../../libs/components/otp/src/acorex-components-otp.ts"],"sourcesContent":["import { AXEvent } from '@acorex/components/common';\n\nexport class AXOtpCompletedEvent extends AXEvent {\n value: string;\n}\n","import { MXLookComponent, MXValueComponent } from '@acorex/components/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport { classes } from 'polytype';\nimport { AXOtpCompletedEvent } from './otp.class';\n\n@Component({\n selector: 'ax-otp',\n templateUrl: './otp.component.html',\n styleUrls: ['./otp.component.scss'],\n inputs: ['state', 'disabled', 'readonly', 'look'],\n outputs: ['stateChange', 'disabledChange'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class AXOtpComponent\n extends classes(MXValueComponent<string>, MXLookComponent)\n implements OnInit, AfterViewInit\n{\n @Output()\n lenghtChange: EventEmitter<number> = new EventEmitter();\n\n private _length: number;\n\n @Input()\n public get length(): number {\n return this._length;\n }\n public set length(v: number) {\n this.setOption({\n name: 'length',\n afterCallback: () => {\n this._render();\n },\n value: v,\n });\n }\n\n inputs: number[] = [];\n\n @Output() onCompleted: EventEmitter<AXOtpCompletedEvent> = new EventEmitter<AXOtpCompletedEvent>();\n\n protected _numbers: number[] = [];\n\n override ngOnInit(): void {\n super.ngOnInit();\n this._render();\n }\n\n private _render() {\n this.inputs = Array(this.length)\n .fill(1)\n .map((x, i) => i);\n }\n\n clear() {\n this._numbers = [];\n this.setState('clear');\n }\n\n override ngAfterViewInit(): void {\n this.getHostElement().querySelector<HTMLInputElement>('.ax-input').focus();\n }\n\n protected _handleOnInput(event: any, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n const numberRegex = /^\\d+$/;\n if (!numberRegex.test(event.target.value)) {\n event.target.value = '';\n return;\n }\n if (event.target.value.length > 1) {\n const currentValue = event.target.value;\n event.target.value = '';\n event.target.value = currentValue.slice(-1);\n }\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n this._numbers[i] = event.target.value;\n if (this._numbers.filter((c) => c).length === this.length) {\n this.setState('success');\n this.onCompleted.emit({\n component: AXOtpComponent,\n value: this._numbers.join(''),\n });\n }\n }\n\n protected _handleOnKeyDown(event: KeyboardEvent, i: number) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n switch (event.key) {\n case 'Backspace':\n inputs[i].value = '';\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n event.preventDefault();\n }\n this._numbers[i] = NaN;\n break;\n case 'ArrowRight':\n if (inputs[i + 1]) {\n inputs[i + 1].select();\n }\n break;\n\n case 'ArrowLeft':\n if (inputs[i - 1]) {\n inputs[i - 1].select();\n }\n break;\n case 'Home':\n inputs[0].focus();\n break;\n case 'End':\n inputs[this.length - 1].select();\n break;\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n }\n }\n protected _handleOnPaste(event: any) {\n const data = event.clipboardData.getData('text');\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[inputs.length - 1].focus();\n this._numbers = [];\n for (let i = 0; i < data.length; i++) {\n this._numbers[i] = data[i];\n }\n }\n\n protected _handleOnClick(event: any, i) {\n const inputs = this.getHostElement().querySelectorAll<HTMLInputElement>('.ax-input');\n inputs[i].select();\n }\n}\n","<div\n class=\"ax-otp-input-container ax-editor-container ax-look-{{ look }}\"\n [ngStyle]=\"{ 'grid-template-columns': 'repeat(' + inputs.length + ', minmax(0, 1fr))' }\"\n (paste)=\"_handleOnPaste($event)\"\n>\n <ng-container *ngFor=\"let input of inputs; let i = index\">\n <input\n class=\"ax-input\"\n type=\"number\"\n [class.ax-state-disabled]=\"disabled\"\n [class.ax-state-success]=\"state === 'success'\"\n [class.ax-state-error]=\"state === 'error'\"\n maxlength=\"1\"\n [value]=\"_numbers[i]\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (click)=\"_handleOnClick($event, i)\"\n (input)=\"_handleOnInput($event, i)\"\n (keydown)=\"_handleOnKeyDown($event, i)\"\n disabled=\"disabled\"\n />\n </ng-container>\n</div>\n<ng-template #name></ng-template>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXOtpComponent } from './otp.component';\n\nconst COMPONENT = [AXOtpComponent];\nconst MODULES = [CommonModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [],\n})\nexport class AXOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEM,MAAO,mBAAoB,SAAQ,OAAO,CAAA;AAE/C;;ACmBK,MAAO,cACX,SAAQ,OAAO,EAAC,gBAAwB,GAAE,eAAe,CAAC,CAAA;AAV5D,IAAA,WAAA,GAAA;;AAcE,QAAA,IAAA,CAAA,YAAY,GAAyB,IAAI,YAAY,EAAE,CAAC;QAkBxD,IAAM,CAAA,MAAA,GAAa,EAAE,CAAC;AAEZ,QAAA,IAAA,CAAA,WAAW,GAAsC,IAAI,YAAY,EAAuB,CAAC;QAEzF,IAAQ,CAAA,QAAA,GAAa,EAAE,CAAC;AA+FnC,KAAA;AAjHC,IAAA,IACW,MAAM,GAAA;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IACD,IAAW,MAAM,CAAC,CAAS,EAAA;QACzB,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,QAAQ;YACd,aAAa,EAAE,MAAK;gBACl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K;gBAgBI,WAAW,EAAA,CAAA;sBAApB,MAAM;;;AE5CT,MAAM,SAAS,GAAG,CAAC,cAAc,CAAC,CAAC;AACnC,MAAM,OAAO,GAAG,CAAC,YAAY,CAAC,CAAC;MAQlB,WAAW,CAAA;8GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EATL,YAAA,EAAA,CAAA,cAAc,CAChB,EAAA,OAAA,EAAA,CAAA,YAAY,aADV,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;AASpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAJT,OAAO,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIT,WAAW,EAAA,UAAA,EAAA,CAAA;kBANvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
@@ -1,8 +1,8 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, EventEmitter, Injectable, ViewChild, Output, Input, Inject, NgModule } from '@angular/core';
3
1
  import { MXBaseComponent } from '@acorex/components/common';
4
2
  import '@acorex/components/decorators';
5
3
  import { AXLoadingService } from '@acorex/components/loading';
4
+ import * as i0 from '@angular/core';
5
+ import { inject, EventEmitter, Injectable, ViewChild, Output, Input, Inject, NgModule } from '@angular/core';
6
6
 
7
7
  class AXBasePageComponent extends MXBaseComponent {
8
8
  constructor() {
@@ -26,7 +26,9 @@ class AXBasePageComponent extends MXBaseComponent {
26
26
  this._loadingId = 0;
27
27
  }
28
28
  if (v) {
29
- this._loadingId = this._loadingService.show({ location: this.getHostElement().closest('.ax-loading-container') });
29
+ this._loadingId = this._loadingService.show({
30
+ location: this.getHostElement().closest('.ax-loading-container'),
31
+ });
30
32
  }
31
33
  this.cdr.markForCheck();
32
34
  },
@@ -52,7 +54,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
52
54
  type: Injectable
53
55
  }], propDecorators: { footer: [{
54
56
  type: ViewChild,
55
- args: ["ax-footer", { static: true }]
57
+ args: ['ax-footer', { static: true }]
56
58
  }], isLoadingChange: [{
57
59
  type: Output
58
60
  }], isLoading: [{
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-page.mjs","sources":["../../../../libs/components/page/src/lib/base-page.class.ts","../../../../libs/components/page/src/lib/page.component.ts","../../../../libs/components/page/src/lib/page.module.ts","../../../../libs/components/page/src/acorex-components-page.ts"],"sourcesContent":["import {\n EventEmitter,\n Injectable,\n Input,\n Output,\n ViewChild,\n inject,\n} from '@angular/core';\nimport { AXComponentCloseEvent, AXComponentClosing, MXBaseComponent } from '@acorex/components/common';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXLoadingService } from '@acorex/components/loading';\n\n@Injectable()\nexport class AXBasePageComponent extends MXBaseComponent {\n\n private _loadingId: number;\n private _loadingService = inject(AXLoadingService);\n\n @ViewChild(\"ax-footer\", { static: true })\n footer: AXDecoratorGenericComponent;\n\n @Output()\n isLoadingChange = new EventEmitter<boolean>();\n\n private _isLoading = false;\n @Input()\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this.setOption({\n name: 'isLoading',\n value: v,\n afterCallback: () => {\n if (this._loadingId && !v) {\n this._loadingService.hide(this._loadingId);\n this._loadingId = 0;\n }\n if (v) {\n this._loadingId = this._loadingService.show({ location: this.getHostElement().closest('.ax-loading-container') });\n }\n this.cdr.markForCheck();\n },\n });\n }\n\n private _isPopup = false;\n public get isPopup(): boolean {\n return this._isPopup;\n }\n\n onClosed: EventEmitter<AXComponentCloseEvent> = new EventEmitter<AXComponentCloseEvent>();\n\n close(data?: unknown) {\n this.onClosed.emit({\n component: this,\n data: data,\n });\n }\n\n onClosing(e: AXComponentClosing): void | Promise<void> { }\n\n ngOnDestroy() {\n this.onClosed.unsubscribe();\n }\n}\n","import {\n EventEmitter,\n Inject,\n Injectable,\n Input,\n Output,\n} from '@angular/core';\nimport { AXLoadingService } from '@acorex/components/loading';\nimport { MXBaseComponent } from '@acorex/components/common';\n\n@Injectable()\nexport abstract class AXPageComponent extends MXBaseComponent {\n constructor(\n @Inject(AXLoadingService) private _loadingService\n ) {\n super();\n }\n\n private _loadingId: number;\n\n @Output()\n isLoadingChange = new EventEmitter<boolean>();\n\n private _isLoading: boolean = false;\n @Input()\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this.setOption({\n name: 'isLoading',\n value: v,\n afterCallback: () => {\n if (this._loadingId && !v) {\n this._loadingService.hide(this._loadingId);\n this._loadingId = 0;\n }\n if (v) {\n this._loadingId = this._loadingService.show(this.getHostElement());\n }\n this.cdr.markForCheck();\n },\n });\n }\n}\n","import { NgModule } from '@angular/core';\n\n\n// TODO: Module is empty!?\n@NgModule({\n imports: [],\n exports: [],\n declarations: [],\n providers: [],\n})\nexport class AXPageModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaM,MAAO,mBAAoB,SAAQ,eAAe,CAAA;AADxD,IAAA,WAAA,GAAA;;AAIU,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,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,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;AACpE,iBAAA;AACD,gBAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;aACzB;AACF,SAAA,CAAC,CAAC;KACJ;AAhCmB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,kBAEzB,gBAAgB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;kHAFN,eAAe,EAAA,CAAA,CAAA,EAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;;0BAGN,MAAM;2BAAC,gBAAgB,CAAA;4CAQ1B,eAAe,EAAA,CAAA;sBADd,MAAM;gBAKI,SAAS,EAAA,CAAA;sBADnB,KAAK;;;ACrBR;MAOa,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,SAAS,EAAE,EAAE;AAChB,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-components-page.mjs","sources":["../../../../libs/components/page/src/lib/base-page.class.ts","../../../../libs/components/page/src/lib/page.component.ts","../../../../libs/components/page/src/lib/page.module.ts","../../../../libs/components/page/src/acorex-components-page.ts"],"sourcesContent":["import { AXComponentCloseEvent, AXComponentClosing, MXBaseComponent } from '@acorex/components/common';\nimport { AXDecoratorGenericComponent } from '@acorex/components/decorators';\nimport { AXLoadingService } from '@acorex/components/loading';\nimport { EventEmitter, Injectable, Input, Output, ViewChild, inject } from '@angular/core';\n\n@Injectable()\nexport class AXBasePageComponent extends MXBaseComponent {\n private _loadingId: number;\n private _loadingService = inject(AXLoadingService);\n\n @ViewChild('ax-footer', { static: true })\n footer: AXDecoratorGenericComponent;\n\n @Output()\n isLoadingChange = new EventEmitter<boolean>();\n\n private _isLoading = false;\n @Input()\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this.setOption({\n name: 'isLoading',\n value: v,\n afterCallback: () => {\n if (this._loadingId && !v) {\n this._loadingService.hide(this._loadingId);\n this._loadingId = 0;\n }\n if (v) {\n this._loadingId = this._loadingService.show({\n location: this.getHostElement().closest('.ax-loading-container'),\n });\n }\n this.cdr.markForCheck();\n },\n });\n }\n\n private _isPopup = false;\n public get isPopup(): boolean {\n return this._isPopup;\n }\n\n onClosed: EventEmitter<AXComponentCloseEvent> = new EventEmitter<AXComponentCloseEvent>();\n\n close(data?: unknown) {\n this.onClosed.emit({\n component: this,\n data: data,\n });\n }\n\n onClosing(e: AXComponentClosing): void | Promise<void> {}\n\n ngOnDestroy() {\n this.onClosed.unsubscribe();\n }\n}\n","import { MXBaseComponent } from '@acorex/components/common';\nimport { AXLoadingService } from '@acorex/components/loading';\nimport { EventEmitter, Inject, Injectable, Input, Output } from '@angular/core';\n\n@Injectable()\nexport abstract class AXPageComponent extends MXBaseComponent {\n constructor(@Inject(AXLoadingService) private _loadingService) {\n super();\n }\n\n private _loadingId: number;\n\n @Output()\n isLoadingChange = new EventEmitter<boolean>();\n\n private _isLoading: boolean = false;\n @Input()\n public get isLoading(): boolean {\n return this._isLoading;\n }\n public set isLoading(v: boolean) {\n this.setOption({\n name: 'isLoading',\n value: v,\n afterCallback: () => {\n if (this._loadingId && !v) {\n this._loadingService.hide(this._loadingId);\n this._loadingId = 0;\n }\n if (v) {\n this._loadingId = this._loadingService.show(this.getHostElement());\n }\n this.cdr.markForCheck();\n },\n });\n }\n}\n","import { NgModule } from '@angular/core';\n\n// TODO: Module is empty!?\n@NgModule({\n imports: [],\n exports: [],\n declarations: [],\n providers: [],\n})\nexport class AXPageModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMM,MAAO,mBAAoB,SAAQ,eAAe,CAAA;AADxD,IAAA,WAAA,GAAA;;AAGU,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAMnD,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,YAAY,EAAW,CAAC;QAEtC,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;QAwBnB,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAKzB,QAAA,IAAA,CAAA,QAAQ,GAAwC,IAAI,YAAY,EAAyB,CAAC;AAc3F,KAAA;AA1CC,IAAA,IACW,SAAS,GAAA;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC;KACxB;IACD,IAAW,SAAS,CAAC,CAAU,EAAA;QAC7B,IAAI,CAAC,SAAS,CAAC;AACb,YAAA,IAAI,EAAE,WAAW;AACjB,YAAA,KAAK,EAAE,CAAC;YACR,aAAa,EAAE,MAAK;AAClB,gBAAA,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,EAAE;oBACzB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC3C,oBAAA,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;AACrB,iBAAA;AACD,gBAAA,IAAI,CAAC,EAAE;oBACL,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;wBAC1C,QAAQ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AA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,CAAA,CAAA,EAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBANxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- import { MXInputBaseValueComponent, MXAppearanceComponent, AXComponent, AXFocusableComponent, AXClearableComponent } from '@acorex/components/common';
1
+ import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent } from '@acorex/components/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, HostBinding, NgModule } from '@angular/core';
4
4
  import * as i2 from '@angular/forms';
@@ -14,7 +14,7 @@ import { AXDecoratorModule } from '@acorex/components/decorators';
14
14
  *
15
15
  * @category Components
16
16
  */
17
- class AXPasswordBoxComponent extends classes((MXInputBaseValueComponent), MXAppearanceComponent) {
17
+ class AXPasswordBoxComponent extends classes((MXInputBaseValueComponent), MXLookComponent) {
18
18
  constructor() {
19
19
  super(...arguments);
20
20
  this._type = 'password';
@@ -39,10 +39,10 @@ class AXPasswordBoxComponent extends classes((MXInputBaseValueComponent), MXAppe
39
39
  }
40
40
  }
41
41
  get __hostClass() {
42
- return `ax-editor-container ax-appearance-${this.appearance}`;
42
+ return ['ax-editor-container', `ax-look-${this.look}`];
43
43
  }
44
44
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXPasswordBoxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
45
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXPasswordBoxComponent, selector: "ax-password-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", placeholder: "placeholder", value: "value", state: "state", name: "name", id: "id", appearance: "appearance", autoComplete: "autoComplete", showToggleButton: "showToggleButton" }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", readonlyChange: "readonlyChange", disabledChange: "disabledChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
45
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.9", type: AXPasswordBoxComponent, selector: "ax-password-box", inputs: { disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", placeholder: "placeholder", value: "value", state: "state", name: "name", id: "id", look: "look", autoComplete: "autoComplete", showToggleButton: "showToggleButton" }, outputs: { valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", readonlyChange: "readonlyChange", disabledChange: "disabledChange" }, host: { properties: { "class": "this.__hostClass" } }, providers: [
46
46
  { provide: AXComponent, useExisting: AXPasswordBoxComponent },
47
47
  { provide: AXFocusableComponent, useExisting: AXPasswordBoxComponent },
48
48
  { provide: AXClearableComponent, useExisting: AXPasswordBoxComponent },
@@ -55,7 +55,7 @@ class AXPasswordBoxComponent extends classes((MXInputBaseValueComponent), MXAppe
55
55
  }
56
56
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXPasswordBoxComponent, decorators: [{
57
57
  type: Component,
58
- args: [{ selector: 'ax-password-box', inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'appearance'], outputs: [
58
+ args: [{ selector: 'ax-password-box', inputs: ['disabled', 'readonly', 'tabIndex', 'placeholder', 'value', 'state', 'name', 'id', 'look'], outputs: [
59
59
  'valueChange',
60
60
  'stateChange',
61
61
  'onValueChanged',
@@ -86,18 +86,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImpor
86
86
  }] } });
87
87
 
88
88
  const COMPONENT = [AXPasswordBoxComponent];
89
- const MODULES = [
90
- CommonModule,
91
- FormsModule,
92
- AXButtonModule,
93
- AXDecoratorModule,
94
- ];
89
+ const MODULES = [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule];
95
90
  class AXPasswordBoxModule {
96
91
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXPasswordBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
97
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXPasswordBoxModule, declarations: [AXPasswordBoxComponent], imports: [CommonModule,
98
- FormsModule,
99
- AXButtonModule,
100
- AXDecoratorModule], exports: [AXPasswordBoxComponent] }); }
92
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.9", ngImport: i0, type: AXPasswordBoxModule, declarations: [AXPasswordBoxComponent], imports: [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule], exports: [AXPasswordBoxComponent] }); }
101
93
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXPasswordBoxModule, imports: [MODULES] }); }
102
94
  }
103
95
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.9", ngImport: i0, type: AXPasswordBoxModule, decorators: [{