@acorex/components 6.1.1 → 6.1.3

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 (331) hide show
  1. package/alert/public-api.d.ts +1 -0
  2. package/alert/src/alert-button.directive.d.ts +8 -0
  3. package/alert/src/alert.component.d.ts +18 -10
  4. package/alert/src/alert.module.d.ts +4 -3
  5. package/badge/src/badge.component.d.ts +2 -1
  6. package/breadcrumbs/src/breadcrumbs-item.component.d.ts +6 -7
  7. package/button/src/button-group.component.d.ts +6 -4
  8. package/button/src/button-item.component.d.ts +6 -4
  9. package/calendar/src/calendar.component.d.ts +4 -4
  10. package/calendar/src/calendar.module.d.ts +2 -4
  11. package/color-picker/src/color-picker.component.d.ts +16 -12
  12. package/data-table/src/data-table.component.d.ts +3 -3
  13. package/date-picker/src/datepicker.component.d.ts +14 -11
  14. package/decorators/public-api.d.ts +1 -0
  15. package/decorators/src/decorators.module.d.ts +7 -6
  16. package/decorators/src/sub-title.component.d.ts +9 -0
  17. package/esm2020/action-sheet/src/action-sheet-item.component.mjs +3 -3
  18. package/esm2020/action-sheet/src/action-sheet.component.mjs +3 -3
  19. package/esm2020/action-sheet/src/action-sheet.module.mjs +4 -4
  20. package/esm2020/alert/public-api.mjs +2 -1
  21. package/esm2020/alert/src/alert-button.directive.mjs +19 -0
  22. package/esm2020/alert/src/alert.component.mjs +80 -51
  23. package/esm2020/alert/src/alert.module.mjs +7 -6
  24. package/esm2020/avatar/src/avatar-group.component.mjs +3 -3
  25. package/esm2020/avatar/src/avatar.component.mjs +3 -3
  26. package/esm2020/avatar/src/avatar.module.mjs +4 -4
  27. package/esm2020/badge/src/badge.component.mjs +3 -3
  28. package/esm2020/badge/src/badge.module.mjs +4 -4
  29. package/esm2020/breadcrumbs/src/breadcrumbs-item.component.mjs +3 -3
  30. package/esm2020/breadcrumbs/src/breadcrumbs.component.mjs +3 -3
  31. package/esm2020/breadcrumbs/src/breadcrumbs.module.mjs +4 -4
  32. package/esm2020/button/src/button-group.component.mjs +3 -3
  33. package/esm2020/button/src/button-item.component.mjs +3 -3
  34. package/esm2020/button/src/button.component.mjs +3 -3
  35. package/esm2020/button/src/button.module.mjs +4 -4
  36. package/esm2020/calendar/src/calendar.class.mjs +3 -3
  37. package/esm2020/calendar/src/calendar.component.mjs +9 -12
  38. package/esm2020/calendar/src/calendar.module.mjs +6 -8
  39. package/esm2020/checkbox/src/checkbox.component.mjs +3 -3
  40. package/esm2020/checkbox/src/checkbox.module.mjs +4 -4
  41. package/esm2020/collapse/src/collapse-group.component.mjs +3 -3
  42. package/esm2020/collapse/src/collapse.component.mjs +3 -3
  43. package/esm2020/collapse/src/collapse.module.mjs +4 -4
  44. package/esm2020/color-palette/src/color-palette-input.component.mjs +3 -3
  45. package/esm2020/color-palette/src/color-palette-picker.component.mjs +3 -3
  46. package/esm2020/color-palette/src/color-palette-preview.component.mjs +3 -3
  47. package/esm2020/color-palette/src/color-palette-swatches.component.mjs +3 -3
  48. package/esm2020/color-palette/src/color-palette.class.mjs +6 -6
  49. package/esm2020/color-palette/src/color-palette.component.mjs +3 -3
  50. package/esm2020/color-palette/src/color-palette.module.mjs +4 -4
  51. package/esm2020/color-picker/src/color-picker.component.mjs +3 -3
  52. package/esm2020/color-picker/src/color-picker.module.mjs +4 -4
  53. package/esm2020/common/src/auto-focus.directive.mjs +3 -3
  54. package/esm2020/common/src/common.module.mjs +4 -4
  55. package/esm2020/common/src/components.class.mjs +18 -18
  56. package/esm2020/common/src/custom-cdk-overlay.service.mjs +7 -7
  57. package/esm2020/common/src/debounce-time.directive.mjs +3 -3
  58. package/esm2020/common/src/hotkey.directive.mjs +3 -3
  59. package/esm2020/common/src/hotkey.service.mjs +4 -4
  60. package/esm2020/common/src/infinite-scroll.directive.mjs +3 -3
  61. package/esm2020/common/src/overlay.service.mjs +3 -3
  62. package/esm2020/common/src/responsive.directive.mjs +3 -3
  63. package/esm2020/context-menu/src/context-menu.component.mjs +3 -3
  64. package/esm2020/context-menu/src/context-menu.module.mjs +4 -4
  65. package/esm2020/data-pager/src/data-pager-base.component.mjs +6 -6
  66. package/esm2020/data-pager/src/data-pager-info.component.mjs +3 -3
  67. package/esm2020/data-pager/src/data-pager-input-selector.component.mjs +3 -3
  68. package/esm2020/data-pager/src/data-pager-next-buttons.components.mjs +14 -13
  69. package/esm2020/data-pager/src/data-pager-numeric-selector.component.mjs +10 -10
  70. package/esm2020/data-pager/src/data-pager-pagesize-dropdown.component.mjs +3 -3
  71. package/esm2020/data-pager/src/data-pager-prev-buttons.component.mjs +14 -13
  72. package/esm2020/data-pager/src/data-pager.component.mjs +7 -6
  73. package/esm2020/data-pager/src/data-pager.module.mjs +4 -4
  74. package/esm2020/data-table/src/data-column-cell-template.directive.mjs +3 -3
  75. package/esm2020/data-table/src/data-column.directive.mjs +3 -3
  76. package/esm2020/data-table/src/data-table.component.mjs +5 -4
  77. package/esm2020/data-table/src/data-table.module.mjs +4 -4
  78. package/esm2020/date-picker/src/datepicker.component.mjs +3 -3
  79. package/esm2020/date-picker/src/datepicker.module.mjs +4 -4
  80. package/esm2020/decorators/public-api.mjs +2 -1
  81. package/esm2020/decorators/src/close-button.component.mjs +3 -3
  82. package/esm2020/decorators/src/content.component.mjs +3 -3
  83. package/esm2020/decorators/src/decorators.module.mjs +10 -6
  84. package/esm2020/decorators/src/footer.component.mjs +3 -3
  85. package/esm2020/decorators/src/header.component.mjs +3 -3
  86. package/esm2020/decorators/src/icon.component.mjs +3 -3
  87. package/esm2020/decorators/src/overlay.component.mjs +3 -3
  88. package/esm2020/decorators/src/placeholder.component.mjs +3 -3
  89. package/esm2020/decorators/src/prefix.component.mjs +3 -3
  90. package/esm2020/decorators/src/sub-title.component.mjs +27 -0
  91. package/esm2020/decorators/src/suffix.component.mjs +3 -3
  92. package/esm2020/decorators/src/text.component.mjs +3 -3
  93. package/esm2020/decorators/src/title.component.mjs +3 -3
  94. package/esm2020/dialog/src/dialog.component.mjs +3 -3
  95. package/esm2020/dialog/src/dialog.module.mjs +4 -4
  96. package/esm2020/dialog/src/dialog.service.mjs +3 -3
  97. package/esm2020/drawer/src/drawer-container.component.mjs +3 -3
  98. package/esm2020/drawer/src/drawer.component.mjs +3 -3
  99. package/esm2020/drawer/src/drawer.module.mjs +4 -4
  100. package/esm2020/dropdown/src/dropdown-panel.component.mjs +3 -3
  101. package/esm2020/dropdown/src/dropdown.module.mjs +4 -4
  102. package/esm2020/form/src/form-field.component.mjs +3 -3
  103. package/esm2020/form/src/form-hint.component.mjs +3 -3
  104. package/esm2020/form/src/form.component.mjs +3 -3
  105. package/esm2020/form/src/form.module.mjs +4 -4
  106. package/esm2020/form/src/validation-rule.widget.mjs +14 -8
  107. package/esm2020/form/src/validation-summary.component.mjs +25 -17
  108. package/esm2020/image/src/image.component.mjs +3 -3
  109. package/esm2020/image/src/image.module.mjs +4 -4
  110. package/esm2020/label/src/label.component.mjs +3 -3
  111. package/esm2020/label/src/label.module.mjs +4 -4
  112. package/esm2020/loading/src/loading-spinner.component.mjs +3 -3
  113. package/esm2020/loading/src/loading.component.mjs +3 -3
  114. package/esm2020/loading/src/loading.directive.mjs +3 -3
  115. package/esm2020/loading/src/loading.module.mjs +4 -4
  116. package/esm2020/loading/src/loading.service.mjs +3 -3
  117. package/esm2020/menu/src/menu.component.mjs +3 -3
  118. package/esm2020/menu/src/menu.module.mjs +4 -4
  119. package/esm2020/mixin/src/base-components.class.mjs +9 -4
  120. package/esm2020/number-box/src/number-box.component.mjs +3 -3
  121. package/esm2020/number-box/src/number-box.module.mjs +4 -4
  122. package/esm2020/page/src/base-page.class.mjs +3 -3
  123. package/esm2020/page/src/page.component.mjs +3 -3
  124. package/esm2020/page/src/page.module.mjs +4 -4
  125. package/esm2020/password-box/src/password-box.component.mjs +3 -3
  126. package/esm2020/password-box/src/password-box.module.mjs +4 -4
  127. package/esm2020/popover/src/popover.component.mjs +3 -3
  128. package/esm2020/popover/src/popover.module.mjs +4 -4
  129. package/esm2020/popup/src/popup.component.mjs +3 -3
  130. package/esm2020/popup/src/popup.module.mjs +4 -4
  131. package/esm2020/popup/src/popup.service.mjs +3 -3
  132. package/esm2020/progress-bar/src/progress-bar.component.mjs +3 -3
  133. package/esm2020/progress-bar/src/progress-bar.module.mjs +4 -4
  134. package/esm2020/radio/src/radio.component.mjs +3 -3
  135. package/esm2020/radio/src/radio.module.mjs +4 -4
  136. package/esm2020/range-slider/src/range-slider.component.mjs +3 -3
  137. package/esm2020/range-slider/src/range-slider.module.mjs +4 -4
  138. package/esm2020/rating/src/rating.component.mjs +3 -3
  139. package/esm2020/rating/src/rating.component.module.mjs +4 -4
  140. package/esm2020/result/src/result.component.mjs +3 -3
  141. package/esm2020/result/src/result.module.mjs +4 -4
  142. package/esm2020/search-box/src/search-box.component.mjs +3 -3
  143. package/esm2020/search-box/src/search-box.module.mjs +4 -4
  144. package/esm2020/select-box/src/selectbox.component.mjs +3 -3
  145. package/esm2020/select-box/src/selectbox.module.mjs +4 -4
  146. package/esm2020/selection-list/src/selection-list.component.mjs +21 -10
  147. package/esm2020/selection-list/src/selection-list.module.mjs +4 -4
  148. package/esm2020/switch/src/switch.component.mjs +3 -3
  149. package/esm2020/switch/src/switch.module.mjs +4 -4
  150. package/esm2020/tabs/src/tab-content.directive.mjs +3 -3
  151. package/esm2020/tabs/src/tab-item.component.mjs +3 -3
  152. package/esm2020/tabs/src/tabs.component.mjs +3 -3
  153. package/esm2020/tabs/src/tabs.module.mjs +4 -4
  154. package/esm2020/textarea/src/textarea.component.mjs +5 -5
  155. package/esm2020/textarea/src/textarea.module.mjs +4 -4
  156. package/esm2020/textbox/src/mask-options.directive.mjs +3 -3
  157. package/esm2020/textbox/src/textbox.component.mjs +3 -3
  158. package/esm2020/textbox/src/textbox.module.mjs +4 -4
  159. package/esm2020/time-box/src/time-box.component.mjs +3 -3
  160. package/esm2020/time-box/src/time-box.module.mjs +4 -4
  161. package/esm2020/toast/src/toast.component.mjs +5 -5
  162. package/esm2020/toast/src/toast.module.mjs +4 -4
  163. package/esm2020/toast/src/toast.service.mjs +3 -3
  164. package/esm2020/tooltip/src/tooltip.component.mjs +3 -3
  165. package/esm2020/tooltip/src/tooltip.directive.mjs +3 -3
  166. package/esm2020/tooltip/src/tooltip.module.mjs +4 -4
  167. package/esm2020/tree-view/src/tree-view.component.mjs +3 -3
  168. package/esm2020/tree-view/src/tree-view.module.mjs +4 -4
  169. package/esm2020/uploader/src/uploader.component.mjs +3 -3
  170. package/esm2020/uploader/src/uploader.module.mjs +4 -4
  171. package/fesm2015/acorex-components-action-sheet.mjs +10 -10
  172. package/fesm2015/acorex-components-alert.mjs +106 -58
  173. package/fesm2015/acorex-components-alert.mjs.map +1 -1
  174. package/fesm2015/acorex-components-avatar.mjs +10 -10
  175. package/fesm2015/acorex-components-badge.mjs +7 -7
  176. package/fesm2015/acorex-components-breadcrumbs.mjs +10 -10
  177. package/fesm2015/acorex-components-button.mjs +13 -13
  178. package/fesm2015/acorex-components-calendar.mjs +16 -21
  179. package/fesm2015/acorex-components-calendar.mjs.map +1 -1
  180. package/fesm2015/acorex-components-checkbox.mjs +7 -7
  181. package/fesm2015/acorex-components-collapse.mjs +10 -10
  182. package/fesm2015/acorex-components-color-palette.mjs +25 -25
  183. package/fesm2015/acorex-components-color-picker.mjs +7 -7
  184. package/fesm2015/acorex-components-common.mjs +49 -49
  185. package/fesm2015/acorex-components-common.mjs.map +1 -1
  186. package/fesm2015/acorex-components-context-menu.mjs +7 -7
  187. package/fesm2015/acorex-components-data-pager.mjs +55 -54
  188. package/fesm2015/acorex-components-data-pager.mjs.map +1 -1
  189. package/fesm2015/acorex-components-data-table.mjs +14 -13
  190. package/fesm2015/acorex-components-data-table.mjs.map +1 -1
  191. package/fesm2015/acorex-components-date-picker.mjs +7 -7
  192. package/fesm2015/acorex-components-decorators.mjs +65 -39
  193. package/fesm2015/acorex-components-decorators.mjs.map +1 -1
  194. package/fesm2015/acorex-components-dialog.mjs +10 -10
  195. package/fesm2015/acorex-components-drawer.mjs +10 -10
  196. package/fesm2015/acorex-components-dropdown.mjs +7 -7
  197. package/fesm2015/acorex-components-form.mjs +50 -36
  198. package/fesm2015/acorex-components-form.mjs.map +1 -1
  199. package/fesm2015/acorex-components-image.mjs +7 -7
  200. package/fesm2015/acorex-components-label.mjs +7 -7
  201. package/fesm2015/acorex-components-loading.mjs +16 -16
  202. package/fesm2015/acorex-components-menu.mjs +7 -7
  203. package/fesm2015/acorex-components-mixin.mjs +8 -3
  204. package/fesm2015/acorex-components-mixin.mjs.map +1 -1
  205. package/fesm2015/acorex-components-number-box.mjs +7 -7
  206. package/fesm2015/acorex-components-page.mjs +10 -10
  207. package/fesm2015/acorex-components-password-box.mjs +7 -7
  208. package/fesm2015/acorex-components-popover.mjs +7 -7
  209. package/fesm2015/acorex-components-popup.mjs +10 -10
  210. package/fesm2015/acorex-components-progress-bar.mjs +7 -7
  211. package/fesm2015/acorex-components-radio.mjs +7 -7
  212. package/fesm2015/acorex-components-range-slider.mjs +7 -7
  213. package/fesm2015/acorex-components-rating.mjs +7 -7
  214. package/fesm2015/acorex-components-result.mjs +7 -7
  215. package/fesm2015/acorex-components-search-box.mjs +7 -7
  216. package/fesm2015/acorex-components-select-box.mjs +7 -7
  217. package/fesm2015/acorex-components-selection-list.mjs +24 -13
  218. package/fesm2015/acorex-components-selection-list.mjs.map +1 -1
  219. package/fesm2015/acorex-components-switch.mjs +7 -7
  220. package/fesm2015/acorex-components-tabs.mjs +13 -13
  221. package/fesm2015/acorex-components-textarea.mjs +8 -8
  222. package/fesm2015/acorex-components-textarea.mjs.map +1 -1
  223. package/fesm2015/acorex-components-textbox.mjs +10 -10
  224. package/fesm2015/acorex-components-time-box.mjs +7 -7
  225. package/fesm2015/acorex-components-toast.mjs +11 -11
  226. package/fesm2015/acorex-components-toast.mjs.map +1 -1
  227. package/fesm2015/acorex-components-tooltip.mjs +10 -10
  228. package/fesm2015/acorex-components-tree-view.mjs +7 -7
  229. package/fesm2015/acorex-components-uploader.mjs +7 -7
  230. package/fesm2020/acorex-components-action-sheet.mjs +10 -10
  231. package/fesm2020/acorex-components-alert.mjs +104 -58
  232. package/fesm2020/acorex-components-alert.mjs.map +1 -1
  233. package/fesm2020/acorex-components-avatar.mjs +10 -10
  234. package/fesm2020/acorex-components-badge.mjs +7 -7
  235. package/fesm2020/acorex-components-breadcrumbs.mjs +10 -10
  236. package/fesm2020/acorex-components-button.mjs +13 -13
  237. package/fesm2020/acorex-components-calendar.mjs +16 -21
  238. package/fesm2020/acorex-components-calendar.mjs.map +1 -1
  239. package/fesm2020/acorex-components-checkbox.mjs +7 -7
  240. package/fesm2020/acorex-components-collapse.mjs +10 -10
  241. package/fesm2020/acorex-components-color-palette.mjs +25 -25
  242. package/fesm2020/acorex-components-color-picker.mjs +7 -7
  243. package/fesm2020/acorex-components-common.mjs +49 -49
  244. package/fesm2020/acorex-components-common.mjs.map +1 -1
  245. package/fesm2020/acorex-components-context-menu.mjs +7 -7
  246. package/fesm2020/acorex-components-data-pager.mjs +55 -54
  247. package/fesm2020/acorex-components-data-pager.mjs.map +1 -1
  248. package/fesm2020/acorex-components-data-table.mjs +14 -13
  249. package/fesm2020/acorex-components-data-table.mjs.map +1 -1
  250. package/fesm2020/acorex-components-date-picker.mjs +7 -7
  251. package/fesm2020/acorex-components-decorators.mjs +65 -39
  252. package/fesm2020/acorex-components-decorators.mjs.map +1 -1
  253. package/fesm2020/acorex-components-dialog.mjs +10 -10
  254. package/fesm2020/acorex-components-drawer.mjs +10 -10
  255. package/fesm2020/acorex-components-dropdown.mjs +7 -7
  256. package/fesm2020/acorex-components-form.mjs +50 -36
  257. package/fesm2020/acorex-components-form.mjs.map +1 -1
  258. package/fesm2020/acorex-components-image.mjs +7 -7
  259. package/fesm2020/acorex-components-label.mjs +7 -7
  260. package/fesm2020/acorex-components-loading.mjs +16 -16
  261. package/fesm2020/acorex-components-menu.mjs +7 -7
  262. package/fesm2020/acorex-components-mixin.mjs +8 -3
  263. package/fesm2020/acorex-components-mixin.mjs.map +1 -1
  264. package/fesm2020/acorex-components-number-box.mjs +7 -7
  265. package/fesm2020/acorex-components-page.mjs +10 -10
  266. package/fesm2020/acorex-components-password-box.mjs +7 -7
  267. package/fesm2020/acorex-components-popover.mjs +7 -7
  268. package/fesm2020/acorex-components-popup.mjs +10 -10
  269. package/fesm2020/acorex-components-progress-bar.mjs +7 -7
  270. package/fesm2020/acorex-components-radio.mjs +7 -7
  271. package/fesm2020/acorex-components-range-slider.mjs +7 -7
  272. package/fesm2020/acorex-components-rating.mjs +7 -7
  273. package/fesm2020/acorex-components-result.mjs +7 -7
  274. package/fesm2020/acorex-components-search-box.mjs +7 -7
  275. package/fesm2020/acorex-components-select-box.mjs +7 -7
  276. package/fesm2020/acorex-components-selection-list.mjs +24 -13
  277. package/fesm2020/acorex-components-selection-list.mjs.map +1 -1
  278. package/fesm2020/acorex-components-switch.mjs +7 -7
  279. package/fesm2020/acorex-components-tabs.mjs +13 -13
  280. package/fesm2020/acorex-components-textarea.mjs +8 -8
  281. package/fesm2020/acorex-components-textarea.mjs.map +1 -1
  282. package/fesm2020/acorex-components-textbox.mjs +10 -10
  283. package/fesm2020/acorex-components-time-box.mjs +7 -7
  284. package/fesm2020/acorex-components-toast.mjs +11 -11
  285. package/fesm2020/acorex-components-toast.mjs.map +1 -1
  286. package/fesm2020/acorex-components-tooltip.mjs +10 -10
  287. package/fesm2020/acorex-components-tree-view.mjs +7 -7
  288. package/fesm2020/acorex-components-uploader.mjs +7 -7
  289. package/form/src/validation-rule.widget.d.ts +1 -0
  290. package/form/src/validation-summary.component.d.ts +4 -2
  291. package/mixin/src/base-components.class.d.ts +3 -1
  292. package/mixin/src/base-menu-mixin.class.d.ts +5 -4
  293. package/mixin/src/button-mixin.class.d.ts +2 -1
  294. package/mixin/src/clickable-mixin.class.d.ts +3 -4
  295. package/mixin/src/color-look-mixing.class.d.ts +2 -1
  296. package/mixin/src/datalist-component.class.d.ts +10 -9
  297. package/mixin/src/dropdown-mixin.class.d.ts +2 -1
  298. package/mixin/src/interactive-mixin.class.d.ts +5 -6
  299. package/mixin/src/loading-mixin.class.d.ts +2 -1
  300. package/mixin/src/mixin.class.d.ts +61 -40
  301. package/mixin/src/page-component.class.d.ts +2 -1
  302. package/mixin/src/selection-component.class.d.ts +3 -4
  303. package/mixin/src/sizable-mixin.class.d.ts +2 -1
  304. package/mixin/src/textbox-mixin.class.d.ts +2 -1
  305. package/mixin/src/value-mixin.class.d.ts +8 -7
  306. package/package.json +5 -25
  307. package/selection-list/src/selection-list.component.d.ts +5 -4
  308. package/tabs/src/tab-item.component.d.ts +2 -1
  309. package/textarea/src/textarea.component.d.ts +1 -1
  310. package/carousel/index.d.ts +0 -5
  311. package/carousel/public-api.d.ts +0 -7
  312. package/carousel/src/carousel-arrows.component.d.ts +0 -16
  313. package/carousel/src/carousel-item.component.d.ts +0 -8
  314. package/carousel/src/carousel-pager.component.d.ts +0 -22
  315. package/carousel/src/carousel-splidejs.class.d.ts +0 -18
  316. package/carousel/src/carousel.class.d.ts +0 -71
  317. package/carousel/src/carousel.component.d.ts +0 -111
  318. package/carousel/src/carousel.module.d.ts +0 -11
  319. package/esm2020/carousel/acorex-components-carousel.mjs +0 -5
  320. package/esm2020/carousel/public-api.mjs +0 -8
  321. package/esm2020/carousel/src/carousel-arrows.component.mjs +0 -80
  322. package/esm2020/carousel/src/carousel-item.component.mjs +0 -21
  323. package/esm2020/carousel/src/carousel-pager.component.mjs +0 -74
  324. package/esm2020/carousel/src/carousel-splidejs.class.mjs +0 -91
  325. package/esm2020/carousel/src/carousel.class.mjs +0 -10
  326. package/esm2020/carousel/src/carousel.component.mjs +0 -438
  327. package/esm2020/carousel/src/carousel.module.mjs +0 -24
  328. package/fesm2015/acorex-components-carousel.mjs +0 -726
  329. package/fesm2015/acorex-components-carousel.mjs.map +0 -1
  330. package/fesm2020/acorex-components-carousel.mjs +0 -722
  331. package/fesm2020/acorex-components-carousel.mjs.map +0 -1
