@ngstarter-ui/components 22.3.5 → 22.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (476) hide show
  1. package/README.md +27 -0
  2. package/ai/component-registry.json +186 -101
  3. package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
  4. package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
  5. package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
  6. package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
  7. package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
  8. package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
  9. package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
  10. package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
  11. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
  12. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
  13. package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
  14. package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
  15. package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
  16. package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
  17. package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
  18. package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
  19. package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
  20. package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
  21. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
  22. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
  23. package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
  24. package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
  25. package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
  26. package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
  27. package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
  28. package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
  29. package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
  30. package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
  31. package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
  32. package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
  33. package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
  34. package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
  35. package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
  36. package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
  37. package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
  38. package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
  39. package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
  40. package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
  41. package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
  42. package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
  44. package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
  46. package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
  48. package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
  50. package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
  52. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
  54. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
  56. package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
  58. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
  60. package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
  62. package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
  64. package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
  66. package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
  68. package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
  70. package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
  71. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
  72. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
  73. package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
  74. package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
  75. package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
  76. package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
  77. package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
  78. package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
  79. package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
  80. package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
  81. package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
  82. package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
  83. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
  84. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
  85. package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
  86. package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
  88. package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
  89. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
  90. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
  91. package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
  92. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  93. package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
  94. package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
  95. package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
  96. package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
  97. package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
  98. package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
  99. package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
  100. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  101. package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
  102. package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
  103. package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
  104. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  105. package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
  106. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
  107. package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
  108. package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
  109. package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
  110. package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
  111. package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
  112. package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
  113. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
  114. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
  115. package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
  116. package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
  117. package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
  118. package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
  119. package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
  120. package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
  121. package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
  122. package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
  123. package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
  124. package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
  125. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
  126. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  127. package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
  128. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  129. package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
  130. package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
  131. package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
  132. package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
  133. package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
  134. package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
  135. package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
  136. package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
  137. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
  138. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  139. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
  140. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
  141. package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
  142. package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
  143. package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
  144. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  145. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
  146. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
  147. package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
  148. package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
  149. package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
  150. package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
  151. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
  152. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
  153. package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
  154. package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
  155. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
  156. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
  157. package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
  158. package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
  159. package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
  160. package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
  161. package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
  162. package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
  163. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
  164. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  165. package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
  166. package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
  167. package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
  168. package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
  169. package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
  170. package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
  171. package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
  172. package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
  173. package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
  174. package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
  175. package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
  176. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  177. package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
  178. package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
  179. package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
  180. package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
  181. package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
  182. package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
  183. package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
  184. package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
  185. package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
  186. package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
  187. package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
  188. package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
  189. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
  190. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
  191. package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
  192. package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
  193. package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
  194. package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
  195. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
  196. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  197. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
  198. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
  199. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
  200. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  201. package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
  202. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  203. package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
  204. package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
  205. package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
  206. package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
  207. package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
  208. package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
  209. package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
  210. package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
  211. package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
  212. package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
  213. package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
  214. package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
  215. package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
  216. package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
  217. package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
  218. package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
  219. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
  220. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
  221. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
  222. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
  223. package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
  224. package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
  225. package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
  226. package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
  227. package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
  228. package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
  229. package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
  230. package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
  231. package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
  232. package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
  233. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
  234. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  235. package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
  236. package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
  237. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
  238. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
  239. package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
  240. package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
  241. package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
  242. package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
  243. package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
  244. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  245. package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
  246. package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
  247. package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
  248. package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
  249. package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
  250. package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
  251. package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
  252. package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
  253. package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
  254. package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
  255. package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
  256. package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
  257. package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
  258. package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
  259. package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
  260. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  261. package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
  262. package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
  263. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
  264. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
  265. package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
  266. package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
  267. package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
  268. package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
  269. package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
  270. package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
  271. package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
  272. package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
  273. package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
  274. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
  275. package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
  276. package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
  277. package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
  278. package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
  279. package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
  280. package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
  281. package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
  282. package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
  283. package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
  284. package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
  285. package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
  286. package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
  287. package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
  288. package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
  289. package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
  290. package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
  291. package/fesm2022/ngstarter-ui-components.mjs +3 -5
  292. package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
  293. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
  294. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
  295. package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
  296. package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
  297. package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
  298. package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
  299. package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
  300. package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
  301. package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
  302. package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
  303. package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
  304. package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
  305. package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
  306. package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
  307. package/package.json +11 -10
  308. package/styles/_tokens.scss +1 -0
  309. package/types/ngstarter-ui-components-action-required.d.ts +34 -14
  310. package/types/ngstarter-ui-components-alert.d.ts +53 -44
  311. package/types/ngstarter-ui-components-announcement.d.ts +74 -53
  312. package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
  313. package/types/ngstarter-ui-components-avatar.d.ts +113 -66
  314. package/types/ngstarter-ui-components-badge.d.ts +73 -37
  315. package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
  316. package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
  317. package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
  318. package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
  319. package/types/ngstarter-ui-components-button.d.ts +69 -27
  320. package/types/ngstarter-ui-components-calendar.d.ts +123 -71
  321. package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
  322. package/types/ngstarter-ui-components-card.d.ts +75 -71
  323. package/types/ngstarter-ui-components-carousel.d.ts +115 -69
  324. package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
  325. package/types/ngstarter-ui-components-chips.d.ts +288 -195
  326. package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
  327. package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
  328. package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
  329. package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
  330. package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
  331. package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
  332. package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
  333. package/types/ngstarter-ui-components-confirm.d.ts +24 -29
  334. package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
  335. package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
  336. package/types/ngstarter-ui-components-core.d.ts +513 -467
  337. package/types/ngstarter-ui-components-country-select.d.ts +170 -97
  338. package/types/ngstarter-ui-components-crop.d.ts +67 -52
  339. package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
  340. package/types/ngstarter-ui-components-data-view.d.ts +811 -567
  341. package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
  342. package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
  343. package/types/ngstarter-ui-components-dialog.d.ts +138 -116
  344. package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
  345. package/types/ngstarter-ui-components-divider.d.ts +29 -17
  346. package/types/ngstarter-ui-components-drawer.d.ts +39 -30
  347. package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
  348. package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
  349. package/types/ngstarter-ui-components-events.d.ts +73 -57
  350. package/types/ngstarter-ui-components-expand.d.ts +55 -25
  351. package/types/ngstarter-ui-components-expansion.d.ts +93 -64
  352. package/types/ngstarter-ui-components-file-type.d.ts +53 -27
  353. package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
  354. package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
  355. package/types/ngstarter-ui-components-form-field.d.ts +116 -105
  356. package/types/ngstarter-ui-components-gauge.d.ts +32 -20
  357. package/types/ngstarter-ui-components-grid.d.ts +66 -50
  358. package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
  359. package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
  360. package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
  361. package/types/ngstarter-ui-components-icon.d.ts +39 -38
  362. package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
  363. package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
  364. package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
  365. package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
  366. package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
  367. package/types/ngstarter-ui-components-incidents.d.ts +97 -104
  368. package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
  369. package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
  370. package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
  371. package/types/ngstarter-ui-components-input.d.ts +82 -54
  372. package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
  373. package/types/ngstarter-ui-components-kbd.d.ts +8 -12
  374. package/types/ngstarter-ui-components-layout.d.ts +131 -87
  375. package/types/ngstarter-ui-components-list.d.ts +123 -88
  376. package/types/ngstarter-ui-components-logo.d.ts +21 -21
  377. package/types/ngstarter-ui-components-marquee.d.ts +41 -34
  378. package/types/ngstarter-ui-components-menu.d.ts +329 -221
  379. package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
  380. package/types/ngstarter-ui-components-navigation.d.ts +186 -125
  381. package/types/ngstarter-ui-components-notifications.d.ts +104 -89
  382. package/types/ngstarter-ui-components-number-input.d.ts +138 -96
  383. package/types/ngstarter-ui-components-option.d.ts +102 -68
  384. package/types/ngstarter-ui-components-overlay.d.ts +7 -12
  385. package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
  386. package/types/ngstarter-ui-components-paginator.d.ts +171 -129
  387. package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
  388. package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
  389. package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
  390. package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
  391. package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
  392. package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
  393. package/types/ngstarter-ui-components-popover.d.ts +128 -89
  394. package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
  395. package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
  396. package/types/ngstarter-ui-components-radio.d.ts +100 -47
  397. package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
  398. package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
  399. package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
  400. package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
  401. package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
  402. package/types/ngstarter-ui-components-segmented.d.ts +93 -61
  403. package/types/ngstarter-ui-components-select.d.ts +366 -266
  404. package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
  405. package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
  406. package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
  407. package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
  408. package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
  409. package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
  410. package/types/ngstarter-ui-components-slider.d.ts +123 -82
  411. package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
  412. package/types/ngstarter-ui-components-sort.d.ts +99 -63
  413. package/types/ngstarter-ui-components-spinner.d.ts +49 -27
  414. package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
  415. package/types/ngstarter-ui-components-split.d.ts +276 -195
  416. package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
  417. package/types/ngstarter-ui-components-stepper.d.ts +57 -43
  418. package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
  419. package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
  420. package/types/ngstarter-ui-components-table.d.ts +256 -228
  421. package/types/ngstarter-ui-components-tabs.d.ts +231 -138
  422. package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
  423. package/types/ngstarter-ui-components-tiles.d.ts +166 -104
  424. package/types/ngstarter-ui-components-timeline.d.ts +45 -57
  425. package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
  426. package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
  427. package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
  428. package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
  429. package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
  430. package/types/ngstarter-ui-components-tree.d.ts +355 -229
  431. package/types/ngstarter-ui-components-upload.d.ts +216 -131
  432. package/types/ngstarter-ui-components-video-player.d.ts +130 -67
  433. package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
  434. package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
  435. package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
  436. package/types/ngstarter-ui-components.d.ts +2 -2
  437. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs +0 -35
  438. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs.map +0 -1
  439. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs +0 -26
  440. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs.map +0 -1
  441. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs +0 -220
  442. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs.map +0 -1
  443. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
  444. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
  445. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
  446. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
  447. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs +0 -375
  448. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs.map +0 -1
  449. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs +0 -80
  450. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs.map +0 -1
  451. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs +0 -65
  452. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs.map +0 -1
  453. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs +0 -137
  454. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs.map +0 -1
  455. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs +0 -113
  456. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs.map +0 -1
  457. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs +0 -235
  458. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs.map +0 -1
  459. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs +0 -117
  460. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs.map +0 -1
  461. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs +0 -4464
  462. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs.map +0 -1
  463. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs +0 -132
  464. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs.map +0 -1
  465. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs +0 -171
  466. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs.map +0 -1
  467. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs +0 -1653
  468. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs.map +0 -1
  469. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs +0 -20
  470. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs.map +0 -1
  471. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
  472. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
  473. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs +0 -134
  474. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs.map +0 -1
  475. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
  476. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
