@acorex/components 7.2.7 → 7.3.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 (473) hide show
  1. package/action-sheet/index.d.ts +1 -1
  2. package/action-sheet/lib/action-sheet.class.d.ts +31 -0
  3. package/action-sheet/lib/action-sheet.component.d.ts +12 -13
  4. package/action-sheet/lib/action-sheet.module.d.ts +2 -1
  5. package/action-sheet/lib/action-sheet.service.d.ts +4 -8
  6. package/alert/lib/alert.component.d.ts +12 -11
  7. package/button/lib/button-group.component.d.ts +6 -6
  8. package/button/lib/button-item.class.d.ts +6 -2
  9. package/button/lib/button-item.component.d.ts +6 -6
  10. package/button/lib/button.component.d.ts +5 -3
  11. package/calendar/lib/calendar.component.d.ts +2 -1
  12. package/check-box/README.md +3 -0
  13. package/check-box/index.d.ts +2 -0
  14. package/check-box/lib/check-box.component.d.ts +14 -0
  15. package/{checkbox/lib/checkbox.module.d.ts → check-box/lib/check-box.module.d.ts} +1 -1
  16. package/chips/lib/chips.component.d.ts +2 -2
  17. package/color-palette/lib/color-palette-input.component.d.ts +10 -7
  18. package/color-palette/lib/color-palette-picker.component.d.ts +10 -5
  19. package/color-palette/lib/color-palette-preview.component.d.ts +8 -4
  20. package/color-palette/lib/color-palette-swatches.component.d.ts +9 -6
  21. package/color-palette/lib/color-palette.class.d.ts +12 -6
  22. package/color-palette/lib/color-palette.component.d.ts +3 -15
  23. package/color-palette/lib/color-palette.module.d.ts +9 -8
  24. package/color-picker/lib/color-picker.component.d.ts +17 -24
  25. package/color-picker/lib/color-picker.module.d.ts +1 -1
  26. package/common/index.d.ts +3 -1
  27. package/common/lib/classes/components.class.d.ts +12 -2
  28. package/common/lib/classes/datalist.class.d.ts +11 -0
  29. package/common/lib/common.module.d.ts +3 -4
  30. package/common/lib/components/base-component.class.d.ts +13 -5
  31. package/common/lib/components/input-base-value-component.class.d.ts +27 -0
  32. package/common/lib/components/interactive-component.class.d.ts +7 -0
  33. package/common/lib/components/value-component.class.d.ts +22 -8
  34. package/common/lib/directives/auto-focus.directive.d.ts +6 -5
  35. package/common/lib/directives/delayed-value-changed.directive.d.ts +17 -0
  36. package/common/lib/services/dom.service.d.ts +6 -0
  37. package/data-pager/lib/data-pager-base.component.d.ts +18 -13
  38. package/data-pager/lib/data-pager-info.component.d.ts +3 -9
  39. package/data-pager/lib/data-pager-input-selector.component.d.ts +5 -9
  40. package/data-pager/lib/data-pager-next-buttons.components.d.ts +2 -8
  41. package/data-pager/lib/data-pager-numeric-selector.component.d.ts +2 -7
  42. package/data-pager/lib/data-pager-pagesize-dropdown.component.d.ts +2 -6
  43. package/data-pager/lib/data-pager-prev-buttons.component.d.ts +2 -7
  44. package/data-pager/lib/data-pager.component.d.ts +17 -18
  45. package/data-pager/lib/data-pager.module.d.ts +6 -5
  46. package/data-table/index.d.ts +0 -1
  47. package/data-table/lib/data-column.directive.d.ts +3 -8
  48. package/data-table/lib/data-table.component.d.ts +6 -7
  49. package/data-table/lib/data-table.module.d.ts +6 -7
  50. package/date-picker/lib/datepicker.component.d.ts +7 -6
  51. package/date-picker/lib/datepicker.module.d.ts +1 -1
  52. package/decorators/index.d.ts +2 -12
  53. package/decorators/lib/clear-button.component.d.ts +13 -0
  54. package/decorators/lib/close-button.component.d.ts +5 -8
  55. package/decorators/lib/decorators.module.d.ts +6 -15
  56. package/decorators/lib/generic-content.component.d.ts +6 -0
  57. package/decorators/lib/icon.component.d.ts +2 -4
  58. package/dialog/lib/dialog.class.d.ts +11 -3
  59. package/dialog/lib/dialog.component.d.ts +15 -11
  60. package/dialog/lib/dialog.module.d.ts +4 -3
  61. package/dialog/lib/dialog.service.d.ts +4 -12
  62. package/drawer/lib/drawer-container.component.d.ts +2 -5
  63. package/drawer/lib/drawer.component.d.ts +6 -7
  64. package/esm2022/acorex-components.mjs +1 -1
  65. package/esm2022/action-sheet/index.mjs +2 -2
  66. package/esm2022/action-sheet/lib/action-sheet.class.mjs +2 -0
  67. package/esm2022/action-sheet/lib/action-sheet.component.mjs +50 -38
  68. package/esm2022/action-sheet/lib/action-sheet.module.mjs +11 -7
  69. package/esm2022/action-sheet/lib/action-sheet.service.mjs +32 -72
  70. package/esm2022/alert/lib/alert.component.mjs +19 -20
  71. package/esm2022/alert/lib/alert.module.mjs +7 -7
  72. package/esm2022/avatar/lib/avatar-group.component.mjs +3 -3
  73. package/esm2022/avatar/lib/avatar.component.mjs +3 -3
  74. package/esm2022/avatar/lib/avatar.module.mjs +4 -4
  75. package/esm2022/badge/lib/badge.component.mjs +7 -7
  76. package/esm2022/badge/lib/badge.module.mjs +4 -4
  77. package/esm2022/breadcrumbs/lib/breadcrumbs-item.component.mjs +3 -3
  78. package/esm2022/breadcrumbs/lib/breadcrumbs.component.mjs +3 -3
  79. package/esm2022/breadcrumbs/lib/breadcrumbs.module.mjs +4 -4
  80. package/esm2022/button/lib/button-group.component.mjs +3 -3
  81. package/esm2022/button/lib/button-item.class.mjs +1 -1
  82. package/esm2022/button/lib/button-item.component.mjs +3 -3
  83. package/esm2022/button/lib/button.component.mjs +34 -17
  84. package/esm2022/button/lib/button.module.mjs +4 -4
  85. package/esm2022/calendar/lib/calendar-range.component.mjs +5 -5
  86. package/esm2022/calendar/lib/calendar.class.mjs +3 -3
  87. package/esm2022/calendar/lib/calendar.component.mjs +18 -15
  88. package/esm2022/calendar/lib/calendar.module.mjs +4 -4
  89. package/esm2022/check-box/acorex-components-check-box.mjs +5 -0
  90. package/esm2022/check-box/index.mjs +3 -0
  91. package/esm2022/check-box/lib/check-box.component.mjs +76 -0
  92. package/esm2022/check-box/lib/check-box.module.mjs +21 -0
  93. package/esm2022/chips/lib/chips.component.mjs +7 -6
  94. package/esm2022/chips/lib/chips.module.mjs +4 -4
  95. package/esm2022/collapse/lib/collapse-group.component.mjs +3 -3
  96. package/esm2022/collapse/lib/collapse.component.mjs +3 -3
  97. package/esm2022/collapse/lib/collapse.module.mjs +4 -4
  98. package/esm2022/color-palette/lib/color-palette-input.component.mjs +64 -73
  99. package/esm2022/color-palette/lib/color-palette-picker.component.mjs +63 -58
  100. package/esm2022/color-palette/lib/color-palette-preview.component.mjs +30 -25
  101. package/esm2022/color-palette/lib/color-palette-swatches.component.mjs +32 -246
  102. package/esm2022/color-palette/lib/color-palette.class.mjs +229 -8
  103. package/esm2022/color-palette/lib/color-palette.component.mjs +32 -47
  104. package/esm2022/color-palette/lib/color-palette.module.mjs +10 -7
  105. package/esm2022/color-picker/lib/color-picker.component.mjs +12 -6
  106. package/esm2022/color-picker/lib/color-picker.module.mjs +6 -6
  107. package/esm2022/common/index.mjs +4 -2
  108. package/esm2022/common/lib/classes/components.class.mjs +26 -19
  109. package/esm2022/common/lib/classes/datalist.class.mjs +3 -0
  110. package/esm2022/common/lib/common.module.mjs +5 -10
  111. package/esm2022/common/lib/components/base-component.class.mjs +26 -13
  112. package/esm2022/common/lib/components/input-base-value-component.class.mjs +47 -0
  113. package/esm2022/common/lib/components/interactive-component.class.mjs +31 -4
  114. package/esm2022/common/lib/components/value-component.class.mjs +57 -33
  115. package/esm2022/common/lib/directives/auto-focus.directive.mjs +18 -11
  116. package/esm2022/common/lib/directives/delayed-value-changed.directive.mjs +49 -0
  117. package/esm2022/common/lib/directives/hotkey.directive.mjs +3 -3
  118. package/esm2022/common/lib/directives/infinite-scroll.directive.mjs +3 -3
  119. package/esm2022/common/lib/directives/responsive.directive.mjs +3 -3
  120. package/esm2022/common/lib/services/custom-cdk-overlay.service.mjs +6 -6
  121. package/esm2022/common/lib/services/dom.service.mjs +16 -0
  122. package/esm2022/common/lib/services/hotkey.service.mjs +3 -3
  123. package/esm2022/common/lib/services/overlay.service.mjs +3 -3
  124. package/esm2022/context-menu/lib/context-menu.component.mjs +5 -5
  125. package/esm2022/context-menu/lib/context-menu.module.mjs +4 -4
  126. package/esm2022/data-pager/lib/data-pager-base.component.mjs +35 -21
  127. package/esm2022/data-pager/lib/data-pager-info.component.mjs +13 -26
  128. package/esm2022/data-pager/lib/data-pager-input-selector.component.mjs +27 -31
  129. package/esm2022/data-pager/lib/data-pager-next-buttons.components.mjs +19 -33
  130. package/esm2022/data-pager/lib/data-pager-numeric-selector.component.mjs +31 -38
  131. package/esm2022/data-pager/lib/data-pager-pagesize-dropdown.component.mjs +22 -31
  132. package/esm2022/data-pager/lib/data-pager-prev-buttons.component.mjs +19 -29
  133. package/esm2022/data-pager/lib/data-pager.component.mjs +66 -38
  134. package/esm2022/data-pager/lib/data-pager.module.mjs +8 -7
  135. package/esm2022/data-table/index.mjs +1 -2
  136. package/esm2022/data-table/lib/data-column.directive.mjs +7 -22
  137. package/esm2022/data-table/lib/data-table.component.mjs +30 -30
  138. package/esm2022/data-table/lib/data-table.module.mjs +6 -7
  139. package/esm2022/date-picker/lib/datepicker.component.mjs +19 -16
  140. package/esm2022/date-picker/lib/datepicker.module.mjs +6 -6
  141. package/esm2022/decorators/index.mjs +3 -13
  142. package/esm2022/decorators/lib/clear-button.component.mjs +58 -0
  143. package/esm2022/decorators/lib/close-button.component.mjs +16 -20
  144. package/esm2022/decorators/lib/decorators.module.mjs +13 -49
  145. package/esm2022/decorators/lib/generic-content.component.mjs +17 -0
  146. package/esm2022/decorators/lib/icon.component.mjs +8 -11
  147. package/esm2022/dialog/lib/dialog.class.mjs +1 -1
  148. package/esm2022/dialog/lib/dialog.component.mjs +41 -23
  149. package/esm2022/dialog/lib/dialog.module.mjs +10 -8
  150. package/esm2022/dialog/lib/dialog.service.mjs +41 -49
  151. package/esm2022/drawer/lib/drawer-container.component.mjs +9 -13
  152. package/esm2022/drawer/lib/drawer.component.mjs +23 -27
  153. package/esm2022/drawer/lib/drawer.module.mjs +4 -4
  154. package/esm2022/dropdown/lib/dropdown-panel.component.mjs +4 -4
  155. package/esm2022/dropdown/lib/dropdown.module.mjs +4 -4
  156. package/esm2022/form/lib/form-field.component.mjs +9 -12
  157. package/esm2022/form/lib/form.component.mjs +38 -42
  158. package/esm2022/form/lib/form.module.mjs +4 -4
  159. package/esm2022/form/lib/validation-rule.widget.mjs +24 -15
  160. package/esm2022/form/lib/validation-summary.component.mjs +15 -14
  161. package/esm2022/image/lib/image.component.mjs +13 -17
  162. package/esm2022/image/lib/image.module.mjs +4 -4
  163. package/esm2022/index.mjs +1 -1
  164. package/esm2022/label/lib/label.component.mjs +18 -18
  165. package/esm2022/label/lib/label.module.mjs +4 -4
  166. package/esm2022/loading/index.mjs +2 -1
  167. package/esm2022/loading/lib/loading-spinner.component.mjs +4 -5
  168. package/esm2022/loading/lib/loading.component.mjs +22 -25
  169. package/esm2022/loading/lib/loading.config.mjs +17 -0
  170. package/esm2022/loading/lib/loading.directive.mjs +4 -4
  171. package/esm2022/loading/lib/loading.module.mjs +6 -17
  172. package/esm2022/loading/lib/loading.service.mjs +4 -36
  173. package/esm2022/menu/lib/menu.component.mjs +26 -19
  174. package/esm2022/menu/lib/menu.module.mjs +4 -4
  175. package/esm2022/mixin/lib/base-components.class.mjs +3 -3
  176. package/esm2022/mixin/lib/base-menu-mixin.class.mjs +3 -3
  177. package/esm2022/mixin/lib/color-look-mixing.class.mjs +1 -1
  178. package/esm2022/notification/index.mjs +2 -1
  179. package/esm2022/notification/lib/notification.class.mjs +1 -1
  180. package/esm2022/notification/lib/notification.component.mjs +51 -35
  181. package/esm2022/notification/lib/notification.config.mjs +20 -0
  182. package/esm2022/notification/lib/notification.module.mjs +11 -7
  183. package/esm2022/notification/lib/notification.service.mjs +46 -59
  184. package/esm2022/number-box/lib/number-box.component.mjs +101 -90
  185. package/esm2022/number-box/lib/number-box.module.mjs +4 -4
  186. package/esm2022/otp/lib/otp.component.mjs +38 -48
  187. package/esm2022/otp/lib/otp.module.mjs +4 -4
  188. package/esm2022/page/lib/base-page.class.mjs +6 -6
  189. package/esm2022/page/lib/page.component.mjs +3 -3
  190. package/esm2022/page/lib/page.module.mjs +4 -4
  191. package/esm2022/password-box/lib/password-box.component.mjs +37 -25
  192. package/esm2022/password-box/lib/password-box.module.mjs +4 -4
  193. package/esm2022/popover/lib/dropdown-component.class.mjs +3 -3
  194. package/esm2022/popover/lib/popover.component.mjs +3 -3
  195. package/esm2022/popover/lib/popover.module.mjs +4 -4
  196. package/esm2022/popup/index.mjs +2 -1
  197. package/esm2022/popup/lib/popup.component.mjs +49 -69
  198. package/esm2022/popup/lib/popup.interface.mjs +2 -0
  199. package/esm2022/popup/lib/popup.module.mjs +27 -12
  200. package/esm2022/popup/lib/popup.service.mjs +31 -86
  201. package/esm2022/progress-bar/lib/progress-bar.component.mjs +3 -3
  202. package/esm2022/progress-bar/lib/progress-bar.module.mjs +4 -4
  203. package/esm2022/radio/lib/radio.component.mjs +4 -4
  204. package/esm2022/radio/lib/radio.module.mjs +4 -4
  205. package/esm2022/range-slider/lib/range-slider.component.mjs +27 -22
  206. package/esm2022/range-slider/lib/range-slider.module.mjs +7 -6
  207. package/esm2022/result/lib/result.component.mjs +3 -3
  208. package/esm2022/result/lib/result.module.mjs +4 -4
  209. package/esm2022/scheduler/acorex-components-scheduler.mjs +5 -0
  210. package/esm2022/scheduler/index.mjs +4 -0
  211. package/esm2022/scheduler/lib/scheduler-month-view.component.mjs +45 -0
  212. package/esm2022/scheduler/lib/scheduler.component.mjs +30 -0
  213. package/esm2022/scheduler/lib/scheduler.module.mjs +26 -0
  214. package/esm2022/search-box/lib/search-box.component.mjs +35 -44
  215. package/esm2022/search-box/lib/search-box.module.mjs +28 -7
  216. package/esm2022/select-box/lib/select-box.component.mjs +11 -9
  217. package/esm2022/select-box/lib/select-box.module.mjs +7 -7
  218. package/esm2022/selection-list/lib/selection-list.component.mjs +3 -3
  219. package/esm2022/selection-list/lib/selection-list.module.mjs +6 -6
  220. package/esm2022/switch/lib/switch-content.component.mjs +3 -3
  221. package/esm2022/switch/lib/switch.component.mjs +27 -24
  222. package/esm2022/switch/lib/switch.module.mjs +4 -4
  223. package/esm2022/tabs/lib/tab-content.directive.mjs +3 -3
  224. package/esm2022/tabs/lib/tab-item.component.mjs +3 -3
  225. package/esm2022/tabs/lib/tabs.component.mjs +3 -3
  226. package/esm2022/tabs/lib/tabs.module.mjs +4 -4
  227. package/esm2022/tag/lib/tag.component.mjs +3 -3
  228. package/esm2022/tag/lib/tag.module.mjs +4 -4
  229. package/esm2022/text-area/acorex-components-text-area.mjs +5 -0
  230. package/esm2022/text-area/index.mjs +3 -0
  231. package/esm2022/text-area/lib/text-area.component.mjs +36 -0
  232. package/esm2022/text-area/lib/text-area.module.mjs +19 -0
  233. package/esm2022/{checkbox/acorex-components-checkbox.mjs → text-box/acorex-components-text-box.mjs} +1 -1
  234. package/esm2022/text-box/index.mjs +4 -0
  235. package/esm2022/text-box/lib/mask-options.directive.mjs +17 -0
  236. package/esm2022/text-box/lib/text-box.component.mjs +111 -0
  237. package/esm2022/text-box/lib/text-box.module.mjs +38 -0
  238. package/esm2022/time-box/lib/time-box.component.mjs +5 -5
  239. package/esm2022/time-box/lib/time-box.module.mjs +4 -4
  240. package/esm2022/toast/index.mjs +2 -1
  241. package/esm2022/toast/lib/toast.class.mjs +1 -1
  242. package/esm2022/toast/lib/toast.component.mjs +37 -25
  243. package/esm2022/toast/lib/toast.config.mjs +19 -0
  244. package/esm2022/toast/lib/toast.module.mjs +12 -8
  245. package/esm2022/toast/lib/toast.service.mjs +46 -55
  246. package/esm2022/tooltip/lib/tooltip.component.mjs +3 -3
  247. package/esm2022/tooltip/lib/tooltip.directive.mjs +3 -3
  248. package/esm2022/tooltip/lib/tooltip.module.mjs +4 -4
  249. package/esm2022/uploader/lib/uploader.component.mjs +3 -3
  250. package/esm2022/uploader/lib/uploader.module.mjs +4 -4
  251. package/fesm2022/acorex-components-action-sheet.mjs +99 -125
  252. package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
  253. package/fesm2022/acorex-components-alert.mjs +21 -22
  254. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  255. package/fesm2022/acorex-components-avatar.mjs +10 -10
  256. package/fesm2022/acorex-components-badge.mjs +9 -9
  257. package/fesm2022/acorex-components-badge.mjs.map +1 -1
  258. package/fesm2022/acorex-components-breadcrumbs.mjs +10 -10
  259. package/fesm2022/acorex-components-button.mjs +41 -24
  260. package/fesm2022/acorex-components-button.mjs.map +1 -1
  261. package/fesm2022/acorex-components-calendar.mjs +28 -25
  262. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  263. package/fesm2022/acorex-components-check-box.mjs +100 -0
  264. package/fesm2022/acorex-components-check-box.mjs.map +1 -0
  265. package/fesm2022/acorex-components-chips.mjs +10 -9
  266. package/fesm2022/acorex-components-chips.mjs.map +1 -1
  267. package/fesm2022/acorex-components-collapse.mjs +10 -10
  268. package/fesm2022/acorex-components-color-palette.mjs +432 -437
  269. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  270. package/fesm2022/acorex-components-color-picker.mjs +16 -10
  271. package/fesm2022/acorex-components-color-picker.mjs.map +1 -1
  272. package/fesm2022/acorex-components-common.mjs +282 -150
  273. package/fesm2022/acorex-components-common.mjs.map +1 -1
  274. package/fesm2022/acorex-components-context-menu.mjs +8 -8
  275. package/fesm2022/acorex-components-context-menu.mjs.map +1 -1
  276. package/fesm2022/acorex-components-data-pager.mjs +214 -228
  277. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  278. package/fesm2022/acorex-components-data-table.mjs +41 -71
  279. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  280. package/fesm2022/acorex-components-date-picker.mjs +25 -22
  281. package/fesm2022/acorex-components-date-picker.mjs.map +1 -1
  282. package/fesm2022/acorex-components-decorators.mjs +80 -283
  283. package/fesm2022/acorex-components-decorators.mjs.map +1 -1
  284. package/fesm2022/acorex-components-dialog.mjs +97 -88
  285. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  286. package/fesm2022/acorex-components-drawer.mjs +31 -39
  287. package/fesm2022/acorex-components-drawer.mjs.map +1 -1
  288. package/fesm2022/acorex-components-dropdown.mjs +7 -7
  289. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  290. package/fesm2022/acorex-components-form.mjs +80 -77
  291. package/fesm2022/acorex-components-form.mjs.map +1 -1
  292. package/fesm2022/acorex-components-image.mjs +15 -19
  293. package/fesm2022/acorex-components-image.mjs.map +1 -1
  294. package/fesm2022/acorex-components-label.mjs +21 -21
  295. package/fesm2022/acorex-components-label.mjs.map +1 -1
  296. package/fesm2022/acorex-components-loading.mjs +51 -83
  297. package/fesm2022/acorex-components-loading.mjs.map +1 -1
  298. package/fesm2022/acorex-components-menu.mjs +29 -22
  299. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  300. package/fesm2022/acorex-components-mixin.mjs +4 -5
  301. package/fesm2022/acorex-components-mixin.mjs.map +1 -1
  302. package/fesm2022/acorex-components-notification.mjs +131 -107
  303. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  304. package/fesm2022/acorex-components-number-box.mjs +106 -96
  305. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  306. package/fesm2022/acorex-components-otp.mjs +40 -50
  307. package/fesm2022/acorex-components-otp.mjs.map +1 -1
  308. package/fesm2022/acorex-components-page.mjs +12 -12
  309. package/fesm2022/acorex-components-page.mjs.map +1 -1
  310. package/fesm2022/acorex-components-password-box.mjs +41 -30
  311. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  312. package/fesm2022/acorex-components-popover.mjs +10 -10
  313. package/fesm2022/acorex-components-popup.mjs +107 -170
  314. package/fesm2022/acorex-components-popup.mjs.map +1 -1
  315. package/fesm2022/acorex-components-progress-bar.mjs +7 -7
  316. package/fesm2022/acorex-components-radio.mjs +8 -8
  317. package/fesm2022/acorex-components-radio.mjs.map +1 -1
  318. package/fesm2022/acorex-components-range-slider.mjs +31 -27
  319. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  320. package/fesm2022/acorex-components-result.mjs +7 -7
  321. package/fesm2022/acorex-components-scheduler.mjs +98 -0
  322. package/fesm2022/acorex-components-scheduler.mjs.map +1 -0
  323. package/fesm2022/acorex-components-search-box.mjs +61 -49
  324. package/fesm2022/acorex-components-search-box.mjs.map +1 -1
  325. package/fesm2022/acorex-components-select-box.mjs +16 -14
  326. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  327. package/fesm2022/acorex-components-selection-list.mjs +8 -8
  328. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  329. package/fesm2022/acorex-components-switch.mjs +33 -31
  330. package/fesm2022/acorex-components-switch.mjs.map +1 -1
  331. package/fesm2022/acorex-components-tabs.mjs +13 -13
  332. package/fesm2022/acorex-components-tag.mjs +7 -7
  333. package/fesm2022/acorex-components-text-area.mjs +59 -0
  334. package/fesm2022/acorex-components-text-area.mjs.map +1 -0
  335. package/fesm2022/{acorex-components-textbox.mjs → acorex-components-text-box.mjs} +49 -32
  336. package/fesm2022/acorex-components-text-box.mjs.map +1 -0
  337. package/fesm2022/acorex-components-time-box.mjs +8 -8
  338. package/fesm2022/acorex-components-time-box.mjs.map +1 -1
  339. package/fesm2022/acorex-components-toast.mjs +116 -94
  340. package/fesm2022/acorex-components-toast.mjs.map +1 -1
  341. package/fesm2022/acorex-components-tooltip.mjs +10 -10
  342. package/fesm2022/acorex-components-uploader.mjs +7 -7
  343. package/fesm2022/acorex-components.mjs.map +1 -1
  344. package/form/lib/form-field.component.d.ts +2 -4
  345. package/form/lib/form.component.d.ts +12 -17
  346. package/form/lib/validation-rule.widget.d.ts +9 -6
  347. package/form/lib/validation-summary.component.d.ts +7 -9
  348. package/image/lib/image.component.d.ts +7 -13
  349. package/label/lib/label.component.d.ts +4 -7
  350. package/loading/index.d.ts +1 -0
  351. package/loading/lib/loading.component.d.ts +9 -12
  352. package/loading/lib/loading.config.d.ts +8 -0
  353. package/loading/lib/loading.directive.d.ts +5 -5
  354. package/loading/lib/loading.module.d.ts +0 -1
  355. package/loading/lib/loading.service.d.ts +0 -18
  356. package/menu/lib/menu.component.d.ts +4 -2
  357. package/mixin/lib/base-components.class.d.ts +2 -2
  358. package/mixin/lib/base-menu-mixin.class.d.ts +5 -5
  359. package/mixin/lib/button-mixin.class.d.ts +2 -2
  360. package/mixin/lib/clickable-mixin.class.d.ts +2 -2
  361. package/mixin/lib/color-look-mixing.class.d.ts +3 -3
  362. package/mixin/lib/datalist-component.class.d.ts +10 -10
  363. package/mixin/lib/dropdown-mixin.class.d.ts +2 -2
  364. package/mixin/lib/interactive-mixin.class.d.ts +4 -4
  365. package/mixin/lib/loading-mixin.class.d.ts +2 -2
  366. package/mixin/lib/mixin.class.d.ts +61 -61
  367. package/mixin/lib/page-component.class.d.ts +2 -2
  368. package/mixin/lib/selection-component.class.d.ts +2 -2
  369. package/mixin/lib/sizable-mixin.class.d.ts +2 -2
  370. package/mixin/lib/textbox-mixin.class.d.ts +2 -2
  371. package/mixin/lib/value-mixin.class.d.ts +8 -8
  372. package/notification/index.d.ts +1 -0
  373. package/notification/lib/notification.class.d.ts +29 -7
  374. package/notification/lib/notification.component.d.ts +13 -14
  375. package/notification/lib/notification.config.d.ts +13 -0
  376. package/notification/lib/notification.module.d.ts +4 -1
  377. package/notification/lib/notification.service.d.ts +5 -9
  378. package/number-box/lib/number-box.component.d.ts +12 -17
  379. package/otp/lib/otp.component.d.ts +7 -14
  380. package/package.json +36 -30
  381. package/page/lib/base-page.class.d.ts +2 -2
  382. package/password-box/lib/password-box.component.d.ts +8 -11
  383. package/popup/index.d.ts +1 -0
  384. package/popup/lib/popup.component.d.ts +14 -19
  385. package/popup/lib/popup.interface.d.ts +26 -0
  386. package/popup/lib/popup.module.d.ts +4 -4
  387. package/popup/lib/popup.service.d.ts +4 -25
  388. package/range-slider/lib/range-slider.component.d.ts +6 -14
  389. package/range-slider/lib/range-slider.module.d.ts +3 -2
  390. package/scheduler/README.md +3 -0
  391. package/scheduler/index.d.ts +3 -0
  392. package/scheduler/lib/scheduler-month-view.component.d.ts +20 -0
  393. package/scheduler/lib/scheduler.component.d.ts +11 -0
  394. package/scheduler/lib/scheduler.module.d.ts +13 -0
  395. package/search-box/lib/search-box.component.d.ts +8 -16
  396. package/search-box/lib/search-box.module.d.ts +7 -5
  397. package/select-box/lib/select-box.module.d.ts +2 -2
  398. package/selection-list/lib/selection-list.module.d.ts +1 -1
  399. package/switch/lib/switch.component.d.ts +10 -8
  400. package/tabs/lib/tab-item.component.d.ts +2 -2
  401. package/text-area/README.md +3 -0
  402. package/text-area/index.d.ts +2 -0
  403. package/text-area/lib/text-area.component.d.ts +11 -0
  404. package/text-area/lib/text-area.module.d.ts +9 -0
  405. package/text-box/README.md +3 -0
  406. package/text-box/index.d.ts +3 -0
  407. package/text-box/lib/text-box.component.d.ts +25 -0
  408. package/{textbox/lib/textbox.module.d.ts → text-box/lib/text-box.module.d.ts} +1 -1
  409. package/time-box/lib/time-box.component.d.ts +1 -1
  410. package/toast/index.d.ts +1 -0
  411. package/toast/lib/toast.class.d.ts +14 -5
  412. package/toast/lib/toast.component.d.ts +13 -12
  413. package/toast/lib/toast.config.d.ts +12 -0
  414. package/toast/lib/toast.module.d.ts +4 -1
  415. package/toast/lib/toast.service.d.ts +5 -9
  416. package/action-sheet/lib/action-sheet.interface.d.ts +0 -21
  417. package/checkbox/README.md +0 -3
  418. package/checkbox/index.d.ts +0 -2
  419. package/checkbox/lib/checkbox.component.d.ts +0 -17
  420. package/common/lib/directives/debounce-time.directive.d.ts +0 -17
  421. package/data-table/lib/data-column-cell-template.directive.d.ts +0 -8
  422. package/decorators/lib/content.component.d.ts +0 -9
  423. package/decorators/lib/divider.component.d.ts +0 -5
  424. package/decorators/lib/footer.component.d.ts +0 -9
  425. package/decorators/lib/form-hint.component.d.ts +0 -8
  426. package/decorators/lib/header.component.d.ts +0 -9
  427. package/decorators/lib/overlay.component.d.ts +0 -6
  428. package/decorators/lib/placeholder.component.d.ts +0 -5
  429. package/decorators/lib/prefix.component.d.ts +0 -9
  430. package/decorators/lib/sub-title.component.d.ts +0 -9
  431. package/decorators/lib/suffix.component.d.ts +0 -9
  432. package/decorators/lib/text.component.d.ts +0 -9
  433. package/decorators/lib/title.component.d.ts +0 -8
  434. package/esm2022/action-sheet/lib/action-sheet.interface.mjs +0 -2
  435. package/esm2022/checkbox/index.mjs +0 -3
  436. package/esm2022/checkbox/lib/checkbox.component.mjs +0 -49
  437. package/esm2022/checkbox/lib/checkbox.module.mjs +0 -21
  438. package/esm2022/common/lib/directives/debounce-time.directive.mjs +0 -48
  439. package/esm2022/data-table/lib/data-column-cell-template.directive.mjs +0 -17
  440. package/esm2022/decorators/lib/content.component.mjs +0 -26
  441. package/esm2022/decorators/lib/divider.component.mjs +0 -17
  442. package/esm2022/decorators/lib/footer.component.mjs +0 -26
  443. package/esm2022/decorators/lib/form-hint.component.mjs +0 -20
  444. package/esm2022/decorators/lib/header.component.mjs +0 -26
  445. package/esm2022/decorators/lib/overlay.component.mjs +0 -22
  446. package/esm2022/decorators/lib/placeholder.component.mjs +0 -14
  447. package/esm2022/decorators/lib/prefix.component.mjs +0 -26
  448. package/esm2022/decorators/lib/sub-title.component.mjs +0 -26
  449. package/esm2022/decorators/lib/suffix.component.mjs +0 -26
  450. package/esm2022/decorators/lib/text.component.mjs +0 -21
  451. package/esm2022/decorators/lib/title.component.mjs +0 -20
  452. package/esm2022/textarea/acorex-components-textarea.mjs +0 -5
  453. package/esm2022/textarea/index.mjs +0 -3
  454. package/esm2022/textarea/lib/textarea.component.mjs +0 -37
  455. package/esm2022/textarea/lib/textarea.module.mjs +0 -19
  456. package/esm2022/textbox/acorex-components-textbox.mjs +0 -5
  457. package/esm2022/textbox/index.mjs +0 -4
  458. package/esm2022/textbox/lib/mask-options.directive.mjs +0 -17
  459. package/esm2022/textbox/lib/textbox.component.mjs +0 -93
  460. package/esm2022/textbox/lib/textbox.module.mjs +0 -38
  461. package/fesm2022/acorex-components-checkbox.mjs +0 -74
  462. package/fesm2022/acorex-components-checkbox.mjs.map +0 -1
  463. package/fesm2022/acorex-components-textarea.mjs +0 -60
  464. package/fesm2022/acorex-components-textarea.mjs.map +0 -1
  465. package/fesm2022/acorex-components-textbox.mjs.map +0 -1
  466. package/textarea/README.md +0 -3
  467. package/textarea/index.d.ts +0 -2
  468. package/textarea/lib/textarea.component.d.ts +0 -14
  469. package/textarea/lib/textarea.module.d.ts +0 -9
  470. package/textbox/README.md +0 -3
  471. package/textbox/index.d.ts +0 -3
  472. package/textbox/lib/textbox.component.d.ts +0 -27
  473. /package/{textbox → text-box}/lib/mask-options.directive.d.ts +0 -0
