@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,582 +1,706 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, PLATFORM_ID, ElementRef, NgZone, Renderer2, DestroyRef, viewChild, input, booleanAttribute, output, signal, computed, effect, untracked, ChangeDetectionStrategy, Component, numberAttribute, Directive } from '@angular/core';
3
- import { isPlatformBrowser } from '@angular/common';
4
- import { Observable, debounceTime, tap, merge, fromEvent, filter, switchMap, map, distinctUntilChanged, takeUntil, finalize, Subject, startWith, auditTime } from 'rxjs';
5
- import { Router, NavigationEnd } from '@angular/router';
6
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
-
8
- class ScrollbarArea {
9
- platformId = inject(PLATFORM_ID);
10
- elRef = inject((ElementRef));
11
- zone = inject(NgZone);
12
- renderer = inject(Renderer2);
13
- destroyRef = inject(DestroyRef);
14
- router = inject(Router, { optional: true });
15
- scrollableContentRef = viewChild.required('scrollableContent', /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "scrollableContentRef" }] : /* istanbul ignore next */ []));
17
- scrollTrackRef = viewChild.required('scrollTrack', /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "scrollTrackRef" }] : /* istanbul ignore next */ []));
19
- scrollThumbRef = viewChild.required('scrollThumb', /* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "scrollThumbRef" }] : /* istanbul ignore next */ []));
21
- scrollTrackXRef = viewChild.required('scrollTrackX', /* @ts-ignore */
22
- ...(ngDevMode ? [{ debugName: "scrollTrackXRef" }] : /* istanbul ignore next */ []));
23
- scrollThumbXRef = viewChild.required('scrollThumbX', /* @ts-ignore */
24
- ...(ngDevMode ? [{ debugName: "scrollThumbXRef" }] : /* istanbul ignore next */ []));
25
- scrollbarWidth = input('8px', /* @ts-ignore */
26
- ...(ngDevMode ? [{ debugName: "scrollbarWidth" }] : /* istanbul ignore next */ []));
27
- autoHide = input(true, { ...(ngDevMode ? { debugName: "autoHide" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
28
- absolute = input(true, { ...(ngDevMode ? { debugName: "absolute" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
29
- scrolled = output();
30
- isDragging = signal(false, /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []));
32
- isHovering = signal(false, /* @ts-ignore */
33
- ...(ngDevMode ? [{ debugName: "isHovering" }] : /* istanbul ignore next */ []));
34
- scrollTop = signal(0, /* @ts-ignore */
35
- ...(ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []));
36
- scrollLeft = signal(0, /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "scrollLeft" }] : /* istanbul ignore next */ []));
38
- contentScrollHeight = signal(0, /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "contentScrollHeight" }] : /* istanbul ignore next */ []));
40
- contentScrollWidth = signal(0, /* @ts-ignore */
41
- ...(ngDevMode ? [{ debugName: "contentScrollWidth" }] : /* istanbul ignore next */ []));
42
- contentClientHeight = signal(0, /* @ts-ignore */
43
- ...(ngDevMode ? [{ debugName: "contentClientHeight" }] : /* istanbul ignore next */ []));
44
- contentClientWidth = signal(0, /* @ts-ignore */
45
- ...(ngDevMode ? [{ debugName: "contentClientWidth" }] : /* istanbul ignore next */ []));
46
- trackClientHeight = signal(0, /* @ts-ignore */
47
- ...(ngDevMode ? [{ debugName: "trackClientHeight" }] : /* istanbul ignore next */ []));
48
- trackClientWidth = signal(0, /* @ts-ignore */
49
- ...(ngDevMode ? [{ debugName: "trackClientWidth" }] : /* istanbul ignore next */ []));
50
- showDueToActivity = signal(false, /* @ts-ignore */
51
- ...(ngDevMode ? [{ debugName: "showDueToActivity" }] : /* istanbul ignore next */ []));
52
- // Vertical axis
53
- hasScrollY = computed(() => this.contentScrollHeight() > this.contentClientHeight() + 1, /* @ts-ignore */
54
- ...(ngDevMode ? [{ debugName: "hasScrollY" }] : /* istanbul ignore next */ []));
55
- scrollRatioY = computed(() => this.hasScrollY() ? this.contentClientHeight() / this.contentScrollHeight() : 1, /* @ts-ignore */
56
- ...(ngDevMode ? [{ debugName: "scrollRatioY" }] : /* istanbul ignore next */ []));
57
- minThumbHeight = 20;
58
- thumbHeight = computed(() => {
59
- if (!this.hasScrollY()) {
60
- return 0;
61
- }
62
- const trackHeight = this.trackClientHeight();
63
- const ratio = this.scrollRatioY();
64
- const calculated = trackHeight * ratio;
65
- return Math.max(calculated, this.minThumbHeight);
66
- }, /* @ts-ignore */
67
- ...(ngDevMode ? [{ debugName: "thumbHeight" }] : /* istanbul ignore next */ []));
68
- maxScrollTop = computed(() => Math.max(0, this.contentScrollHeight() - this.contentClientHeight()), /* @ts-ignore */
69
- ...(ngDevMode ? [{ debugName: "maxScrollTop" }] : /* istanbul ignore next */ []));
70
- maxThumbTop = computed(() => Math.max(0, this.trackClientHeight() - this.thumbHeight()), /* @ts-ignore */
71
- ...(ngDevMode ? [{ debugName: "maxThumbTop" }] : /* istanbul ignore next */ []));
72
- thumbTop = computed(() => {
73
- if (!this.hasScrollY())
74
- return 0;
75
- const maxScroll = this.maxScrollTop();
76
- const currentScroll = this.scrollTop();
77
- const maxThumb = this.maxThumbTop();
78
- return maxScroll > 0 ? (currentScroll / maxScroll) * maxThumb : 0;
79
- }, /* @ts-ignore */
80
- ...(ngDevMode ? [{ debugName: "thumbTop" }] : /* istanbul ignore next */ []));
81
- // Horizontal axis
82
- hasScrollX = computed(() => this.contentScrollWidth() > this.contentClientWidth() + 1, /* @ts-ignore */
83
- ...(ngDevMode ? [{ debugName: "hasScrollX" }] : /* istanbul ignore next */ []));
84
- scrollRatioX = computed(() => this.hasScrollX() ? this.contentClientWidth() / this.contentScrollWidth() : 1, /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "scrollRatioX" }] : /* istanbul ignore next */ []));
86
- minThumbWidth = 20;
87
- thumbWidth = computed(() => {
88
- if (!this.hasScrollX())
89
- return 0;
90
- const trackWidth = this.trackClientWidth();
91
- const ratio = this.scrollRatioX();
92
- const calculated = trackWidth * ratio;
93
- return Math.max(calculated, this.minThumbWidth);
94
- }, /* @ts-ignore */
95
- ...(ngDevMode ? [{ debugName: "thumbWidth" }] : /* istanbul ignore next */ []));
96
- maxScrollLeft = computed(() => Math.max(0, this.contentScrollWidth() - this.contentClientWidth()), /* @ts-ignore */
97
- ...(ngDevMode ? [{ debugName: "maxScrollLeft" }] : /* istanbul ignore next */ []));
98
- maxThumbLeft = computed(() => Math.max(0, this.trackClientWidth() - this.thumbWidth()), /* @ts-ignore */
99
- ...(ngDevMode ? [{ debugName: "maxThumbLeft" }] : /* istanbul ignore next */ []));
100
- thumbLeft = computed(() => {
101
- if (!this.hasScrollX())
102
- return 0;
103
- const maxScroll = this.maxScrollLeft();
104
- const currentScroll = this.scrollLeft();
105
- const maxThumb = this.maxThumbLeft();
106
- return maxScroll > 0 ? (currentScroll / maxScroll) * maxThumb : 0;
107
- }, /* @ts-ignore */
108
- ...(ngDevMode ? [{ debugName: "thumbLeft" }] : /* istanbul ignore next */ []));
109
- hasAnyScroll = computed(() => this.hasScrollX() || this.hasScrollY(), /* @ts-ignore */
110
- ...(ngDevMode ? [{ debugName: "hasAnyScroll" }] : /* istanbul ignore next */ []));
111
- isVisible = computed(() => {
112
- if (!this.hasAnyScroll())
113
- return false;
114
- if (!this.autoHide())
115
- return true;
116
- return this.isHovering() || this.isDragging() || this.showDueToActivity();
117
- }, /* @ts-ignore */
118
- ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
119
- isInteractive = computed(() => this.isHovering() || this.isDragging(), /* @ts-ignore */
120
- ...(ngDevMode ? [{ debugName: "isInteractive" }] : /* istanbul ignore next */ []));
121
- isInitialized = signal(false, /* @ts-ignore */
122
- ...(ngDevMode ? [{ debugName: "isInitialized" }] : /* istanbul ignore next */ []));
123
- eventsSubscription = null;
124
- observersSubscription = null;
125
- hideTimeout = null;
126
- constructor() {
127
- effect(() => {
128
- this.scrollableContentRef();
129
- this.scrollTrackRef();
130
- this.scrollThumbRef();
131
- this.scrollTrackXRef();
132
- this.scrollThumbXRef();
133
- if (isPlatformBrowser(this.platformId) && !this.isInitialized()) {
134
- this.initializeComponentLogic();
135
- this.isInitialized.set(true);
136
- }
137
- });
138
- this.setupStyleEffects();
139
- this.destroyRef.onDestroy(() => this.cleanup());
140
- }
141
- initializeComponentLogic() {
142
- this.updateDimensions();
143
- this.setupObservers();
144
- this.setupEventStreams();
145
- this.setupRouteChanges();
146
- }
147
- raf(cb) {
148
- // Use requestAnimationFrame in the browser, fallback to setTimeout on SSR
149
- if (typeof requestAnimationFrame !== 'undefined') {
150
- requestAnimationFrame(() => cb());
151
- }
152
- else {
153
- setTimeout(() => cb(), 0);
154
- }
155
- }
156
- setupStyleEffects() {
157
- // Vertical thickness (width) and horizontal thickness (height)
158
- effect(() => {
159
- const thickness = this.scrollbarWidth();
160
- const trackY = this.scrollTrackRef().nativeElement;
161
- const thumbY = this.scrollThumbRef().nativeElement;
162
- const trackX = this.scrollTrackXRef().nativeElement;
163
- const thumbX = this.scrollThumbXRef().nativeElement;
164
- untracked(() => {
165
- // Vertical scrollbar: width is thickness
166
- this.renderer.setStyle(trackY, 'width', thickness);
167
- this.renderer.setStyle(thumbY, 'width', thickness);
168
- // Horizontal scrollbar: height is thickness
169
- this.renderer.setStyle(trackX, 'height', thickness);
170
- this.renderer.setStyle(thumbX, 'height', thickness);
171
- });
172
- });
173
- // Vertical thumb height
174
- effect(() => {
175
- const height = this.thumbHeight();
176
- const thumbElement = this.scrollThumbRef().nativeElement;
177
- untracked(() => {
178
- this.renderer.setStyle(thumbElement, 'height', `${height}px`);
179
- });
180
- });
181
- // Vertical thumb position
182
- effect(() => {
183
- const top = this.thumbTop();
184
- const thumbElement = this.scrollThumbRef().nativeElement;
185
- untracked(() => {
186
- this.renderer.setStyle(thumbElement, 'transform', `translateY(${top}px)`);
187
- });
188
- });
189
- // Horizontal thumb width
190
- effect(() => {
191
- const width = this.thumbWidth();
192
- const thumbElementX = this.scrollThumbXRef().nativeElement;
193
- untracked(() => {
194
- this.renderer.setStyle(thumbElementX, 'width', `${width}px`);
195
- });
196
- });
197
- // Horizontal thumb position
198
- effect(() => {
199
- const left = this.thumbLeft();
200
- const thumbElementX = this.scrollThumbXRef().nativeElement;
201
- untracked(() => {
202
- this.renderer.setStyle(thumbElementX, 'transform', `translateX(${left}px)`);
203
- });
204
- });
205
- // Toggle track visibility per axis based on content
206
- effect(() => {
207
- const hasY = this.hasScrollY();
208
- const trackY = this.scrollTrackRef().nativeElement;
209
- untracked(() => {
210
- this.renderer.setStyle(trackY, 'display', hasY ? 'block' : 'none');
211
- });
212
- });
213
- effect(() => {
214
- const hasX = this.hasScrollX();
215
- const trackX = this.scrollTrackXRef().nativeElement;
216
- untracked(() => {
217
- this.renderer.setStyle(trackX, 'display', hasX ? 'block' : 'none');
218
- });
219
- });
220
- // When scrollability toggles, recompute dimensions after tracks are laid out
221
- effect(() => {
222
- // depend on both so we run when either axis scrollability changes
223
- const _hasY = this.hasScrollY();
224
- const _hasX = this.hasScrollX();
225
- untracked(() => {
226
- // Wait for style changes (display:block/none) to apply, then measure
227
- this.raf(() => {
228
- this.zone.run(() => this.updateDimensions());
229
- });
230
- });
231
- });
232
- }
233
- setupObservers() {
234
- const scrollableElement = this.scrollableContentRef().nativeElement;
235
- const hostElement = this.elRef.nativeElement;
236
- // Helper to observe all element nodes within a subtree with ResizeObserver
237
- const observeSubtree = (ro, root) => {
238
- ro.observe(root);
239
- // Observe all current descendants as well to catch size changes that don't bubble to the container
240
- const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT);
241
- let node = walker.currentNode;
242
- while (node) {
243
- ro.observe(node);
244
- node = walker.nextNode();
245
- }
246
- };
247
- const resize$ = new Observable(observer => {
248
- const resizeObserver = new ResizeObserver(entries => this.zone.run(() => observer.next(entries)));
249
- // Observe host (tracks may affect layout) and the entire subtree of scrollable content
250
- observeSubtree(resizeObserver, scrollableElement);
251
- resizeObserver.observe(hostElement);
252
- return () => resizeObserver.disconnect();
253
- }).pipe(debounceTime(50));
254
- const mutation$ = new Observable(observer => {
255
- const mutationObserver = new MutationObserver(mutations => this.zone.run(() => observer.next(mutations)));
256
- // Watch for any DOM changes that can affect layout including attribute/class/style changes
257
- mutationObserver.observe(scrollableElement, { childList: true, subtree: true, characterData: true, attributes: true });
258
- return () => mutationObserver.disconnect();
259
- }).pipe(tap(mutations => {
260
- // If nodes were added to the subtree, start observing them for size changes as well
261
- // We run outside Angular to avoid triggering change detection per node
262
- this.zone.runOutsideAngular(() => {
263
- // Create a temporary RO reference by reusing the one from resize$ is not trivial here,
264
- // but we can trigger a dimension update directly which is enough for many cases.
265
- // The resize observer above already observes the whole subtree at setup time.
266
- // For dynamically added nodes, re-run a subtree observation by creating a one-shot RO.
267
- const newlyAdded = [];
268
- for (const m of mutations) {
269
- if (m.type === 'childList') {
270
- m.addedNodes.forEach(n => { if (n.nodeType === Node.ELEMENT_NODE)
271
- newlyAdded.push(n); });
272
- }
273
- }
274
- if (newlyAdded.length) {
275
- try {
276
- const ro = new ResizeObserver(() => { });
277
- newlyAdded.forEach(el => observeSubtree(ro, el));
278
- // Disconnect immediately; observing once is enough for triggering initial measure via update below
279
- ro.disconnect();
280
- }
281
- catch { }
282
- }
283
- });
284
- }), debounceTime(50));
285
- this.observersSubscription = merge(resize$, mutation$)
286
- .subscribe(() => {
287
- // Use rAF to ensure layout is settled before measuring
288
- this.raf(() => this.zone.run(() => this.updateDimensions()));
289
- });
290
- }
291
- setupEventStreams() {
292
- const scrollableElement = this.scrollableContentRef().nativeElement;
293
- const hostElement = this.elRef.nativeElement;
294
- const thumbElementY = this.scrollThumbRef().nativeElement;
295
- const thumbElementX = this.scrollThumbXRef().nativeElement;
296
- const scroll$ = fromEvent(scrollableElement, 'scroll', { passive: true }).pipe(tap((event) => {
297
- this.zone.run(() => {
298
- this.scrollTop.set(scrollableElement.scrollTop);
299
- this.scrollLeft.set(scrollableElement.scrollLeft);
300
- this.scrolled.emit(event);
301
- });
302
- // Imperative sync to ensure thumbs move with content during scroll
303
- this.zone.runOutsideAngular(() => {
304
- this.raf(() => {
305
- const top = untracked(this.thumbTop);
306
- const left = untracked(this.thumbLeft);
307
- this.renderer.setStyle(thumbElementY, 'transform', `translateY(${top}px)`);
308
- this.renderer.setStyle(thumbElementX, 'transform', `translateX(${left}px)`);
309
- });
310
- });
311
- }), filter(() => this.autoHide()), tap(() => this.zone.run(() => this.showDueToActivity.set(true))), debounceTime(1500), tap(() => {
312
- untracked(() => {
313
- if (!this.isHovering() && !this.isDragging()) {
314
- this.zone.run(() => this.showDueToActivity.set(false));
315
- }
316
- });
317
- }));
318
- const hostEnter$ = fromEvent(hostElement, 'mouseenter').pipe(tap(() => this.zone.run(() => {
319
- this.isHovering.set(true);
320
- if (untracked(this.autoHide))
321
- this.showDueToActivity.set(true);
322
- })));
323
- const hostLeave$ = fromEvent(hostElement, 'mouseleave').pipe(tap(() => this.zone.run(() => {
324
- this.isHovering.set(false);
325
- if (untracked(this.autoHide) && !untracked(this.isDragging)) {
326
- this.scheduleHide();
327
- }
328
- })));
329
- const thumbMouseDownY$ = fromEvent(thumbElementY, 'mousedown');
330
- const thumbMouseDownX$ = fromEvent(thumbElementX, 'mousedown');
331
- const mouseMove$ = fromEvent(document, 'mousemove');
332
- const mouseUp$ = fromEvent(document, 'mouseup');
333
- const thumbDragY$ = thumbMouseDownY$.pipe(tap(event => {
334
- event.preventDefault();
335
- event.stopPropagation();
336
- }), switchMap(startEvent => {
337
- const startY = startEvent.clientY;
338
- const startScrollTop = scrollableElement.scrollTop;
339
- const initialTrackHeight = untracked(() => this.trackClientHeight());
340
- const initialContentHeight = untracked(() => this.contentScrollHeight());
341
- this.zone.run(() => this.isDragging.set(true));
342
- return mouseMove$.pipe(map(moveEvent => {
343
- moveEvent.preventDefault();
344
- const deltaY = moveEvent.clientY - startY;
345
- const scrollDelta = initialTrackHeight > 0
346
- ? (deltaY / initialTrackHeight) * initialContentHeight
347
- : 0;
348
- return startScrollTop + scrollDelta;
349
- }), distinctUntilChanged(), tap(newScrollTop => {
350
- this.renderer.setProperty(scrollableElement, 'scrollTop', newScrollTop);
351
- }), takeUntil(mouseUp$), finalize(() => {
352
- this.zone.run(() => {
353
- this.isDragging.set(false);
354
- untracked(() => {
355
- if (this.autoHide() && !this.isHovering()) {
356
- this.scheduleHide();
357
- }
358
- });
359
- });
360
- }));
361
- }));
362
- const thumbDragX$ = thumbMouseDownX$.pipe(tap(event => {
363
- event.preventDefault();
364
- event.stopPropagation();
365
- }), switchMap(startEvent => {
366
- const startX = startEvent.clientX;
367
- const startScrollLeft = scrollableElement.scrollLeft;
368
- const initialTrackWidth = untracked(() => this.trackClientWidth());
369
- const initialContentWidth = untracked(() => this.contentScrollWidth());
370
- this.zone.run(() => this.isDragging.set(true));
371
- return mouseMove$.pipe(map(moveEvent => {
372
- moveEvent.preventDefault();
373
- const deltaX = moveEvent.clientX - startX;
374
- const scrollDelta = initialTrackWidth > 0
375
- ? (deltaX / initialTrackWidth) * initialContentWidth
376
- : 0;
377
- return startScrollLeft + scrollDelta;
378
- }), distinctUntilChanged(), tap(newScrollLeft => {
379
- this.renderer.setProperty(scrollableElement, 'scrollLeft', newScrollLeft);
380
- }), takeUntil(mouseUp$), finalize(() => {
381
- this.zone.run(() => {
382
- this.isDragging.set(false);
383
- untracked(() => {
384
- if (this.autoHide() && !this.isHovering()) {
385
- this.scheduleHide();
386
- }
387
- });
388
- });
389
- }));
390
- }));
391
- this.zone.runOutsideAngular(() => {
392
- this.eventsSubscription = merge(scroll$, hostEnter$, hostLeave$, thumbDragY$, thumbDragX$).subscribe();
393
- });
394
- }
395
- scheduleHide() {
396
- this.clearHideTimeout();
397
- this.zone.runOutsideAngular(() => {
398
- this.hideTimeout = setTimeout(() => {
399
- untracked(() => {
400
- if (!this.isHovering() && !this.isDragging()) {
401
- this.zone.run(() => this.showDueToActivity.set(false));
402
- }
403
- });
404
- this.hideTimeout = null;
405
- }, 100);
406
- });
407
- }
408
- clearHideTimeout() {
409
- if (this.hideTimeout) {
410
- clearTimeout(this.hideTimeout);
411
- this.hideTimeout = null;
412
- }
413
- }
414
- updateDimensions() {
415
- const scrollableElement = this.scrollableContentRef().nativeElement;
416
- const trackElementY = this.scrollTrackRef().nativeElement;
417
- const trackElementX = this.scrollTrackXRef().nativeElement;
418
- if (scrollableElement && trackElementY && trackElementX) {
419
- // Vertical metrics
420
- const newScrollHeight = scrollableElement.scrollHeight;
421
- const newClientHeight = scrollableElement.clientHeight;
422
- const newTrackHeight = trackElementY.clientHeight;
423
- const newScrollTop = scrollableElement.scrollTop;
424
- this.contentScrollHeight.set(newScrollHeight);
425
- this.contentClientHeight.set(newClientHeight);
426
- this.trackClientHeight.set(newTrackHeight);
427
- if (this.scrollTop() !== newScrollTop) {
428
- this.scrollTop.set(newScrollTop);
429
- }
430
- // Horizontal metrics
431
- const newScrollWidth = scrollableElement.scrollWidth;
432
- const newClientWidth = scrollableElement.clientWidth;
433
- const newTrackWidth = trackElementX.clientWidth;
434
- const newScrollLeft = scrollableElement.scrollLeft;
435
- this.contentScrollWidth.set(newScrollWidth);
436
- this.contentClientWidth.set(newClientWidth);
437
- this.trackClientWidth.set(newTrackWidth);
438
- if (this.scrollLeft() !== newScrollLeft) {
439
- this.scrollLeft.set(newScrollLeft);
440
- }
441
- }
442
- else {
443
- this.contentScrollHeight.set(0);
444
- this.contentClientHeight.set(0);
445
- this.trackClientHeight.set(0);
446
- this.scrollTop.set(0);
447
- this.contentScrollWidth.set(0);
448
- this.contentClientWidth.set(0);
449
- this.trackClientWidth.set(0);
450
- this.scrollLeft.set(0);
451
- }
452
- }
453
- cleanup() {
454
- this.clearHideTimeout();
455
- if (this.eventsSubscription) {
456
- this.eventsSubscription.unsubscribe();
457
- this.eventsSubscription = null;
458
- }
459
- if (this.observersSubscription) {
460
- this.observersSubscription.unsubscribe();
461
- this.observersSubscription = null;
462
- }
463
- }
464
- setupRouteChanges() {
465
- this.router?.events
466
- .pipe(filter(event => event instanceof NavigationEnd), takeUntilDestroyed(this.destroyRef))
467
- .subscribe(() => {
468
- this.raf(() => {
469
- this.updateDimensions();
470
- });
471
- });
472
- }
473
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ScrollbarArea, deps: [], target: i0.ɵɵFactoryTarget.Component });
474
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.7", type: ScrollbarArea, isStandalone: true, selector: "ngs-scrollbar-area", inputs: { scrollbarWidth: { classPropertyName: "scrollbarWidth", publicName: "scrollbarWidth", isSignal: true, isRequired: false, transformFunction: null }, autoHide: { classPropertyName: "autoHide", publicName: "autoHide", isSignal: true, isRequired: false, transformFunction: null }, absolute: { classPropertyName: "absolute", publicName: "absolute", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { scrolled: "scrolled" }, host: { properties: { "class.scrollbar-visible": "isVisible()", "class.scrollbar-interactive": "isInteractive()", "class.is-absolute": "absolute()" }, classAttribute: "ngs-scrollbar-area" }, viewQueries: [{ propertyName: "scrollableContentRef", first: true, predicate: ["scrollableContent"], descendants: true, isSignal: true }, { propertyName: "scrollTrackRef", first: true, predicate: ["scrollTrack"], descendants: true, isSignal: true }, { propertyName: "scrollThumbRef", first: true, predicate: ["scrollThumb"], descendants: true, isSignal: true }, { propertyName: "scrollTrackXRef", first: true, predicate: ["scrollTrackX"], descendants: true, isSignal: true }, { propertyName: "scrollThumbXRef", first: true, predicate: ["scrollThumbX"], descendants: true, isSignal: true }], exportAs: ["ngsScrollbarArea"], ngImport: i0, template: "<div #scrollableContent class=\"scrollable-content\">\n <ng-content/>\n</div>\n<div #scrollTrack class=\"scroll-track\">\n <div #scrollThumb class=\"scroll-thumb\"></div>\n</div>\n<div #scrollTrackX class=\"scroll-track-x\">\n <div #scrollThumbX class=\"scroll-thumb-x\"></div>\n</div>\n", styles: [":host{--ngs-scrollbar-area-thumb-bg: var(--ngs-scrollbar-thumb-bg);--ngs-scrollbar-area-thumb-hover-bg: var(--ngs-scrollbar-thumb-hover-bg);--ngs-scrollbar-area-thumb-active-bg: var(--ngs-scrollbar-thumb-active-bg);--ngs-scrollbar-area-width: 10px;--ngs-scrollbar-area-scroll-track-bg: transparent;display:block;overflow:hidden;position:absolute;inset:0}:host .scrollable-content{height:100%;overflow-y:scroll;overflow-x:scroll;width:100%;padding-right:0;box-sizing:border-box}:host .scrollable-content::-webkit-scrollbar{width:0;height:0;background:transparent}:host .scrollable-content{scrollbar-width:none;-ms-overflow-style:none}:host .scroll-track{position:absolute;top:0;right:0;bottom:0;width:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-scroll-track-bg);border-radius:var(--ngs-radius-sm);opacity:0;transition:opacity .2s ease-in-out;z-index:100;pointer-events:none}:host .scroll-thumb{position:absolute;top:0;left:0;width:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-thumb-bg);border-radius:var(--ngs-radius-sm);transition:background-color .2s ease-in-out;pointer-events:auto}:host .scroll-track-x{position:absolute;left:0;right:0;bottom:0;height:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-scroll-track-bg);border-radius:var(--ngs-radius-sm);opacity:0;transition:opacity .2s ease-in-out;z-index:100;pointer-events:none}:host .scroll-thumb-x{position:absolute;bottom:0;left:0;height:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-thumb-bg);border-radius:var(--ngs-radius-sm);transition:background-color .2s ease-in-out;pointer-events:auto}:host .scroll-thumb:hover,:host .scroll-thumb-x:hover{background:var(--ngs-scrollbar-area-thumb-hover-bg)}:host .scroll-thumb:active,:host .scroll-thumb-x:active{background:var(--ngs-scrollbar-area-thumb-active-bg)}:host.scrollbar-visible .scroll-track,:host.scrollbar-visible .scroll-track-x{opacity:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
475
- }
476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ScrollbarArea, decorators: [{
477
- type: Component,
478
- args: [{ selector: 'ngs-scrollbar-area', exportAs: 'ngsScrollbarArea', changeDetection: ChangeDetectionStrategy.OnPush, host: {
479
- 'class': 'ngs-scrollbar-area',
480
- '[class.scrollbar-visible]': 'isVisible()',
481
- '[class.scrollbar-interactive]': 'isInteractive()',
482
- '[class.is-absolute]': 'absolute()',
483
- }, template: "<div #scrollableContent class=\"scrollable-content\">\n <ng-content/>\n</div>\n<div #scrollTrack class=\"scroll-track\">\n <div #scrollThumb class=\"scroll-thumb\"></div>\n</div>\n<div #scrollTrackX class=\"scroll-track-x\">\n <div #scrollThumbX class=\"scroll-thumb-x\"></div>\n</div>\n", styles: [":host{--ngs-scrollbar-area-thumb-bg: var(--ngs-scrollbar-thumb-bg);--ngs-scrollbar-area-thumb-hover-bg: var(--ngs-scrollbar-thumb-hover-bg);--ngs-scrollbar-area-thumb-active-bg: var(--ngs-scrollbar-thumb-active-bg);--ngs-scrollbar-area-width: 10px;--ngs-scrollbar-area-scroll-track-bg: transparent;display:block;overflow:hidden;position:absolute;inset:0}:host .scrollable-content{height:100%;overflow-y:scroll;overflow-x:scroll;width:100%;padding-right:0;box-sizing:border-box}:host .scrollable-content::-webkit-scrollbar{width:0;height:0;background:transparent}:host .scrollable-content{scrollbar-width:none;-ms-overflow-style:none}:host .scroll-track{position:absolute;top:0;right:0;bottom:0;width:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-scroll-track-bg);border-radius:var(--ngs-radius-sm);opacity:0;transition:opacity .2s ease-in-out;z-index:100;pointer-events:none}:host .scroll-thumb{position:absolute;top:0;left:0;width:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-thumb-bg);border-radius:var(--ngs-radius-sm);transition:background-color .2s ease-in-out;pointer-events:auto}:host .scroll-track-x{position:absolute;left:0;right:0;bottom:0;height:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-scroll-track-bg);border-radius:var(--ngs-radius-sm);opacity:0;transition:opacity .2s ease-in-out;z-index:100;pointer-events:none}:host .scroll-thumb-x{position:absolute;bottom:0;left:0;height:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-thumb-bg);border-radius:var(--ngs-radius-sm);transition:background-color .2s ease-in-out;pointer-events:auto}:host .scroll-thumb:hover,:host .scroll-thumb-x:hover{background:var(--ngs-scrollbar-area-thumb-hover-bg)}:host .scroll-thumb:active,:host .scroll-thumb-x:active{background:var(--ngs-scrollbar-area-thumb-active-bg)}:host.scrollbar-visible .scroll-track,:host.scrollbar-visible .scroll-track-x{opacity:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
484
- }], ctorParameters: () => [], propDecorators: { scrollableContentRef: [{ type: i0.ViewChild, args: ['scrollableContent', { isSignal: true }] }], scrollTrackRef: [{ type: i0.ViewChild, args: ['scrollTrack', { isSignal: true }] }], scrollThumbRef: [{ type: i0.ViewChild, args: ['scrollThumb', { isSignal: true }] }], scrollTrackXRef: [{ type: i0.ViewChild, args: ['scrollTrackX', { isSignal: true }] }], scrollThumbXRef: [{ type: i0.ViewChild, args: ['scrollThumbX', { isSignal: true }] }], scrollbarWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollbarWidth", required: false }] }], autoHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHide", required: false }] }], absolute: [{ type: i0.Input, args: [{ isSignal: true, alias: "absolute", required: false }] }], scrolled: [{ type: i0.Output, args: ["scrolled"] }] } });
485
-
486
- class ScrollContainerFixed {
487
- elementRef = inject(ElementRef);
488
- ngZone = inject(NgZone);
489
- platformId = inject(PLATFORM_ID);
490
- destroyRef = inject(DestroyRef);
491
- refreshChanges = new Subject();
492
- enabled = input(true, { ...(ngDevMode ? { debugName: "enabled" } : /* istanbul ignore next */ {}), alias: 'ngsScrollContainerFixed',
493
- transform: booleanAttribute });
494
- bottomOffset = input(0, { ...(ngDevMode ? { debugName: "bottomOffset" } : /* istanbul ignore next */ {}), alias: 'ngsScrollContainerFixedBottomOffset',
495
- transform: numberAttribute });
496
- minHeight = input(0, { ...(ngDevMode ? { debugName: "minHeight" } : /* istanbul ignore next */ {}), alias: 'ngsScrollContainerFixedMinHeight',
497
- transform: numberAttribute });
498
- height = signal(null, /* @ts-ignore */
499
- ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
500
- constructor() {
501
- effect(() => {
502
- this.enabled();
503
- this.bottomOffset();
504
- this.minHeight();
505
- this.refresh();
506
- });
507
- }
508
- ngAfterViewInit() {
509
- if (!isPlatformBrowser(this.platformId)) {
510
- return;
511
- }
512
- this.ngZone.runOutsideAngular(() => {
513
- merge(...this.getResizeStreams())
514
- .pipe(startWith(null), auditTime(0), takeUntilDestroyed(this.destroyRef))
515
- .subscribe(() => this.updateHeight());
516
- });
517
- }
518
- refresh() {
519
- if (!isPlatformBrowser(this.platformId)) {
520
- return;
521
- }
522
- this.refreshChanges.next();
523
- }
524
- updateHeight() {
525
- if (!this.enabled()) {
526
- this.height.set(null);
527
- return;
528
- }
529
- const elementTop = this.elementRef.nativeElement.getBoundingClientRect().top;
530
- const viewportHeight = window.visualViewport?.height ?? window.innerHeight;
531
- const nextHeight = Math.max(this.minHeight(), Math.floor(viewportHeight - elementTop - this.bottomOffset()));
532
- this.height.set(nextHeight);
533
- }
534
- getResizeStreams() {
535
- const streams = [
536
- this.refreshChanges.asObservable(),
537
- fromEvent(window, 'resize'),
538
- fromEvent(window, 'orientationchange'),
539
- this.observeElement(this.elementRef.nativeElement),
540
- ];
541
- if (this.elementRef.nativeElement.parentElement) {
542
- streams.push(this.observeElement(this.elementRef.nativeElement.parentElement));
543
- }
544
- if (window.visualViewport) {
545
- streams.push(fromEvent(window.visualViewport, 'resize'), fromEvent(window.visualViewport, 'scroll'));
546
- }
547
- return streams;
548
- }
549
- observeElement(element) {
550
- return new Observable(observer => {
551
- if (typeof ResizeObserver === 'undefined') {
552
- observer.complete();
553
- return undefined;
554
- }
555
- const resizeObserver = new ResizeObserver(entries => observer.next(entries));
556
- resizeObserver.observe(element);
557
- return () => resizeObserver.disconnect();
558
- });
559
- }
560
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ScrollContainerFixed, deps: [], target: i0.ɵɵFactoryTarget.Directive });
561
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: ScrollContainerFixed, isStandalone: true, selector: "[ngsScrollContainerFixed]", inputs: { enabled: { classPropertyName: "enabled", publicName: "ngsScrollContainerFixed", isSignal: true, isRequired: false, transformFunction: null }, bottomOffset: { classPropertyName: "bottomOffset", publicName: "ngsScrollContainerFixedBottomOffset", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "ngsScrollContainerFixedMinHeight", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.box-sizing": "\"border-box\"", "style.height.px": "height()", "style.min-height.px": "enabled() ? minHeight() : null" } }, exportAs: ["ngsScrollContainerFixed"], ngImport: i0 });
562
- }
563
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ScrollContainerFixed, decorators: [{
564
- type: Directive,
565
- args: [{
566
- selector: '[ngsScrollContainerFixed]',
567
- exportAs: 'ngsScrollContainerFixed',
568
- standalone: true,
569
- host: {
570
- '[style.box-sizing]': '"border-box"',
571
- '[style.height.px]': 'height()',
572
- '[style.min-height.px]': 'enabled() ? minHeight() : null',
573
- },
574
- }]
575
- }], ctorParameters: () => [], propDecorators: { enabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsScrollContainerFixed", required: false }] }], bottomOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsScrollContainerFixedBottomOffset", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsScrollContainerFixedMinHeight", required: false }] }] } });
576
-
577
- /**
578
- * Generated bundle index. Do not edit.
579
- */
580
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, NgZone, PLATFORM_ID, Renderer2, booleanAttribute, computed, effect, inject, input, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
3
+ import { isPlatformBrowser } from "@angular/common";
4
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
+ import { Observable, Subject, auditTime, debounceTime, distinctUntilChanged, filter, finalize, fromEvent, map, merge, startWith, switchMap, takeUntil, tap } from "rxjs";
6
+ import { NavigationEnd, Router } from "@angular/router";
7
+ var ScrollbarArea = class ScrollbarArea {
8
+ platformId = inject(PLATFORM_ID);
9
+ elRef = inject(ElementRef);
10
+ zone = inject(NgZone);
11
+ renderer = inject(Renderer2);
12
+ destroyRef = inject(DestroyRef);
13
+ router = inject(Router, { optional: true });
14
+ scrollableContentRef = viewChild.required("scrollableContent", ...ngDevMode ? [{ debugName: "scrollableContentRef" }] : /* istanbul ignore next */ []);
15
+ scrollTrackRef = viewChild.required("scrollTrack", ...ngDevMode ? [{ debugName: "scrollTrackRef" }] : /* istanbul ignore next */ []);
16
+ scrollThumbRef = viewChild.required("scrollThumb", ...ngDevMode ? [{ debugName: "scrollThumbRef" }] : /* istanbul ignore next */ []);
17
+ scrollTrackXRef = viewChild.required("scrollTrackX", ...ngDevMode ? [{ debugName: "scrollTrackXRef" }] : /* istanbul ignore next */ []);
18
+ scrollThumbXRef = viewChild.required("scrollThumbX", ...ngDevMode ? [{ debugName: "scrollThumbXRef" }] : /* istanbul ignore next */ []);
19
+ scrollbarWidth = input("8px", ...ngDevMode ? [{ debugName: "scrollbarWidth" }] : /* istanbul ignore next */ []);
20
+ autoHide = input(true, {
21
+ ...ngDevMode ? { debugName: "autoHide" } : /* istanbul ignore next */ {},
22
+ transform: booleanAttribute
23
+ });
24
+ absolute = input(true, {
25
+ ...ngDevMode ? { debugName: "absolute" } : /* istanbul ignore next */ {},
26
+ transform: booleanAttribute
27
+ });
28
+ scrolled = output();
29
+ isDragging = signal(false, ...ngDevMode ? [{ debugName: "isDragging" }] : /* istanbul ignore next */ []);
30
+ isHovering = signal(false, ...ngDevMode ? [{ debugName: "isHovering" }] : /* istanbul ignore next */ []);
31
+ scrollTop = signal(0, ...ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []);
32
+ scrollLeft = signal(0, ...ngDevMode ? [{ debugName: "scrollLeft" }] : /* istanbul ignore next */ []);
33
+ contentScrollHeight = signal(0, ...ngDevMode ? [{ debugName: "contentScrollHeight" }] : /* istanbul ignore next */ []);
34
+ contentScrollWidth = signal(0, ...ngDevMode ? [{ debugName: "contentScrollWidth" }] : /* istanbul ignore next */ []);
35
+ contentClientHeight = signal(0, ...ngDevMode ? [{ debugName: "contentClientHeight" }] : /* istanbul ignore next */ []);
36
+ contentClientWidth = signal(0, ...ngDevMode ? [{ debugName: "contentClientWidth" }] : /* istanbul ignore next */ []);
37
+ trackClientHeight = signal(0, ...ngDevMode ? [{ debugName: "trackClientHeight" }] : /* istanbul ignore next */ []);
38
+ trackClientWidth = signal(0, ...ngDevMode ? [{ debugName: "trackClientWidth" }] : /* istanbul ignore next */ []);
39
+ showDueToActivity = signal(false, ...ngDevMode ? [{ debugName: "showDueToActivity" }] : /* istanbul ignore next */ []);
40
+ hasScrollY = computed(() => this.contentScrollHeight() > this.contentClientHeight() + 1, ...ngDevMode ? [{ debugName: "hasScrollY" }] : /* istanbul ignore next */ []);
41
+ scrollRatioY = computed(() => this.hasScrollY() ? this.contentClientHeight() / this.contentScrollHeight() : 1, ...ngDevMode ? [{ debugName: "scrollRatioY" }] : /* istanbul ignore next */ []);
42
+ minThumbHeight = 20;
43
+ thumbHeight = computed(() => {
44
+ if (!this.hasScrollY()) return 0;
45
+ const calculated = this.trackClientHeight() * this.scrollRatioY();
46
+ return Math.max(calculated, this.minThumbHeight);
47
+ }, ...ngDevMode ? [{ debugName: "thumbHeight" }] : /* istanbul ignore next */ []);
48
+ maxScrollTop = computed(() => Math.max(0, this.contentScrollHeight() - this.contentClientHeight()), ...ngDevMode ? [{ debugName: "maxScrollTop" }] : /* istanbul ignore next */ []);
49
+ maxThumbTop = computed(() => Math.max(0, this.trackClientHeight() - this.thumbHeight()), ...ngDevMode ? [{ debugName: "maxThumbTop" }] : /* istanbul ignore next */ []);
50
+ thumbTop = computed(() => {
51
+ if (!this.hasScrollY()) return 0;
52
+ const maxScroll = this.maxScrollTop();
53
+ const currentScroll = this.scrollTop();
54
+ const maxThumb = this.maxThumbTop();
55
+ return maxScroll > 0 ? currentScroll / maxScroll * maxThumb : 0;
56
+ }, ...ngDevMode ? [{ debugName: "thumbTop" }] : /* istanbul ignore next */ []);
57
+ hasScrollX = computed(() => this.contentScrollWidth() > this.contentClientWidth() + 1, ...ngDevMode ? [{ debugName: "hasScrollX" }] : /* istanbul ignore next */ []);
58
+ scrollRatioX = computed(() => this.hasScrollX() ? this.contentClientWidth() / this.contentScrollWidth() : 1, ...ngDevMode ? [{ debugName: "scrollRatioX" }] : /* istanbul ignore next */ []);
59
+ minThumbWidth = 20;
60
+ thumbWidth = computed(() => {
61
+ if (!this.hasScrollX()) return 0;
62
+ const calculated = this.trackClientWidth() * this.scrollRatioX();
63
+ return Math.max(calculated, this.minThumbWidth);
64
+ }, ...ngDevMode ? [{ debugName: "thumbWidth" }] : /* istanbul ignore next */ []);
65
+ maxScrollLeft = computed(() => Math.max(0, this.contentScrollWidth() - this.contentClientWidth()), ...ngDevMode ? [{ debugName: "maxScrollLeft" }] : /* istanbul ignore next */ []);
66
+ maxThumbLeft = computed(() => Math.max(0, this.trackClientWidth() - this.thumbWidth()), ...ngDevMode ? [{ debugName: "maxThumbLeft" }] : /* istanbul ignore next */ []);
67
+ thumbLeft = computed(() => {
68
+ if (!this.hasScrollX()) return 0;
69
+ const maxScroll = this.maxScrollLeft();
70
+ const currentScroll = this.scrollLeft();
71
+ const maxThumb = this.maxThumbLeft();
72
+ return maxScroll > 0 ? currentScroll / maxScroll * maxThumb : 0;
73
+ }, ...ngDevMode ? [{ debugName: "thumbLeft" }] : /* istanbul ignore next */ []);
74
+ hasAnyScroll = computed(() => this.hasScrollX() || this.hasScrollY(), ...ngDevMode ? [{ debugName: "hasAnyScroll" }] : /* istanbul ignore next */ []);
75
+ isVisible = computed(() => {
76
+ if (!this.hasAnyScroll()) return false;
77
+ if (!this.autoHide()) return true;
78
+ return this.isHovering() || this.isDragging() || this.showDueToActivity();
79
+ }, ...ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []);
80
+ isInteractive = computed(() => this.isHovering() || this.isDragging(), ...ngDevMode ? [{ debugName: "isInteractive" }] : /* istanbul ignore next */ []);
81
+ isInitialized = signal(false, ...ngDevMode ? [{ debugName: "isInitialized" }] : /* istanbul ignore next */ []);
82
+ eventsSubscription = null;
83
+ observersSubscription = null;
84
+ hideTimeout = null;
85
+ constructor() {
86
+ effect(() => {
87
+ this.scrollableContentRef();
88
+ this.scrollTrackRef();
89
+ this.scrollThumbRef();
90
+ this.scrollTrackXRef();
91
+ this.scrollThumbXRef();
92
+ if (isPlatformBrowser(this.platformId) && !this.isInitialized()) {
93
+ this.initializeComponentLogic();
94
+ this.isInitialized.set(true);
95
+ }
96
+ });
97
+ this.setupStyleEffects();
98
+ this.destroyRef.onDestroy(() => this.cleanup());
99
+ }
100
+ initializeComponentLogic() {
101
+ this.updateDimensions();
102
+ this.setupObservers();
103
+ this.setupEventStreams();
104
+ this.setupRouteChanges();
105
+ }
106
+ raf(cb) {
107
+ if (typeof requestAnimationFrame !== "undefined") requestAnimationFrame(() => cb());
108
+ else setTimeout(() => cb(), 0);
109
+ }
110
+ setupStyleEffects() {
111
+ effect(() => {
112
+ const thickness = this.scrollbarWidth();
113
+ const trackY = this.scrollTrackRef().nativeElement;
114
+ const thumbY = this.scrollThumbRef().nativeElement;
115
+ const trackX = this.scrollTrackXRef().nativeElement;
116
+ const thumbX = this.scrollThumbXRef().nativeElement;
117
+ untracked(() => {
118
+ this.renderer.setStyle(trackY, "width", thickness);
119
+ this.renderer.setStyle(thumbY, "width", thickness);
120
+ this.renderer.setStyle(trackX, "height", thickness);
121
+ this.renderer.setStyle(thumbX, "height", thickness);
122
+ });
123
+ });
124
+ effect(() => {
125
+ const height = this.thumbHeight();
126
+ const thumbElement = this.scrollThumbRef().nativeElement;
127
+ untracked(() => {
128
+ this.renderer.setStyle(thumbElement, "height", `${height}px`);
129
+ });
130
+ });
131
+ effect(() => {
132
+ const top = this.thumbTop();
133
+ const thumbElement = this.scrollThumbRef().nativeElement;
134
+ untracked(() => {
135
+ this.renderer.setStyle(thumbElement, "transform", `translateY(${top}px)`);
136
+ });
137
+ });
138
+ effect(() => {
139
+ const width = this.thumbWidth();
140
+ const thumbElementX = this.scrollThumbXRef().nativeElement;
141
+ untracked(() => {
142
+ this.renderer.setStyle(thumbElementX, "width", `${width}px`);
143
+ });
144
+ });
145
+ effect(() => {
146
+ const left = this.thumbLeft();
147
+ const thumbElementX = this.scrollThumbXRef().nativeElement;
148
+ untracked(() => {
149
+ this.renderer.setStyle(thumbElementX, "transform", `translateX(${left}px)`);
150
+ });
151
+ });
152
+ effect(() => {
153
+ const hasY = this.hasScrollY();
154
+ const trackY = this.scrollTrackRef().nativeElement;
155
+ untracked(() => {
156
+ this.renderer.setStyle(trackY, "display", hasY ? "block" : "none");
157
+ });
158
+ });
159
+ effect(() => {
160
+ const hasX = this.hasScrollX();
161
+ const trackX = this.scrollTrackXRef().nativeElement;
162
+ untracked(() => {
163
+ this.renderer.setStyle(trackX, "display", hasX ? "block" : "none");
164
+ });
165
+ });
166
+ effect(() => {
167
+ this.hasScrollY();
168
+ this.hasScrollX();
169
+ untracked(() => {
170
+ this.raf(() => {
171
+ this.zone.run(() => this.updateDimensions());
172
+ });
173
+ });
174
+ });
175
+ }
176
+ setupObservers() {
177
+ const scrollableElement = this.scrollableContentRef().nativeElement;
178
+ const hostElement = this.elRef.nativeElement;
179
+ const observeSubtree = (ro, root) => {
180
+ ro.observe(root);
181
+ const walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT);
182
+ let node = walker.currentNode;
183
+ while (node) {
184
+ ro.observe(node);
185
+ node = walker.nextNode();
186
+ }
187
+ };
188
+ const resize$ = new Observable((observer) => {
189
+ const resizeObserver = new ResizeObserver((entries) => this.zone.run(() => observer.next(entries)));
190
+ observeSubtree(resizeObserver, scrollableElement);
191
+ resizeObserver.observe(hostElement);
192
+ return () => resizeObserver.disconnect();
193
+ }).pipe(debounceTime(50));
194
+ const mutation$ = new Observable((observer) => {
195
+ const mutationObserver = new MutationObserver((mutations) => this.zone.run(() => observer.next(mutations)));
196
+ mutationObserver.observe(scrollableElement, {
197
+ childList: true,
198
+ subtree: true,
199
+ characterData: true,
200
+ attributes: true
201
+ });
202
+ return () => mutationObserver.disconnect();
203
+ }).pipe(tap((mutations) => {
204
+ this.zone.runOutsideAngular(() => {
205
+ const newlyAdded = [];
206
+ for (const m of mutations) if (m.type === "childList") m.addedNodes.forEach((n) => {
207
+ if (n.nodeType === Node.ELEMENT_NODE) newlyAdded.push(n);
208
+ });
209
+ if (newlyAdded.length) try {
210
+ const ro = new ResizeObserver(() => {});
211
+ newlyAdded.forEach((el) => observeSubtree(ro, el));
212
+ ro.disconnect();
213
+ } catch {}
214
+ });
215
+ }), debounceTime(50));
216
+ this.observersSubscription = merge(resize$, mutation$).subscribe(() => {
217
+ this.raf(() => this.zone.run(() => this.updateDimensions()));
218
+ });
219
+ }
220
+ setupEventStreams() {
221
+ const scrollableElement = this.scrollableContentRef().nativeElement;
222
+ const hostElement = this.elRef.nativeElement;
223
+ const thumbElementY = this.scrollThumbRef().nativeElement;
224
+ const thumbElementX = this.scrollThumbXRef().nativeElement;
225
+ const scroll$ = fromEvent(scrollableElement, "scroll", { passive: true }).pipe(tap((event) => {
226
+ this.zone.run(() => {
227
+ this.scrollTop.set(scrollableElement.scrollTop);
228
+ this.scrollLeft.set(scrollableElement.scrollLeft);
229
+ this.scrolled.emit(event);
230
+ });
231
+ this.zone.runOutsideAngular(() => {
232
+ this.raf(() => {
233
+ const top = untracked(this.thumbTop);
234
+ const left = untracked(this.thumbLeft);
235
+ this.renderer.setStyle(thumbElementY, "transform", `translateY(${top}px)`);
236
+ this.renderer.setStyle(thumbElementX, "transform", `translateX(${left}px)`);
237
+ });
238
+ });
239
+ }), filter(() => this.autoHide()), tap(() => this.zone.run(() => this.showDueToActivity.set(true))), debounceTime(1500), tap(() => {
240
+ untracked(() => {
241
+ if (!this.isHovering() && !this.isDragging()) this.zone.run(() => this.showDueToActivity.set(false));
242
+ });
243
+ }));
244
+ const hostEnter$ = fromEvent(hostElement, "mouseenter").pipe(tap(() => this.zone.run(() => {
245
+ this.isHovering.set(true);
246
+ if (untracked(this.autoHide)) this.showDueToActivity.set(true);
247
+ })));
248
+ const hostLeave$ = fromEvent(hostElement, "mouseleave").pipe(tap(() => this.zone.run(() => {
249
+ this.isHovering.set(false);
250
+ if (untracked(this.autoHide) && !untracked(this.isDragging)) this.scheduleHide();
251
+ })));
252
+ const thumbMouseDownY$ = fromEvent(thumbElementY, "mousedown");
253
+ const thumbMouseDownX$ = fromEvent(thumbElementX, "mousedown");
254
+ const mouseMove$ = fromEvent(document, "mousemove");
255
+ const mouseUp$ = fromEvent(document, "mouseup");
256
+ const thumbDragY$ = thumbMouseDownY$.pipe(tap((event) => {
257
+ event.preventDefault();
258
+ event.stopPropagation();
259
+ }), switchMap((startEvent) => {
260
+ const startY = startEvent.clientY;
261
+ const startScrollTop = scrollableElement.scrollTop;
262
+ const initialTrackHeight = untracked(() => this.trackClientHeight());
263
+ const initialContentHeight = untracked(() => this.contentScrollHeight());
264
+ this.zone.run(() => this.isDragging.set(true));
265
+ return mouseMove$.pipe(map((moveEvent) => {
266
+ moveEvent.preventDefault();
267
+ const deltaY = moveEvent.clientY - startY;
268
+ const scrollDelta = initialTrackHeight > 0 ? deltaY / initialTrackHeight * initialContentHeight : 0;
269
+ return startScrollTop + scrollDelta;
270
+ }), distinctUntilChanged(), tap((newScrollTop) => {
271
+ this.renderer.setProperty(scrollableElement, "scrollTop", newScrollTop);
272
+ }), takeUntil(mouseUp$), finalize(() => {
273
+ this.zone.run(() => {
274
+ this.isDragging.set(false);
275
+ untracked(() => {
276
+ if (this.autoHide() && !this.isHovering()) this.scheduleHide();
277
+ });
278
+ });
279
+ }));
280
+ }));
281
+ const thumbDragX$ = thumbMouseDownX$.pipe(tap((event) => {
282
+ event.preventDefault();
283
+ event.stopPropagation();
284
+ }), switchMap((startEvent) => {
285
+ const startX = startEvent.clientX;
286
+ const startScrollLeft = scrollableElement.scrollLeft;
287
+ const initialTrackWidth = untracked(() => this.trackClientWidth());
288
+ const initialContentWidth = untracked(() => this.contentScrollWidth());
289
+ this.zone.run(() => this.isDragging.set(true));
290
+ return mouseMove$.pipe(map((moveEvent) => {
291
+ moveEvent.preventDefault();
292
+ const deltaX = moveEvent.clientX - startX;
293
+ const scrollDelta = initialTrackWidth > 0 ? deltaX / initialTrackWidth * initialContentWidth : 0;
294
+ return startScrollLeft + scrollDelta;
295
+ }), distinctUntilChanged(), tap((newScrollLeft) => {
296
+ this.renderer.setProperty(scrollableElement, "scrollLeft", newScrollLeft);
297
+ }), takeUntil(mouseUp$), finalize(() => {
298
+ this.zone.run(() => {
299
+ this.isDragging.set(false);
300
+ untracked(() => {
301
+ if (this.autoHide() && !this.isHovering()) this.scheduleHide();
302
+ });
303
+ });
304
+ }));
305
+ }));
306
+ this.zone.runOutsideAngular(() => {
307
+ this.eventsSubscription = merge(scroll$, hostEnter$, hostLeave$, thumbDragY$, thumbDragX$).subscribe();
308
+ });
309
+ }
310
+ scheduleHide() {
311
+ this.clearHideTimeout();
312
+ this.zone.runOutsideAngular(() => {
313
+ this.hideTimeout = setTimeout(() => {
314
+ untracked(() => {
315
+ if (!this.isHovering() && !this.isDragging()) this.zone.run(() => this.showDueToActivity.set(false));
316
+ });
317
+ this.hideTimeout = null;
318
+ }, 100);
319
+ });
320
+ }
321
+ clearHideTimeout() {
322
+ if (this.hideTimeout) {
323
+ clearTimeout(this.hideTimeout);
324
+ this.hideTimeout = null;
325
+ }
326
+ }
327
+ updateDimensions() {
328
+ const scrollableElement = this.scrollableContentRef().nativeElement;
329
+ const trackElementY = this.scrollTrackRef().nativeElement;
330
+ const trackElementX = this.scrollTrackXRef().nativeElement;
331
+ if (scrollableElement && trackElementY && trackElementX) {
332
+ const newScrollHeight = scrollableElement.scrollHeight;
333
+ const newClientHeight = scrollableElement.clientHeight;
334
+ const newTrackHeight = trackElementY.clientHeight;
335
+ const newScrollTop = scrollableElement.scrollTop;
336
+ this.contentScrollHeight.set(newScrollHeight);
337
+ this.contentClientHeight.set(newClientHeight);
338
+ this.trackClientHeight.set(newTrackHeight);
339
+ if (this.scrollTop() !== newScrollTop) this.scrollTop.set(newScrollTop);
340
+ const newScrollWidth = scrollableElement.scrollWidth;
341
+ const newClientWidth = scrollableElement.clientWidth;
342
+ const newTrackWidth = trackElementX.clientWidth;
343
+ const newScrollLeft = scrollableElement.scrollLeft;
344
+ this.contentScrollWidth.set(newScrollWidth);
345
+ this.contentClientWidth.set(newClientWidth);
346
+ this.trackClientWidth.set(newTrackWidth);
347
+ if (this.scrollLeft() !== newScrollLeft) this.scrollLeft.set(newScrollLeft);
348
+ } else {
349
+ this.contentScrollHeight.set(0);
350
+ this.contentClientHeight.set(0);
351
+ this.trackClientHeight.set(0);
352
+ this.scrollTop.set(0);
353
+ this.contentScrollWidth.set(0);
354
+ this.contentClientWidth.set(0);
355
+ this.trackClientWidth.set(0);
356
+ this.scrollLeft.set(0);
357
+ }
358
+ }
359
+ cleanup() {
360
+ this.clearHideTimeout();
361
+ if (this.eventsSubscription) {
362
+ this.eventsSubscription.unsubscribe();
363
+ this.eventsSubscription = null;
364
+ }
365
+ if (this.observersSubscription) {
366
+ this.observersSubscription.unsubscribe();
367
+ this.observersSubscription = null;
368
+ }
369
+ }
370
+ setupRouteChanges() {
371
+ this.router?.events.pipe(filter((event) => event instanceof NavigationEnd), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
372
+ this.raf(() => {
373
+ this.updateDimensions();
374
+ });
375
+ });
376
+ }
377
+ static ɵfac = i0.ɵɵngDeclareFactory({
378
+ minVersion: "12.0.0",
379
+ version: "22.3.0",
380
+ ngImport: i0,
381
+ type: ScrollbarArea,
382
+ deps: [],
383
+ target: i0.ɵɵFactoryTarget.Component
384
+ });
385
+ static ɵcmp = i0.ɵɵngDeclareComponent({
386
+ minVersion: "17.2.0",
387
+ version: "22.3.0",
388
+ type: ScrollbarArea,
389
+ isStandalone: true,
390
+ selector: "ngs-scrollbar-area",
391
+ inputs: {
392
+ scrollbarWidth: {
393
+ classPropertyName: "scrollbarWidth",
394
+ publicName: "scrollbarWidth",
395
+ isSignal: true,
396
+ isRequired: false,
397
+ transformFunction: null
398
+ },
399
+ autoHide: {
400
+ classPropertyName: "autoHide",
401
+ publicName: "autoHide",
402
+ isSignal: true,
403
+ isRequired: false,
404
+ transformFunction: null
405
+ },
406
+ absolute: {
407
+ classPropertyName: "absolute",
408
+ publicName: "absolute",
409
+ isSignal: true,
410
+ isRequired: false,
411
+ transformFunction: null
412
+ }
413
+ },
414
+ outputs: { scrolled: "scrolled" },
415
+ host: {
416
+ properties: {
417
+ "class.scrollbar-visible": "isVisible()",
418
+ "class.scrollbar-interactive": "isInteractive()",
419
+ "class.is-absolute": "absolute()"
420
+ },
421
+ classAttribute: "ngs-scrollbar-area"
422
+ },
423
+ viewQueries: [
424
+ {
425
+ propertyName: "scrollableContentRef",
426
+ first: true,
427
+ predicate: ["scrollableContent"],
428
+ descendants: true,
429
+ isSignal: true
430
+ },
431
+ {
432
+ propertyName: "scrollTrackRef",
433
+ first: true,
434
+ predicate: ["scrollTrack"],
435
+ descendants: true,
436
+ isSignal: true
437
+ },
438
+ {
439
+ propertyName: "scrollThumbRef",
440
+ first: true,
441
+ predicate: ["scrollThumb"],
442
+ descendants: true,
443
+ isSignal: true
444
+ },
445
+ {
446
+ propertyName: "scrollTrackXRef",
447
+ first: true,
448
+ predicate: ["scrollTrackX"],
449
+ descendants: true,
450
+ isSignal: true
451
+ },
452
+ {
453
+ propertyName: "scrollThumbXRef",
454
+ first: true,
455
+ predicate: ["scrollThumbX"],
456
+ descendants: true,
457
+ isSignal: true
458
+ }
459
+ ],
460
+ exportAs: ["ngsScrollbarArea"],
461
+ ngImport: i0,
462
+ template: "<div #scrollableContent class=\"scrollable-content\">\n <ng-content/>\n</div>\n<div #scrollTrack class=\"scroll-track\">\n <div #scrollThumb class=\"scroll-thumb\"></div>\n</div>\n<div #scrollTrackX class=\"scroll-track-x\">\n <div #scrollThumbX class=\"scroll-thumb-x\"></div>\n</div>\n",
463
+ styles: [":host{--ngs-scrollbar-area-thumb-bg: var(--ngs-scrollbar-thumb-bg);--ngs-scrollbar-area-thumb-hover-bg: var(--ngs-scrollbar-thumb-hover-bg);--ngs-scrollbar-area-thumb-active-bg: var(--ngs-scrollbar-thumb-active-bg);--ngs-scrollbar-area-width: 10px;--ngs-scrollbar-area-scroll-track-bg: transparent;display:block;overflow:hidden;position:absolute;inset:0}:host .scrollable-content{height:100%;overflow-y:scroll;overflow-x:scroll;width:100%;padding-right:0;box-sizing:border-box}:host .scrollable-content::-webkit-scrollbar{width:0;height:0;background:transparent}:host .scrollable-content{scrollbar-width:none;-ms-overflow-style:none}:host .scroll-track{position:absolute;top:0;right:0;bottom:0;width:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-scroll-track-bg);border-radius:var(--ngs-radius-sm);opacity:0;transition:opacity .2s ease-in-out;z-index:100;pointer-events:none}:host .scroll-thumb{position:absolute;top:0;left:0;width:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-thumb-bg);border-radius:var(--ngs-radius-sm);transition:background-color .2s ease-in-out;pointer-events:auto}:host .scroll-track-x{position:absolute;left:0;right:0;bottom:0;height:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-scroll-track-bg);border-radius:var(--ngs-radius-sm);opacity:0;transition:opacity .2s ease-in-out;z-index:100;pointer-events:none}:host .scroll-thumb-x{position:absolute;bottom:0;left:0;height:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-thumb-bg);border-radius:var(--ngs-radius-sm);transition:background-color .2s ease-in-out;pointer-events:auto}:host .scroll-thumb:hover,:host .scroll-thumb-x:hover{background:var(--ngs-scrollbar-area-thumb-hover-bg)}:host .scroll-thumb:active,:host .scroll-thumb-x:active{background:var(--ngs-scrollbar-area-thumb-active-bg)}:host.scrollbar-visible .scroll-track,:host.scrollbar-visible .scroll-track-x{opacity:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
464
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
465
+ });
466
+ };
467
+ i0.ɵɵngDeclareClassMetadata({
468
+ minVersion: "12.0.0",
469
+ version: "22.3.0",
470
+ ngImport: i0,
471
+ type: ScrollbarArea,
472
+ decorators: [{
473
+ type: Component,
474
+ args: [{
475
+ selector: "ngs-scrollbar-area",
476
+ exportAs: "ngsScrollbarArea",
477
+ changeDetection: ChangeDetectionStrategy.OnPush,
478
+ host: {
479
+ "class": "ngs-scrollbar-area",
480
+ "[class.scrollbar-visible]": "isVisible()",
481
+ "[class.scrollbar-interactive]": "isInteractive()",
482
+ "[class.is-absolute]": "absolute()"
483
+ },
484
+ template: "<div #scrollableContent class=\"scrollable-content\">\n <ng-content/>\n</div>\n<div #scrollTrack class=\"scroll-track\">\n <div #scrollThumb class=\"scroll-thumb\"></div>\n</div>\n<div #scrollTrackX class=\"scroll-track-x\">\n <div #scrollThumbX class=\"scroll-thumb-x\"></div>\n</div>\n",
485
+ styles: [":host{--ngs-scrollbar-area-thumb-bg: var(--ngs-scrollbar-thumb-bg);--ngs-scrollbar-area-thumb-hover-bg: var(--ngs-scrollbar-thumb-hover-bg);--ngs-scrollbar-area-thumb-active-bg: var(--ngs-scrollbar-thumb-active-bg);--ngs-scrollbar-area-width: 10px;--ngs-scrollbar-area-scroll-track-bg: transparent;display:block;overflow:hidden;position:absolute;inset:0}:host .scrollable-content{height:100%;overflow-y:scroll;overflow-x:scroll;width:100%;padding-right:0;box-sizing:border-box}:host .scrollable-content::-webkit-scrollbar{width:0;height:0;background:transparent}:host .scrollable-content{scrollbar-width:none;-ms-overflow-style:none}:host .scroll-track{position:absolute;top:0;right:0;bottom:0;width:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-scroll-track-bg);border-radius:var(--ngs-radius-sm);opacity:0;transition:opacity .2s ease-in-out;z-index:100;pointer-events:none}:host .scroll-thumb{position:absolute;top:0;left:0;width:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-thumb-bg);border-radius:var(--ngs-radius-sm);transition:background-color .2s ease-in-out;pointer-events:auto}:host .scroll-track-x{position:absolute;left:0;right:0;bottom:0;height:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-scroll-track-bg);border-radius:var(--ngs-radius-sm);opacity:0;transition:opacity .2s ease-in-out;z-index:100;pointer-events:none}:host .scroll-thumb-x{position:absolute;bottom:0;left:0;height:var(--ngs-scrollbar-area-width);background:var(--ngs-scrollbar-area-thumb-bg);border-radius:var(--ngs-radius-sm);transition:background-color .2s ease-in-out;pointer-events:auto}:host .scroll-thumb:hover,:host .scroll-thumb-x:hover{background:var(--ngs-scrollbar-area-thumb-hover-bg)}:host .scroll-thumb:active,:host .scroll-thumb-x:active{background:var(--ngs-scrollbar-area-thumb-active-bg)}:host.scrollbar-visible .scroll-track,:host.scrollbar-visible .scroll-track-x{opacity:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
486
+ }]
487
+ }],
488
+ ctorParameters: () => [],
489
+ propDecorators: {
490
+ scrollableContentRef: [{
491
+ type: i0.ViewChild,
492
+ args: ["scrollableContent", { isSignal: true }]
493
+ }],
494
+ scrollTrackRef: [{
495
+ type: i0.ViewChild,
496
+ args: ["scrollTrack", { isSignal: true }]
497
+ }],
498
+ scrollThumbRef: [{
499
+ type: i0.ViewChild,
500
+ args: ["scrollThumb", { isSignal: true }]
501
+ }],
502
+ scrollTrackXRef: [{
503
+ type: i0.ViewChild,
504
+ args: ["scrollTrackX", { isSignal: true }]
505
+ }],
506
+ scrollThumbXRef: [{
507
+ type: i0.ViewChild,
508
+ args: ["scrollThumbX", { isSignal: true }]
509
+ }],
510
+ scrollbarWidth: [{
511
+ type: i0.Input,
512
+ args: [{
513
+ isSignal: true,
514
+ alias: "scrollbarWidth",
515
+ required: false
516
+ }]
517
+ }],
518
+ autoHide: [{
519
+ type: i0.Input,
520
+ args: [{
521
+ isSignal: true,
522
+ alias: "autoHide",
523
+ required: false
524
+ }]
525
+ }],
526
+ absolute: [{
527
+ type: i0.Input,
528
+ args: [{
529
+ isSignal: true,
530
+ alias: "absolute",
531
+ required: false
532
+ }]
533
+ }],
534
+ scrolled: [{
535
+ type: i0.Output,
536
+ args: ["scrolled"]
537
+ }]
538
+ }
539
+ });
540
+ var ScrollContainerFixed = class ScrollContainerFixed {
541
+ elementRef = inject(ElementRef);
542
+ ngZone = inject(NgZone);
543
+ platformId = inject(PLATFORM_ID);
544
+ destroyRef = inject(DestroyRef);
545
+ refreshChanges = new Subject();
546
+ enabled = input(true, {
547
+ ...ngDevMode ? { debugName: "enabled" } : /* istanbul ignore next */ {},
548
+ alias: "ngsScrollContainerFixed",
549
+ transform: booleanAttribute
550
+ });
551
+ bottomOffset = input(0, {
552
+ ...ngDevMode ? { debugName: "bottomOffset" } : /* istanbul ignore next */ {},
553
+ alias: "ngsScrollContainerFixedBottomOffset",
554
+ transform: numberAttribute
555
+ });
556
+ minHeight = input(0, {
557
+ ...ngDevMode ? { debugName: "minHeight" } : /* istanbul ignore next */ {},
558
+ alias: "ngsScrollContainerFixedMinHeight",
559
+ transform: numberAttribute
560
+ });
561
+ height = signal(null, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
562
+ constructor() {
563
+ effect(() => {
564
+ this.enabled();
565
+ this.bottomOffset();
566
+ this.minHeight();
567
+ this.refresh();
568
+ });
569
+ }
570
+ ngAfterViewInit() {
571
+ if (!isPlatformBrowser(this.platformId)) return;
572
+ this.ngZone.runOutsideAngular(() => {
573
+ merge(...this.getResizeStreams()).pipe(startWith(null), auditTime(0), takeUntilDestroyed(this.destroyRef)).subscribe(() => this.updateHeight());
574
+ });
575
+ }
576
+ refresh() {
577
+ if (!isPlatformBrowser(this.platformId)) return;
578
+ this.refreshChanges.next();
579
+ }
580
+ updateHeight() {
581
+ if (!this.enabled()) {
582
+ this.height.set(null);
583
+ return;
584
+ }
585
+ const elementTop = this.elementRef.nativeElement.getBoundingClientRect().top;
586
+ const viewportHeight = window.visualViewport?.height ?? window.innerHeight;
587
+ const nextHeight = Math.max(this.minHeight(), Math.floor(viewportHeight - elementTop - this.bottomOffset()));
588
+ this.height.set(nextHeight);
589
+ }
590
+ getResizeStreams() {
591
+ const streams = [
592
+ this.refreshChanges.asObservable(),
593
+ fromEvent(window, "resize"),
594
+ fromEvent(window, "orientationchange"),
595
+ this.observeElement(this.elementRef.nativeElement)
596
+ ];
597
+ if (this.elementRef.nativeElement.parentElement) streams.push(this.observeElement(this.elementRef.nativeElement.parentElement));
598
+ if (window.visualViewport) streams.push(fromEvent(window.visualViewport, "resize"), fromEvent(window.visualViewport, "scroll"));
599
+ return streams;
600
+ }
601
+ observeElement(element) {
602
+ return new Observable((observer) => {
603
+ if (typeof ResizeObserver === "undefined") {
604
+ observer.complete();
605
+ return;
606
+ }
607
+ const resizeObserver = new ResizeObserver((entries) => observer.next(entries));
608
+ resizeObserver.observe(element);
609
+ return () => resizeObserver.disconnect();
610
+ });
611
+ }
612
+ static ɵfac = i0.ɵɵngDeclareFactory({
613
+ minVersion: "12.0.0",
614
+ version: "22.3.0",
615
+ ngImport: i0,
616
+ type: ScrollContainerFixed,
617
+ deps: [],
618
+ target: i0.ɵɵFactoryTarget.Directive
619
+ });
620
+ static ɵdir = i0.ɵɵngDeclareDirective({
621
+ minVersion: "17.1.0",
622
+ version: "22.3.0",
623
+ type: ScrollContainerFixed,
624
+ isStandalone: true,
625
+ selector: "[ngsScrollContainerFixed]",
626
+ inputs: {
627
+ enabled: {
628
+ classPropertyName: "enabled",
629
+ publicName: "ngsScrollContainerFixed",
630
+ isSignal: true,
631
+ isRequired: false,
632
+ transformFunction: null
633
+ },
634
+ bottomOffset: {
635
+ classPropertyName: "bottomOffset",
636
+ publicName: "ngsScrollContainerFixedBottomOffset",
637
+ isSignal: true,
638
+ isRequired: false,
639
+ transformFunction: null
640
+ },
641
+ minHeight: {
642
+ classPropertyName: "minHeight",
643
+ publicName: "ngsScrollContainerFixedMinHeight",
644
+ isSignal: true,
645
+ isRequired: false,
646
+ transformFunction: null
647
+ }
648
+ },
649
+ host: { properties: {
650
+ "style.box-sizing": "\"border-box\"",
651
+ "style.height.px": "height()",
652
+ "style.min-height.px": "enabled() ? minHeight() : null"
653
+ } },
654
+ exportAs: ["ngsScrollContainerFixed"],
655
+ ngImport: i0
656
+ });
657
+ };
658
+ i0.ɵɵngDeclareClassMetadata({
659
+ minVersion: "12.0.0",
660
+ version: "22.3.0",
661
+ ngImport: i0,
662
+ type: ScrollContainerFixed,
663
+ decorators: [{
664
+ type: Directive,
665
+ args: [{
666
+ selector: "[ngsScrollContainerFixed]",
667
+ exportAs: "ngsScrollContainerFixed",
668
+ standalone: true,
669
+ host: {
670
+ "[style.box-sizing]": "\"border-box\"",
671
+ "[style.height.px]": "height()",
672
+ "[style.min-height.px]": "enabled() ? minHeight() : null"
673
+ }
674
+ }]
675
+ }],
676
+ ctorParameters: () => [],
677
+ propDecorators: {
678
+ enabled: [{
679
+ type: i0.Input,
680
+ args: [{
681
+ isSignal: true,
682
+ alias: "ngsScrollContainerFixed",
683
+ required: false
684
+ }]
685
+ }],
686
+ bottomOffset: [{
687
+ type: i0.Input,
688
+ args: [{
689
+ isSignal: true,
690
+ alias: "ngsScrollContainerFixedBottomOffset",
691
+ required: false
692
+ }]
693
+ }],
694
+ minHeight: [{
695
+ type: i0.Input,
696
+ args: [{
697
+ isSignal: true,
698
+ alias: "ngsScrollContainerFixedMinHeight",
699
+ required: false
700
+ }]
701
+ }]
702
+ }
703
+ });
581
704
  export { ScrollContainerFixed, ScrollbarArea };
582
- //# sourceMappingURL=ngstarter-ui-components-scrollbar-area.mjs.map
705
+
706
+ //# sourceMappingURL=ngstarter-ui-components-scrollbar-area.mjs.map