@@ -1,637 +1,1015 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, input, booleanAttribute, output, signal, inject, ElementRef, Renderer2, NgZone, Directive, viewChild, contentChildren, ChangeDetectionStrategy, Component } from '@angular/core';
3
-
4
- const CAROUSEL = new InjectionToken('CAROUSEL');
5
- const CAROUSEL_CARD = new InjectionToken('CAROUSEL_CARD');
6
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, InjectionToken, NgZone, Renderer2, booleanAttribute, contentChildren, inject, input, output, signal, viewChild } from "@angular/core";
3
+ const CAROUSEL = new InjectionToken("CAROUSEL");
4
+ const CAROUSEL_CARD = new InjectionToken("CAROUSEL_CARD");
7
5
  function easeOutQuad(t) {
8
- return t * (2 - t);
9
- }
10
- class DraggableCarouselDirective {
11
- cardSelector = input('.ngs-carousel-card', /* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "cardSelector" }] : /* istanbul ignore next */ []));
13
- snapToCenter = input(true, /* @ts-ignore */
14
- ...(ngDevMode ? [{ debugName: "snapToCenter" }] : /* istanbul ignore next */ []));
15
- snapDebounceTime = input(50, /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "snapDebounceTime" }] : /* istanbul ignore next */ []));
17
- snapDuration = input(300, /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "snapDuration" }] : /* istanbul ignore next */ []));
19
- resistanceFactor = input(0.5, /* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "resistanceFactor" }] : /* istanbul ignore next */ []));
21
- velocityThreshold = input(0.5, /* @ts-ignore */
22
- ...(ngDevMode ? [{ debugName: "velocityThreshold" }] : /* istanbul ignore next */ []));
23
- visibilityDebounceTime = input(100, /* @ts-ignore */
24
- ...(ngDevMode ? [{ debugName: "visibilityDebounceTime" }] : /* istanbul ignore next */ []));
25
- stopPropagation = input(true, { ...(ngDevMode ? { debugName: "stopPropagation" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
26
- indexChange = output();
27
- isDragging = signal(false, /* @ts-ignore */
28
- ...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
29
- startX = signal(0, /* @ts-ignore */
30
- ...(ngDevMode ? [{ debugName: "startX" }] : /* istanbul ignore next */ []));
31
- scrollLeftStart = signal(0, /* @ts-ignore */
32
- ...(ngDevMode ? [{ debugName: "scrollLeftStart" }] : /* istanbul ignore next */ []));
33
- currentTranslateX = signal(0, /* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "currentTranslateX" }] : /* istanbul ignore next */ []));
35
- lastMoveX = signal(null, /* @ts-ignore */
36
- ...(ngDevMode ? [{ debugName: "lastMoveX" }] : /* istanbul ignore next */ []));
37
- lastMoveTime = signal(null, /* @ts-ignore */
38
- ...(ngDevMode ? [{ debugName: "lastMoveTime" }] : /* istanbul ignore next */ []));
39
- currentVelocityX = signal(0, /* @ts-ignore */
40
- ...(ngDevMode ? [{ debugName: "currentVelocityX" }] : /* istanbul ignore next */ []));
41
- lastEmittedIndex = signal(null, /* @ts-ignore */
42
- ...(ngDevMode ? [{ debugName: "lastEmittedIndex" }] : /* istanbul ignore next */ []));
43
- snapTimeoutId = null;
44
- scrollAnimationId = null;
45
- transformAnimationId = null;
46
- visibilityDebounceTimeoutId = null;
47
- el = inject((ElementRef));
48
- renderer = inject(Renderer2);
49
- zone = inject(NgZone);
50
- hostElement;
51
- cards = [];
52
- ngOnInit() {
53
- this.hostElement = this.el.nativeElement;
54
- this.renderer.setStyle(this.hostElement, 'cursor', 'grab');
55
- this.hostElement.style.scrollBehavior = 'auto';
56
- }
57
- ngAfterContentInit() {
58
- this.cards = Array.from(this.hostElement.querySelectorAll(this.cardSelector()));
59
- // Initial state calculation after content is initialized and layout is stable
60
- setTimeout(() => {
61
- const actualInitialIndex = this.findCurrentCenterIndex();
62
- this.emitActiveIndex(actualInitialIndex);
63
- this.updateCardVisibilityClasses();
64
- }, 0);
65
- }
66
- ngOnDestroy() {
67
- this.clearSnapTimeout();
68
- this.cancelScrollAnimation();
69
- this.cancelTransformAnimation();
70
- clearTimeout(this.visibilityDebounceTimeoutId);
71
- }
72
- onScroll(event) {
73
- if (this.isDragging() || this.scrollAnimationId !== null || this.transformAnimationId !== null) {
74
- return;
75
- }
76
- if (this.visibilityDebounceTimeoutId !== null) {
77
- clearTimeout(this.visibilityDebounceTimeoutId);
78
- }
79
- this.visibilityDebounceTimeoutId = setTimeout(() => {
80
- this.updateCardVisibilityClasses();
81
- const currentIndex = this.findCurrentCenterIndex();
82
- this.emitActiveIndex(currentIndex);
83
- this.visibilityDebounceTimeoutId = null;
84
- }, this.visibilityDebounceTime());
85
- }
86
- onMouseDown(event) {
87
- clearTimeout(this.visibilityDebounceTimeoutId);
88
- this.clearSnapTimeout();
89
- this.cancelScrollAnimation();
90
- this.cancelTransformAnimation();
91
- if (this.currentTranslateX() !== 0) {
92
- this.currentTranslateX.set(0);
93
- this.renderer.setStyle(this.hostElement, 'transform', '');
94
- }
95
- this.hostElement.style.scrollBehavior = 'auto';
96
- if (event.button !== 0)
97
- return;
98
- this.isDragging.set(true);
99
- this.startX.set(event.pageX - this.hostElement.offsetLeft);
100
- this.scrollLeftStart.set(this.hostElement.scrollLeft);
101
- this.lastMoveX.set(event.pageX);
102
- this.lastMoveTime.set(event.timeStamp);
103
- this.currentVelocityX.set(0);
104
- this.renderer.setStyle(this.hostElement, 'cursor', 'grabbing');
105
- event.preventDefault();
106
- }
107
- onMouseMove(event) {
108
- if (!this.isDragging())
109
- return;
110
- event.preventDefault();
111
- const currentX = event.pageX;
112
- const currentTime = event.timeStamp;
113
- const lastMoveTime = this.lastMoveTime();
114
- const lastMoveX = this.lastMoveX();
115
- if (lastMoveTime !== null && lastMoveX !== null && currentTime > lastMoveTime) {
116
- const deltaX = currentX - lastMoveX;
117
- const deltaTime = currentTime - lastMoveTime;
118
- if (deltaTime > 0) {
119
- this.currentVelocityX.set(-deltaX / deltaTime);
120
- }
121
- }
122
- this.lastMoveX.set(currentX);
123
- this.lastMoveTime.set(currentTime);
124
- const dragDeltaX = currentX - (this.startX() + this.hostElement.offsetLeft);
125
- const intendedScrollLeft = this.scrollLeftStart() - dragDeltaX;
126
- const maxScrollLeft = this.hostElement.scrollWidth - this.hostElement.clientWidth;
127
- let targetScrollLeft = intendedScrollLeft;
128
- let translateX = 0;
129
- if (intendedScrollLeft < 0) {
130
- targetScrollLeft = 0;
131
- const overpull = -intendedScrollLeft;
132
- translateX = Math.min(overpull * this.resistanceFactor(), this.hostElement.clientWidth * 0.4);
133
- }
134
- else if (intendedScrollLeft > maxScrollLeft) {
135
- targetScrollLeft = maxScrollLeft;
136
- const overpull = intendedScrollLeft - maxScrollLeft;
137
- translateX = -Math.min(overpull * this.resistanceFactor(), this.hostElement.clientWidth * 0.4);
138
- }
139
- if (this.hostElement.scrollLeft !== targetScrollLeft) {
140
- this.hostElement.scrollLeft = targetScrollLeft;
141
- }
142
- if (this.currentTranslateX() !== translateX) {
143
- this.currentTranslateX.set(translateX);
144
- if (Math.abs(translateX) > 0.1) {
145
- this.renderer.setStyle(this.hostElement, 'transform', `translateX(${translateX}px)`);
146
- }
147
- else {
148
- this.currentTranslateX.set(0);
149
- this.renderer.setStyle(this.hostElement, 'transform', '');
150
- }
151
- }
152
- }
153
- onMouseUpOrLeave(event) {
154
- if (!this.isDragging()) {
155
- return;
156
- }
157
- this.stopDragging();
158
- if (this.stopPropagation()) {
159
- event.stopPropagation();
160
- event.preventDefault();
161
- event.stopImmediatePropagation();
162
- }
163
- }
164
- onMouseLeaveElement(event) {
165
- if (!this.isDragging()) {
166
- this.renderer.setStyle(this.hostElement, 'cursor', 'grab');
167
- }
168
- }
169
- stopDragging() {
170
- if (!this.isDragging())
171
- return;
172
- this.isDragging.set(false);
173
- this.renderer.setStyle(this.hostElement, 'cursor', 'grab');
174
- this.clearSnapTimeout();
175
- const wasPulled = Math.abs(this.currentTranslateX()) > 0.1;
176
- if (wasPulled) {
177
- this.snapTimeoutId = setTimeout(() => {
178
- this.animateTransformReset();
179
- this.snapTimeoutId = null;
180
- }, this.snapDebounceTime() / 2);
181
- }
182
- else if (this.snapToCenter()) {
183
- this.snapTimeoutId = setTimeout(() => {
184
- this.initiateSnap();
185
- this.snapTimeoutId = null;
186
- }, this.snapDebounceTime());
187
- }
188
- else {
189
- this.updateCardVisibilityClasses();
190
- const currentIndex = this.findCurrentCenterIndex();
191
- this.emitActiveIndex(currentIndex);
192
- }
193
- }
194
- initiateSnap() {
195
- this.cards = Array.from(this.hostElement.querySelectorAll(this.cardSelector()));
196
- if (!this.cards.length)
197
- return;
198
- let targetCardIndex = -1;
199
- const currentScroll = this.hostElement.scrollLeft;
200
- const containerCenter = currentScroll + this.hostElement.clientWidth / 2;
201
- let currentNearestCardIndex = this.findNearestCardIndex(this.cards, containerCenter);
202
- if (currentNearestCardIndex < 0)
203
- return;
204
- const absVelocity = Math.abs(this.currentVelocityX());
205
- const threshold = this.velocityThreshold();
206
- if (absVelocity > threshold) {
207
- if (this.currentVelocityX() < 0) {
208
- targetCardIndex = currentNearestCardIndex - 1;
209
- }
210
- else {
211
- targetCardIndex = currentNearestCardIndex + 1;
212
- }
213
- targetCardIndex = Math.max(0, Math.min(targetCardIndex, this.cards.length - 1));
214
- }
215
- else {
216
- targetCardIndex = currentNearestCardIndex;
217
- }
218
- if (targetCardIndex >= 0 && targetCardIndex < this.cards.length) {
219
- this.scrollToCard(targetCardIndex, false);
220
- }
221
- else {
222
- this.updateCardVisibilityClasses();
223
- }
224
- }
225
- scrollToCard(index, immediate = false) {
226
- if (index < 0 || index >= this.cards.length) {
227
- return;
228
- }
229
- const targetCard = this.cards[index];
230
- if (!targetCard)
231
- return;
232
- const container = this.hostElement;
233
- const containerWidth = container.clientWidth;
234
- const targetCardLeft = targetCard.offsetLeft;
235
- const targetCardWidth = targetCard.offsetWidth;
236
- let targetScrollLeft = targetCardLeft + targetCardWidth / 2 - containerWidth / 2;
237
- const maxScrollLeft = container.scrollWidth - containerWidth;
238
- targetScrollLeft = Math.max(0, Math.min(targetScrollLeft, maxScrollLeft));
239
- this.cancelScrollAnimation();
240
- if (immediate) {
241
- container.scrollLeft = targetScrollLeft;
242
- this.updateCardVisibilityClasses();
243
- this.emitActiveIndex(index);
244
- }
245
- else {
246
- this.animateScroll(targetScrollLeft);
247
- }
248
- }
249
- findNearestCardIndex(cards, position) {
250
- let nearestIndex = -1;
251
- let minDistance = Infinity;
252
- cards.forEach((card, index) => {
253
- if (card instanceof HTMLElement) {
254
- const cardLeft = card.offsetLeft;
255
- const cardWidth = card.offsetWidth;
256
- const cardCenter = cardLeft + cardWidth / 2;
257
- const distance = Math.abs(cardCenter - position);
258
- if (distance < minDistance) {
259
- minDistance = distance;
260
- nearestIndex = index;
261
- }
262
- }
263
- });
264
- return nearestIndex;
265
- }
266
- animateTransformReset() {
267
- this.cancelTransformAnimation();
268
- const startTranslateX = this.currentTranslateX();
269
- const distance = 0 - startTranslateX;
270
- if (Math.abs(distance) < 1) {
271
- if (startTranslateX !== 0) {
272
- this.currentTranslateX.set(0);
273
- this.renderer.setStyle(this.hostElement, 'transform', '');
274
- const finalIndex = this.findCurrentCenterIndex();
275
- this.emitActiveIndex(finalIndex);
276
- this.updateCardVisibilityClasses();
277
- }
278
- return;
279
- }
280
- const duration = this.snapDuration();
281
- let startTime = null;
282
- const step = (timestamp) => {
283
- if (startTime === null)
284
- startTime = timestamp;
285
- const elapsed = timestamp - startTime;
286
- const progress = Math.min(1, elapsed / duration);
287
- const easedProgress = easeOutQuad(progress);
288
- const newTranslateX = startTranslateX + distance * easedProgress;
289
- this.currentTranslateX.set(newTranslateX);
290
- this.renderer.setStyle(this.hostElement, 'transform', `translateX(${newTranslateX}px)`);
291
- if (progress < 1) {
292
- this.transformAnimationId = requestAnimationFrame(step);
293
- }
294
- else {
295
- this.currentTranslateX.set(0);
296
- this.renderer.setStyle(this.hostElement, 'transform', '');
297
- this.transformAnimationId = null;
298
- const finalIndex = this.findCurrentCenterIndex();
299
- this.emitActiveIndex(finalIndex);
300
- this.updateCardVisibilityClasses();
301
- }
302
- };
303
- this.zone.runOutsideAngular(() => {
304
- this.transformAnimationId = requestAnimationFrame(step);
305
- });
306
- }
307
- animateScroll(targetScrollLeft) {
308
- this.cancelScrollAnimation();
309
- const container = this.hostElement;
310
- const startScrollLeft = container.scrollLeft;
311
- const distance = targetScrollLeft - startScrollLeft;
312
- if (Math.abs(distance) < 1) {
313
- const finalIndex = this.findCurrentCenterIndex();
314
- this.emitActiveIndex(finalIndex);
315
- this.updateCardVisibilityClasses();
316
- return;
317
- }
318
- const duration = this.snapDuration();
319
- let startTime = null;
320
- const step = (timestamp) => {
321
- if (startTime === null)
322
- startTime = timestamp;
323
- const elapsed = timestamp - startTime;
324
- const progress = Math.min(1, elapsed / duration);
325
- const easedProgress = easeOutQuad(progress);
326
- container.scrollLeft = startScrollLeft + distance * easedProgress;
327
- if (progress < 1) {
328
- this.scrollAnimationId = requestAnimationFrame(step);
329
- }
330
- else {
331
- container.scrollLeft = targetScrollLeft;
332
- this.scrollAnimationId = null;
333
- const finalIndex = this.findCurrentCenterIndex();
334
- this.emitActiveIndex(finalIndex);
335
- this.updateCardVisibilityClasses();
336
- }
337
- };
338
- this.zone.runOutsideAngular(() => {
339
- this.scrollAnimationId = requestAnimationFrame(step);
340
- });
341
- }
342
- findCurrentCenterIndex() {
343
- this.cards = Array.from(this.hostElement.querySelectorAll(this.cardSelector()));
344
- if (!this.cards.length)
345
- return -1;
346
- const currentScroll = this.hostElement.scrollLeft;
347
- const containerCenter = currentScroll + this.hostElement.clientWidth / 2;
348
- return this.findNearestCardIndex(this.cards, containerCenter);
349
- }
350
- emitActiveIndex(index) {
351
- if (index >= 0 && index !== this.lastEmittedIndex()) {
352
- this.lastEmittedIndex.set(index);
353
- this.zone.run(() => {
354
- this.indexChange.emit(index);
355
- });
356
- }
357
- }
358
- updateCardVisibilityClasses() {
359
- this.cards = Array.from(this.hostElement.querySelectorAll(this.cardSelector()));
360
- if (!this.cards.length || !this.hostElement.clientWidth)
361
- return;
362
- const viewportStart = this.hostElement.scrollLeft;
363
- const viewportWidth = this.hostElement.clientWidth;
364
- const viewportEnd = viewportStart + viewportWidth;
365
- const tolerance = 1;
366
- this.cards.forEach(card => {
367
- if (card instanceof HTMLElement) {
368
- const cardStart = card.offsetLeft;
369
- const cardEnd = cardStart + card.offsetWidth;
370
- const isSpanned = cardStart >= viewportStart - tolerance && cardEnd <= viewportEnd + tolerance;
371
- const isInView = cardEnd > viewportStart + tolerance && cardStart < viewportEnd - tolerance;
372
- if (isSpanned) {
373
- this.renderer.addClass(card, 'is-spanned');
374
- }
375
- else {
376
- this.renderer.removeClass(card, 'is-spanned');
377
- }
378
- if (isInView) {
379
- this.renderer.addClass(card, 'is-in-view');
380
- }
381
- else {
382
- this.renderer.removeClass(card, 'is-in-view');
383
- }
384
- }
385
- });
386
- }
387
- cancelScrollAnimation() {
388
- if (this.scrollAnimationId !== null) {
389
- cancelAnimationFrame(this.scrollAnimationId);
390
- this.scrollAnimationId = null;
391
- }
392
- }
393
- cancelTransformAnimation() {
394
- if (this.transformAnimationId !== null) {
395
- cancelAnimationFrame(this.transformAnimationId);
396
- this.transformAnimationId = null;
397
- }
398
- }
399
- clearSnapTimeout() {
400
- if (this.snapTimeoutId !== null) {
401
- clearTimeout(this.snapTimeoutId);
402
- this.snapTimeoutId = null;
403
- }
404
- }
405
- onClick(event) {
406
- if (this.stopPropagation()) {
407
- event.stopPropagation();
408
- event.preventDefault();
409
- }
410
- }
411
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DraggableCarouselDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
412
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: DraggableCarouselDirective, isStandalone: true, selector: "[ngsDraggableCarousel]", inputs: { cardSelector: { classPropertyName: "cardSelector", publicName: "cardSelector", isSignal: true, isRequired: false, transformFunction: null }, snapToCenter: { classPropertyName: "snapToCenter", publicName: "snapToCenter", isSignal: true, isRequired: false, transformFunction: null }, snapDebounceTime: { classPropertyName: "snapDebounceTime", publicName: "snapDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, snapDuration: { classPropertyName: "snapDuration", publicName: "snapDuration", isSignal: true, isRequired: false, transformFunction: null }, resistanceFactor: { classPropertyName: "resistanceFactor", publicName: "resistanceFactor", isSignal: true, isRequired: false, transformFunction: null }, velocityThreshold: { classPropertyName: "velocityThreshold", publicName: "velocityThreshold", isSignal: true, isRequired: false, transformFunction: null }, visibilityDebounceTime: { classPropertyName: "visibilityDebounceTime", publicName: "visibilityDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indexChange: "indexChange" }, host: { listeners: { "scroll": "onScroll($event)", "click": "onClick($event)", "mousedown": "onMouseDown($event)", "mouseleave": "onMouseLeaveElement($event)", "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUpOrLeave($event)", "document:mouseleave": "onMouseUpOrLeave($event)" }, properties: { "class.dragging-active": "isDragging()" } }, ngImport: i0 });
413
- }
414
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DraggableCarouselDirective, decorators: [{
415
- type: Directive,
416
- args: [{
417
- selector: '[ngsDraggableCarousel]',
418
- host: {
419
- '(scroll)': 'onScroll($event)',
420
- '(click)': 'onClick($event)',
421
- '(mousedown)': 'onMouseDown($event)',
422
- '(mouseleave)': 'onMouseLeaveElement($event)',
423
- '(document:mousemove)': 'onMouseMove($event)',
424
- '(document:mouseup)': 'onMouseUpOrLeave($event)',
425
- '(document:mouseleave)': 'onMouseUpOrLeave($event)',
426
- '[class.dragging-active]': 'isDragging()'
427
- }
428
- }]
429
- }], propDecorators: { cardSelector: [{ type: i0.Input, args: [{ isSignal: true, alias: "cardSelector", required: false }] }], snapToCenter: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapToCenter", required: false }] }], snapDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapDebounceTime", required: false }] }], snapDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapDuration", required: false }] }], resistanceFactor: [{ type: i0.Input, args: [{ isSignal: true, alias: "resistanceFactor", required: false }] }], velocityThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "velocityThreshold", required: false }] }], visibilityDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibilityDebounceTime", required: false }] }], stopPropagation: [{ type: i0.Input, args: [{ isSignal: true, alias: "stopPropagation", required: false }] }], indexChange: [{ type: i0.Output, args: ["indexChange"] }] } });
430
-
431
- class Carousel {
432
- _content = viewChild.required('content', /* @ts-ignore */
433
- ...(ngDevMode ? [{ debugName: "_content" }] : /* istanbul ignore next */ []));
434
- _cards = contentChildren(CAROUSEL_CARD, /* @ts-ignore */
435
- ...(ngDevMode ? [{ debugName: "_cards" }] : /* istanbul ignore next */ []));
436
- fade = input(false, { ...(ngDevMode ? { debugName: "fade" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
437
- snapToCenter = input(true, /* @ts-ignore */
438
- ...(ngDevMode ? [{ debugName: "snapToCenter" }] : /* istanbul ignore next */ []));
439
- snapDebounceTime = input(50, /* @ts-ignore */
440
- ...(ngDevMode ? [{ debugName: "snapDebounceTime" }] : /* istanbul ignore next */ []));
441
- snapDuration = input(300, /* @ts-ignore */
442
- ...(ngDevMode ? [{ debugName: "snapDuration" }] : /* istanbul ignore next */ []));
443
- resistanceFactor = input(0.5, /* @ts-ignore */
444
- ...(ngDevMode ? [{ debugName: "resistanceFactor" }] : /* istanbul ignore next */ []));
445
- velocityThreshold = input(0.5, /* @ts-ignore */
446
- ...(ngDevMode ? [{ debugName: "velocityThreshold" }] : /* istanbul ignore next */ []));
447
- visibilityDebounceTime = input(100, /* @ts-ignore */
448
- ...(ngDevMode ? [{ debugName: "visibilityDebounceTime" }] : /* istanbul ignore next */ []));
449
- stopPropagation = input(true, { ...(ngDevMode ? { debugName: "stopPropagation" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
450
- indexChange = output();
451
- _index = signal(0, /* @ts-ignore */
452
- ...(ngDevMode ? [{ debugName: "_index" }] : /* istanbul ignore next */ []));
453
- get api() {
454
- return {
455
- isNextDisabled: () => this._isNextDisabled,
456
- isPreviousDisabled: () => this._isPreviousDisabled,
457
- previous: () => this._previous(),
458
- next: () => this._next(),
459
- selectedIndex: () => this._index()
460
- };
461
- }
462
- onIndexChanged(index) {
463
- if (this._index() === index) {
464
- return;
465
- }
466
- this._index.set(index);
467
- this.indexChange.emit(index);
468
- }
469
- _previous() {
470
- const contentElement = this._content()?.nativeElement;
471
- for (let index = this._cards().length - 1; index >= 0; index--) {
472
- if (index >= this._index()) {
473
- continue;
474
- }
475
- const card = this._cards().at(index);
476
- if (!this._visibleInParentViewport(contentElement, card.element)) {
477
- this._scrollToCard(card);
478
- break;
479
- }
480
- }
481
- }
482
- _next() {
483
- const contentElement = this._content().nativeElement;
484
- const notVisibleCard = this._cards().find((card, index) => !this._visibleInParentViewport(contentElement, card.element) && index > this._index());
485
- if (notVisibleCard) {
486
- this._scrollToCard(notVisibleCard);
487
- }
488
- }
489
- _scrollToCard(notVisibleCard) {
490
- this._index.set(this._cards().findIndex(card => card === notVisibleCard));
491
- this.indexChange.emit(this._index());
492
- notVisibleCard.element.scrollIntoView({
493
- block: 'nearest',
494
- behavior: 'smooth',
495
- inline: 'center'
496
- });
497
- }
498
- _visibleInParentViewport = (parent, el) => {
499
- const parentRect = parent.getBoundingClientRect();
500
- const elementRect = el.getBoundingClientRect();
501
- return (elementRect.right <= parentRect.right &&
502
- elementRect.left >= parentRect.left);
503
- };
504
- get _isPreviousDisabled() {
505
- return this._index() === 0;
506
- }
507
- get _isNextDisabled() {
508
- return this._index() === this._cards().length - 1;
509
- }
510
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Carousel, deps: [], target: i0.ɵɵFactoryTarget.Component });
511
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: Carousel, isStandalone: true, selector: "ngs-carousel", inputs: { fade: { classPropertyName: "fade", publicName: "fade", isSignal: true, isRequired: false, transformFunction: null }, snapToCenter: { classPropertyName: "snapToCenter", publicName: "snapToCenter", isSignal: true, isRequired: false, transformFunction: null }, snapDebounceTime: { classPropertyName: "snapDebounceTime", publicName: "snapDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, snapDuration: { classPropertyName: "snapDuration", publicName: "snapDuration", isSignal: true, isRequired: false, transformFunction: null }, resistanceFactor: { classPropertyName: "resistanceFactor", publicName: "resistanceFactor", isSignal: true, isRequired: false, transformFunction: null }, velocityThreshold: { classPropertyName: "velocityThreshold", publicName: "velocityThreshold", isSignal: true, isRequired: false, transformFunction: null }, visibilityDebounceTime: { classPropertyName: "visibilityDebounceTime", publicName: "visibilityDebounceTime", isSignal: true, isRequired: false, transformFunction: null }, stopPropagation: { classPropertyName: "stopPropagation", publicName: "stopPropagation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { indexChange: "indexChange" }, host: { properties: { "class.fade": "fade()" }, classAttribute: "ngs-carousel" }, providers: [
512
- {
513
- provide: CAROUSEL,
514
- useExisting: Carousel
515
- }
516
- ], queries: [{ propertyName: "_cards", predicate: CAROUSEL_CARD, isSignal: true }], viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true, isSignal: true }], exportAs: ["ngsCarousel"], ngImport: i0, template: "<div #content class=\"content\"\n ngsDraggableCarousel\n [stopPropagation]=\"stopPropagation()\"\n [snapToCenter]=\"snapToCenter()\"\n [snapDebounceTime]=\"snapDebounceTime()\"\n [snapDuration]=\"snapDuration()\"\n [resistanceFactor]=\"resistanceFactor()\"\n [velocityThreshold]=\"velocityThreshold()\"\n [visibilityDebounceTime]=\"visibilityDebounceTime()\"\n (indexChange)=\"onIndexChanged($event)\">\n <ng-content select=\"ngs-carousel-card,[ngs-carousel-card]\" />\n</div>\n<div class=\"controls\">\n <ng-content select=\"[ngsCarouselControls]\" />\n</div>\n", styles: [":host{--ngs-carousel-gap: calc(var(--spacing, .25rem) * 8);display:block;position:relative}:host .content{display:flex;overflow:hidden;gap:var(--ngs-carousel-gap)}:host .controls{margin-top:calc(var(--spacing, .25rem) * 4);gap:calc(var(--spacing, .25rem) * 3)}:host .controls:empty{display:none}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: DraggableCarouselDirective, selector: "[ngsDraggableCarousel]", inputs: ["cardSelector", "snapToCenter", "snapDebounceTime", "snapDuration", "resistanceFactor", "velocityThreshold", "visibilityDebounceTime", "stopPropagation"], outputs: ["indexChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
517
- }
518
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Carousel, decorators: [{
519
- type: Component,
520
- args: [{ selector: 'ngs-carousel', exportAs: 'ngsCarousel', providers: [
521
- {
522
- provide: CAROUSEL,
523
- useExisting: Carousel
524
- }
525
- ], hostDirectives: [], imports: [
526
- DraggableCarouselDirective
527
- ], changeDetection: ChangeDetectionStrategy.Eager, host: {
528
- 'class': 'ngs-carousel',
529
- '[class.fade]': 'fade()',
530
- }, template: "<div #content class=\"content\"\n ngsDraggableCarousel\n [stopPropagation]=\"stopPropagation()\"\n [snapToCenter]=\"snapToCenter()\"\n [snapDebounceTime]=\"snapDebounceTime()\"\n [snapDuration]=\"snapDuration()\"\n [resistanceFactor]=\"resistanceFactor()\"\n [velocityThreshold]=\"velocityThreshold()\"\n [visibilityDebounceTime]=\"visibilityDebounceTime()\"\n (indexChange)=\"onIndexChanged($event)\">\n <ng-content select=\"ngs-carousel-card,[ngs-carousel-card]\" />\n</div>\n<div class=\"controls\">\n <ng-content select=\"[ngsCarouselControls]\" />\n</div>\n", styles: [":host{--ngs-carousel-gap: calc(var(--spacing, .25rem) * 8);display:block;position:relative}:host .content{display:flex;overflow:hidden;gap:var(--ngs-carousel-gap)}:host .controls{margin-top:calc(var(--spacing, .25rem) * 4);gap:calc(var(--spacing, .25rem) * 3)}:host .controls:empty{display:none}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
531
- }], propDecorators: { _content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], _cards: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => CAROUSEL_CARD), { isSignal: true }] }], fade: [{ type: i0.Input, args: [{ isSignal: true, alias: "fade", required: false }] }], snapToCenter: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapToCenter", required: false }] }], snapDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapDebounceTime", required: false }] }], snapDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapDuration", required: false }] }], resistanceFactor: [{ type: i0.Input, args: [{ isSignal: true, alias: "resistanceFactor", required: false }] }], velocityThreshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "velocityThreshold", required: false }] }], visibilityDebounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "visibilityDebounceTime", required: false }] }], stopPropagation: [{ type: i0.Input, args: [{ isSignal: true, alias: "stopPropagation", required: false }] }], indexChange: [{ type: i0.Output, args: ["indexChange"] }] } });
532
-
533
- class CarouselCard {
534
- _elementRef = inject(ElementRef);
535
- get element() {
536
- return this._elementRef.nativeElement;
537
- }
538
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CarouselCard, deps: [], target: i0.ɵɵFactoryTarget.Component });
539
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: CarouselCard, isStandalone: true, selector: "ngs-carousel-card,[ngs-carousel-card]", host: { classAttribute: "ngs-carousel-card" }, providers: [
540
- {
541
- provide: CAROUSEL_CARD,
542
- useExisting: CarouselCard
543
- }
544
- ], exportAs: ["ngsCarouselCard"], ngImport: i0, template: "<ng-content />\n", styles: [":host{display:block;scroll-padding-inline:100px;flex:none}:host-context(.ngs-carousel.fade){animation:ngs-carousel-fade;animation-fill-mode:both;animation-timing-function:linear;animation-timeline:view(inline)}@keyframes ngs-carousel-fade{0%,to{opacity:.3}50%{opacity:1}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
545
- }
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CarouselCard, decorators: [{
547
- type: Component,
548
- args: [{ selector: 'ngs-carousel-card,[ngs-carousel-card]', exportAs: 'ngsCarouselCard', imports: [], providers: [
549
- {
550
- provide: CAROUSEL_CARD,
551
- useExisting: CarouselCard
552
- }
553
- ], changeDetection: ChangeDetectionStrategy.Eager, host: {
554
- 'class': 'ngs-carousel-card',
555
- }, template: "<ng-content />\n", styles: [":host{display:block;scroll-padding-inline:100px;flex:none}:host-context(.ngs-carousel.fade){animation:ngs-carousel-fade;animation-fill-mode:both;animation-timing-function:linear;animation-timeline:view(inline)}@keyframes ngs-carousel-fade{0%,to{opacity:.3}50%{opacity:1}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
556
- }] });
557
-
558
- class CarouselControlsDirective {
559
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CarouselControlsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
560
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: CarouselControlsDirective, isStandalone: true, selector: "[ngsCarouselControls]", host: { classAttribute: "ngs-carousel-controls" }, ngImport: i0 });
561
- }
562
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CarouselControlsDirective, decorators: [{
563
- type: Directive,
564
- args: [{
565
- selector: '[ngsCarouselControls]',
566
- host: {
567
- 'class': 'ngs-carousel-controls',
568
- }
569
- }]
570
- }] });
571
-
572
- class CarouselPreviousDirective {
573
- _carousel = inject(CAROUSEL, {
574
- optional: true
575
- });
576
- carousel = input(null, /* @ts-ignore */
577
- ...(ngDevMode ? [{ debugName: "carousel" }] : /* istanbul ignore next */ []));
578
- ngOnInit() {
579
- if (this.carousel() && !this._carousel) {
580
- this._carousel = this.carousel();
581
- }
582
- }
583
- _handleClick() {
584
- this._carousel?.api.previous();
585
- }
586
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CarouselPreviousDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
587
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: CarouselPreviousDirective, isStandalone: true, selector: "[ngsCarouselPrevious]", inputs: { carousel: { classPropertyName: "carousel", publicName: "carousel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_handleClick()" }, properties: { "attr.disabled": "_carousel?.api?.isPreviousDisabled() ? true : null" }, classAttribute: "ngs-carousel-previous" }, exportAs: ["ngsCarouselPrevious"], ngImport: i0 });
588
- }
589
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CarouselPreviousDirective, decorators: [{
590
- type: Directive,
591
- args: [{
592
- selector: '[ngsCarouselPrevious]',
593
- exportAs: 'ngsCarouselPrevious',
594
- host: {
595
- 'class': 'ngs-carousel-previous',
596
- '[attr.disabled]': '_carousel?.api?.isPreviousDisabled() ? true : null',
597
- '(click)': '_handleClick()'
598
- }
599
- }]
600
- }], propDecorators: { carousel: [{ type: i0.Input, args: [{ isSignal: true, alias: "carousel", required: false }] }] } });
601
-
602
- class CarouselNextDirective {
603
- _carousel = inject(CAROUSEL, {
604
- optional: true
605
- });
606
- carousel = input(null, /* @ts-ignore */
607
- ...(ngDevMode ? [{ debugName: "carousel" }] : /* istanbul ignore next */ []));
608
- ngOnInit() {
609
- if (this.carousel() && !this._carousel) {
610
- this._carousel = this.carousel();
611
- }
612
- }
613
- _handleClick() {
614
- this._carousel?.api.next();
615
- }
616
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CarouselNextDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
617
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: CarouselNextDirective, isStandalone: true, selector: "[ngsCarouselNext]", inputs: { carousel: { classPropertyName: "carousel", publicName: "carousel", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_handleClick()" }, properties: { "attr.disabled": "_carousel?.api?.isNextDisabled() ? true : null" }, classAttribute: "ngs-carousel-next" }, exportAs: ["ngsCarouselNext"], ngImport: i0 });
6
+ return t * (2 - t);
618
7
  }
619
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CarouselNextDirective, decorators: [{
620
- type: Directive,
621
- args: [{
622
- selector: '[ngsCarouselNext]',
623
- exportAs: 'ngsCarouselNext',
624
- host: {
625
- 'class': 'ngs-carousel-next',
626
- '[attr.disabled]': '_carousel?.api?.isNextDisabled() ? true : null',
627
- '(click)': '_handleClick()'
628
- }
629
- }]
630
- }], propDecorators: { carousel: [{ type: i0.Input, args: [{ isSignal: true, alias: "carousel", required: false }] }] } });
631
-
632
- /**
633
- * Generated bundle index. Do not edit.
634
- */
635
-
8
+ var DraggableCarouselDirective = class DraggableCarouselDirective {
9
+ cardSelector = input(".ngs-carousel-card", ...ngDevMode ? [{ debugName: "cardSelector" }] : /* istanbul ignore next */ []);
10
+ snapToCenter = input(true, ...ngDevMode ? [{ debugName: "snapToCenter" }] : /* istanbul ignore next */ []);
11
+ snapDebounceTime = input(50, ...ngDevMode ? [{ debugName: "snapDebounceTime" }] : /* istanbul ignore next */ []);
12
+ snapDuration = input(300, ...ngDevMode ? [{ debugName: "snapDuration" }] : /* istanbul ignore next */ []);
13
+ resistanceFactor = input(.5, ...ngDevMode ? [{ debugName: "resistanceFactor" }] : /* istanbul ignore next */ []);
14
+ velocityThreshold = input(.5, ...ngDevMode ? [{ debugName: "velocityThreshold" }] : /* istanbul ignore next */ []);
15
+ visibilityDebounceTime = input(100, ...ngDevMode ? [{ debugName: "visibilityDebounceTime" }] : /* istanbul ignore next */ []);
16
+ stopPropagation = input(true, {
17
+ ...ngDevMode ? { debugName: "stopPropagation" } : /* istanbul ignore next */ {},
18
+ transform: booleanAttribute
19
+ });
20
+ indexChange = output();
21
+ isDragging = signal(false, ...ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []);
22
+ startX = signal(0, ...ngDevMode ? [{ debugName: "startX" }] : /* istanbul ignore next */ []);
23
+ scrollLeftStart = signal(0, ...ngDevMode ? [{ debugName: "scrollLeftStart" }] : /* istanbul ignore next */ []);
24
+ currentTranslateX = signal(0, ...ngDevMode ? [{ debugName: "currentTranslateX" }] : /* istanbul ignore next */ []);
25
+ lastMoveX = signal(null, ...ngDevMode ? [{ debugName: "lastMoveX" }] : /* istanbul ignore next */ []);
26
+ lastMoveTime = signal(null, ...ngDevMode ? [{ debugName: "lastMoveTime" }] : /* istanbul ignore next */ []);
27
+ currentVelocityX = signal(0, ...ngDevMode ? [{ debugName: "currentVelocityX" }] : /* istanbul ignore next */ []);
28
+ lastEmittedIndex = signal(null, ...ngDevMode ? [{ debugName: "lastEmittedIndex" }] : /* istanbul ignore next */ []);
29
+ snapTimeoutId = null;
30
+ scrollAnimationId = null;
31
+ transformAnimationId = null;
32
+ visibilityDebounceTimeoutId = null;
33
+ el = inject(ElementRef);
34
+ renderer = inject(Renderer2);
35
+ zone = inject(NgZone);
36
+ hostElement;
37
+ cards = [];
38
+ ngOnInit() {
39
+ this.hostElement = this.el.nativeElement;
40
+ this.renderer.setStyle(this.hostElement, "cursor", "grab");
41
+ this.hostElement.style.scrollBehavior = "auto";
42
+ }
43
+ ngAfterContentInit() {
44
+ this.cards = Array.from(this.hostElement.querySelectorAll(this.cardSelector()));
45
+ setTimeout(() => {
46
+ const actualInitialIndex = this.findCurrentCenterIndex();
47
+ this.emitActiveIndex(actualInitialIndex);
48
+ this.updateCardVisibilityClasses();
49
+ }, 0);
50
+ }
51
+ ngOnDestroy() {
52
+ this.clearSnapTimeout();
53
+ this.cancelScrollAnimation();
54
+ this.cancelTransformAnimation();
55
+ clearTimeout(this.visibilityDebounceTimeoutId);
56
+ }
57
+ onScroll(event) {
58
+ if (this.isDragging() || this.scrollAnimationId !== null || this.transformAnimationId !== null) return;
59
+ if (this.visibilityDebounceTimeoutId !== null) clearTimeout(this.visibilityDebounceTimeoutId);
60
+ this.visibilityDebounceTimeoutId = setTimeout(() => {
61
+ this.updateCardVisibilityClasses();
62
+ const currentIndex = this.findCurrentCenterIndex();
63
+ this.emitActiveIndex(currentIndex);
64
+ this.visibilityDebounceTimeoutId = null;
65
+ }, this.visibilityDebounceTime());
66
+ }
67
+ onMouseDown(event) {
68
+ clearTimeout(this.visibilityDebounceTimeoutId);
69
+ this.clearSnapTimeout();
70
+ this.cancelScrollAnimation();
71
+ this.cancelTransformAnimation();
72
+ if (this.currentTranslateX() !== 0) {
73
+ this.currentTranslateX.set(0);
74
+ this.renderer.setStyle(this.hostElement, "transform", "");
75
+ }
76
+ this.hostElement.style.scrollBehavior = "auto";
77
+ if (event.button !== 0) return;
78
+ this.isDragging.set(true);
79
+ this.startX.set(event.pageX - this.hostElement.offsetLeft);
80
+ this.scrollLeftStart.set(this.hostElement.scrollLeft);
81
+ this.lastMoveX.set(event.pageX);
82
+ this.lastMoveTime.set(event.timeStamp);
83
+ this.currentVelocityX.set(0);
84
+ this.renderer.setStyle(this.hostElement, "cursor", "grabbing");
85
+ event.preventDefault();
86
+ }
87
+ onMouseMove(event) {
88
+ if (!this.isDragging()) return;
89
+ event.preventDefault();
90
+ const currentX = event.pageX;
91
+ const currentTime = event.timeStamp;
92
+ const lastMoveTime = this.lastMoveTime();
93
+ const lastMoveX = this.lastMoveX();
94
+ if (lastMoveTime !== null && lastMoveX !== null && currentTime > lastMoveTime) {
95
+ const deltaX = currentX - lastMoveX;
96
+ const deltaTime = currentTime - lastMoveTime;
97
+ if (deltaTime > 0) this.currentVelocityX.set(-deltaX / deltaTime);
98
+ }
99
+ this.lastMoveX.set(currentX);
100
+ this.lastMoveTime.set(currentTime);
101
+ const dragDeltaX = currentX - (this.startX() + this.hostElement.offsetLeft);
102
+ const intendedScrollLeft = this.scrollLeftStart() - dragDeltaX;
103
+ const maxScrollLeft = this.hostElement.scrollWidth - this.hostElement.clientWidth;
104
+ let targetScrollLeft = intendedScrollLeft;
105
+ let translateX = 0;
106
+ if (intendedScrollLeft < 0) {
107
+ targetScrollLeft = 0;
108
+ const overpull = -intendedScrollLeft;
109
+ translateX = Math.min(overpull * this.resistanceFactor(), this.hostElement.clientWidth * .4);
110
+ } else if (intendedScrollLeft > maxScrollLeft) {
111
+ targetScrollLeft = maxScrollLeft;
112
+ const overpull = intendedScrollLeft - maxScrollLeft;
113
+ translateX = -Math.min(overpull * this.resistanceFactor(), this.hostElement.clientWidth * .4);
114
+ }
115
+ if (this.hostElement.scrollLeft !== targetScrollLeft) this.hostElement.scrollLeft = targetScrollLeft;
116
+ if (this.currentTranslateX() !== translateX) {
117
+ this.currentTranslateX.set(translateX);
118
+ if (Math.abs(translateX) > .1) this.renderer.setStyle(this.hostElement, "transform", `translateX(${translateX}px)`);
119
+ else {
120
+ this.currentTranslateX.set(0);
121
+ this.renderer.setStyle(this.hostElement, "transform", "");
122
+ }
123
+ }
124
+ }
125
+ onMouseUpOrLeave(event) {
126
+ if (!this.isDragging()) return;
127
+ this.stopDragging();
128
+ if (this.stopPropagation()) {
129
+ event.stopPropagation();
130
+ event.preventDefault();
131
+ event.stopImmediatePropagation();
132
+ }
133
+ }
134
+ onMouseLeaveElement(event) {
135
+ if (!this.isDragging()) this.renderer.setStyle(this.hostElement, "cursor", "grab");
136
+ }
137
+ stopDragging() {
138
+ if (!this.isDragging()) return;
139
+ this.isDragging.set(false);
140
+ this.renderer.setStyle(this.hostElement, "cursor", "grab");
141
+ this.clearSnapTimeout();
142
+ if (Math.abs(this.currentTranslateX()) > .1) this.snapTimeoutId = setTimeout(() => {
143
+ this.animateTransformReset();
144
+ this.snapTimeoutId = null;
145
+ }, this.snapDebounceTime() / 2);
146
+ else if (this.snapToCenter()) this.snapTimeoutId = setTimeout(() => {
147
+ this.initiateSnap();
148
+ this.snapTimeoutId = null;
149
+ }, this.snapDebounceTime());
150
+ else {
151
+ this.updateCardVisibilityClasses();
152
+ const currentIndex = this.findCurrentCenterIndex();
153
+ this.emitActiveIndex(currentIndex);
154
+ }
155
+ }
156
+ initiateSnap() {
157
+ this.cards = Array.from(this.hostElement.querySelectorAll(this.cardSelector()));
158
+ if (!this.cards.length) return;
159
+ let targetCardIndex = -1;
160
+ const containerCenter = this.hostElement.scrollLeft + this.hostElement.clientWidth / 2;
161
+ let currentNearestCardIndex = this.findNearestCardIndex(this.cards, containerCenter);
162
+ if (currentNearestCardIndex < 0) return;
163
+ if (Math.abs(this.currentVelocityX()) > this.velocityThreshold()) {
164
+ if (this.currentVelocityX() < 0) targetCardIndex = currentNearestCardIndex - 1;
165
+ else targetCardIndex = currentNearestCardIndex + 1;
166
+ targetCardIndex = Math.max(0, Math.min(targetCardIndex, this.cards.length - 1));
167
+ } else targetCardIndex = currentNearestCardIndex;
168
+ if (targetCardIndex >= 0 && targetCardIndex < this.cards.length) this.scrollToCard(targetCardIndex, false);
169
+ else this.updateCardVisibilityClasses();
170
+ }
171
+ scrollToCard(index, immediate = false) {
172
+ if (index < 0 || index >= this.cards.length) return;
173
+ const targetCard = this.cards[index];
174
+ if (!targetCard) return;
175
+ const container = this.hostElement;
176
+ const containerWidth = container.clientWidth;
177
+ let targetScrollLeft = targetCard.offsetLeft + targetCard.offsetWidth / 2 - containerWidth / 2;
178
+ const maxScrollLeft = container.scrollWidth - containerWidth;
179
+ targetScrollLeft = Math.max(0, Math.min(targetScrollLeft, maxScrollLeft));
180
+ this.cancelScrollAnimation();
181
+ if (immediate) {
182
+ container.scrollLeft = targetScrollLeft;
183
+ this.updateCardVisibilityClasses();
184
+ this.emitActiveIndex(index);
185
+ } else this.animateScroll(targetScrollLeft);
186
+ }
187
+ findNearestCardIndex(cards, position) {
188
+ let nearestIndex = -1;
189
+ let minDistance = Infinity;
190
+ cards.forEach((card, index) => {
191
+ if (card instanceof HTMLElement) {
192
+ const cardCenter = card.offsetLeft + card.offsetWidth / 2;
193
+ const distance = Math.abs(cardCenter - position);
194
+ if (distance < minDistance) {
195
+ minDistance = distance;
196
+ nearestIndex = index;
197
+ }
198
+ }
199
+ });
200
+ return nearestIndex;
201
+ }
202
+ animateTransformReset() {
203
+ this.cancelTransformAnimation();
204
+ const startTranslateX = this.currentTranslateX();
205
+ const distance = 0 - startTranslateX;
206
+ if (Math.abs(distance) < 1) {
207
+ if (startTranslateX !== 0) {
208
+ this.currentTranslateX.set(0);
209
+ this.renderer.setStyle(this.hostElement, "transform", "");
210
+ const finalIndex = this.findCurrentCenterIndex();
211
+ this.emitActiveIndex(finalIndex);
212
+ this.updateCardVisibilityClasses();
213
+ }
214
+ return;
215
+ }
216
+ const duration = this.snapDuration();
217
+ let startTime = null;
218
+ const step = (timestamp) => {
219
+ if (startTime === null) startTime = timestamp;
220
+ const elapsed = timestamp - startTime;
221
+ const progress = Math.min(1, elapsed / duration);
222
+ const easedProgress = easeOutQuad(progress);
223
+ const newTranslateX = startTranslateX + distance * easedProgress;
224
+ this.currentTranslateX.set(newTranslateX);
225
+ this.renderer.setStyle(this.hostElement, "transform", `translateX(${newTranslateX}px)`);
226
+ if (progress < 1) this.transformAnimationId = requestAnimationFrame(step);
227
+ else {
228
+ this.currentTranslateX.set(0);
229
+ this.renderer.setStyle(this.hostElement, "transform", "");
230
+ this.transformAnimationId = null;
231
+ const finalIndex = this.findCurrentCenterIndex();
232
+ this.emitActiveIndex(finalIndex);
233
+ this.updateCardVisibilityClasses();
234
+ }
235
+ };
236
+ this.zone.runOutsideAngular(() => {
237
+ this.transformAnimationId = requestAnimationFrame(step);
238
+ });
239
+ }
240
+ animateScroll(targetScrollLeft) {
241
+ this.cancelScrollAnimation();
242
+ const container = this.hostElement;
243
+ const startScrollLeft = container.scrollLeft;
244
+ const distance = targetScrollLeft - startScrollLeft;
245
+ if (Math.abs(distance) < 1) {
246
+ const finalIndex = this.findCurrentCenterIndex();
247
+ this.emitActiveIndex(finalIndex);
248
+ this.updateCardVisibilityClasses();
249
+ return;
250
+ }
251
+ const duration = this.snapDuration();
252
+ let startTime = null;
253
+ const step = (timestamp) => {
254
+ if (startTime === null) startTime = timestamp;
255
+ const elapsed = timestamp - startTime;
256
+ const progress = Math.min(1, elapsed / duration);
257
+ const easedProgress = easeOutQuad(progress);
258
+ container.scrollLeft = startScrollLeft + distance * easedProgress;
259
+ if (progress < 1) this.scrollAnimationId = requestAnimationFrame(step);
260
+ else {
261
+ container.scrollLeft = targetScrollLeft;
262
+ this.scrollAnimationId = null;
263
+ const finalIndex = this.findCurrentCenterIndex();
264
+ this.emitActiveIndex(finalIndex);
265
+ this.updateCardVisibilityClasses();
266
+ }
267
+ };
268
+ this.zone.runOutsideAngular(() => {
269
+ this.scrollAnimationId = requestAnimationFrame(step);
270
+ });
271
+ }
272
+ findCurrentCenterIndex() {
273
+ this.cards = Array.from(this.hostElement.querySelectorAll(this.cardSelector()));
274
+ if (!this.cards.length) return -1;
275
+ const containerCenter = this.hostElement.scrollLeft + this.hostElement.clientWidth / 2;
276
+ return this.findNearestCardIndex(this.cards, containerCenter);
277
+ }
278
+ emitActiveIndex(index) {
279
+ if (index >= 0 && index !== this.lastEmittedIndex()) {
280
+ this.lastEmittedIndex.set(index);
281
+ this.zone.run(() => {
282
+ this.indexChange.emit(index);
283
+ });
284
+ }
285
+ }
286
+ updateCardVisibilityClasses() {
287
+ this.cards = Array.from(this.hostElement.querySelectorAll(this.cardSelector()));
288
+ if (!this.cards.length || !this.hostElement.clientWidth) return;
289
+ const viewportStart = this.hostElement.scrollLeft;
290
+ const viewportEnd = viewportStart + this.hostElement.clientWidth;
291
+ const tolerance = 1;
292
+ this.cards.forEach((card) => {
293
+ if (card instanceof HTMLElement) {
294
+ const cardStart = card.offsetLeft;
295
+ const cardEnd = cardStart + card.offsetWidth;
296
+ const isSpanned = cardStart >= viewportStart - tolerance && cardEnd <= viewportEnd + tolerance;
297
+ const isInView = cardEnd > viewportStart + tolerance && cardStart < viewportEnd - tolerance;
298
+ if (isSpanned) this.renderer.addClass(card, "is-spanned");
299
+ else this.renderer.removeClass(card, "is-spanned");
300
+ if (isInView) this.renderer.addClass(card, "is-in-view");
301
+ else this.renderer.removeClass(card, "is-in-view");
302
+ }
303
+ });
304
+ }
305
+ cancelScrollAnimation() {
306
+ if (this.scrollAnimationId !== null) {
307
+ cancelAnimationFrame(this.scrollAnimationId);
308
+ this.scrollAnimationId = null;
309
+ }
310
+ }
311
+ cancelTransformAnimation() {
312
+ if (this.transformAnimationId !== null) {
313
+ cancelAnimationFrame(this.transformAnimationId);
314
+ this.transformAnimationId = null;
315
+ }
316
+ }
317
+ clearSnapTimeout() {
318
+ if (this.snapTimeoutId !== null) {
319
+ clearTimeout(this.snapTimeoutId);
320
+ this.snapTimeoutId = null;
321
+ }
322
+ }
323
+ onClick(event) {
324
+ if (this.stopPropagation()) {
325
+ event.stopPropagation();
326
+ event.preventDefault();
327
+ }
328
+ }
329
+ static ɵfac = i0.ɵɵngDeclareFactory({
330
+ minVersion: "12.0.0",
331
+ version: "22.3.0",
332
+ ngImport: i0,
333
+ type: DraggableCarouselDirective,
334
+ deps: [],
335
+ target: i0.ɵɵFactoryTarget.Directive
336
+ });
337
+ static ɵdir = i0.ɵɵngDeclareDirective({
338
+ minVersion: "17.1.0",
339
+ version: "22.3.0",
340
+ type: DraggableCarouselDirective,
341
+ isStandalone: true,
342
+ selector: "[ngsDraggableCarousel]",
343
+ inputs: {
344
+ cardSelector: {
345
+ classPropertyName: "cardSelector",
346
+ publicName: "cardSelector",
347
+ isSignal: true,
348
+ isRequired: false,
349
+ transformFunction: null
350
+ },
351
+ snapToCenter: {
352
+ classPropertyName: "snapToCenter",
353
+ publicName: "snapToCenter",
354
+ isSignal: true,
355
+ isRequired: false,
356
+ transformFunction: null
357
+ },
358
+ snapDebounceTime: {
359
+ classPropertyName: "snapDebounceTime",
360
+ publicName: "snapDebounceTime",
361
+ isSignal: true,
362
+ isRequired: false,
363
+ transformFunction: null
364
+ },
365
+ snapDuration: {
366
+ classPropertyName: "snapDuration",
367
+ publicName: "snapDuration",
368
+ isSignal: true,
369
+ isRequired: false,
370
+ transformFunction: null
371
+ },
372
+ resistanceFactor: {
373
+ classPropertyName: "resistanceFactor",
374
+ publicName: "resistanceFactor",
375
+ isSignal: true,
376
+ isRequired: false,
377
+ transformFunction: null
378
+ },
379
+ velocityThreshold: {
380
+ classPropertyName: "velocityThreshold",
381
+ publicName: "velocityThreshold",
382
+ isSignal: true,
383
+ isRequired: false,
384
+ transformFunction: null
385
+ },
386
+ visibilityDebounceTime: {
387
+ classPropertyName: "visibilityDebounceTime",
388
+ publicName: "visibilityDebounceTime",
389
+ isSignal: true,
390
+ isRequired: false,
391
+ transformFunction: null
392
+ },
393
+ stopPropagation: {
394
+ classPropertyName: "stopPropagation",
395
+ publicName: "stopPropagation",
396
+ isSignal: true,
397
+ isRequired: false,
398
+ transformFunction: null
399
+ }
400
+ },
401
+ outputs: { indexChange: "indexChange" },
402
+ host: {
403
+ listeners: {
404
+ "scroll": "onScroll($event)",
405
+ "click": "onClick($event)",
406
+ "mousedown": "onMouseDown($event)",
407
+ "mouseleave": "onMouseLeaveElement($event)",
408
+ "document:mousemove": "onMouseMove($event)",
409
+ "document:mouseup": "onMouseUpOrLeave($event)",
410
+ "document:mouseleave": "onMouseUpOrLeave($event)"
411
+ },
412
+ properties: { "class.dragging-active": "isDragging()" }
413
+ },
414
+ ngImport: i0
415
+ });
416
+ };
417
+ i0.ɵɵngDeclareClassMetadata({
418
+ minVersion: "12.0.0",
419
+ version: "22.3.0",
420
+ ngImport: i0,
421
+ type: DraggableCarouselDirective,
422
+ decorators: [{
423
+ type: Directive,
424
+ args: [{
425
+ selector: "[ngsDraggableCarousel]",
426
+ host: {
427
+ "(scroll)": "onScroll($event)",
428
+ "(click)": "onClick($event)",
429
+ "(mousedown)": "onMouseDown($event)",
430
+ "(mouseleave)": "onMouseLeaveElement($event)",
431
+ "(document:mousemove)": "onMouseMove($event)",
432
+ "(document:mouseup)": "onMouseUpOrLeave($event)",
433
+ "(document:mouseleave)": "onMouseUpOrLeave($event)",
434
+ "[class.dragging-active]": "isDragging()"
435
+ }
436
+ }]
437
+ }],
438
+ propDecorators: {
439
+ cardSelector: [{
440
+ type: i0.Input,
441
+ args: [{
442
+ isSignal: true,
443
+ alias: "cardSelector",
444
+ required: false
445
+ }]
446
+ }],
447
+ snapToCenter: [{
448
+ type: i0.Input,
449
+ args: [{
450
+ isSignal: true,
451
+ alias: "snapToCenter",
452
+ required: false
453
+ }]
454
+ }],
455
+ snapDebounceTime: [{
456
+ type: i0.Input,
457
+ args: [{
458
+ isSignal: true,
459
+ alias: "snapDebounceTime",
460
+ required: false
461
+ }]
462
+ }],
463
+ snapDuration: [{
464
+ type: i0.Input,
465
+ args: [{
466
+ isSignal: true,
467
+ alias: "snapDuration",
468
+ required: false
469
+ }]
470
+ }],
471
+ resistanceFactor: [{
472
+ type: i0.Input,
473
+ args: [{
474
+ isSignal: true,
475
+ alias: "resistanceFactor",
476
+ required: false
477
+ }]
478
+ }],
479
+ velocityThreshold: [{
480
+ type: i0.Input,
481
+ args: [{
482
+ isSignal: true,
483
+ alias: "velocityThreshold",
484
+ required: false
485
+ }]
486
+ }],
487
+ visibilityDebounceTime: [{
488
+ type: i0.Input,
489
+ args: [{
490
+ isSignal: true,
491
+ alias: "visibilityDebounceTime",
492
+ required: false
493
+ }]
494
+ }],
495
+ stopPropagation: [{
496
+ type: i0.Input,
497
+ args: [{
498
+ isSignal: true,
499
+ alias: "stopPropagation",
500
+ required: false
501
+ }]
502
+ }],
503
+ indexChange: [{
504
+ type: i0.Output,
505
+ args: ["indexChange"]
506
+ }]
507
+ }
508
+ });
509
+ var Carousel = class Carousel {
510
+ _content = viewChild.required("content", ...ngDevMode ? [{ debugName: "_content" }] : /* istanbul ignore next */ []);
511
+ _cards = contentChildren(CAROUSEL_CARD, ...ngDevMode ? [{ debugName: "_cards" }] : /* istanbul ignore next */ []);
512
+ fade = input(false, {
513
+ ...ngDevMode ? { debugName: "fade" } : /* istanbul ignore next */ {},
514
+ transform: booleanAttribute
515
+ });
516
+ snapToCenter = input(true, ...ngDevMode ? [{ debugName: "snapToCenter" }] : /* istanbul ignore next */ []);
517
+ snapDebounceTime = input(50, ...ngDevMode ? [{ debugName: "snapDebounceTime" }] : /* istanbul ignore next */ []);
518
+ snapDuration = input(300, ...ngDevMode ? [{ debugName: "snapDuration" }] : /* istanbul ignore next */ []);
519
+ resistanceFactor = input(.5, ...ngDevMode ? [{ debugName: "resistanceFactor" }] : /* istanbul ignore next */ []);
520
+ velocityThreshold = input(.5, ...ngDevMode ? [{ debugName: "velocityThreshold" }] : /* istanbul ignore next */ []);
521
+ visibilityDebounceTime = input(100, ...ngDevMode ? [{ debugName: "visibilityDebounceTime" }] : /* istanbul ignore next */ []);
522
+ stopPropagation = input(true, {
523
+ ...ngDevMode ? { debugName: "stopPropagation" } : /* istanbul ignore next */ {},
524
+ transform: booleanAttribute
525
+ });
526
+ indexChange = output();
527
+ _index = signal(0, ...ngDevMode ? [{ debugName: "_index" }] : /* istanbul ignore next */ []);
528
+ get api() {
529
+ return {
530
+ isNextDisabled: () => this._isNextDisabled,
531
+ isPreviousDisabled: () => this._isPreviousDisabled,
532
+ previous: () => this._previous(),
533
+ next: () => this._next(),
534
+ selectedIndex: () => this._index()
535
+ };
536
+ }
537
+ onIndexChanged(index) {
538
+ if (this._index() === index) return;
539
+ this._index.set(index);
540
+ this.indexChange.emit(index);
541
+ }
542
+ _previous() {
543
+ const contentElement = this._content()?.nativeElement;
544
+ for (let index = this._cards().length - 1; index >= 0; index--) {
545
+ if (index >= this._index()) continue;
546
+ const card = this._cards().at(index);
547
+ if (!this._visibleInParentViewport(contentElement, card.element)) {
548
+ this._scrollToCard(card);
549
+ break;
550
+ }
551
+ }
552
+ }
553
+ _next() {
554
+ const contentElement = this._content().nativeElement;
555
+ const notVisibleCard = this._cards().find((card, index) => !this._visibleInParentViewport(contentElement, card.element) && index > this._index());
556
+ if (notVisibleCard) this._scrollToCard(notVisibleCard);
557
+ }
558
+ _scrollToCard(notVisibleCard) {
559
+ this._index.set(this._cards().findIndex((card) => card === notVisibleCard));
560
+ this.indexChange.emit(this._index());
561
+ notVisibleCard.element.scrollIntoView({
562
+ block: "nearest",
563
+ behavior: "smooth",
564
+ inline: "center"
565
+ });
566
+ }
567
+ _visibleInParentViewport = (parent, el) => {
568
+ const parentRect = parent.getBoundingClientRect();
569
+ const elementRect = el.getBoundingClientRect();
570
+ return elementRect.right <= parentRect.right && elementRect.left >= parentRect.left;
571
+ };
572
+ get _isPreviousDisabled() {
573
+ return this._index() === 0;
574
+ }
575
+ get _isNextDisabled() {
576
+ return this._index() === this._cards().length - 1;
577
+ }
578
+ static ɵfac = i0.ɵɵngDeclareFactory({
579
+ minVersion: "12.0.0",
580
+ version: "22.3.0",
581
+ ngImport: i0,
582
+ type: Carousel,
583
+ deps: [],
584
+ target: i0.ɵɵFactoryTarget.Component
585
+ });
586
+ static ɵcmp = i0.ɵɵngDeclareComponent({
587
+ minVersion: "17.2.0",
588
+ version: "22.3.0",
589
+ type: Carousel,
590
+ isStandalone: true,
591
+ selector: "ngs-carousel",
592
+ inputs: {
593
+ fade: {
594
+ classPropertyName: "fade",
595
+ publicName: "fade",
596
+ isSignal: true,
597
+ isRequired: false,
598
+ transformFunction: null
599
+ },
600
+ snapToCenter: {
601
+ classPropertyName: "snapToCenter",
602
+ publicName: "snapToCenter",
603
+ isSignal: true,
604
+ isRequired: false,
605
+ transformFunction: null
606
+ },
607
+ snapDebounceTime: {
608
+ classPropertyName: "snapDebounceTime",
609
+ publicName: "snapDebounceTime",
610
+ isSignal: true,
611
+ isRequired: false,
612
+ transformFunction: null
613
+ },
614
+ snapDuration: {
615
+ classPropertyName: "snapDuration",
616
+ publicName: "snapDuration",
617
+ isSignal: true,
618
+ isRequired: false,
619
+ transformFunction: null
620
+ },
621
+ resistanceFactor: {
622
+ classPropertyName: "resistanceFactor",
623
+ publicName: "resistanceFactor",
624
+ isSignal: true,
625
+ isRequired: false,
626
+ transformFunction: null
627
+ },
628
+ velocityThreshold: {
629
+ classPropertyName: "velocityThreshold",
630
+ publicName: "velocityThreshold",
631
+ isSignal: true,
632
+ isRequired: false,
633
+ transformFunction: null
634
+ },
635
+ visibilityDebounceTime: {
636
+ classPropertyName: "visibilityDebounceTime",
637
+ publicName: "visibilityDebounceTime",
638
+ isSignal: true,
639
+ isRequired: false,
640
+ transformFunction: null
641
+ },
642
+ stopPropagation: {
643
+ classPropertyName: "stopPropagation",
644
+ publicName: "stopPropagation",
645
+ isSignal: true,
646
+ isRequired: false,
647
+ transformFunction: null
648
+ }
649
+ },
650
+ outputs: { indexChange: "indexChange" },
651
+ host: {
652
+ properties: { "class.fade": "fade()" },
653
+ classAttribute: "ngs-carousel"
654
+ },
655
+ providers: [{
656
+ provide: CAROUSEL,
657
+ useExisting: Carousel
658
+ }],
659
+ queries: [{
660
+ propertyName: "_cards",
661
+ predicate: CAROUSEL_CARD,
662
+ isSignal: true
663
+ }],
664
+ viewQueries: [{
665
+ propertyName: "_content",
666
+ first: true,
667
+ predicate: ["content"],
668
+ descendants: true,
669
+ isSignal: true
670
+ }],
671
+ exportAs: ["ngsCarousel"],
672
+ ngImport: i0,
673
+ template: "<div #content class=\"content\"\n ngsDraggableCarousel\n [stopPropagation]=\"stopPropagation()\"\n [snapToCenter]=\"snapToCenter()\"\n [snapDebounceTime]=\"snapDebounceTime()\"\n [snapDuration]=\"snapDuration()\"\n [resistanceFactor]=\"resistanceFactor()\"\n [velocityThreshold]=\"velocityThreshold()\"\n [visibilityDebounceTime]=\"visibilityDebounceTime()\"\n (indexChange)=\"onIndexChanged($event)\">\n <ng-content select=\"ngs-carousel-card,[ngs-carousel-card]\" />\n</div>\n<div class=\"controls\">\n <ng-content select=\"[ngsCarouselControls]\" />\n</div>\n",
674
+ styles: [":host{--ngs-carousel-gap: calc(var(--spacing, .25rem) * 8);display:block;position:relative}:host .content{display:flex;overflow:hidden;gap:var(--ngs-carousel-gap)}:host .controls{margin-top:calc(var(--spacing, .25rem) * 4);gap:calc(var(--spacing, .25rem) * 3)}:host .controls:empty{display:none}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
675
+ dependencies: [{
676
+ kind: "directive",
677
+ type: DraggableCarouselDirective,
678
+ selector: "[ngsDraggableCarousel]",
679
+ inputs: [
680
+ "cardSelector",
681
+ "snapToCenter",
682
+ "snapDebounceTime",
683
+ "snapDuration",
684
+ "resistanceFactor",
685
+ "velocityThreshold",
686
+ "visibilityDebounceTime",
687
+ "stopPropagation"
688
+ ],
689
+ outputs: ["indexChange"]
690
+ }],
691
+ changeDetection: i0.ChangeDetectionStrategy.Eager
692
+ });
693
+ };
694
+ i0.ɵɵngDeclareClassMetadata({
695
+ minVersion: "12.0.0",
696
+ version: "22.3.0",
697
+ ngImport: i0,
698
+ type: Carousel,
699
+ decorators: [{
700
+ type: Component,
701
+ args: [{
702
+ selector: "ngs-carousel",
703
+ exportAs: "ngsCarousel",
704
+ providers: [{
705
+ provide: CAROUSEL,
706
+ useExisting: Carousel
707
+ }],
708
+ hostDirectives: [],
709
+ imports: [DraggableCarouselDirective],
710
+ changeDetection: ChangeDetectionStrategy.Eager,
711
+ host: {
712
+ "class": "ngs-carousel",
713
+ "[class.fade]": "fade()"
714
+ },
715
+ template: "<div #content class=\"content\"\n ngsDraggableCarousel\n [stopPropagation]=\"stopPropagation()\"\n [snapToCenter]=\"snapToCenter()\"\n [snapDebounceTime]=\"snapDebounceTime()\"\n [snapDuration]=\"snapDuration()\"\n [resistanceFactor]=\"resistanceFactor()\"\n [velocityThreshold]=\"velocityThreshold()\"\n [visibilityDebounceTime]=\"visibilityDebounceTime()\"\n (indexChange)=\"onIndexChanged($event)\">\n <ng-content select=\"ngs-carousel-card,[ngs-carousel-card]\" />\n</div>\n<div class=\"controls\">\n <ng-content select=\"[ngsCarouselControls]\" />\n</div>\n",
716
+ styles: [":host{--ngs-carousel-gap: calc(var(--spacing, .25rem) * 8);display:block;position:relative}:host .content{display:flex;overflow:hidden;gap:var(--ngs-carousel-gap)}:host .controls{margin-top:calc(var(--spacing, .25rem) * 4);gap:calc(var(--spacing, .25rem) * 3)}:host .controls:empty{display:none}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
717
+ }]
718
+ }],
719
+ propDecorators: {
720
+ _content: [{
721
+ type: i0.ViewChild,
722
+ args: ["content", { isSignal: true }]
723
+ }],
724
+ _cards: [{
725
+ type: i0.ContentChildren,
726
+ args: [i0.forwardRef(() => CAROUSEL_CARD), { isSignal: true }]
727
+ }],
728
+ fade: [{
729
+ type: i0.Input,
730
+ args: [{
731
+ isSignal: true,
732
+ alias: "fade",
733
+ required: false
734
+ }]
735
+ }],
736
+ snapToCenter: [{
737
+ type: i0.Input,
738
+ args: [{
739
+ isSignal: true,
740
+ alias: "snapToCenter",
741
+ required: false
742
+ }]
743
+ }],
744
+ snapDebounceTime: [{
745
+ type: i0.Input,
746
+ args: [{
747
+ isSignal: true,
748
+ alias: "snapDebounceTime",
749
+ required: false
750
+ }]
751
+ }],
752
+ snapDuration: [{
753
+ type: i0.Input,
754
+ args: [{
755
+ isSignal: true,
756
+ alias: "snapDuration",
757
+ required: false
758
+ }]
759
+ }],
760
+ resistanceFactor: [{
761
+ type: i0.Input,
762
+ args: [{
763
+ isSignal: true,
764
+ alias: "resistanceFactor",
765
+ required: false
766
+ }]
767
+ }],
768
+ velocityThreshold: [{
769
+ type: i0.Input,
770
+ args: [{
771
+ isSignal: true,
772
+ alias: "velocityThreshold",
773
+ required: false
774
+ }]
775
+ }],
776
+ visibilityDebounceTime: [{
777
+ type: i0.Input,
778
+ args: [{
779
+ isSignal: true,
780
+ alias: "visibilityDebounceTime",
781
+ required: false
782
+ }]
783
+ }],
784
+ stopPropagation: [{
785
+ type: i0.Input,
786
+ args: [{
787
+ isSignal: true,
788
+ alias: "stopPropagation",
789
+ required: false
790
+ }]
791
+ }],
792
+ indexChange: [{
793
+ type: i0.Output,
794
+ args: ["indexChange"]
795
+ }]
796
+ }
797
+ });
798
+ var CarouselCard = class CarouselCard {
799
+ _elementRef = inject(ElementRef);
800
+ get element() {
801
+ return this._elementRef.nativeElement;
802
+ }
803
+ static ɵfac = i0.ɵɵngDeclareFactory({
804
+ minVersion: "12.0.0",
805
+ version: "22.3.0",
806
+ ngImport: i0,
807
+ type: CarouselCard,
808
+ deps: [],
809
+ target: i0.ɵɵFactoryTarget.Component
810
+ });
811
+ static ɵcmp = i0.ɵɵngDeclareComponent({
812
+ minVersion: "14.0.0",
813
+ version: "22.3.0",
814
+ type: CarouselCard,
815
+ isStandalone: true,
816
+ selector: "ngs-carousel-card,[ngs-carousel-card]",
817
+ host: { classAttribute: "ngs-carousel-card" },
818
+ providers: [{
819
+ provide: CAROUSEL_CARD,
820
+ useExisting: CarouselCard
821
+ }],
822
+ exportAs: ["ngsCarouselCard"],
823
+ ngImport: i0,
824
+ template: "<ng-content />\n",
825
+ styles: [":host{display:block;scroll-padding-inline:100px;flex:none}:host-context(.ngs-carousel.fade){animation:ngs-carousel-fade;animation-fill-mode:both;animation-timing-function:linear;animation-timeline:view(inline)}@keyframes ngs-carousel-fade{0%,to{opacity:.3}50%{opacity:1}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
826
+ changeDetection: i0.ChangeDetectionStrategy.Eager
827
+ });
828
+ };
829
+ i0.ɵɵngDeclareClassMetadata({
830
+ minVersion: "12.0.0",
831
+ version: "22.3.0",
832
+ ngImport: i0,
833
+ type: CarouselCard,
834
+ decorators: [{
835
+ type: Component,
836
+ args: [{
837
+ selector: "ngs-carousel-card,[ngs-carousel-card]",
838
+ exportAs: "ngsCarouselCard",
839
+ imports: [],
840
+ providers: [{
841
+ provide: CAROUSEL_CARD,
842
+ useExisting: CarouselCard
843
+ }],
844
+ changeDetection: ChangeDetectionStrategy.Eager,
845
+ host: { "class": "ngs-carousel-card" },
846
+ template: "<ng-content />\n",
847
+ styles: [":host{display:block;scroll-padding-inline:100px;flex:none}:host-context(.ngs-carousel.fade){animation:ngs-carousel-fade;animation-fill-mode:both;animation-timing-function:linear;animation-timeline:view(inline)}@keyframes ngs-carousel-fade{0%,to{opacity:.3}50%{opacity:1}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
848
+ }]
849
+ }]
850
+ });
851
+ var CarouselControlsDirective = class CarouselControlsDirective {
852
+ static ɵfac = i0.ɵɵngDeclareFactory({
853
+ minVersion: "12.0.0",
854
+ version: "22.3.0",
855
+ ngImport: i0,
856
+ type: CarouselControlsDirective,
857
+ deps: [],
858
+ target: i0.ɵɵFactoryTarget.Directive
859
+ });
860
+ static ɵdir = i0.ɵɵngDeclareDirective({
861
+ minVersion: "14.0.0",
862
+ version: "22.3.0",
863
+ type: CarouselControlsDirective,
864
+ isStandalone: true,
865
+ selector: "[ngsCarouselControls]",
866
+ host: { classAttribute: "ngs-carousel-controls" },
867
+ ngImport: i0
868
+ });
869
+ };
870
+ i0.ɵɵngDeclareClassMetadata({
871
+ minVersion: "12.0.0",
872
+ version: "22.3.0",
873
+ ngImport: i0,
874
+ type: CarouselControlsDirective,
875
+ decorators: [{
876
+ type: Directive,
877
+ args: [{
878
+ selector: "[ngsCarouselControls]",
879
+ host: { "class": "ngs-carousel-controls" }
880
+ }]
881
+ }]
882
+ });
883
+ var CarouselPreviousDirective = class CarouselPreviousDirective {
884
+ _carousel = inject(CAROUSEL, { optional: true });
885
+ carousel = input(null, ...ngDevMode ? [{ debugName: "carousel" }] : /* istanbul ignore next */ []);
886
+ ngOnInit() {
887
+ if (this.carousel() && !this._carousel) this._carousel = this.carousel();
888
+ }
889
+ _handleClick() {
890
+ this._carousel?.api.previous();
891
+ }
892
+ static ɵfac = i0.ɵɵngDeclareFactory({
893
+ minVersion: "12.0.0",
894
+ version: "22.3.0",
895
+ ngImport: i0,
896
+ type: CarouselPreviousDirective,
897
+ deps: [],
898
+ target: i0.ɵɵFactoryTarget.Directive
899
+ });
900
+ static ɵdir = i0.ɵɵngDeclareDirective({
901
+ minVersion: "17.1.0",
902
+ version: "22.3.0",
903
+ type: CarouselPreviousDirective,
904
+ isStandalone: true,
905
+ selector: "[ngsCarouselPrevious]",
906
+ inputs: { carousel: {
907
+ classPropertyName: "carousel",
908
+ publicName: "carousel",
909
+ isSignal: true,
910
+ isRequired: false,
911
+ transformFunction: null
912
+ } },
913
+ host: {
914
+ listeners: { "click": "_handleClick()" },
915
+ properties: { "attr.disabled": "_carousel?.api?.isPreviousDisabled() ? true : null" },
916
+ classAttribute: "ngs-carousel-previous"
917
+ },
918
+ exportAs: ["ngsCarouselPrevious"],
919
+ ngImport: i0
920
+ });
921
+ };
922
+ i0.ɵɵngDeclareClassMetadata({
923
+ minVersion: "12.0.0",
924
+ version: "22.3.0",
925
+ ngImport: i0,
926
+ type: CarouselPreviousDirective,
927
+ decorators: [{
928
+ type: Directive,
929
+ args: [{
930
+ selector: "[ngsCarouselPrevious]",
931
+ exportAs: "ngsCarouselPrevious",
932
+ host: {
933
+ "class": "ngs-carousel-previous",
934
+ "[attr.disabled]": "_carousel?.api?.isPreviousDisabled() ? true : null",
935
+ "(click)": "_handleClick()"
936
+ }
937
+ }]
938
+ }],
939
+ propDecorators: { carousel: [{
940
+ type: i0.Input,
941
+ args: [{
942
+ isSignal: true,
943
+ alias: "carousel",
944
+ required: false
945
+ }]
946
+ }] }
947
+ });
948
+ var CarouselNextDirective = class CarouselNextDirective {
949
+ _carousel = inject(CAROUSEL, { optional: true });
950
+ carousel = input(null, ...ngDevMode ? [{ debugName: "carousel" }] : /* istanbul ignore next */ []);
951
+ ngOnInit() {
952
+ if (this.carousel() && !this._carousel) this._carousel = this.carousel();
953
+ }
954
+ _handleClick() {
955
+ this._carousel?.api.next();
956
+ }
957
+ static ɵfac = i0.ɵɵngDeclareFactory({
958
+ minVersion: "12.0.0",
959
+ version: "22.3.0",
960
+ ngImport: i0,
961
+ type: CarouselNextDirective,
962
+ deps: [],
963
+ target: i0.ɵɵFactoryTarget.Directive
964
+ });
965
+ static ɵdir = i0.ɵɵngDeclareDirective({
966
+ minVersion: "17.1.0",
967
+ version: "22.3.0",
968
+ type: CarouselNextDirective,
969
+ isStandalone: true,
970
+ selector: "[ngsCarouselNext]",
971
+ inputs: { carousel: {
972
+ classPropertyName: "carousel",
973
+ publicName: "carousel",
974
+ isSignal: true,
975
+ isRequired: false,
976
+ transformFunction: null
977
+ } },
978
+ host: {
979
+ listeners: { "click": "_handleClick()" },
980
+ properties: { "attr.disabled": "_carousel?.api?.isNextDisabled() ? true : null" },
981
+ classAttribute: "ngs-carousel-next"
982
+ },
983
+ exportAs: ["ngsCarouselNext"],
984
+ ngImport: i0
985
+ });
986
+ };
987
+ i0.ɵɵngDeclareClassMetadata({
988
+ minVersion: "12.0.0",
989
+ version: "22.3.0",
990
+ ngImport: i0,
991
+ type: CarouselNextDirective,
992
+ decorators: [{
993
+ type: Directive,
994
+ args: [{
995
+ selector: "[ngsCarouselNext]",
996
+ exportAs: "ngsCarouselNext",
997
+ host: {
998
+ "class": "ngs-carousel-next",
999
+ "[attr.disabled]": "_carousel?.api?.isNextDisabled() ? true : null",
1000
+ "(click)": "_handleClick()"
1001
+ }
1002
+ }]
1003
+ }],
1004
+ propDecorators: { carousel: [{
1005
+ type: i0.Input,
1006
+ args: [{
1007
+ isSignal: true,
1008
+ alias: "carousel",
1009
+ required: false
1010
+ }]
1011
+ }] }
1012
+ });
636
1013
  export { CAROUSEL, CAROUSEL_CARD, Carousel, CarouselCard, CarouselControlsDirective, CarouselNextDirective, CarouselPreviousDirective };
637
- //# sourceMappingURL=ngstarter-ui-components-carousel.mjs.map
1014
+
1015
+ //# sourceMappingURL=ngstarter-ui-components-carousel.mjs.map