@@ -1,44 +1,266 @@
1
- import { AXColorUtil } from '@acorex/core/utils';
1
+ import * as i1 from '@acorex/core/utils';
2
+ import { AXColorUtil, AXUnsubscriber } from '@acorex/core/utils';
2
3
  import * as i0 from '@angular/core';
3
- import { Injectable, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, Input, ContentChildren, HostBinding, NgModule } from '@angular/core';
4
- import { distinctUntilChanged } from 'rxjs/operators';
5
- import { MXBaseComponent, MXInteractiveComponent, MXValueComponent } from '@acorex/components/common';
6
- import * as i1 from '@angular/common';
4
+ import { Injectable, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, Input, forwardRef, ContentChildren, HostBinding, NgModule } from '@angular/core';
5
+ import { MXBaseComponent, MXValueComponent } from '@acorex/components/common';
6
+ import * as i2 from '@angular/common';
7
7
  import { CommonModule } from '@angular/common';
8
- import * as i2 from '@acorex/components/textbox';
9
- import { AXTextBoxModule } from '@acorex/components/textbox';
10
- import * as i3 from '@acorex/components/number-box';
8
+ import * as i3 from '@angular/forms';
9
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
10
+ import * as i4 from '@acorex/components/text-box';
11
+ import { AXTextBoxModule } from '@acorex/components/text-box';
12
+ import * as i5 from '@acorex/components/number-box';
11
13
  import { AXNumberBoxModule } from '@acorex/components/number-box';
