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