@@ -1,722 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, Input, Optional, NgModule } from '@angular/core';
3
- import { AXBaseComponentMixin } from '@acorex/components/mixin';
4
- import { coerceNumberProperty, coerceBooleanProperty } from '@angular/cdk/coercion';
5
- import * as i2 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
7
-
8
- class AXCarouselCore {
9
- }
10
- AXCarouselCore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselCore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11
- AXCarouselCore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselCore });
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselCore, decorators: [{
13
- type: Injectable
14
- }] });
15
-
16
- class AXCarouselSplideJS {
17
- constructor() {
18
- }
19
- mount(instance) {
20
- this._instance = instance;
21
- this._instance.host.classList.add('splide');
22
- this._instance.host.querySelector('.ax-carousel-list-container').classList.add('splide__track');
23
- const listElement = this._instance.host.querySelector('.ax-carousel-list');
24
- listElement?.classList.add('splide__list');
25
- //
26
- this.rebuild();
27
- this._instance.onItemsChanged.subscribe((items) => {
28
- items?.value?.forEach(i => i.classList.add('splide__slide'));
29
- this._ref.refresh();
30
- });
31
- this._instance.items = Array.from(listElement.querySelectorAll('ax-carousel-item'));
32
- this._instance.onOptionsChanged.subscribe(() => {
33
- this.rebuild();
34
- });
35
- }
36
- _emitOnSlideChanged(i) {
37
- const oldValue = this._instance.visibleIndex;
38
- this._instance.visibleIndex = i;
39
- this._instance.onSlideChanged.emit({
40
- component: this,
41
- htmlElement: this._instance.host,
42
- value: this._instance.visibleIndex,
43
- oldValue
44
- });
45
- }
46
- _getConfig() {
47
- return {
48
- autoplay: this._instance.autoplay,
49
- type: this._instance.loop && !this._instance.rewind ? 'loop' : 'slide',
50
- rewind: this._instance.rewind,
51
- gap: this._instance.gap,
52
- perPage: this._instance.perPage,
53
- perMove: this._instance.perMove,
54
- start: this._instance.visibleIndex,
55
- interval: this._instance.interval,
56
- direction: this._instance.vertical ? 'ttb' : (this._instance.rtl ? 'rtl' : 'ltr'),
57
- arrows: false,
58
- pagination: false,
59
- padding: this._instance.padding,
60
- autoWidth: this._instance.autoWidth,
61
- focus: this._instance.centered ? 'center' : this._instance.focus,
62
- height: this._instance.height,
63
- fixedHeight: this._instance.fixedHeight,
64
- heightRatio: this._instance.heightRatio,
65
- wheel: this._instance.wheel,
66
- width: this._instance.width,
67
- fixedWidth: this._instance.fixedWidth,
68
- drag: this._instance.drag,
69
- snap: this._instance.snap,
70
- breakpoints: this._instance.breakpoints,
71
- };
72
- }
73
- next() {
74
- this._ref.go('+');
75
- }
76
- last() {
77
- this._ref.go(this._ref.length - 1);
78
- }
79
- prev() {
80
- this._ref.go('-');
81
- }
82
- first() {
83
- this._ref.go(0);
84
- }
85
- goToSlide(index) {
86
- this._ref.go(index);
87
- }
88
- goToPage(index) {
89
- this._ref.go(`>${index}`);
90
- }
91
- destroy() {
92
- this._ref.destroy();
93
- }
94
- rebuild() {
95
- if (this._ref) {
96
- this._ref.off('move');
97
- this._ref.destroy();
98
- }
99
- //
100
- this._ref = new Splide(this._instance.host, this._getConfig());
101
- this._ref.mount();
102
- this._ref.on('move', this._emitOnSlideChanged.bind(this));
103
- this._emitOnSlideChanged(this._instance.visibleIndex);
104
- }
105
- }
106
-
107
- class AXCarouselComponent extends AXBaseComponentMixin {
108
- constructor(elementRef, zone, cdr, core) {
109
- super(elementRef, cdr);
110
- this.zone = zone;
111
- this.core = core;
112
- this.onOptionsChanged = new EventEmitter();
113
- this.onSlideChanged = new EventEmitter();
114
- this.perMoveChange = new EventEmitter();
115
- this._perMove = 1;
116
- this.focusChange = new EventEmitter();
117
- this._focus = 0;
118
- this.breakpointsChange = new EventEmitter();
119
- this.heightRatioChange = new EventEmitter();
120
- this._heightRatio = 0;
121
- this.heightChange = new EventEmitter();
122
- this._height = 'auto';
123
- this.fixedHeightChange = new EventEmitter();
124
- this._fixedHeight = '';
125
- this.widthChange = new EventEmitter();
126
- this._width = 'fit-content';
127
- this.fixedWidthChange = new EventEmitter();
128
- this._fixedWidth = '';
129
- this.perPageChange = new EventEmitter();
130
- this._perPage = 1;
131
- this.gap = 10;
132
- this.autoplayChange = new EventEmitter();
133
- this._autoplay = false;
134
- this.snapChange = new EventEmitter();
135
- this._snap = false;
136
- this.autoWidthChange = new EventEmitter();
137
- this._autoWidth = true;
138
- this.dragChange = new EventEmitter();
139
- this._drag = true;
140
- this.wheelChange = new EventEmitter();
141
- this._wheel = false;
142
- this.intervalChange = new EventEmitter();
143
- this._interval = 3000;
144
- this.paddingChange = new EventEmitter();
145
- this._padding = 0;
146
- this.centeredChange = new EventEmitter();
147
- this._centered = false;
148
- this.verticalChange = new EventEmitter();
149
- this._vertical = false;
150
- this.loopChange = new EventEmitter();
151
- this._loop = false;
152
- this.rewindChange = new EventEmitter();
153
- this._rewind = false;
154
- this._visibleIndex = 0;
155
- this.onItemsChanged = new EventEmitter();
156
- this._items = [];
157
- }
158
- get perMove() {
159
- return this._perMove;
160
- }
161
- set perMove(v) {
162
- const val = Math.max(1, coerceNumberProperty(v));
163
- if (val != this._perMove) {
164
- this._perMove = val;
165
- if (this._perMove > 1) {
166
- this._vertical = false;
167
- }
168
- this.perMoveChange.emit(this.perMove);
169
- this.onOptionsChanged.emit();
170
- }
171
- }
172
- get focus() {
173
- return this._focus;
174
- }
175
- set focus(v) {
176
- if (v != this._focus) {
177
- this._focus = v;
178
- this.paddingChange.emit(v);
179
- this.onOptionsChanged.emit();
180
- }
181
- }
182
- get breakpoints() {
183
- return this._breakpoints;
184
- }
185
- set breakpoints(v) {
186
- if (v != this._breakpoints) {
187
- this._breakpoints = v;
188
- this.paddingChange.emit(v);
189
- this.onOptionsChanged.emit();
190
- }
191
- }
192
- get heightRatio() {
193
- return this._heightRatio;
194
- }
195
- set heightRatio(v) {
196
- if (v != this._heightRatio) {
197
- this._heightRatio = v;
198
- this.paddingChange.emit(v);
199
- this.onOptionsChanged.emit();
200
- }
201
- }
202
- get height() {
203
- return this._height;
204
- }
205
- set height(v) {
206
- const val = v;
207
- if (val != this._height) {
208
- this._height = val;
209
- this.heightChange.emit(this.height);
210
- this.onOptionsChanged.emit();
211
- }
212
- }
213
- get fixedHeight() {
214
- return this._fixedHeight;
215
- }
216
- set fixedHeight(v) {
217
- const val = v;
218
- if (val != this._fixedHeight) {
219
- this._fixedHeight = val;
220
- this.fixedHeightChange.emit(this.fixedHeight);
221
- this.onOptionsChanged.emit();
222
- }
223
- }
224
- get width() {
225
- return this._width;
226
- }
227
- set width(v) {
228
- const val = v;
229
- if (val != this._width) {
230
- this._width = val;
231
- this.widthChange.emit(this.width);
232
- this.onOptionsChanged.emit();
233
- }
234
- }
235
- get fixedWidth() {
236
- return this._fixedWidth;
237
- }
238
- set fixedWidth(v) {
239
- const val = v;
240
- if (val != this._fixedWidth) {
241
- this._fixedWidth = val;
242
- this.fixedWidthChange.emit(this.fixedWidth);
243
- this.onOptionsChanged.emit();
244
- }
245
- }
246
- get perPage() {
247
- return this._perPage;
248
- }
249
- set perPage(v) {
250
- const val = v;
251
- if (val != this._perPage) {
252
- this._perPage = val;
253
- this.perPageChange.emit(this.perPage);
254
- this.onOptionsChanged.emit();
255
- }
256
- }
257
- get autoplay() {
258
- return this._autoplay;
259
- }
260
- set autoplay(v) {
261
- const val = coerceBooleanProperty(v);
262
- if (val != this._autoplay) {
263
- this._autoplay = val;
264
- this.autoplayChange.emit(this.autoplay);
265
- this.onOptionsChanged.emit();
266
- }
267
- }
268
- get snap() {
269
- return this._snap;
270
- }
271
- set snap(v) {
272
- const val = coerceBooleanProperty(v);
273
- if (val != this._snap) {
274
- this._snap = val;
275
- this.snapChange.emit(this.snap);
276
- this.onOptionsChanged.emit();
277
- }
278
- }
279
- get autoWidth() {
280
- return this._autoWidth;
281
- }
282
- set autoWidth(v) {
283
- const val = coerceBooleanProperty(v);
284
- if (val != this._autoWidth) {
285
- this._autoWidth = val;
286
- this.autoWidthChange.emit(this.autoWidth);
287
- this.onOptionsChanged.emit();
288
- }
289
- }
290
- get drag() {
291
- return this._drag;
292
- }
293
- set drag(v) {
294
- const val = v;
295
- if (val != this._drag) {
296
- this._drag = val;
297
- this.dragChange.emit(this.drag);
298
- this.onOptionsChanged.emit();
299
- }
300
- }
301
- get wheel() {
302
- return this._wheel;
303
- }
304
- set wheel(v) {
305
- const val = coerceBooleanProperty(v);
306
- if (val != this._wheel) {
307
- this._wheel = val;
308
- this.wheelChange.emit(this.wheel);
309
- this.onOptionsChanged.emit();
310
- }
311
- }
312
- get interval() {
313
- return this._interval;
314
- }
315
- set interval(v) {
316
- const val = coerceNumberProperty(v);
317
- if (val != this._interval) {
318
- this.intervalChange.emit(val);
319
- this.onOptionsChanged.emit();
320
- }
321
- }
322
- get padding() {
323
- return this._padding;
324
- }
325
- set padding(v) {
326
- if (v != this._padding) {
327
- this._padding = v;
328
- this.paddingChange.emit(v);
329
- this.onOptionsChanged.emit();
330
- }
331
- }
332
- get centered() {
333
- return this._centered;
334
- }
335
- set centered(v) {
336
- const val = coerceBooleanProperty(v);
337
- if (val != this._centered) {
338
- this._centered = val;
339
- if (this._centered) {
340
- this._rewind = false;
341
- }
342
- this.centeredChange.emit(this.centered);
343
- this.rewindChange.emit(this.rewind);
344
- this.onOptionsChanged.emit();
345
- }
346
- }
347
- get vertical() {
348
- return this._vertical;
349
- }
350
- set vertical(v) {
351
- const val = coerceBooleanProperty(v);
352
- if (val != this._vertical) {
353
- this._vertical = val;
354
- this.verticalChange.emit(this.vertical);
355
- this.onOptionsChanged.emit();
356
- }
357
- }
358
- get loop() {
359
- return this._loop;
360
- }
361
- set loop(v) {
362
- const val = coerceBooleanProperty(v);
363
- if (val != this._loop) {
364
- this._loop = val;
365
- if (this._loop) {
366
- this._rewind = false;
367
- }
368
- this.loopChange.emit(this.loop);
369
- this.rewindChange.emit(this.rewind);
370
- this.onOptionsChanged.emit();
371
- }
372
- }
373
- get rewind() {
374
- return this._rewind;
375
- }
376
- set rewind(v) {
377
- const val = coerceBooleanProperty(v);
378
- if (val != this._rewind) {
379
- this._rewind = val;
380
- if (this._rewind) {
381
- this._loop = false;
382
- this._centered = false;
383
- }
384
- this.rewindChange.emit(this.rewind);
385
- this.loopChange.emit(this.loop);
386
- this.centeredChange.emit(this.centered);
387
- this.onOptionsChanged.emit();
388
- }
389
- }
390
- get visibleIndex() {
391
- return this._visibleIndex;
392
- }
393
- set visibleIndex(v) {
394
- this._visibleIndex = v;
395
- }
396
- get items() {
397
- return this._items ?? [];
398
- }
399
- set items(v) {
400
- const oldValue = this.items.slice();
401
- this._items = v;
402
- this.onItemsChanged.emit({
403
- component: this,
404
- htmlElement: this._getHostElement(),
405
- oldValue,
406
- value: this.items
407
- });
408
- }
409
- onViewInit() {
410
- this.core.mount(this);
411
- }
412
- next() {
413
- this.core.next();
414
- }
415
- last() {
416
- this.core.last();
417
- }
418
- prev() {
419
- this.core.prev();
420
- }
421
- first() {
422
- this.core.first();
423
- }
424
- goToSlide(index) {
425
- this.core.goToSlide(index);
426
- }
427
- goToPage(index) {
428
- this.core.goToPage(index);
429
- }
430
- get host() {
431
- return this._getHostElement();
432
- }
433
- onDestroy() {
434
- this.core.destroy();
435
- }
436
- }
437
- AXCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: AXCarouselCore }], target: i0.ɵɵFactoryTarget.Component });
438
- AXCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXCarouselComponent, selector: "ax-carousel", inputs: { perMove: "perMove", focus: "focus", breakpoints: "breakpoints", heightRatio: "heightRatio", height: "height", fixedHeight: "fixedHeight", width: "width", fixedWidth: "fixedWidth", perPage: "perPage", gap: "gap", autoplay: "autoplay", snap: "snap", autoWidth: "autoWidth", drag: "drag", wheel: "wheel", interval: "interval", padding: "padding", centered: "centered", vertical: "vertical", loop: "loop", rewind: "rewind" }, outputs: { onOptionsChanged: "onOptionsChanged", onSlideChanged: "onSlideChanged", perMoveChange: "perMoveChange", focusChange: "focusChange", breakpointsChange: "breakpointsChange", heightRatioChange: "heightRatioChange", heightChange: "heightChange", fixedHeightChange: "fixedHeightChange", widthChange: "widthChange", fixedWidthChange: "fixedWidthChange", perPageChange: "perPageChange", autoplayChange: "autoplayChange", snapChange: "snapChange", autoWidthChange: "autoWidthChange", dragChange: "dragChange", wheelChange: "wheelChange", intervalChange: "intervalChange", paddingChange: "paddingChange", centeredChange: "centeredChange", verticalChange: "verticalChange", loopChange: "loopChange", rewindChange: "rewindChange", onItemsChanged: "onItemsChanged" }, host: { classAttribute: "ax-carousel" }, providers: [{
439
- provide: AXCarouselCore,
440
- useClass: AXCarouselSplideJS
441
- }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-carousel-list-container\">\r\n <div class=\"ax-carousel-list\">\r\n <ng-content select=\"ax-carousel-item\">\r\n </ng-content>\r\n </div>\r\n <ng-content select=\"ax-carousel-arrows\">\r\n </ng-content>\r\n</div>\r\n\r\n<ng-content select=\"ax-carousel-pager\">\r\n</ng-content>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
442
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselComponent, decorators: [{
443
- type: Component,
444
- args: [{ selector: 'ax-carousel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { class: 'ax-carousel' }, providers: [{
445
- provide: AXCarouselCore,
446
- useClass: AXCarouselSplideJS
447
- }], template: "<div class=\"ax-carousel-list-container\">\r\n <div class=\"ax-carousel-list\">\r\n <ng-content select=\"ax-carousel-item\">\r\n </ng-content>\r\n </div>\r\n <ng-content select=\"ax-carousel-arrows\">\r\n </ng-content>\r\n</div>\r\n\r\n<ng-content select=\"ax-carousel-pager\">\r\n</ng-content>" }]
448
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: AXCarouselCore }]; }, propDecorators: { onOptionsChanged: [{
449
- type: Output
450
- }], onSlideChanged: [{
451
- type: Output
452
- }], perMoveChange: [{
453
- type: Output
454
- }], perMove: [{
455
- type: Input
456
- }], focusChange: [{
457
- type: Output
458
- }], focus: [{
459
- type: Input
460
- }], breakpointsChange: [{
461
- type: Output
462
- }], breakpoints: [{
463
- type: Input
464
- }], heightRatioChange: [{
465
- type: Output
466
- }], heightRatio: [{
467
- type: Input
468
- }], heightChange: [{
469
- type: Output
470
- }], height: [{
471
- type: Input
472
- }], fixedHeightChange: [{
473
- type: Output
474
- }], fixedHeight: [{
475
- type: Input
476
- }], widthChange: [{
477
- type: Output
478
- }], width: [{
479
- type: Input
480
- }], fixedWidthChange: [{
481
- type: Output
482
- }], fixedWidth: [{
483
- type: Input
484
- }], perPageChange: [{
485
- type: Output
486
- }], perPage: [{
487
- type: Input
488
- }], gap: [{
489
- type: Input
490
- }], autoplayChange: [{
491
- type: Output
492
- }], autoplay: [{
493
- type: Input
494
- }], snapChange: [{
495
- type: Output
496
- }], snap: [{
497
- type: Input
498
- }], autoWidthChange: [{
499
- type: Output
500
- }], autoWidth: [{
501
- type: Input
502
- }], dragChange: [{
503
- type: Output
504
- }], drag: [{
505
- type: Input
506
- }], wheelChange: [{
507
- type: Output
508
- }], wheel: [{
509
- type: Input
510
- }], intervalChange: [{
511
- type: Output
512
- }], interval: [{
513
- type: Input
514
- }], paddingChange: [{
515
- type: Output
516
- }], padding: [{
517
- type: Input
518
- }], centeredChange: [{
519
- type: Output
520
- }], centered: [{
521
- type: Input
522
- }], verticalChange: [{
523
- type: Output
524
- }], vertical: [{
525
- type: Input
526
- }], loopChange: [{
527
- type: Output
528
- }], loop: [{
529
- type: Input
530
- }], rewindChange: [{
531
- type: Output
532
- }], rewind: [{
533
- type: Input
534
- }], onItemsChanged: [{
535
- type: Output
536
- }] } });
537
-
538
- class AXCarouselArrowsComponent extends AXBaseComponentMixin {
539
- constructor(elementRef, cdr, parent) {
540
- super(elementRef, cdr);
541
- this.parent = parent;
542
- this.onNextClick = new EventEmitter();
543
- this.onPrevClick = new EventEmitter();
544
- }
545
- _handlePrevClick(e) {
546
- e.stopPropagation();
547
- this.parent.prev();
548
- }
549
- _handleNextClick(e) {
550
- e.stopPropagation();
551
- this.parent.next();
552
- }
553
- }
554
- AXCarouselArrowsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselArrowsComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: AXCarouselComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component });
555
- AXCarouselArrowsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXCarouselArrowsComponent, selector: "ax-carousel-arrows", inputs: { class: "class" }, outputs: { onNextClick: "onNextClick", onPrevClick: "onPrevClick" }, host: { classAttribute: "ax-carousel-arrows" }, usesInheritance: true, ngImport: i0, template: `
556
- <button
557
- class="ax-carousel-arrow-prev"
558
- [ngClass]="{ 'ax-vertical-arrow ax-top-arrow': this.parent.vertical }"
559
- (click)="_handlePrevClick($event)"
560
- >
561
- <i class="ax-ic ax-ic-chevron ax-block rtl:ax-rotate-180 {{ class }}"></i>
562
- </button>
563
- <button
564
- class="ax-carousel-arrow-next"
565
- [ngClass]="{ 'ax-vertical-arrow ax-bottom-arrow': this.parent.vertical }"
566
- (click)="_handleNextClick($event)"
567
- >
568
- <i
569
- class="ax-ic ax-ic-chevron ax-block ax-rotate-180 rtl:ax-rotate-0 {{
570
- class
571
- }}"
572
- ></i>
573
- </button>
574
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
575
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselArrowsComponent, decorators: [{
576
- type: Component,
577
- args: [{
578
- selector: 'ax-carousel-arrows',
579
- template: `
580
- <button
581
- class="ax-carousel-arrow-prev"
582
- [ngClass]="{ 'ax-vertical-arrow ax-top-arrow': this.parent.vertical }"
583
- (click)="_handlePrevClick($event)"
584
- >
585
- <i class="ax-ic ax-ic-chevron ax-block rtl:ax-rotate-180 {{ class }}"></i>
586
- </button>
587
- <button
588
- class="ax-carousel-arrow-next"
589
- [ngClass]="{ 'ax-vertical-arrow ax-bottom-arrow': this.parent.vertical }"
590
- (click)="_handleNextClick($event)"
591
- >
592
- <i
593
- class="ax-ic ax-ic-chevron ax-block ax-rotate-180 rtl:ax-rotate-0 {{
594
- class
595
- }}"
596
- ></i>
597
- </button>
598
- `,
599
- changeDetection: ChangeDetectionStrategy.OnPush,
600
- encapsulation: ViewEncapsulation.None,
601
- host: { class: 'ax-carousel-arrows' },
602
- }]
603
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: AXCarouselComponent, decorators: [{
604
- type: Optional
605
- }] }]; }, propDecorators: { class: [{
606
- type: Input
607
- }], onNextClick: [{
608
- type: Output
609
- }], onPrevClick: [{
610
- type: Output
611
- }] } });
612
-
613
- class AXCarouselItemComponent extends AXBaseComponentMixin {
614
- constructor(elementRef, cdr) {
615
- super(elementRef, cdr);
616
- }
617
- }
618
- AXCarouselItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselItemComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
619
- AXCarouselItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXCarouselItemComponent, selector: "ax-carousel-item", host: { classAttribute: "ax-carousel-item" }, usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
620
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselItemComponent, decorators: [{
621
- type: Component,
622
- args: [{
623
- selector: 'ax-carousel-item',
624
- template: '<ng-content></ng-content>',
625
- changeDetection: ChangeDetectionStrategy.OnPush,
626
- encapsulation: ViewEncapsulation.None,
627
- host: { class: 'ax-carousel-item' }
628
- }]
629
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; } });
630
-
631
- class AXCarouselPagerComponent extends AXBaseComponentMixin {
632
- constructor(elementRef, cdr, _parent) {
633
- super(elementRef, cdr);
634
- this.cdr = cdr;
635
- this._parent = _parent;
636
- this._visibleIndex = 0;
637
- this._pageIndex = 0;
638
- this._size = 1;
639
- this._dots = [];
640
- this._subs = [];
641
- _parent.perPageChange.subscribe(c => {
642
- this._size = c;
643
- this._generateDots();
644
- });
645
- _parent.onSlideChanged.subscribe((c) => {
646
- this._visibleIndex = c.value;
647
- this._generateDots();
648
- });
649
- _parent.onItemsChanged.subscribe(c => {
650
- this._generateDots();
651
- });
652
- }
653
- onViewInit() {
654
- this._size = this._parent.perPage;
655
- this._visibleIndex = this._parent.visibleIndex;
656
- this._generateDots();
657
- }
658
- _generateDots() {
659
- this._dots = [...Array(Math.ceil(this._parent.items.length / this._size)).keys()];
660
- this._setPageIndex(this._findPageIndex(this._visibleIndex));
661
- this.cdr.detectChanges();
662
- }
663
- _handleClick(e, index) {
664
- e.stopPropagation();
665
- this._setPageIndex(index);
666
- this._parent.goToPage(index);
667
- }
668
- _setPageIndex(index) {
669
- this._pageIndex = index;
670
- this.cdr.detectChanges();
671
- }
672
- _findPageIndex(slideIndex) {
673
- return Math.min(Math.ceil(slideIndex / this._size), this._dots.length - 1);
674
- }
675
- onDestroy() {
676
- this._subs.forEach(s => {
677
- s.unsubscribe();
678
- });
679
- }
680
- }
681
- AXCarouselPagerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselPagerComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: AXCarouselComponent }], target: i0.ɵɵFactoryTarget.Component });
682
- AXCarouselPagerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.2", type: AXCarouselPagerComponent, selector: "ax-carousel-pager", host: { classAttribute: "ax-carousel-pager" }, usesInheritance: true, ngImport: i0, template: `
683
- <button *ngFor="let d of _dots;let i=index" [class.ax-state-active]="i==_pageIndex" (click)="_handleClick($event,i)">
684
- </button>
685
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselPagerComponent, decorators: [{
687
- type: Component,
688
- args: [{
689
- selector: 'ax-carousel-pager',
690
- template: `
691
- <button *ngFor="let d of _dots;let i=index" [class.ax-state-active]="i==_pageIndex" (click)="_handleClick($event,i)">
692
- </button>
693
- `,
694
- changeDetection: ChangeDetectionStrategy.OnPush,
695
- encapsulation: ViewEncapsulation.None,
696
- host: { class: 'ax-carousel-pager' }
697
- }]
698
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: AXCarouselComponent }]; } });
699
-
700
- const COMPONENT = [AXCarouselComponent, AXCarouselItemComponent, AXCarouselArrowsComponent, AXCarouselPagerComponent];
701
- const MODULES = [CommonModule];
702
- class AXCarouselModule {
703
- }
704
- AXCarouselModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
705
- AXCarouselModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselModule, declarations: [AXCarouselComponent, AXCarouselItemComponent, AXCarouselArrowsComponent, AXCarouselPagerComponent], imports: [CommonModule], exports: [AXCarouselComponent, AXCarouselItemComponent, AXCarouselArrowsComponent, AXCarouselPagerComponent] });
706
- AXCarouselModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselModule, imports: [MODULES] });
707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.2", ngImport: i0, type: AXCarouselModule, decorators: [{
708
- type: NgModule,
709
- args: [{
710
- declarations: [...COMPONENT],
711
- imports: [...MODULES],
712
- exports: [...COMPONENT],
713
- providers: [],
714
- }]
715
- }] });
716
-
717
- /**
718
- * Generated bundle index. Do not edit.
719
- */
720
-
721
- export { AXCarouselArrowsComponent, AXCarouselComponent, AXCarouselCore, AXCarouselItemComponent, AXCarouselModule, AXCarouselPagerComponent, AXCarouselSplideJS };
722
- //# sourceMappingURL=acorex-components-carousel.mjs.map