12
- import * as i1$1 from '@acorex/components/range-slider';
14
+ import * as i3$1 from '@acorex/components/range-slider';
13
15
  import { AXRangeSliderModule } from '@acorex/components/range-slider';
14
- import * as i2$1 from '@angular/cdk/drag-drop';
16
+ import * as i4$1 from '@angular/cdk/drag-drop';
15
17
  import { DragDropModule } from '@angular/cdk/drag-drop';
16
- import { Subject } from 'rxjs';
17
- import { classes } from 'polytype';
18
+ import { distinctUntilChanged } from 'rxjs/operators';
18
19
  import { AXLabelModule } from '@acorex/components/label';
19
20
  import { AXButtonModule } from '@acorex/components/button';
20
21
  import { AXDecoratorModule } from '@acorex/components/decorators';
21
22
 
22
- class AXColorComponent {
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
24
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorComponent }); }
23
+ class AXColorPaletteParentComponent {
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteParentComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
25
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteParentComponent }); }
25
26
  }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorComponent, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteParentComponent, decorators: [{
27
28
  type: Injectable
28
29
  }] });
29
30
  class AXColorPaletteChildComponent {
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteChildComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
31
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteChildComponent }); }
31
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteChildComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
32
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteChildComponent }); }
32
33
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteChildComponent, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteChildComponent, decorators: [{
34
35
  type: Injectable
35
36
  }] });
37
+ const AXDefaultColorPalette = [
38
+ { code: '#ffffff' },
39
+ { code: '#000000' },
40
+ { code: '#9E9E9E' },
41
+ { code: '#FFC107' },
42
+ { code: '#607D8B' },
43
+ { code: '#2196F3' },
44
+ { code: '#FF5722' },
45
+ { code: '#4CAF50' },
46
+ { code: '#9c27b0' },
47
+ { code: '#3F51B5' },
48
+ // Amber
49
+ { code: '#fff8e1' },
50
+ { code: '#ffecb3' },
51
+ { code: '#ffe082' },
52
+ { code: '#ffd54f' },
53
+ { code: '#ffca28' },
54
+ { code: '#ffc107' },
55
+ { code: '#ffb300' },
56
+ { code: '#ffa000' },
57
+ { code: '#ff8f00' },
58
+ { code: '#ff6f00' },
59
+ // Blue Grey
60
+ { code: '#ECEFF1' },
61
+ { code: '#CFD8DC' },
62
+ { code: '#B0BEC5' },
63
+ { code: '#90A4AE' },
64
+ { code: '#78909C' },
65
+ { code: '#607D8B' },
66
+ { code: '#546E7A' },
67
+ { code: '#455A64' },
68
+ { code: '#37474F' },
69
+ { code: '#263238' },
70
+ // Blue
71
+ { code: '#E3F2FD' },
72
+ { code: '#BBDEFB' },
73
+ { code: '#90CAF9' },
74
+ { code: '#64B5F6' },
75
+ { code: '#42A5F5' },
76
+ { code: '#2196F3' },
77
+ { code: '#1E88E5' },
78
+ { code: '#1976D2' },
79
+ { code: '#1565C0' },
80
+ { code: '#0D47A1' },
81
+ // Brown
82
+ { code: '#EFEBE9' },
83
+ { code: '#D7CCC8' },
84
+ { code: '#BCAAA4' },
85
+ { code: '#A1887F' },
86
+ { code: '#8D6E63' },
87
+ { code: '#795548' },
88
+ { code: '#6D4C41' },
89
+ { code: '#5D4037' },
90
+ { code: '#4E342E' },
91
+ { code: '#3E2723' },
92
+ // Cyan
93
+ { code: '#E0F7FA' },
94
+ { code: '#B2EBF2' },
95
+ { code: '#80DEEA' },
96
+ { code: '#4DD0E1' },
97
+ { code: '#26C6DA' },
98
+ { code: '#00BCD4' },
99
+ { code: '#00ACC1' },
100
+ { code: '#0097A7' },
101
+ { code: '#00838F' },
102
+ { code: '#006064' },
103
+ // Deep Orange
104
+ { code: '#FBE9E7' },
105
+ { code: '#FFCCBC' },
106
+ { code: '#FFAB91' },
107
+ { code: '#FF8A65' },
108
+ { code: '#FF7043' },
109
+ { code: '#FF5722' },
110
+ { code: '#F4511E' },
111
+ { code: '#E64A19' },
112
+ { code: '#D84315' },
113
+ { code: '#BF360C' },
114
+ // Deep Purple
115
+ { code: '#EDE7F6' },
116
+ { code: '#D1C4E9' },
117
+ { code: '#B39DDB' },
118
+ { code: '#9575CD' },
119
+ { code: '#7E57C2' },
120
+ { code: '#673AB7' },
121
+ { code: '#5E35B1' },
122
+ { code: '#512DA8' },
123
+ { code: '#4527A0' },
124
+ { code: '#311B92' },
125
+ // Green
126
+ { code: '#E8F5E9' },
127
+ { code: '#C8E6C9' },
128
+ { code: '#A5D6A7' },
129
+ { code: '#81C784' },
130
+ { code: '#66BB6A' },
131
+ { code: '#4CAF50' },
132
+ { code: '#43A047' },
133
+ { code: '#388E3C' },
134
+ { code: '#2E7D32' },
135
+ { code: '#1B5E20' },
136
+ // Grey
137
+ { code: '#FAFAFA' },
138
+ { code: '#F5F5F5' },
139
+ { code: '#EEEEEE' },
140
+ { code: '#E0E0E0' },
141
+ { code: '#BDBDBD' },
142
+ { code: '#9E9E9E' },
143
+ { code: '#757575' },
144
+ { code: '#616161' },
145
+ { code: '#424242' },
146
+ { code: '#212121' },
147
+ // Indigo
148
+ { code: '#E8EAF6' },
149
+ { code: '#C5CAE9' },
150
+ { code: '#9FA8DA' },
151
+ { code: '#7986CB' },
152
+ { code: '#5C6BC0' },
153
+ { code: '#3F51B5' },
154
+ { code: '#3949AB' },
155
+ { code: '#303F9F' },
156
+ { code: '#283593' },
157
+ { code: '#1A237E' },
158
+ // Light Blue
159
+ { code: '#E1F5FE' },
160
+ { code: '#B3E5FC' },
161
+ { code: '#81D4FA' },
162
+ { code: '#4FC3F7' },
163
+ { code: '#29B6F6' },
164
+ { code: '#03A9F4' },
165
+ { code: '#039BE5' },
166
+ { code: '#0288D1' },
167
+ { code: '#0277BD' },
168
+ { code: '#01579B' },
169
+ // Light Green
170
+ { code: '#F1F8E9' },
171
+ { code: '#DCEDC8' },
172
+ { code: '#C5E1A5' },
173
+ { code: '#AED581' },
174
+ { code: '#9CCC65' },
175
+ { code: '#8BC34A' },
176
+ { code: '#7CB342' },
177
+ { code: '#689F38' },
178
+ { code: '#558B2F' },
179
+ { code: '#33691E' },
180
+ // Lime
181
+ { code: '#F9FBE7' },
182
+ { code: '#F0F4C3' },
183
+ { code: '#E6EE9C' },
184
+ { code: '#DCE775' },
185
+ { code: '#D4E157' },
186
+ { code: '#CDDC39' },
187
+ { code: '#C0CA33' },
188
+ { code: '#AFB42B' },
189
+ { code: '#9E9D24' },
190
+ { code: '#827717' },
191
+ // Orange
192
+ { code: '#FFF3E0' },
193
+ { code: '#FFE0B2' },
194
+ { code: '#FFCC80' },
195
+ { code: '#FFB74D' },
196
+ { code: '#FFA726' },
197
+ { code: '#FF9800' },
198
+ { code: '#FB8C00' },
199
+ { code: '#F57C00' },
200
+ { code: '#EF6C00' },
201
+ { code: '#E65100' },
202
+ // Pink
203
+ { code: '#FCE4EC' },
204
+ { code: '#F8BBD0' },
205
+ { code: '#F48FB1' },
206
+ { code: '#F06292' },
207
+ { code: '#EC407A' },
208
+ { code: '#E91E63' },
209
+ { code: '#D81B60' },
210
+ { code: '#C2185B' },
211
+ { code: '#AD1457' },
212
+ { code: '#880E4F' },
213
+ // Purple
214
+ { code: '#F3E5F5' },
215
+ { code: '#E1BEE7' },
216
+ { code: '#CE93D8' },
217
+ { code: '#BA68C8' },
218
+ { code: '#AB47BC' },
219
+ { code: '#9C27B0' },
220
+ { code: '#8E24AA' },
221
+ { code: '#7B1FA2' },
222
+ { code: '#6A1B9A' },
223
+ { code: '#4A148C' },
224
+ // Red
225
+ { code: '#FFEBEE' },
226
+ { code: '#FFCDD2' },
227
+ { code: '#EF9A9A' },
228
+ { code: '#E57373' },
229
+ { code: '#EF5350' },
230
+ { code: '#F44336' },
231
+ { code: '#E53935' },
232
+ { code: '#D32F2F' },
233
+ { code: '#C62828' },
234
+ { code: '#B71C1C' },
235
+ // Teal
236
+ { code: '#E0F2F1' },
237
+ { code: '#B2DFDB' },
238
+ { code: '#80CBC4' },
239
+ { code: '#4DB6AC' },
240
+ { code: '#26A69A' },
241
+ { code: '#009688' },
242
+ { code: '#00897B' },
243
+ { code: '#00796B' },
244
+ { code: '#00695C' },
245
+ { code: '#004D40' },
246
+ // Yellow
247
+ { code: '#FFFDE7' },
248
+ { code: '#FFF9C4' },
249
+ { code: '#FFF59D' },
250
+ { code: '#FFF176' },
251
+ { code: '#FFEE58' },
252
+ { code: '#FFEB3B' },
253
+ { code: '#FDD835' },
254
+ { code: '#FBC02D' },
255
+ { code: '#F9A825' },
256
+ { code: '#F57F17' },
257
+ ];
36
258
 
37
259
  class AXColorPaletteInputComponent extends MXBaseComponent {
38
- constructor(_parent) {
260
+ constructor(_parent, _unsubscriber) {
39
261
  super();
40
262
  this._parent = _parent;
41
- this._isTouched = false;
263
+ this._unsubscriber = _unsubscriber;
42
264
  this.isValid = true;
43
265
  this._rgba = {
44
266
  r: 0,
@@ -54,34 +276,47 @@ class AXColorPaletteInputComponent extends MXBaseComponent {
54
276
  return m.typedValue?.startsWith('#') || str == '#' ? str.trim() : '#' + str.trim();
55
277
  },
56
278
  };
57
- _parent._onInternalColorChanged$
58
- .pipe(distinctUntilChanged())
279
+ _parent.onValueChanged
280
+ .pipe(_unsubscriber.takeUntilDestroy)
281
+ .subscribe((e) => {
282
+ this.applyParent(e.isUserInteraction);
283
+ });
284
+ _parent.onOptionChanged
285
+ .pipe(_unsubscriber.takeUntilDestroy)
59
286
  .subscribe((e) => {
60
- if (!e.color) {
61
- this._hex = '';
62
- this._rgba = {
63
- r: null,
64
- g: null,
65
- b: null,
66
- a: null,
67
- };
287
+ this.cdr.markForCheck();
288
+ });
289
+ }
290
+ applyParent(u = false) {
291
+ const value = this._parent.value;
292
+ if (!value) {
293
+ this._hex = '';
294
+ this._rgba = {
295
+ r: null,
296
+ g: null,
297
+ b: null,
298
+ a: null,
299
+ };
300
+ }
301
+ else {
302
+ Object.assign(this._rgba, AXColorUtil.to(value, 'rgba'));
303
+ if (this._colorMode != 'hex' || !this._hex) {
304
+ this._hex = AXColorUtil.toString(value, 'hex');
68
305
  }
69
- else {
70
- Object.assign(this._rgba, AXColorUtil.to(e.color, 'rgba'));
71
- if (this._colorMode != 'hex' || !this._hex)
72
- this._hex = AXColorUtil.toString(e.color, 'hex');
73
- if (this._colorMode == 'hex')
74
- this._hex = e.color;
75
- if (this._rgba.a != 1 && !this._isTouched) {
76
- this._colorMode = 'rgba';
77
- }
306
+ if (this._colorMode == 'hex') {
307
+ this._hex = value;
78
308
  }
79
- this.checkValid();
80
- this.cdr.detectChanges();
81
- });
309
+ if (!u && this._rgba.a != 1) {
310
+ this._colorMode = 'rgba';
311
+ }
312
+ }
313
+ this.checkValid();
314
+ this.cdr.detectChanges();
315
+ }
316
+ ngAfterViewInit() {
317
+ this.applyParent();
82
318
  }
83
319
  _handleChangeInputMode() {
84
- this._isTouched = true;
85
320
  switch (this._colorMode) {
86
321
  case 'rgba':
87
322
  this._colorMode = 'hex';
@@ -92,71 +327,49 @@ class AXColorPaletteInputComponent extends MXBaseComponent {
92
327
  }
93
328
  }
94
329
  _handleRGBAValueChanged(e) {
95
- if (e.value == null || (e.value == 0 && !e.oldValue))
96
- return;
97
- const { r, g, b, a } = this._rgba;
98
- const _color = `rgba(${r},${g},${b},${a})`;
99
330
  if (e.isUserInteraction) {
100
- this._parent.setUserInteraction();
101
- this._isTouched = true;
331
+ this._rgba[e.name] = e.value;
332
+ const { r, g, b, a } = this._rgba;
333
+ const _color = `rgba(${r},${g},${b},${a})`;
334
+ this._parent.commitValue(AXColorUtil.toString(_color, 'rgba'), e.isUserInteraction);
102
335
  }
103
- this._parent._onInternalColorChanged$.next({
104
- color: AXColorUtil.toString(_color, 'rgba'),
105
- sender: this,
106
- });
107
336
  }
108
337
  _handleHEXAValueChanged(e) {
109
- if (!e.value && !e.oldValue)
110
- return;
111
- //
112
- if (e.isUserInteraction) {
113
- this._parent.setUserInteraction();
114
- this._isTouched = true;
115
- }
116
- //
117
- if (!e.value && e.oldValue) {
118
- this._parent._onInternalColorChanged$.next({
119
- color: null,
120
- sender: this
121
- });
122
- }
123
- else {
124
- this._parent._onInternalColorChanged$.next({
125
- color: e.value,
126
- sender: this
127
- });
338
+ if (e.isUserInteraction && e.value?.trim() != this._hex?.trim()) {
339
+ this._parent.commitValue(e.value, e.isUserInteraction);
128
340
  }
129
341
  }
130
342
  checkValid() {
131
343
  this.isValid = AXColorUtil.isValid(this._hex);
132
344
  }
133
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteInputComponent, deps: [{ token: AXColorComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
134
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: AXColorPaletteInputComponent, selector: "ax-color-palette-input", host: { classAttribute: "ax-color-palette-input" }, providers: [
345
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteInputComponent, deps: [{ token: AXColorPaletteParentComponent }, { token: i1.AXUnsubscriber }], target: i0.ɵɵFactoryTarget.Component }); }
346
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: AXColorPaletteInputComponent, selector: "ax-color-palette-input", host: { classAttribute: "ax-color-palette-input" }, providers: [
135
347
  {
136
348
  provide: AXColorPaletteChildComponent,
137
349
  useExisting: AXColorPaletteInputComponent,
138
350
  },
139
- ], usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"this._colorMode\">\n <div class=\"palette-inputs\">\n <ng-container *ngSwitchCase=\"'hex'\">\n <div>\n <ax-text-box\n class=\"ax-sm\"\n [value]=\"_hex\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n [state]=\"isValid ? 'clear' : 'error'\"\n (onValueChanged)=\"_handleHEXAValueChanged($event)\"\n [mask-options]=\"_hexMaskOptions\">\n </ax-text-box>\n <label>HEX</label>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'rgba'\">\n <div>\n <ax-number-box\n class=\"ax-sm\"\n [minValue]=\"0\"\n [maxValue]=\"255\"\n [(value)]=\"_rgba.r\"\n [showSpinButtons]=\"false\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>R</label>\n </div>\n <div>\n <ax-number-box\n class=\"ax-sm\"\n [minValue]=\"0\"\n [maxValue]=\"255\"\n [(value)]=\"_rgba.g\"\n [showSpinButtons]=\"false\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>G</label>\n </div>\n <div>\n <ax-number-box\n class=\"ax-sm\"\n [minValue]=\"0\"\n [maxValue]=\"255\"\n [(value)]=\"_rgba.b\"\n [showSpinButtons]=\"false\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>B</label>\n </div>\n <div>\n <ax-number-box\n class=\"ax-sm\"\n [minValue]=\"0\"\n [maxValue]=\"1\"\n [(value)]=\"_rgba.a\"\n [decimals]=\"2\"\n [step]=\"0.1\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n [showSpinButtons]=\"false\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>A</label>\n </div>\n </ng-container>\n </div>\n <button\n class=\"ax-general-button ax-button-rounded ax-button-icon ax-sm\"\n (click)=\"_handleChangeInputMode()\"\n [disabled]=\"_parent.disabled\">\n <span class=\"ax-icon ax-icon-unfold-more\"></span>\n </button>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "mask-options"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged"] }, { kind: "component", type: i3.AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "size", "value", "state", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "name", "checked", "thousandsSeparator", "padDecimalZeros", "step", "decimals", "decimalStep", "showSpinButtons", "minValue", "maxValue"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
351
+ AXUnsubscriber
352
+ ], usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"this._colorMode\">\n <div class=\"palette-inputs\">\n <ng-container *ngSwitchCase=\"'hex'\">\n <div>\n <ax-text-box class=\"ax-sm\" [ngModel]=\"_hex\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\"\n [state]=\"isValid ? 'clear' : 'error'\" (onValueChanged)=\"_handleHEXAValueChanged($event)\"\n [mask-options]=\"_hexMaskOptions\">\n </ax-text-box>\n <label>HEX</label>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'rgba'\">\n <div>\n <ax-number-box class=\"ax-sm\" name=\"r\" [minValue]=\"0\" [maxValue]=\"255\" [ngModel]=\"_rgba.r\"\n [showSpinButtons]=\"false\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>R</label>\n </div>\n <div>\n <ax-number-box class=\"ax-sm\" name=\"g\" [minValue]=\"0\" [maxValue]=\"255\" [ngModel]=\"_rgba.g\"\n [showSpinButtons]=\"false\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>G</label>\n </div>\n <div>\n <ax-number-box class=\"ax-sm\" name=\"b\" [minValue]=\"0\" [maxValue]=\"255\" [ngModel]=\"_rgba.b\"\n [showSpinButtons]=\"false\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>B</label>\n </div>\n <div>\n <ax-number-box class=\"ax-sm\" name=\"a\" [minValue]=\"0\" [maxValue]=\"1\" [ngModel]=\"_rgba.a\" [decimals]=\"2\"\n [step]=\"0.1\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\" [showSpinButtons]=\"false\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>A</label>\n </div>\n </ng-container>\n </div>\n <button type=\"button\" class=\"ax-general-button ax-button-rounded ax-button-icon ax-sm\"\n (click)=\"_handleChangeInputMode()\" [disabled]=\"_parent.disabled\">\n <span class=\"ax-icon ax-icon-unfold-more\"></span>\n </button>\n</ng-container>", dependencies: [{ kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "mask-options"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i5.AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "thousandsSeparator", "padDecimalZeros", "step", "decimals", "decimalStep", "showSpinButtons", "minValue", "maxValue"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
140
353
  }
141
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteInputComponent, decorators: [{
354
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteInputComponent, decorators: [{
142
355
  type: Component,
143
356
  args: [{ selector: 'ax-color-palette-input', host: { class: 'ax-color-palette-input' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
144
357
  {
145
358
  provide: AXColorPaletteChildComponent,
146
359
  useExisting: AXColorPaletteInputComponent,
147
360
  },
148
- ], template: "<ng-container [ngSwitch]=\"this._colorMode\">\n <div class=\"palette-inputs\">\n <ng-container *ngSwitchCase=\"'hex'\">\n <div>\n <ax-text-box\n class=\"ax-sm\"\n [value]=\"_hex\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n [state]=\"isValid ? 'clear' : 'error'\"\n (onValueChanged)=\"_handleHEXAValueChanged($event)\"\n [mask-options]=\"_hexMaskOptions\">\n </ax-text-box>\n <label>HEX</label>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'rgba'\">\n <div>\n <ax-number-box\n class=\"ax-sm\"\n [minValue]=\"0\"\n [maxValue]=\"255\"\n [(value)]=\"_rgba.r\"\n [showSpinButtons]=\"false\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>R</label>\n </div>\n <div>\n <ax-number-box\n class=\"ax-sm\"\n [minValue]=\"0\"\n [maxValue]=\"255\"\n [(value)]=\"_rgba.g\"\n [showSpinButtons]=\"false\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>G</label>\n </div>\n <div>\n <ax-number-box\n class=\"ax-sm\"\n [minValue]=\"0\"\n [maxValue]=\"255\"\n [(value)]=\"_rgba.b\"\n [showSpinButtons]=\"false\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>B</label>\n </div>\n <div>\n <ax-number-box\n class=\"ax-sm\"\n [minValue]=\"0\"\n [maxValue]=\"1\"\n [(value)]=\"_rgba.a\"\n [decimals]=\"2\"\n [step]=\"0.1\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n [showSpinButtons]=\"false\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>A</label>\n </div>\n </ng-container>\n </div>\n <button\n class=\"ax-general-button ax-button-rounded ax-button-icon ax-sm\"\n (click)=\"_handleChangeInputMode()\"\n [disabled]=\"_parent.disabled\">\n <span class=\"ax-icon ax-icon-unfold-more\"></span>\n </button>\n</ng-container>\n" }]
149
- }], ctorParameters: function () { return [{ type: AXColorComponent, decorators: [{
150
- type: Optional
151
- }, {
361
+ AXUnsubscriber
362
+ ], template: "<ng-container [ngSwitch]=\"this._colorMode\">\n <div class=\"palette-inputs\">\n <ng-container *ngSwitchCase=\"'hex'\">\n <div>\n <ax-text-box class=\"ax-sm\" [ngModel]=\"_hex\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\"\n [state]=\"isValid ? 'clear' : 'error'\" (onValueChanged)=\"_handleHEXAValueChanged($event)\"\n [mask-options]=\"_hexMaskOptions\">\n </ax-text-box>\n <label>HEX</label>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'rgba'\">\n <div>\n <ax-number-box class=\"ax-sm\" name=\"r\" [minValue]=\"0\" [maxValue]=\"255\" [ngModel]=\"_rgba.r\"\n [showSpinButtons]=\"false\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>R</label>\n </div>\n <div>\n <ax-number-box class=\"ax-sm\" name=\"g\" [minValue]=\"0\" [maxValue]=\"255\" [ngModel]=\"_rgba.g\"\n [showSpinButtons]=\"false\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>G</label>\n </div>\n <div>\n <ax-number-box class=\"ax-sm\" name=\"b\" [minValue]=\"0\" [maxValue]=\"255\" [ngModel]=\"_rgba.b\"\n [showSpinButtons]=\"false\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>B</label>\n </div>\n <div>\n <ax-number-box class=\"ax-sm\" name=\"a\" [minValue]=\"0\" [maxValue]=\"1\" [ngModel]=\"_rgba.a\" [decimals]=\"2\"\n [step]=\"0.1\" [disabled]=\"_parent.disabled\" [readonly]=\"_parent.readonly\" [showSpinButtons]=\"false\"\n (onValueChanged)=\"_handleRGBAValueChanged($event)\">\n </ax-number-box>\n <label>A</label>\n </div>\n </ng-container>\n </div>\n <button type=\"button\" class=\"ax-general-button ax-button-rounded ax-button-icon ax-sm\"\n (click)=\"_handleChangeInputMode()\" [disabled]=\"_parent.disabled\">\n <span class=\"ax-icon ax-icon-unfold-more\"></span>\n </button>\n</ng-container>" }]
363
+ }], ctorParameters: function () { return [{ type: AXColorPaletteParentComponent, decorators: [{
152
364
  type: Inject,
153
- args: [AXColorComponent]
154
- }] }]; } });
365
+ args: [AXColorPaletteParentComponent]
366
+ }] }, { type: i1.AXUnsubscriber }]; } });
155
367
 
156
368
  class AXColorPalettePickerComponent extends MXBaseComponent {
157
- constructor(_parent) {
369
+ constructor(_parent, _unsubscriber) {
158
370
  super();
159
371
  this._parent = _parent;
372
+ this._unsubscriber = _unsubscriber;
160
373
  this._rgba = {
161
374
  r: 0,
162
375
  g: 0,
@@ -174,54 +387,58 @@ class AXColorPalettePickerComponent extends MXBaseComponent {
174
387
  { color: 'rgb(255, 0, 255)', pos: 0.83 },
175
388
  { color: 'rgb(255, 0, 0)', pos: 1 },
176
389
  ];
390
+ this._gradients = AXColorUtil.gradient(this._gradientColors);
391
+ this._colors = this._gradients.rgb(100);
177
392
  this.dragPosition = { x: 0, y: 0 };
178
- _parent._onInternalColorChanged$
179
- .pipe(distinctUntilChanged())
393
+ _parent.onValueChanged
394
+ .pipe(_unsubscriber.takeUntilDestroy)
180
395
  .subscribe((e) => {
181
- if (!e.color) {
182
- this._rgba = {
183
- r: 0,
184
- g: 0,
185
- b: 0,
186
- a: 0,
187
- };
188
- }
189
- else {
190
- if (!AXColorUtil.equal(e.color, this._rgba)) {
191
- Object.assign(this._rgba, AXColorUtil.to(e.color, 'rgba'));
192
- }
193
- }
194
- this.setHSV();
195
- this.cdr.detectChanges();
396
+ this._handleParentColorChanged();
397
+ });
398
+ _parent.onOptionChanged
399
+ .pipe(_unsubscriber.takeUntilDestroy)
400
+ .subscribe((e) => {
401
+ this.cdr.markForCheck();
196
402
  });
197
403
  }
198
404
  setHSV() {
199
405
  const hsv = AXColorUtil.to(this._rgba, 'hsva');
406
+ const sortedH = this._colors.map(c => c.toHsv().h);
407
+ //TODO: find closest
408
+ this._gradient = sortedH.findIndex(c => { return Math.round(c) >= Math.round(hsv.h); });
200
409
  this._bgColor = AXColorUtil.toString({ h: hsv.h, s: 1, v: 1, a: this._rgba.a }, 'rgba');
201
410
  this.setPointerByPercent(hsv.s * 100, hsv.v * 100);
202
411
  }
412
+ _handleParentColorChanged() {
413
+ const color = this._parent.value;
414
+ if (!color) {
415
+ this._rgba = {
416
+ r: 0,
417
+ g: 0,
418
+ b: 0,
419
+ a: 0,
420
+ };
421
+ }
422
+ else {
423
+ if (!AXColorUtil.equal(color, this._rgba)) {
424
+ Object.assign(this._rgba, AXColorUtil.to(color, 'rgba'));
425
+ }
426
+ }
427
+ this.setHSV();
428
+ this.cdr.detectChanges();
429
+ }
203
430
  _handleAlphaChanged(e) {
204
- if (e.value != null && e.value != this._rgba.a) {
431
+ if (e.isUserInteraction && e.value != this._rgba.a) {
205
432
  const { r, g, b } = this._rgba;
206
433
  const _color = `rgba(${r},${g},${b},${e.value})`;
207
- this._parent.setUserInteraction();
208
- this._parent._onInternalColorChanged$.next({
209
- color: AXColorUtil.toString(_color, 'rgba'),
210
- sender: this,
211
- });
434
+ this._parent.commitValue(AXColorUtil.toString(_color, 'rgba'), e.isUserInteraction);
212
435
  }
213
436
  }
214
437
  _handleGradientChanged(e) {
215
- if (e.value != null && e.value != this._gradient) {
216
- const gradient = AXColorUtil.gradient(this._gradientColors);
217
- const colors = gradient.rgb(100);
438
+ if (e.isUserInteraction && e.value != this._gradient) {
218
439
  const { s, v } = AXColorUtil.to(this._rgba, "hsva");
219
- const { h } = colors[e.value].toHsv();
220
- this._parent.setUserInteraction();
221
- this._parent._onInternalColorChanged$.next({
222
- color: AXColorUtil.toString({ h, s, v, a: this._rgba.a }, 'rgba'),
223
- sender: this,
224
- });
440
+ const { h } = this._colors[e.value].toHsv();
441
+ this._parent.commitValue(AXColorUtil.toString({ h, s, v, a: this._rgba.a }, 'rgba'), e.isUserInteraction);
225
442
  }
226
443
  }
227
444
  _handleSurfaceClick(e) {
@@ -231,14 +448,15 @@ class AXColorPalettePickerComponent extends MXBaseComponent {
231
448
  return;
232
449
  }
233
450
  const surface = this.getHostElement().querySelector(".ax-color-picker-overlay");
234
- const sb = surface.getBoundingClientRect();
235
451
  const pointer = this.getHostElement().querySelector(".ax-color-picker-pointer");
236
- const pb = pointer.getBoundingClientRect();
237
452
  let x = e.offsetX;
238
453
  let y = e.offsetY;
239
454
  this.setColorByXY(x, y);
240
455
  }
241
456
  _handleDrag() {
457
+ if (this._parent.disabled || this._parent.readonly) {
458
+ return;
459
+ }
242
460
  const surface = this.getHostElement().querySelector(".ax-color-picker-overlay");
243
461
  const sb = surface.getBoundingClientRect();
244
462
  const pointer = this.getHostElement().querySelector(".ax-color-picker-pointer");
@@ -265,13 +483,12 @@ class AXColorPalettePickerComponent extends MXBaseComponent {
265
483
  s: (x / sb.width),
266
484
  v: ((sb.height - y) / sb.height)
267
485
  };
268
- this._parent._onInternalColorChanged$.next({
269
- color: AXColorUtil.toString(hsv, 'rgba'),
270
- sender: this,
271
- });
486
+ this._parent.commitValue(AXColorUtil.toString(hsv, 'rgba'), true);
272
487
  }
273
488
  setPointerByPercent(x, y) {
274
489
  const surface = this.getHostElement().querySelector(".ax-color-picker-overlay");
490
+ if (!surface)
491
+ return;
275
492
  const sb = surface.getBoundingClientRect();
276
493
  const pointer = this.getHostElement().querySelector(".ax-color-picker-pointer");
277
494
  const pb = pointer.getBoundingClientRect();
@@ -283,59 +500,65 @@ class AXColorPalettePickerComponent extends MXBaseComponent {
283
500
  y: (height - (((y * height)) / 100)) - w
284
501
  };
285
502
  }
286
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPalettePickerComponent, deps: [{ token: AXColorComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
287
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: AXColorPalettePickerComponent, selector: "ax-color-palette-picker", host: { classAttribute: "ax-color-palette-picker" }, providers: [
503
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPalettePickerComponent, deps: [{ token: AXColorPaletteParentComponent }, { token: i1.AXUnsubscriber }], target: i0.ɵɵFactoryTarget.Component }); }
504
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: AXColorPalettePickerComponent, selector: "ax-color-palette-picker", host: { classAttribute: "ax-color-palette-picker" }, providers: [
288
505
  {
289
506
  provide: AXColorPaletteChildComponent,
290
507
  useExisting: AXColorPalettePickerComponent,
291
508
  },
292
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-color-picker-overlay-trans\">\n <div class=\"ax-color-picker-overlay\" [style.background-color]=\"_bgColor\">\n <div class=\"ax-color-picker-overlay-g1\"></div>\n <div class=\"ax-color-picker-overlay-g2\" (click)=\"_handleSurfaceClick($event)\"></div>\n <div class=\"ax-color-picker-pointer\" cdkDrag cdkDragBoundary=\".ax-color-picker-overlay\" [cdkDragFreeDragPosition]=\"dragPosition\" (cdkDragEnded)=\"_handleDrag()\" \n [cdkDragDisabled]=\"_parent.disabled || _parent.readonly\">\n\n </div>\n </div>\n</div>\n<ax-range-slider class=\"ax-color-picker-gradient\" [minValue]=\"0\" [maxValue]=\"99\" [step]=\"1\" [value]=\"_gradient\" \n (onValueChanged)=\"_handleGradientChanged($event)\" \n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\">\n</ax-range-slider>\n<ax-range-slider class=\"ax-color-picker-transparent\" [minValue]=\"0\" [maxValue]=\"1\" [step]=\"0.01\" [value]=\"_rgba.a\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleAlphaChanged($event)\">\n</ax-range-slider>", dependencies: [{ kind: "component", type: i1$1.AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["readonly", "disabled", "value", "name", "minValue", "maxValue", "step", "color", "oriantaion"], outputs: ["valueChange", "onValueChanged", "colorChange"] }, { kind: "directive", type: i2$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
509
+ AXUnsubscriber
510
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-color-picker-overlay-trans\">\n <div class=\"ax-color-picker-overlay\" [style.background-color]=\"_bgColor\">\n <div class=\"ax-color-picker-overlay-g1\"></div>\n <div class=\"ax-color-picker-overlay-g2\" (click)=\"_handleSurfaceClick($event)\"></div>\n <div class=\"ax-color-picker-pointer\" cdkDrag cdkDragBoundary=\".ax-color-picker-overlay\" [cdkDragFreeDragPosition]=\"dragPosition\" (cdkDragEnded)=\"_handleDrag()\" \n [cdkDragDisabled]=\"_parent.disabled || _parent.readonly\">\n </div>\n </div>\n</div>\n<ax-range-slider class=\"ax-color-picker-gradient\" [minValue]=\"0\" [maxValue]=\"100\" [step]=\"1\" \n [ngModel]=\"_gradient\" \n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleGradientChanged($event)\" >\n</ax-range-slider>\n<ax-range-slider class=\"ax-color-picker-transparent\" [minValue]=\"0\" [maxValue]=\"1\" [step]=\"0.01\" \n [ngModel]=\"_rgba.a\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleAlphaChanged($event)\">\n</ax-range-slider>", dependencies: [{ kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.AXRangeSliderComponent, selector: "ax-range-slider", inputs: ["readonly", "disabled", "value", "name", "minValue", "maxValue", "step", "color", "oriantaion"], outputs: ["valueChange", "onValueChanged", "readonlyChange", "disabledChange", "colorChange"] }, { kind: "directive", type: i4$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
293
511
  }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPalettePickerComponent, decorators: [{
512
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPalettePickerComponent, decorators: [{
295
513
  type: Component,
296
514
  args: [{ selector: 'ax-color-palette-picker', host: { class: 'ax-color-palette-picker' }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
297
515
  {
298
516
  provide: AXColorPaletteChildComponent,
299
517
  useExisting: AXColorPalettePickerComponent,
300
518
  },
301
- ], template: "<div class=\"ax-color-picker-overlay-trans\">\n <div class=\"ax-color-picker-overlay\" [style.background-color]=\"_bgColor\">\n <div class=\"ax-color-picker-overlay-g1\"></div>\n <div class=\"ax-color-picker-overlay-g2\" (click)=\"_handleSurfaceClick($event)\"></div>\n <div class=\"ax-color-picker-pointer\" cdkDrag cdkDragBoundary=\".ax-color-picker-overlay\" [cdkDragFreeDragPosition]=\"dragPosition\" (cdkDragEnded)=\"_handleDrag()\" \n [cdkDragDisabled]=\"_parent.disabled || _parent.readonly\">\n\n </div>\n </div>\n</div>\n<ax-range-slider class=\"ax-color-picker-gradient\" [minValue]=\"0\" [maxValue]=\"99\" [step]=\"1\" [value]=\"_gradient\" \n (onValueChanged)=\"_handleGradientChanged($event)\" \n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\">\n</ax-range-slider>\n<ax-range-slider class=\"ax-color-picker-transparent\" [minValue]=\"0\" [maxValue]=\"1\" [step]=\"0.01\" [value]=\"_rgba.a\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleAlphaChanged($event)\">\n</ax-range-slider>" }]
302
- }], ctorParameters: function () { return [{ type: AXColorComponent, decorators: [{
303
- type: Optional
304
- }, {
519
+ AXUnsubscriber
520
+ ], template: "<div class=\"ax-color-picker-overlay-trans\">\n <div class=\"ax-color-picker-overlay\" [style.background-color]=\"_bgColor\">\n <div class=\"ax-color-picker-overlay-g1\"></div>\n <div class=\"ax-color-picker-overlay-g2\" (click)=\"_handleSurfaceClick($event)\"></div>\n <div class=\"ax-color-picker-pointer\" cdkDrag cdkDragBoundary=\".ax-color-picker-overlay\" [cdkDragFreeDragPosition]=\"dragPosition\" (cdkDragEnded)=\"_handleDrag()\" \n [cdkDragDisabled]=\"_parent.disabled || _parent.readonly\">\n </div>\n </div>\n</div>\n<ax-range-slider class=\"ax-color-picker-gradient\" [minValue]=\"0\" [maxValue]=\"100\" [step]=\"1\" \n [ngModel]=\"_gradient\" \n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleGradientChanged($event)\" >\n</ax-range-slider>\n<ax-range-slider class=\"ax-color-picker-transparent\" [minValue]=\"0\" [maxValue]=\"1\" [step]=\"0.01\" \n [ngModel]=\"_rgba.a\"\n [disabled]=\"_parent.disabled\"\n [readonly]=\"_parent.readonly\"\n (onValueChanged)=\"_handleAlphaChanged($event)\">\n</ax-range-slider>" }]
521
+ }], ctorParameters: function () { return [{ type: AXColorPaletteParentComponent, decorators: [{
305
522
  type: Inject,
306
- args: [AXColorComponent]
307
- }] }]; } });
523
+ args: [AXColorPaletteParentComponent]
524
+ }] }, { type: i1.AXUnsubscriber }]; } });
308
525
 
309
526
  class AXColorPalettePreviewComponent extends MXBaseComponent {
310
- constructor(_parent, _zone) {
527
+ constructor(_parent, _zone, _unsubscriber) {
311
528
  super();
312
529
  this._parent = _parent;
313
530
  this._zone = _zone;
314
- _parent._onInternalColorChanged$
315
- .pipe(distinctUntilChanged())
531
+ this._unsubscriber = _unsubscriber;
532
+ _parent.onValueChanged
533
+ .pipe(_unsubscriber.takeUntilDestroy)
316
534
  .subscribe((e) => {
317
- _zone.runOutsideAngular(() => {
318
- const inner = this.getHostElement().firstElementChild;
319
- inner.style.backgroundColor = e.color;
320
- inner.innerText = AXColorUtil.toString(e.color);
321
- const color = AXColorUtil.toString(e.color, 'hex');
322
- const ratio = AXColorUtil.contrastToWhite(color);
323
- this.getHostElement().style.color = !(ratio > 2.0) ? '#000' : '#fff';
324
- });
535
+ _zone.runOutsideAngular(this.applyParent.bind(this));
325
536
  });
326
537
  }
327
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPalettePreviewComponent, deps: [{ token: AXColorComponent, optional: true }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
328
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: AXColorPalettePreviewComponent, selector: "ax-color-palette-preview", host: { classAttribute: "ax-color-palette-preview" }, providers: [
538
+ ngAfterViewInit() {
539
+ this.applyParent();
540
+ }
541
+ applyParent() {
542
+ const inner = this.getHostElement().firstElementChild;
543
+ inner.style.backgroundColor = this._parent.value;
544
+ inner.innerText = AXColorUtil.toString(this._parent.value);
545
+ const color = AXColorUtil.toString(this._parent.value, 'hex');
546
+ const ratio = AXColorUtil.contrastToWhite(color);
547
+ this.getHostElement().style.color = !(ratio > 2.0) ? '#000' : '#fff';
548
+ }
549
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPalettePreviewComponent, deps: [{ token: AXColorPaletteParentComponent }, { token: i0.NgZone }, { token: i1.AXUnsubscriber }], target: i0.ɵɵFactoryTarget.Component }); }
550
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: AXColorPalettePreviewComponent, selector: "ax-color-palette-preview", host: { classAttribute: "ax-color-palette-preview" }, providers: [
329
551
  {
330
552
  provide: AXColorPaletteChildComponent,
331
553
  useExisting: AXColorPalettePreviewComponent,
332
554
  },
555
+ AXUnsubscriber
333
556
  ], usesInheritance: true, ngImport: i0, template: `<div
334
557
  class="palette-preview-overlay"
335
558
  [class.ax-state-disabled]="_parent.disabled"
336
559
  ></div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
337
560
  }
338
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPalettePreviewComponent, decorators: [{
561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPalettePreviewComponent, decorators: [{
339
562
  type: Component,
340
563
  args: [{
341
564
  selector: 'ax-color-palette-preview',
@@ -351,281 +574,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
351
574
  provide: AXColorPaletteChildComponent,
352
575
  useExisting: AXColorPalettePreviewComponent,
353
576
  },
577
+ AXUnsubscriber
354
578
  ],
355
579
  }]
356
- }], ctorParameters: function () { return [{ type: AXColorComponent, decorators: [{
357
- type: Optional
358
- }, {
580
+ }], ctorParameters: function () { return [{ type: AXColorPaletteParentComponent, decorators: [{
359
581
  type: Inject,
360
- args: [AXColorComponent]
361
- }] }, { type: i0.NgZone }]; } });
582
+ args: [AXColorPaletteParentComponent]
583
+ }] }, { type: i0.NgZone }, { type: i1.AXUnsubscriber }]; } });
362
584
 
363
585
  class AXColorPaletteSwatchesComponent extends MXBaseComponent {
364
- constructor(_parent) {
586
+ constructor(_parent, _unsubscriber) {
365
587
  super();
366
588
  this._parent = _parent;
589
+ this._unsubscriber = _unsubscriber;
367
590
  this.colors = [];
368
- this._defaultPalette = [
369
- { code: '#ffffff' },
370
- { code: '#000000' },
371
- { code: '#9E9E9E' },
372
- { code: '#FFC107' },
373
- { code: '#607D8B' },
374
- { code: '#2196F3' },
375
- { code: '#FF5722' },
376
- { code: '#4CAF50' },
377
- { code: '#9c27b0' },
378
- { code: '#3F51B5' },
379
- // Amber
380
- { code: '#fff8e1' },
381
- { code: '#ffecb3' },
382
- { code: '#ffe082' },
383
- { code: '#ffd54f' },
384
- { code: '#ffca28' },
385
- { code: '#ffc107' },
386
- { code: '#ffb300' },
387
- { code: '#ffa000' },
388
- { code: '#ff8f00' },
389
- { code: '#ff6f00' },
390
- // Blue Grey
391
- { code: '#ECEFF1' },
392
- { code: '#CFD8DC' },
393
- { code: '#B0BEC5' },
394
- { code: '#90A4AE' },
395
- { code: '#78909C' },
396
- { code: '#607D8B' },
397
- { code: '#546E7A' },
398
- { code: '#455A64' },
399
- { code: '#37474F' },
400
- { code: '#263238' },
401
- // Blue
402
- { code: '#E3F2FD' },
403
- { code: '#BBDEFB' },
404
- { code: '#90CAF9' },
405
- { code: '#64B5F6' },
406
- { code: '#42A5F5' },
407
- { code: '#2196F3' },
408
- { code: '#1E88E5' },
409
- { code: '#1976D2' },
410
- { code: '#1565C0' },
411
- { code: '#0D47A1' },
412
- // Brown
413
- { code: '#EFEBE9' },
414
- { code: '#D7CCC8' },
415
- { code: '#BCAAA4' },
416
- { code: '#A1887F' },
417
- { code: '#8D6E63' },
418
- { code: '#795548' },
419
- { code: '#6D4C41' },
420
- { code: '#5D4037' },
421
- { code: '#4E342E' },
422
- { code: '#3E2723' },
423
- // Cyan
424
- { code: '#E0F7FA' },
425
- { code: '#B2EBF2' },
426
- { code: '#80DEEA' },
427
- { code: '#4DD0E1' },
428
- { code: '#26C6DA' },
429
- { code: '#00BCD4' },
430
- { code: '#00ACC1' },
431
- { code: '#0097A7' },
432
- { code: '#00838F' },
433
- { code: '#006064' },
434
- // Deep Orange
435
- { code: '#FBE9E7' },
436
- { code: '#FFCCBC' },
437
- { code: '#FFAB91' },
438
- { code: '#FF8A65' },
439
- { code: '#FF7043' },
440
- { code: '#FF5722' },
441
- { code: '#F4511E' },
442
- { code: '#E64A19' },
443
- { code: '#D84315' },
444
- { code: '#BF360C' },
445
- // Deep Purple
446
- { code: '#EDE7F6' },
447
- { code: '#D1C4E9' },
448
- { code: '#B39DDB' },
449
- { code: '#9575CD' },
450
- { code: '#7E57C2' },
451
- { code: '#673AB7' },
452
- { code: '#5E35B1' },
453
- { code: '#512DA8' },
454
- { code: '#4527A0' },
455
- { code: '#311B92' },
456
- // Green
457
- { code: '#E8F5E9' },
458
- { code: '#C8E6C9' },
459
- { code: '#A5D6A7' },
460
- { code: '#81C784' },
461
- { code: '#66BB6A' },
462
- { code: '#4CAF50' },
463
- { code: '#43A047' },
464
- { code: '#388E3C' },
465
- { code: '#2E7D32' },
466
- { code: '#1B5E20' },
467
- // Grey
468
- { code: '#FAFAFA' },
469
- { code: '#F5F5F5' },
470
- { code: '#EEEEEE' },
471
- { code: '#E0E0E0' },
472
- { code: '#BDBDBD' },
473
- { code: '#9E9E9E' },
474
- { code: '#757575' },
475
- { code: '#616161' },
476
- { code: '#424242' },
477
- { code: '#212121' },
478
- // Indigo
479
- { code: '#E8EAF6' },
480
- { code: '#C5CAE9' },
481
- { code: '#9FA8DA' },
482
- { code: '#7986CB' },
483
- { code: '#5C6BC0' },
484
- { code: '#3F51B5' },
485
- { code: '#3949AB' },
486
- { code: '#303F9F' },
487
- { code: '#283593' },
488
- { code: '#1A237E' },
489
- // Light Blue
490
- { code: '#E1F5FE' },
491
- { code: '#B3E5FC' },
492
- { code: '#81D4FA' },
493
- { code: '#4FC3F7' },
494
- { code: '#29B6F6' },
495
- { code: '#03A9F4' },
496
- { code: '#039BE5' },
497
- { code: '#0288D1' },
498
- { code: '#0277BD' },
499
- { code: '#01579B' },
500
- // Light Green
501
- { code: '#F1F8E9' },
502
- { code: '#DCEDC8' },
503
- { code: '#C5E1A5' },
504
- { code: '#AED581' },
505
- { code: '#9CCC65' },
506
- { code: '#8BC34A' },
507
- { code: '#7CB342' },
508
- { code: '#689F38' },
509
- { code: '#558B2F' },
510
- { code: '#33691E' },
511
- // Lime
512
- { code: '#F9FBE7' },
513
- { code: '#F0F4C3' },
514
- { code: '#E6EE9C' },
515
- { code: '#DCE775' },
516
- { code: '#D4E157' },
517
- { code: '#CDDC39' },
518
- { code: '#C0CA33' },
519
- { code: '#AFB42B' },
520
- { code: '#9E9D24' },
521
- { code: '#827717' },
522
- // Orange
523
- { code: '#FFF3E0' },
524
- { code: '#FFE0B2' },
525
- { code: '#FFCC80' },
526
- { code: '#FFB74D' },
527
- { code: '#FFA726' },
528
- { code: '#FF9800' },
529
- { code: '#FB8C00' },
530
- { code: '#F57C00' },
531
- { code: '#EF6C00' },
532
- { code: '#E65100' },
533
- // Pink
534
- { code: '#FCE4EC' },
535
- { code: '#F8BBD0' },
536
- { code: '#F48FB1' },
537
- { code: '#F06292' },
538
- { code: '#EC407A' },
539
- { code: '#E91E63' },
540
- { code: '#D81B60' },
541
- { code: '#C2185B' },
542
- { code: '#AD1457' },
543
- { code: '#880E4F' },
544
- // Purple
545
- { code: '#F3E5F5' },
546
- { code: '#E1BEE7' },
547
- { code: '#CE93D8' },
548
- { code: '#BA68C8' },
549
- { code: '#AB47BC' },
550
- { code: '#9C27B0' },
551
- { code: '#8E24AA' },
552
- { code: '#7B1FA2' },
553
- { code: '#6A1B9A' },
554
- { code: '#4A148C' },
555
- // Red
556
- { code: '#FFEBEE' },
557
- { code: '#FFCDD2' },
558
- { code: '#EF9A9A' },
559
- { code: '#E57373' },
560
- { code: '#EF5350' },
561
- { code: '#F44336' },
562
- { code: '#E53935' },
563
- { code: '#D32F2F' },
564
- { code: '#C62828' },
565
- { code: '#B71C1C' },
566
- // Teal
567
- { code: '#E0F2F1' },
568
- { code: '#B2DFDB' },
569
- { code: '#80CBC4' },
570
- { code: '#4DB6AC' },
571
- { code: '#26A69A' },
572
- { code: '#009688' },
573
- { code: '#00897B' },
574
- { code: '#00796B' },
575
- { code: '#00695C' },
576
- { code: '#004D40' },
577
- // Yellow
578
- { code: '#FFFDE7' },
579
- { code: '#FFF9C4' },
580
- { code: '#FFF59D' },
581
- { code: '#FFF176' },
582
- { code: '#FFEE58' },
583
- { code: '#FFEB3B' },
584
- { code: '#FDD835' },
585
- { code: '#FBC02D' },
586
- { code: '#F9A825' },
587
- { code: '#F57F17' },
588
- ];
589
- _parent?._onInternalColorChanged$.pipe(distinctUntilChanged()).subscribe((e) => {
590
- this._selected = AXColorUtil.toString(e.color, 'hex').toLowerCase();
591
- this.cdr.detectChanges();
591
+ _parent.onValueChanged
592
+ .pipe(_unsubscriber.takeUntilDestroy)
593
+ .pipe(distinctUntilChanged())
594
+ .subscribe((e) => {
595
+ this.applyParent();
592
596
  });
593
597
  }
598
+ applyParent() {
599
+ this._selected = AXColorUtil.toString(this._parent.value, 'hex').toLowerCase();
600
+ this.cdr.detectChanges();
601
+ }
594
602
  ngOnInit() {
595
603
  const isFav = this.getHostElement().tagName.toLowerCase() == 'ax-color-palette-favorite';
596
604
  if (!isFav && this.colors.length == 0) {
597
- this.colors = this._defaultPalette.map((c) => this._format(c));
605
+ this.colors = AXDefaultColorPalette.map((c) => this._format(c));
598
606
  }
599
607
  }
608
+ ngAfterViewInit() {
609
+ this.applyParent();
610
+ }
600
611
  _handleClick(e, color) {
601
612
  if (this._parent.disabled || this._parent.readonly)
602
613
  return;
603
- this._parent.setUserInteraction();
604
- this._parent._onInternalColorChanged$.next({
605
- color: color.code,
606
- sender: this,
607
- });
614
+ this._parent.commitValue(color.code, true);
608
615
  }
609
616
  _format(color) {
610
617
  return {
611
618
  code: color.code.toLowerCase(),
612
619
  };
613
620
  }
614
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteSwatchesComponent, deps: [{ token: AXColorComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
615
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: AXColorPaletteSwatchesComponent, selector: "ax-color-palette-swatches, ax-color-palette-favorite", inputs: { colors: "colors" }, providers: [
621
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteSwatchesComponent, deps: [{ token: AXColorPaletteParentComponent }, { token: i1.AXUnsubscriber }], target: i0.ɵɵFactoryTarget.Component }); }
622
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: AXColorPaletteSwatchesComponent, selector: "ax-color-palette-swatches, ax-color-palette-favorite", inputs: { colors: "colors" }, providers: [
616
623
  {
617
624
  provide: AXColorPaletteChildComponent,
618
625
  useExisting: AXColorPaletteSwatchesComponent,
619
626
  },
627
+ AXUnsubscriber
620
628
  ], usesInheritance: true, ngImport: i0, template: ` <div
621
629
  *ngFor="let color of colors"
622
630
  [style.background-color]="color.code"
623
631
  [attr.title]="color.code"
624
632
  [class.ax-state-selected]="color.code == _selected"
625
633
  (click)="_handleClick($event, color)"
626
- ></div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
634
+ ></div>`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
627
635
  }
628
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteSwatchesComponent, decorators: [{
636
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteSwatchesComponent, decorators: [{
629
637
  type: Component,
630
638
  args: [{
631
639
  selector: 'ax-color-palette-swatches, ax-color-palette-favorite',
@@ -643,62 +651,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
643
651
  provide: AXColorPaletteChildComponent,
644
652
  useExisting: AXColorPaletteSwatchesComponent,
645
653
  },
654
+ AXUnsubscriber
646
655
  ],
647
656
  }]
648
- }], ctorParameters: function () { return [{ type: AXColorComponent, decorators: [{
649
- type: Optional
650
- }, {
657
+ }], ctorParameters: function () { return [{ type: AXColorPaletteParentComponent, decorators: [{
651
658
  type: Inject,
652
- args: [AXColorComponent]
653
- }] }]; }, propDecorators: { colors: [{
659
+ args: [AXColorPaletteParentComponent]
660
+ }] }, { type: i1.AXUnsubscriber }]; }, propDecorators: { colors: [{
654
661
  type: Input
655
662
  }] } });
656
663
 
657
- class AXColorPalleteComponent extends classes(MXInteractiveComponent, (MXValueComponent)) {
658
- ngAfterContentInit() {
659
- this._children.changes.subscribe(() => {
660
- this._onInternalColorChanged$.next({
661
- color: this.value,
662
- sender: this,
663
- });
664
- });
665
- }
666
- ngAfterViewInit() {
667
- this._onInternalColorChanged$.next({
668
- color: this.value,
669
- sender: this,
670
- });
671
- }
672
- constructor() {
673
- super();
674
- this._onInternalColorChanged$ = new Subject();
675
- //
676
- this._onInternalColorChanged$.pipe(distinctUntilChanged()).subscribe((e) => {
677
- if (this.disabled || this.readonly)
678
- return;
679
- this.value = e.color;
680
- this.cdr.markForCheck();
681
- });
682
- //
683
- this.onValueChanged.subscribe(this._handleOnValueChanged.bind(this));
684
- }
685
- _handleOnValueChanged(e) {
686
- this._onInternalColorChanged$.next({
687
- color: this.value,
688
- mode: e.value?.startsWith('#') ? 'hex' : 'rgba',
689
- sender: this,
690
- });
691
- }
664
+ class AXColorPalleteComponent extends MXValueComponent {
692
665
  get __hostDisabled() {
693
666
  return this.disabled;
694
667
  }
695
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPalleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
696
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.5", type: AXColorPalleteComponent, selector: "ax-color-palette", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", value: "value", state: "state", name: "name", checked: "checked" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged" }, host: { properties: { "class.ax-state-disabled": "this.__hostDisabled" } }, providers: [{ provide: AXColorComponent, useExisting: AXColorPalleteComponent }], queries: [{ propertyName: "_children", predicate: AXColorPaletteChildComponent }], usesInheritance: true, ngImport: i0, template: "<ng-content select='ax-header'></ng-content>\n\n<ng-container [ngTemplateOutlet]=\"default\" *ngIf=\"!_children.length\"></ng-container>\n<ng-container [ngTemplateOutlet]=\"custom\" *ngIf=\"_children.length\"></ng-container>\n\n<ng-template #custom>\n <ng-content select='ax-color-palette-preview'></ng-content>\n <ng-content select='ax-color-palette-picker'></ng-content>\n <ng-content select='ax-color-palette-swatches'></ng-content>\n <ng-content select='ax-color-palette-favorite'></ng-content>\n <ng-content select='ax-color-palette-input'></ng-content>\n</ng-template>\n<ng-template #default>\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-swatches></ax-color-palette-swatches>\n <ax-color-palette-input></ax-color-palette-input>\n</ng-template>\n\n<ng-content select='ax-footer'></ng-content>\n\n\n", styles: ["ax-color-palette{display:flex;flex-direction:column;border:1px solid;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);width:18rem}@media (min-width: 600px){ax-color-palette{width:20rem!important}}@media (min-width: 1200px){ax-color-palette{width:18rem!important}}@media (max-width: 599px){ax-color-palette{width:100%!important}}ax-color-palette.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-color-palette.ax-state-disabled ax-color-palette-swatches div:hover,ax-color-palette.ax-state-disabled ax-color-palette-swatches div.ax-state-selected,ax-color-palette.ax-state-disabled ax-color-palette-favorite div:hover,ax-color-palette.ax-state-disabled ax-color-palette-favorite div.ax-state-selected{opacity:.5;cursor:not-allowed}ax-color-palette ax-header,ax-color-palette ax-footer{padding:.75rem;border-top-width:1px;display:flex}ax-color-palette ax-color-palette-preview{position:relative;width:100%;height:6rem;gap:.5;border-top-left-radius:var(--ax-rounded-border-default);border-top-right-radius:var(--ax-rounded-border-default);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=) left center}ax-color-palette ax-color-palette-preview .palette-preview-overlay{position:absolute;left:0;width:100%;height:100%;display:flex;align-items:center;text-transform:uppercase;justify-content:center;border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));box-shadow:0 1px 8px #00000029;text-shadow:0px 0px 14px rgba(0,0,0,.5)}ax-color-palette ax-color-palette-favorite{display:block;border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-swatches,ax-color-palette ax-color-palette-favorite{display:grid;padding:.5rem;grid-template-columns:repeat(10,minmax(0,1fr));max-height:9rem;overflow-x:hidden;gap:.5rem}ax-color-palette ax-color-palette-swatches div,ax-color-palette ax-color-palette-favorite div{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:99rem;border:1px solid rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-swatches div:before,ax-color-palette ax-color-palette-favorite div:before{content:\"\";padding-top:100%;float:left}ax-color-palette ax-color-palette-swatches div:after,ax-color-palette ax-color-palette-favorite div:after{content:\"\";display:block;clear:both}ax-color-palette ax-color-palette-swatches div:hover,ax-color-palette ax-color-palette-swatches div.ax-state-selected,ax-color-palette ax-color-palette-favorite div:hover,ax-color-palette ax-color-palette-favorite div.ax-state-selected{outline-offset:2px;outline-width:1px;outline-style:solid;outline-color:rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-input{display:flex;gap:.5rem;padding:.5rem}ax-color-palette ax-color-palette-input .palette-inputs{display:flex;flex:1 1 0%;gap:.5rem}ax-color-palette ax-color-palette-input .palette-inputs div{width:100%;text-align:center}ax-color-palette ax-color-palette-input .palette-inputs div label{margin-top:.75rem;font-size:.75rem;line-height:1.25rem}ax-color-palette ax-color-palette-picker{display:flex;flex-direction:column;gap:.5rem;padding:.5rem}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay-trans{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=)}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay{display:block;width:100%;height:8rem;position:relative}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-pointer{width:.75rem;height:.75rem;border-radius:99rem;background-color:transparent;border:1px solid rgba(var(--ax-color-background-default));position:relative;z-index:1}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g1,ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g2{height:100%;width:100%;position:absolute;inset:0}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g1{z-index:0;background:linear-gradient(to right,#fff 0%,rgba(255,255,255,0) 100%)}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g2{z-index:1;background:linear-gradient(to bottom,transparent 0%,#000 100%)}ax-color-palette ax-color-palette-picker .ax-range-slider.ax-color-picker-gradient input{background:linear-gradient(to right,rgb(255,0,0) 0%,rgb(255,255,0) 17%,rgb(0,255,0) 33%,rgb(0,255,255) 50%,rgb(0,0,255) 67%,rgb(255,0,255) 83%,rgb(255,0,0) 100%)}ax-color-palette ax-color-palette-picker .ax-range-slider.ax-color-picker-transparent input{background-image:linear-gradient(to right,rgba(245,246,252,0),rgb(0,0,0)),url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXColorPalettePreviewComponent, selector: "ax-color-palette-preview" }, { kind: "component", type: AXColorPaletteSwatchesComponent, selector: "ax-color-palette-swatches, ax-color-palette-favorite", inputs: ["colors"] }, { kind: "component", type: AXColorPaletteInputComponent, selector: "ax-color-palette-input" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
668
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPalleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
669
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: AXColorPalleteComponent, selector: "ax-color-palette", inputs: { disabled: "disabled", tabIndex: "tabIndex", readonly: "readonly", value: "value", state: "state", name: "name", checked: "checked" }, outputs: { onBlur: "onBlur", onFocus: "onFocus", valueChange: "valueChange", stateChange: "stateChange", onValueChanged: "onValueChanged", readonlyChange: "readonlyChange", disabledChange: "disabledChange" }, host: { properties: { "class.ax-state-disabled": "this.__hostDisabled" } }, providers: [
670
+ {
671
+ provide: NG_VALUE_ACCESSOR,
672
+ useExisting: forwardRef(() => AXColorPalleteComponent),
673
+ multi: true
674
+ },
675
+ {
676
+ provide: AXColorPaletteParentComponent,
677
+ useExisting: AXColorPalleteComponent,
678
+ },
679
+ ], queries: [{ propertyName: "_children", predicate: AXColorPaletteChildComponent }], usesInheritance: true, ngImport: i0, template: "<ng-content select='ax-header'></ng-content>\n\n<ng-container [ngTemplateOutlet]=\"default\" *ngIf=\"!_children?.length\"></ng-container>\n<ng-container [ngTemplateOutlet]=\"custom\" *ngIf=\"_children?.length\"></ng-container>\n\n<ng-template #custom>\n <ng-content select='ax-color-palette-preview'></ng-content>\n <ng-content select='ax-color-palette-picker'></ng-content>\n <ng-content select='ax-color-palette-swatches'></ng-content>\n <ng-content select='ax-color-palette-favorite'></ng-content>\n <ng-content select='ax-color-palette-input'></ng-content>\n</ng-template>\n<ng-template #default>\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-swatches></ax-color-palette-swatches>\n <ax-color-palette-input></ax-color-palette-input>\n</ng-template>\n<ng-content select='ax-footer'></ng-content>", styles: ["ax-color-palette{display:flex;flex-direction:column;border:1px solid;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);width:18rem}@media (min-width: 600px){ax-color-palette{width:20rem!important}}@media (min-width: 1200px){ax-color-palette{width:18rem!important}}@media (max-width: 599px){ax-color-palette{width:100%!important}}ax-color-palette.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-color-palette.ax-state-disabled ax-color-palette-swatches div:hover,ax-color-palette.ax-state-disabled ax-color-palette-swatches div.ax-state-selected,ax-color-palette.ax-state-disabled ax-color-palette-favorite div:hover,ax-color-palette.ax-state-disabled ax-color-palette-favorite div.ax-state-selected{opacity:.5;cursor:not-allowed}ax-color-palette ax-header,ax-color-palette ax-footer{padding:.75rem;border-top-width:1px;display:flex}ax-color-palette ax-color-palette-preview{position:relative;width:100%;height:6rem;gap:.5;border-top-left-radius:var(--ax-rounded-border-default);border-top-right-radius:var(--ax-rounded-border-default);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=) left center}ax-color-palette ax-color-palette-preview .palette-preview-overlay{position:absolute;left:0;width:100%;height:100%;display:flex;align-items:center;text-transform:uppercase;justify-content:center;border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));box-shadow:0 1px 8px #00000029;text-shadow:0px 0px 14px rgba(0,0,0,.5)}ax-color-palette ax-color-palette-favorite{display:block;border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-swatches,ax-color-palette ax-color-palette-favorite{display:grid;padding:.5rem;grid-template-columns:repeat(10,minmax(0,1fr));max-height:9rem;overflow-x:hidden;gap:.5rem}ax-color-palette ax-color-palette-swatches div,ax-color-palette ax-color-palette-favorite div{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:99rem;border:1px solid rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-swatches div:before,ax-color-palette ax-color-palette-favorite div:before{content:\"\";padding-top:100%;float:left}ax-color-palette ax-color-palette-swatches div:after,ax-color-palette ax-color-palette-favorite div:after{content:\"\";display:block;clear:both}ax-color-palette ax-color-palette-swatches div:hover,ax-color-palette ax-color-palette-swatches div.ax-state-selected,ax-color-palette ax-color-palette-favorite div:hover,ax-color-palette ax-color-palette-favorite div.ax-state-selected{outline-offset:2px;outline-width:1px;outline-style:solid;outline-color:rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-input{display:flex;gap:.5rem;padding:.5rem}ax-color-palette ax-color-palette-input .palette-inputs{display:flex;flex:1 1 0%;gap:.5rem}ax-color-palette ax-color-palette-input .palette-inputs div{width:100%;text-align:center}ax-color-palette ax-color-palette-input .palette-inputs div label{margin-top:.75rem;font-size:.75rem;line-height:1.25rem}ax-color-palette ax-color-palette-input .palette-inputs .ax-editor-container .ax-input{padding:0}ax-color-palette ax-color-palette-picker{display:flex;flex-direction:column;gap:.5rem;padding:.5rem}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay-trans{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=)}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay{display:block;width:100%;height:8rem;position:relative}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-pointer{width:.75rem;height:.75rem;border-radius:99rem;background-color:transparent;border:1px solid rgba(var(--ax-color-background-default));position:relative;z-index:1}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g1,ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g2{height:100%;width:100%;position:absolute;inset:0}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g1{z-index:0;background:linear-gradient(to right,#fff 0%,rgba(255,255,255,0) 100%)}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g2{z-index:1;background:linear-gradient(to bottom,transparent 0%,#000 100%)}ax-color-palette ax-color-palette-picker .ax-range-slider.ax-color-picker-gradient input{background:linear-gradient(to right,rgb(255,0,0) 0%,rgb(255,255,0) 17%,rgb(0,255,0) 33%,rgb(0,255,255) 50%,rgb(0,0,255) 67%,rgb(255,0,255) 83%,rgb(255,0,0) 100%)}ax-color-palette ax-color-palette-picker .ax-range-slider.ax-color-picker-transparent input{background-image:linear-gradient(to right,rgba(245,246,252,0),rgb(0,0,0)),url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=)}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AXColorPalettePreviewComponent, selector: "ax-color-palette-preview" }, { kind: "component", type: AXColorPaletteSwatchesComponent, selector: "ax-color-palette-swatches, ax-color-palette-favorite", inputs: ["colors"] }, { kind: "component", type: AXColorPaletteInputComponent, selector: "ax-color-palette-input" }, { kind: "component", type: AXColorPalettePickerComponent, selector: "ax-color-palette-picker" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
697
680
  }
698
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPalleteComponent, decorators: [{
681
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPalleteComponent, decorators: [{
699
682
  type: Component,
700
- args: [{ selector: 'ax-color-palette', inputs: ['disabled', 'tabIndex', 'readonly', 'value', 'state', 'name', 'checked'], outputs: ['onBlur', 'onFocus', 'valueChange', 'stateChange', 'onValueChanged'], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: AXColorComponent, useExisting: AXColorPalleteComponent }], template: "<ng-content select='ax-header'></ng-content>\n\n<ng-container [ngTemplateOutlet]=\"default\" *ngIf=\"!_children.length\"></ng-container>\n<ng-container [ngTemplateOutlet]=\"custom\" *ngIf=\"_children.length\"></ng-container>\n\n<ng-template #custom>\n <ng-content select='ax-color-palette-preview'></ng-content>\n <ng-content select='ax-color-palette-picker'></ng-content>\n <ng-content select='ax-color-palette-swatches'></ng-content>\n <ng-content select='ax-color-palette-favorite'></ng-content>\n <ng-content select='ax-color-palette-input'></ng-content>\n</ng-template>\n<ng-template #default>\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-swatches></ax-color-palette-swatches>\n <ax-color-palette-input></ax-color-palette-input>\n</ng-template>\n\n<ng-content select='ax-footer'></ng-content>\n\n\n", styles: ["ax-color-palette{display:flex;flex-direction:column;border:1px solid;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);width:18rem}@media (min-width: 600px){ax-color-palette{width:20rem!important}}@media (min-width: 1200px){ax-color-palette{width:18rem!important}}@media (max-width: 599px){ax-color-palette{width:100%!important}}ax-color-palette.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-color-palette.ax-state-disabled ax-color-palette-swatches div:hover,ax-color-palette.ax-state-disabled ax-color-palette-swatches div.ax-state-selected,ax-color-palette.ax-state-disabled ax-color-palette-favorite div:hover,ax-color-palette.ax-state-disabled ax-color-palette-favorite div.ax-state-selected{opacity:.5;cursor:not-allowed}ax-color-palette ax-header,ax-color-palette ax-footer{padding:.75rem;border-top-width:1px;display:flex}ax-color-palette ax-color-palette-preview{position:relative;width:100%;height:6rem;gap:.5;border-top-left-radius:var(--ax-rounded-border-default);border-top-right-radius:var(--ax-rounded-border-default);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=) left center}ax-color-palette ax-color-palette-preview .palette-preview-overlay{position:absolute;left:0;width:100%;height:100%;display:flex;align-items:center;text-transform:uppercase;justify-content:center;border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));box-shadow:0 1px 8px #00000029;text-shadow:0px 0px 14px rgba(0,0,0,.5)}ax-color-palette ax-color-palette-favorite{display:block;border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-swatches,ax-color-palette ax-color-palette-favorite{display:grid;padding:.5rem;grid-template-columns:repeat(10,minmax(0,1fr));max-height:9rem;overflow-x:hidden;gap:.5rem}ax-color-palette ax-color-palette-swatches div,ax-color-palette ax-color-palette-favorite div{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:99rem;border:1px solid rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-swatches div:before,ax-color-palette ax-color-palette-favorite div:before{content:\"\";padding-top:100%;float:left}ax-color-palette ax-color-palette-swatches div:after,ax-color-palette ax-color-palette-favorite div:after{content:\"\";display:block;clear:both}ax-color-palette ax-color-palette-swatches div:hover,ax-color-palette ax-color-palette-swatches div.ax-state-selected,ax-color-palette ax-color-palette-favorite div:hover,ax-color-palette ax-color-palette-favorite div.ax-state-selected{outline-offset:2px;outline-width:1px;outline-style:solid;outline-color:rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-input{display:flex;gap:.5rem;padding:.5rem}ax-color-palette ax-color-palette-input .palette-inputs{display:flex;flex:1 1 0%;gap:.5rem}ax-color-palette ax-color-palette-input .palette-inputs div{width:100%;text-align:center}ax-color-palette ax-color-palette-input .palette-inputs div label{margin-top:.75rem;font-size:.75rem;line-height:1.25rem}ax-color-palette ax-color-palette-picker{display:flex;flex-direction:column;gap:.5rem;padding:.5rem}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay-trans{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=)}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay{display:block;width:100%;height:8rem;position:relative}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-pointer{width:.75rem;height:.75rem;border-radius:99rem;background-color:transparent;border:1px solid rgba(var(--ax-color-background-default));position:relative;z-index:1}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g1,ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g2{height:100%;width:100%;position:absolute;inset:0}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g1{z-index:0;background:linear-gradient(to right,#fff 0%,rgba(255,255,255,0) 100%)}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g2{z-index:1;background:linear-gradient(to bottom,transparent 0%,#000 100%)}ax-color-palette ax-color-palette-picker .ax-range-slider.ax-color-picker-gradient input{background:linear-gradient(to right,rgb(255,0,0) 0%,rgb(255,255,0) 17%,rgb(0,255,0) 33%,rgb(0,255,255) 50%,rgb(0,0,255) 67%,rgb(255,0,255) 83%,rgb(255,0,0) 100%)}ax-color-palette ax-color-palette-picker .ax-range-slider.ax-color-picker-transparent input{background-image:linear-gradient(to right,rgba(245,246,252,0),rgb(0,0,0)),url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=)}\n"] }]
701
- }], ctorParameters: function () { return []; }, propDecorators: { _children: [{
683
+ args: [{ selector: 'ax-color-palette', inputs: ['disabled', 'tabIndex', 'readonly', 'value', 'state', 'name', 'checked'], outputs: ['onBlur', 'onFocus', 'valueChange', 'stateChange', 'onValueChanged', "readonlyChange", "disabledChange"], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
684
+ {
685
+ provide: NG_VALUE_ACCESSOR,
686
+ useExisting: forwardRef(() => AXColorPalleteComponent),
687
+ multi: true
688
+ },
689
+ {
690
+ provide: AXColorPaletteParentComponent,
691
+ useExisting: AXColorPalleteComponent,
692
+ },
693
+ ], template: "<ng-content select='ax-header'></ng-content>\n\n<ng-container [ngTemplateOutlet]=\"default\" *ngIf=\"!_children?.length\"></ng-container>\n<ng-container [ngTemplateOutlet]=\"custom\" *ngIf=\"_children?.length\"></ng-container>\n\n<ng-template #custom>\n <ng-content select='ax-color-palette-preview'></ng-content>\n <ng-content select='ax-color-palette-picker'></ng-content>\n <ng-content select='ax-color-palette-swatches'></ng-content>\n <ng-content select='ax-color-palette-favorite'></ng-content>\n <ng-content select='ax-color-palette-input'></ng-content>\n</ng-template>\n<ng-template #default>\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-swatches></ax-color-palette-swatches>\n <ax-color-palette-input></ax-color-palette-input>\n</ng-template>\n<ng-content select='ax-footer'></ng-content>", styles: ["ax-color-palette{display:flex;flex-direction:column;border:1px solid;background-color:rgba(var(--ax-color-surface));border-color:rgba(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);width:18rem}@media (min-width: 600px){ax-color-palette{width:20rem!important}}@media (min-width: 1200px){ax-color-palette{width:18rem!important}}@media (max-width: 599px){ax-color-palette{width:100%!important}}ax-color-palette.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-color-palette.ax-state-disabled ax-color-palette-swatches div:hover,ax-color-palette.ax-state-disabled ax-color-palette-swatches div.ax-state-selected,ax-color-palette.ax-state-disabled ax-color-palette-favorite div:hover,ax-color-palette.ax-state-disabled ax-color-palette-favorite div.ax-state-selected{opacity:.5;cursor:not-allowed}ax-color-palette ax-header,ax-color-palette ax-footer{padding:.75rem;border-top-width:1px;display:flex}ax-color-palette ax-color-palette-preview{position:relative;width:100%;height:6rem;gap:.5;border-top-left-radius:var(--ax-rounded-border-default);border-top-right-radius:var(--ax-rounded-border-default);background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=) left center}ax-color-palette ax-color-palette-preview .palette-preview-overlay{position:absolute;left:0;width:100%;height:100%;display:flex;align-items:center;text-transform:uppercase;justify-content:center;border-bottom:1px solid;border-color:rgba(var(--ax-color-border-default));box-shadow:0 1px 8px #00000029;text-shadow:0px 0px 14px rgba(0,0,0,.5)}ax-color-palette ax-color-palette-favorite{display:block;border-top:1px solid;border-color:rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-swatches,ax-color-palette ax-color-palette-favorite{display:grid;padding:.5rem;grid-template-columns:repeat(10,minmax(0,1fr));max-height:9rem;overflow-x:hidden;gap:.5rem}ax-color-palette ax-color-palette-swatches div,ax-color-palette ax-color-palette-favorite div{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:99rem;border:1px solid rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-swatches div:before,ax-color-palette ax-color-palette-favorite div:before{content:\"\";padding-top:100%;float:left}ax-color-palette ax-color-palette-swatches div:after,ax-color-palette ax-color-palette-favorite div:after{content:\"\";display:block;clear:both}ax-color-palette ax-color-palette-swatches div:hover,ax-color-palette ax-color-palette-swatches div.ax-state-selected,ax-color-palette ax-color-palette-favorite div:hover,ax-color-palette ax-color-palette-favorite div.ax-state-selected{outline-offset:2px;outline-width:1px;outline-style:solid;outline-color:rgba(var(--ax-color-border-default))}ax-color-palette ax-color-palette-input{display:flex;gap:.5rem;padding:.5rem}ax-color-palette ax-color-palette-input .palette-inputs{display:flex;flex:1 1 0%;gap:.5rem}ax-color-palette ax-color-palette-input .palette-inputs div{width:100%;text-align:center}ax-color-palette ax-color-palette-input .palette-inputs div label{margin-top:.75rem;font-size:.75rem;line-height:1.25rem}ax-color-palette ax-color-palette-input .palette-inputs .ax-editor-container .ax-input{padding:0}ax-color-palette ax-color-palette-picker{display:flex;flex-direction:column;gap:.5rem;padding:.5rem}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay-trans{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=)}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay{display:block;width:100%;height:8rem;position:relative}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-pointer{width:.75rem;height:.75rem;border-radius:99rem;background-color:transparent;border:1px solid rgba(var(--ax-color-background-default));position:relative;z-index:1}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g1,ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g2{height:100%;width:100%;position:absolute;inset:0}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g1{z-index:0;background:linear-gradient(to right,#fff 0%,rgba(255,255,255,0) 100%)}ax-color-palette ax-color-palette-picker .ax-color-picker-overlay .ax-color-picker-overlay-g2{z-index:1;background:linear-gradient(to bottom,transparent 0%,#000 100%)}ax-color-palette ax-color-palette-picker .ax-range-slider.ax-color-picker-gradient input{background:linear-gradient(to right,rgb(255,0,0) 0%,rgb(255,255,0) 17%,rgb(0,255,0) 33%,rgb(0,255,255) 50%,rgb(0,0,255) 67%,rgb(255,0,255) 83%,rgb(255,0,0) 100%)}ax-color-palette ax-color-palette-picker .ax-range-slider.ax-color-picker-transparent input{background-image:linear-gradient(to right,rgba(245,246,252,0),rgb(0,0,0)),url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAADFJREFUOE9jZGBgEGHAD97gk2YcNYBhmIQBgWSAP52AwoAQwJvQRg1gACckQoC2gQgAIF8IscwEtKYAAAAASUVORK5CYII=)}\n"] }]
694
+ }], propDecorators: { _children: [{
702
695
  type: ContentChildren,
703
696
  args: [AXColorPaletteChildComponent]
704
697
  }], __hostDisabled: [{
@@ -707,6 +700,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
707
700
  }] } });
708
701
 
709
702
  const MODULES = [
703
+ FormsModule,
710
704
  AXTextBoxModule,
711
705
  AXLabelModule,
712
706
  AXButtonModule,
@@ -723,12 +717,13 @@ const CONPONENTS = [
723
717
  AXColorPalettePickerComponent
724
718
  ];
725
719
  class AXColorPaletteModule {
726
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
727
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteModule, declarations: [AXColorPalleteComponent,
720
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
721
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteModule, declarations: [AXColorPalleteComponent,
728
722
  AXColorPalettePreviewComponent,
729
723
  AXColorPaletteSwatchesComponent,
730
724
  AXColorPaletteInputComponent,
731
- AXColorPalettePickerComponent], imports: [CommonModule, AXTextBoxModule,
725
+ AXColorPalettePickerComponent], imports: [CommonModule, FormsModule,
726
+ AXTextBoxModule,
732
727
  AXLabelModule,
733
728
  AXButtonModule,
734
729
  AXDecoratorModule,
@@ -739,9 +734,9 @@ class AXColorPaletteModule {
739
734
  AXColorPaletteSwatchesComponent,
740
735
  AXColorPaletteInputComponent,
741
736
  AXColorPalettePickerComponent] }); }
742
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteModule, imports: [CommonModule, MODULES] }); }
737
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteModule, imports: [CommonModule, MODULES] }); }
743
738
  }
744
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImport: i0, type: AXColorPaletteModule, decorators: [{
739
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: AXColorPaletteModule, decorators: [{
745
740
  type: NgModule,
746
741
  args: [{
747
742
  declarations: [...CONPONENTS],
@@ -755,5 +750,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.5", ngImpor
755
750
  * Generated bundle index. Do not edit.
756
751
  */
757
752
 
758
- export { AXColorComponent, AXColorPaletteChildComponent, AXColorPaletteInputComponent, AXColorPaletteModule, AXColorPalettePickerComponent, AXColorPalettePreviewComponent, AXColorPaletteSwatchesComponent, AXColorPalleteComponent };
753
+ export { AXColorPaletteChildComponent, AXColorPaletteInputComponent, AXColorPaletteModule, AXColorPaletteParentComponent, AXColorPalettePickerComponent, AXColorPalettePreviewComponent, AXColorPaletteSwatchesComponent, AXColorPalleteComponent, AXDefaultColorPalette };
759
754
  //# sourceMappingURL=acorex-components-color-palette.mjs.map