@ngstarter-ui/components 22.3.6 → 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-BgKuFsDy.mjs +0 -35
  438. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-BgKuFsDy.mjs.map +0 -1
  439. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs +0 -26
  440. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-CGTJefVK.mjs.map +0 -1
  441. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.mjs +0 -220
  442. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-B441NasU.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-Bo3irEeG.mjs +0 -375
  448. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-Bo3irEeG.mjs.map +0 -1
  449. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs +0 -80
  450. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-Cbh0nblW.mjs.map +0 -1
  451. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs +0 -65
  452. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-BVQTRzaX.mjs.map +0 -1
  453. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs +0 -137
  454. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnbRqEWF.mjs.map +0 -1
  455. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs +0 -113
  456. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-Cv9-02mR.mjs.map +0 -1
  457. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs +0 -188
  458. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-yvSNKY0B.mjs.map +0 -1
  459. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs +0 -117
  460. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-Clz9SzCR.mjs.map +0 -1
  461. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs +0 -4464
  462. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CZn1p9ek.mjs.map +0 -1
  463. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs +0 -132
  464. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-CxDRklAS.mjs.map +0 -1
  465. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs +0 -171
  466. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BNgtiV7U.mjs.map +0 -1
  467. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs +0 -1653
  468. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-D05mE7nQ.mjs.map +0 -1
  469. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.mjs +0 -20
  470. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-Ch1kWIaX.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-laP7DTyq.mjs +0 -134
  474. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-laP7DTyq.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,148 +1,379 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, model, input, output, Directive, inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
- import { Subject } from 'rxjs';
4
-
5
- const SORT = new InjectionToken('SORT');
6
-
7
- class SortDirective {
8
- active = model('', { ...(ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {}), alias: 'ngsSortActive' });
9
- start = input('asc', { ...(ngDevMode ? { debugName: "start" } : /* istanbul ignore next */ {}), alias: 'ngsSortStart' });
10
- direction = model('', { ...(ngDevMode ? { debugName: "direction" } : /* istanbul ignore next */ {}), alias: 'ngsSortDirection' });
11
- disableClear = input(false, { ...(ngDevMode ? { debugName: "disableClear" } : /* istanbul ignore next */ {}), alias: 'ngsSortDisableClear',
12
- transform: (value) => typeof value === 'string' ? value === '' || value === 'true' : value });
13
- disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'ngsSortDisabled',
14
- transform: (value) => typeof value === 'string' ? value === '' || value === 'true' : value });
15
- sortChange = output({ alias: 'ngsSortChange' });
16
- _stateChanges = new Subject();
17
- _initialized = new Subject();
18
- initialized = this._initialized.asObservable();
19
- ngOnInit() {
20
- this._initialized.next();
21
- this._initialized.complete();
22
- }
23
- ngOnChanges() {
24
- this._stateChanges.next();
25
- }
26
- ngOnDestroy() {
27
- this._stateChanges.complete();
28
- }
29
- sort(id) {
30
- const direction = this.getNextSortDirection(id);
31
- this.active.set(id);
32
- this.direction.set(direction);
33
- this.sortChange.emit({ active: id, direction });
34
- this._stateChanges.next();
35
- }
36
- getNextSortDirection(id) {
37
- if (this.active() !== id) {
38
- return this.start() || 'asc';
39
- }
40
- if (this.direction() === 'asc') {
41
- return 'desc';
42
- }
43
- if (this.direction() === 'desc' && !this.disableClear()) {
44
- return '';
45
- }
46
- return 'asc';
47
- }
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SortDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
49
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.7", type: SortDirective, isStandalone: true, selector: "[ngsSort]", inputs: { active: { classPropertyName: "active", publicName: "ngsSortActive", isSignal: true, isRequired: false, transformFunction: null }, start: { classPropertyName: "start", publicName: "ngsSortStart", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "ngsSortDirection", isSignal: true, isRequired: false, transformFunction: null }, disableClear: { classPropertyName: "disableClear", publicName: "ngsSortDisableClear", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngsSortDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { active: "ngsSortActiveChange", direction: "ngsSortDirectionChange", sortChange: "ngsSortChange" }, providers: [{ provide: SORT, useExisting: SortDirective }], exportAs: ["ngsSort"], usesOnChanges: true, ngImport: i0 });
50
- }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SortDirective, decorators: [{
52
- type: Directive,
53
- args: [{
54
- selector: '[ngsSort]',
55
- exportAs: 'ngsSort',
56
- providers: [{ provide: SORT, useExisting: SortDirective }],
57
- standalone: true,
58
- }]
59
- }], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsSortActive", required: false }] }, { type: i0.Output, args: ["ngsSortActiveChange"] }], start: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsSortStart", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsSortDirection", required: false }] }, { type: i0.Output, args: ["ngsSortDirectionChange"] }], disableClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsSortDisableClear", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngsSortDisabled", required: false }] }], sortChange: [{ type: i0.Output, args: ["ngsSortChange"] }] } });
60
-
61
- class SortHeader {
62
- _rerenderSubscription;
63
- _cdr = inject(ChangeDetectorRef);
64
- id = input('', { ...(ngDevMode ? { debugName: "id" } : /* istanbul ignore next */ {}), alias: 'ngs-sort-header' });
65
- sortActionDescription = input('', /* @ts-ignore */
66
- ...(ngDevMode ? [{ debugName: "sortActionDescription" }] : /* istanbul ignore next */ []));
67
- disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: (value) => typeof value === 'string' ? value === '' || value === 'true' : value });
68
- _sort = inject(SORT, { optional: true });
69
- ngOnInit() {
70
- if (this._sort && this._sort._stateChanges) {
71
- this._rerenderSubscription = this._sort._stateChanges.subscribe(() => {
72
- this._cdr.markForCheck();
73
- });
74
- }
75
- }
76
- ngOnDestroy() {
77
- this._rerenderSubscription?.unsubscribe();
78
- }
79
- _handleClick() {
80
- if (!this._isDisabled() && this._sort) {
81
- this._sort.sort(this.id());
82
- }
83
- }
84
- _handleKeydown(event) {
85
- if (event.key === 'Enter' || event.key === ' ') {
86
- event.preventDefault();
87
- event.stopPropagation();
88
- this._handleClick();
89
- }
90
- }
91
- _getNextSortDirection() {
92
- if (!this._sort || this._isDisabled()) {
93
- return '';
94
- }
95
- return this._sort.getNextSortDirection(this.id());
96
- }
97
- _isSorted() {
98
- if (!this._sort) {
99
- return false;
100
- }
101
- const active = typeof this._sort.active === 'function' ? this._sort.active() : this._sort.active;
102
- const direction = typeof this._sort.direction === 'function' ? this._sort.direction() : this._sort.direction;
103
- return !!(active === this.id() && direction);
104
- }
105
- _isDisabled() {
106
- return this.disabled() || this._isSortDisabled();
107
- }
108
- _isSortDisabled() {
109
- return typeof this._sort?.disabled === 'function' ? this._sort.disabled() : this._sort?.disabled;
110
- }
111
- _getArrowState() {
112
- if (!this._sort) {
113
- return 'void';
114
- }
115
- const active = typeof this._sort.active === 'function' ? this._sort.active() : this._sort.active;
116
- const direction = typeof this._sort.direction === 'function' ? this._sort.direction() : this._sort.direction;
117
- return active === this.id() ? direction : 'void';
118
- }
119
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SortHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
120
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: SortHeader, isStandalone: true, selector: "[ngs-sort-header]", inputs: { id: { classPropertyName: "id", publicName: "ngs-sort-header", isSignal: true, isRequired: false, transformFunction: null }, sortActionDescription: { classPropertyName: "sortActionDescription", publicName: "sortActionDescription", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ngs-sort-header-disabled": "_isDisabled()" }, classAttribute: "ngs-sort-header" }, exportAs: ["ngsSortHeader"], ngImport: i0, template: "<div class=\"ngs-sort-header-container\"\n [class.ngs-sort-header-sorted]=\"_isSorted()\">\n <div class=\"ngs-sort-header-button relative\"\n role=\"button\" [attr.tabindex]=\"_isDisabled() ? -1 : 0\" [attr.aria-disabled]=\"_isDisabled()\"\n [attr.aria-label]=\"sortActionDescription() || 'Sort by ' + id()\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"_handleClick()\">\n <ng-content />\n <div class=\"ngs-sort-header-arrow\"\n [class.ngs-sort-header-arrow-asc]=\"_getArrowState() === 'asc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'asc')\"\n [class.ngs-sort-header-arrow-desc]=\"_getArrowState() === 'desc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'desc')\"\n [class.ngs-sort-header-arrow-hint]=\"_getArrowState() === 'void' && !_isDisabled()\">\n <svg viewBox=\"0 0 24 24\" focusable=\"false\" class=\"ngs-sort-header-arrow-svg\">\n <path d=\"M7 10l5 5 5-5z\"/>\n </svg>\n </div>\n </div>\n</div>\n", styles: [":host .ngs-sort-header-container{display:flex;align-items:center;cursor:pointer;position:relative;justify-content:flex-start;-webkit-user-select:text;user-select:text}:host .ngs-sort-header-button{border:none;background:transparent;padding:0;font:inherit;color:inherit;cursor:pointer;display:flex;align-items:center;width:100%;text-align:inherit;justify-content:inherit;-webkit-user-select:text;user-select:text}:host .ngs-sort-header-arrow{display:flex;align-items:center;justify-content:center;margin-left:calc(var(--spacing, .25rem) * .5);opacity:0;transition:transform .2s cubic-bezier(.4,0,.2,1),opacity .2s cubic-bezier(.4,0,.2,1)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-asc{opacity:1;transform:translateY(0)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-desc{opacity:1;transform:translateY(0) rotate(180deg)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:0}:host:hover:not(.ngs-sort-header-disabled) .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:.54}:host .ngs-sort-header-arrow-svg{width:20px;height:20px;fill:currentColor}:host.ngs-sort-header-disabled{cursor:default}:host.ngs-sort-header-disabled .ngs-sort-header-button{cursor:default}:host.ngs-sort-header-disabled:hover .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:0}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
121
- }
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SortHeader, decorators: [{
123
- type: Component,
124
- args: [{ selector: '[ngs-sort-header]', exportAs: 'ngsSortHeader', changeDetection: ChangeDetectionStrategy.OnPush, host: {
125
- 'class': 'ngs-sort-header',
126
- '[class.ngs-sort-header-disabled]': '_isDisabled()',
127
- }, template: "<div class=\"ngs-sort-header-container\"\n [class.ngs-sort-header-sorted]=\"_isSorted()\">\n <div class=\"ngs-sort-header-button relative\"\n role=\"button\" [attr.tabindex]=\"_isDisabled() ? -1 : 0\" [attr.aria-disabled]=\"_isDisabled()\"\n [attr.aria-label]=\"sortActionDescription() || 'Sort by ' + id()\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"_handleClick()\">\n <ng-content />\n <div class=\"ngs-sort-header-arrow\"\n [class.ngs-sort-header-arrow-asc]=\"_getArrowState() === 'asc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'asc')\"\n [class.ngs-sort-header-arrow-desc]=\"_getArrowState() === 'desc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'desc')\"\n [class.ngs-sort-header-arrow-hint]=\"_getArrowState() === 'void' && !_isDisabled()\">\n <svg viewBox=\"0 0 24 24\" focusable=\"false\" class=\"ngs-sort-header-arrow-svg\">\n <path d=\"M7 10l5 5 5-5z\"/>\n </svg>\n </div>\n </div>\n</div>\n", styles: [":host .ngs-sort-header-container{display:flex;align-items:center;cursor:pointer;position:relative;justify-content:flex-start;-webkit-user-select:text;user-select:text}:host .ngs-sort-header-button{border:none;background:transparent;padding:0;font:inherit;color:inherit;cursor:pointer;display:flex;align-items:center;width:100%;text-align:inherit;justify-content:inherit;-webkit-user-select:text;user-select:text}:host .ngs-sort-header-arrow{display:flex;align-items:center;justify-content:center;margin-left:calc(var(--spacing, .25rem) * .5);opacity:0;transition:transform .2s cubic-bezier(.4,0,.2,1),opacity .2s cubic-bezier(.4,0,.2,1)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-asc{opacity:1;transform:translateY(0)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-desc{opacity:1;transform:translateY(0) rotate(180deg)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:0}:host:hover:not(.ngs-sort-header-disabled) .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:.54}:host .ngs-sort-header-arrow-svg{width:20px;height:20px;fill:currentColor}:host.ngs-sort-header-disabled{cursor:default}:host.ngs-sort-header-disabled .ngs-sort-header-button{cursor:default}:host.ngs-sort-header-disabled:hover .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:0}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
128
- }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngs-sort-header", required: false }] }], sortActionDescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "sortActionDescription", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
129
-
130
- class SortModule {
131
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SortModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
132
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.7", ngImport: i0, type: SortModule, imports: [SortDirective, SortHeader], exports: [SortDirective, SortHeader] });
133
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SortModule });
134
- }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SortModule, decorators: [{
136
- type: NgModule,
137
- args: [{
138
- imports: [SortDirective, SortHeader],
139
- exports: [SortDirective, SortHeader],
140
- }]
141
- }] });
142
-
143
- /**
144
- * Generated bundle index. Do not edit.
145
- */
146
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, InjectionToken, NgModule, inject, input, model, output } from "@angular/core";
3
+ import { Subject } from "rxjs";
4
+ const SORT = new InjectionToken("SORT");
5
+ var SortDirective = class SortDirective {
6
+ active = model("", {
7
+ ...ngDevMode ? { debugName: "active" } : /* istanbul ignore next */ {},
8
+ alias: "ngsSortActive"
9
+ });
10
+ start = input("asc", {
11
+ ...ngDevMode ? { debugName: "start" } : /* istanbul ignore next */ {},
12
+ alias: "ngsSortStart"
13
+ });
14
+ direction = model("", {
15
+ ...ngDevMode ? { debugName: "direction" } : /* istanbul ignore next */ {},
16
+ alias: "ngsSortDirection"
17
+ });
18
+ disableClear = input(false, {
19
+ ...ngDevMode ? { debugName: "disableClear" } : /* istanbul ignore next */ {},
20
+ alias: "ngsSortDisableClear",
21
+ transform: (value) => typeof value === "string" ? value === "" || value === "true" : value
22
+ });
23
+ disabled = input(false, {
24
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
25
+ alias: "ngsSortDisabled",
26
+ transform: (value) => typeof value === "string" ? value === "" || value === "true" : value
27
+ });
28
+ sortChange = output({ alias: "ngsSortChange" });
29
+ _stateChanges = new Subject();
30
+ _initialized = new Subject();
31
+ initialized = this._initialized.asObservable();
32
+ ngOnInit() {
33
+ this._initialized.next();
34
+ this._initialized.complete();
35
+ }
36
+ ngOnChanges() {
37
+ this._stateChanges.next();
38
+ }
39
+ ngOnDestroy() {
40
+ this._stateChanges.complete();
41
+ }
42
+ sort(id) {
43
+ const direction = this.getNextSortDirection(id);
44
+ this.active.set(id);
45
+ this.direction.set(direction);
46
+ this.sortChange.emit({
47
+ active: id,
48
+ direction
49
+ });
50
+ this._stateChanges.next();
51
+ }
52
+ getNextSortDirection(id) {
53
+ if (this.active() !== id) return this.start() || "asc";
54
+ if (this.direction() === "asc") return "desc";
55
+ if (this.direction() === "desc" && !this.disableClear()) return "";
56
+ return "asc";
57
+ }
58
+ static ɵfac = i0.ɵɵngDeclareFactory({
59
+ minVersion: "12.0.0",
60
+ version: "22.3.0",
61
+ ngImport: i0,
62
+ type: SortDirective,
63
+ deps: [],
64
+ target: i0.ɵɵFactoryTarget.Directive
65
+ });
66
+ static ɵdir = i0.ɵɵngDeclareDirective({
67
+ minVersion: "17.1.0",
68
+ version: "22.3.0",
69
+ type: SortDirective,
70
+ isStandalone: true,
71
+ selector: "[ngsSort]",
72
+ inputs: {
73
+ active: {
74
+ classPropertyName: "active",
75
+ publicName: "ngsSortActive",
76
+ isSignal: true,
77
+ isRequired: false,
78
+ transformFunction: null
79
+ },
80
+ start: {
81
+ classPropertyName: "start",
82
+ publicName: "ngsSortStart",
83
+ isSignal: true,
84
+ isRequired: false,
85
+ transformFunction: null
86
+ },
87
+ direction: {
88
+ classPropertyName: "direction",
89
+ publicName: "ngsSortDirection",
90
+ isSignal: true,
91
+ isRequired: false,
92
+ transformFunction: null
93
+ },
94
+ disableClear: {
95
+ classPropertyName: "disableClear",
96
+ publicName: "ngsSortDisableClear",
97
+ isSignal: true,
98
+ isRequired: false,
99
+ transformFunction: null
100
+ },
101
+ disabled: {
102
+ classPropertyName: "disabled",
103
+ publicName: "ngsSortDisabled",
104
+ isSignal: true,
105
+ isRequired: false,
106
+ transformFunction: null
107
+ }
108
+ },
109
+ outputs: {
110
+ active: "ngsSortActiveChange",
111
+ direction: "ngsSortDirectionChange",
112
+ sortChange: "ngsSortChange"
113
+ },
114
+ providers: [{
115
+ provide: SORT,
116
+ useExisting: SortDirective
117
+ }],
118
+ exportAs: ["ngsSort"],
119
+ usesOnChanges: true,
120
+ ngImport: i0
121
+ });
122
+ };
123
+ i0.ɵɵngDeclareClassMetadata({
124
+ minVersion: "12.0.0",
125
+ version: "22.3.0",
126
+ ngImport: i0,
127
+ type: SortDirective,
128
+ decorators: [{
129
+ type: Directive,
130
+ args: [{
131
+ selector: "[ngsSort]",
132
+ exportAs: "ngsSort",
133
+ providers: [{
134
+ provide: SORT,
135
+ useExisting: SortDirective
136
+ }],
137
+ standalone: true
138
+ }]
139
+ }],
140
+ propDecorators: {
141
+ active: [{
142
+ type: i0.Input,
143
+ args: [{
144
+ isSignal: true,
145
+ alias: "ngsSortActive",
146
+ required: false
147
+ }]
148
+ }, {
149
+ type: i0.Output,
150
+ args: ["ngsSortActiveChange"]
151
+ }],
152
+ start: [{
153
+ type: i0.Input,
154
+ args: [{
155
+ isSignal: true,
156
+ alias: "ngsSortStart",
157
+ required: false
158
+ }]
159
+ }],
160
+ direction: [{
161
+ type: i0.Input,
162
+ args: [{
163
+ isSignal: true,
164
+ alias: "ngsSortDirection",
165
+ required: false
166
+ }]
167
+ }, {
168
+ type: i0.Output,
169
+ args: ["ngsSortDirectionChange"]
170
+ }],
171
+ disableClear: [{
172
+ type: i0.Input,
173
+ args: [{
174
+ isSignal: true,
175
+ alias: "ngsSortDisableClear",
176
+ required: false
177
+ }]
178
+ }],
179
+ disabled: [{
180
+ type: i0.Input,
181
+ args: [{
182
+ isSignal: true,
183
+ alias: "ngsSortDisabled",
184
+ required: false
185
+ }]
186
+ }],
187
+ sortChange: [{
188
+ type: i0.Output,
189
+ args: ["ngsSortChange"]
190
+ }]
191
+ }
192
+ });
193
+ var SortHeader = class SortHeader {
194
+ _rerenderSubscription;
195
+ _cdr = inject(ChangeDetectorRef);
196
+ id = input("", {
197
+ ...ngDevMode ? { debugName: "id" } : /* istanbul ignore next */ {},
198
+ alias: "ngs-sort-header"
199
+ });
200
+ sortActionDescription = input("", ...ngDevMode ? [{ debugName: "sortActionDescription" }] : /* istanbul ignore next */ []);
201
+ disabled = input(false, {
202
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
203
+ transform: (value) => typeof value === "string" ? value === "" || value === "true" : value
204
+ });
205
+ _sort = inject(SORT, { optional: true });
206
+ ngOnInit() {
207
+ if (this._sort && this._sort._stateChanges) this._rerenderSubscription = this._sort._stateChanges.subscribe(() => {
208
+ this._cdr.markForCheck();
209
+ });
210
+ }
211
+ ngOnDestroy() {
212
+ this._rerenderSubscription?.unsubscribe();
213
+ }
214
+ _handleClick() {
215
+ if (!this._isDisabled() && this._sort) this._sort.sort(this.id());
216
+ }
217
+ _handleKeydown(event) {
218
+ if (event.key === "Enter" || event.key === " ") {
219
+ event.preventDefault();
220
+ event.stopPropagation();
221
+ this._handleClick();
222
+ }
223
+ }
224
+ _getNextSortDirection() {
225
+ if (!this._sort || this._isDisabled()) return "";
226
+ return this._sort.getNextSortDirection(this.id());
227
+ }
228
+ _isSorted() {
229
+ if (!this._sort) return false;
230
+ const active = typeof this._sort.active === "function" ? this._sort.active() : this._sort.active;
231
+ const direction = typeof this._sort.direction === "function" ? this._sort.direction() : this._sort.direction;
232
+ return !!(active === this.id() && direction);
233
+ }
234
+ _isDisabled() {
235
+ return this.disabled() || this._isSortDisabled();
236
+ }
237
+ _isSortDisabled() {
238
+ return typeof this._sort?.disabled === "function" ? this._sort.disabled() : this._sort?.disabled;
239
+ }
240
+ _getArrowState() {
241
+ if (!this._sort) return "void";
242
+ const active = typeof this._sort.active === "function" ? this._sort.active() : this._sort.active;
243
+ const direction = typeof this._sort.direction === "function" ? this._sort.direction() : this._sort.direction;
244
+ return active === this.id() ? direction : "void";
245
+ }
246
+ static ɵfac = i0.ɵɵngDeclareFactory({
247
+ minVersion: "12.0.0",
248
+ version: "22.3.0",
249
+ ngImport: i0,
250
+ type: SortHeader,
251
+ deps: [],
252
+ target: i0.ɵɵFactoryTarget.Component
253
+ });
254
+ static ɵcmp = i0.ɵɵngDeclareComponent({
255
+ minVersion: "17.1.0",
256
+ version: "22.3.0",
257
+ type: SortHeader,
258
+ isStandalone: true,
259
+ selector: "[ngs-sort-header]",
260
+ inputs: {
261
+ id: {
262
+ classPropertyName: "id",
263
+ publicName: "ngs-sort-header",
264
+ isSignal: true,
265
+ isRequired: false,
266
+ transformFunction: null
267
+ },
268
+ sortActionDescription: {
269
+ classPropertyName: "sortActionDescription",
270
+ publicName: "sortActionDescription",
271
+ isSignal: true,
272
+ isRequired: false,
273
+ transformFunction: null
274
+ },
275
+ disabled: {
276
+ classPropertyName: "disabled",
277
+ publicName: "disabled",
278
+ isSignal: true,
279
+ isRequired: false,
280
+ transformFunction: null
281
+ }
282
+ },
283
+ host: {
284
+ properties: { "class.ngs-sort-header-disabled": "_isDisabled()" },
285
+ classAttribute: "ngs-sort-header"
286
+ },
287
+ exportAs: ["ngsSortHeader"],
288
+ ngImport: i0,
289
+ template: "<div class=\"ngs-sort-header-container\"\n [class.ngs-sort-header-sorted]=\"_isSorted()\">\n <div class=\"ngs-sort-header-button relative\"\n role=\"button\" [attr.tabindex]=\"_isDisabled() ? -1 : 0\" [attr.aria-disabled]=\"_isDisabled()\"\n [attr.aria-label]=\"sortActionDescription() || 'Sort by ' + id()\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"_handleClick()\">\n <ng-content />\n <div class=\"ngs-sort-header-arrow\"\n [class.ngs-sort-header-arrow-asc]=\"_getArrowState() === 'asc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'asc')\"\n [class.ngs-sort-header-arrow-desc]=\"_getArrowState() === 'desc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'desc')\"\n [class.ngs-sort-header-arrow-hint]=\"_getArrowState() === 'void' && !_isDisabled()\">\n <svg viewBox=\"0 0 24 24\" focusable=\"false\" class=\"ngs-sort-header-arrow-svg\">\n <path d=\"M7 10l5 5 5-5z\"/>\n </svg>\n </div>\n </div>\n</div>\n",
290
+ styles: [":host .ngs-sort-header-container{display:flex;align-items:center;cursor:pointer;position:relative;justify-content:flex-start;-webkit-user-select:text;user-select:text}:host .ngs-sort-header-button{border:none;background:transparent;padding:0;font:inherit;color:inherit;cursor:pointer;display:flex;align-items:center;width:100%;text-align:inherit;justify-content:inherit;-webkit-user-select:text;user-select:text}:host .ngs-sort-header-arrow{display:flex;align-items:center;justify-content:center;margin-left:calc(var(--spacing, .25rem) * .5);opacity:0;transition:transform .2s cubic-bezier(.4,0,.2,1),opacity .2s cubic-bezier(.4,0,.2,1)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-asc{opacity:1;transform:translateY(0)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-desc{opacity:1;transform:translateY(0) rotate(180deg)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:0}:host:hover:not(.ngs-sort-header-disabled) .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:.54}:host .ngs-sort-header-arrow-svg{width:20px;height:20px;fill:currentColor}:host.ngs-sort-header-disabled{cursor:default}:host.ngs-sort-header-disabled .ngs-sort-header-button{cursor:default}:host.ngs-sort-header-disabled:hover .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:0}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
291
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
292
+ });
293
+ };
294
+ i0.ɵɵngDeclareClassMetadata({
295
+ minVersion: "12.0.0",
296
+ version: "22.3.0",
297
+ ngImport: i0,
298
+ type: SortHeader,
299
+ decorators: [{
300
+ type: Component,
301
+ args: [{
302
+ selector: "[ngs-sort-header]",
303
+ exportAs: "ngsSortHeader",
304
+ changeDetection: ChangeDetectionStrategy.OnPush,
305
+ host: {
306
+ "class": "ngs-sort-header",
307
+ "[class.ngs-sort-header-disabled]": "_isDisabled()"
308
+ },
309
+ template: "<div class=\"ngs-sort-header-container\"\n [class.ngs-sort-header-sorted]=\"_isSorted()\">\n <div class=\"ngs-sort-header-button relative\"\n role=\"button\" [attr.tabindex]=\"_isDisabled() ? -1 : 0\" [attr.aria-disabled]=\"_isDisabled()\"\n [attr.aria-label]=\"sortActionDescription() || 'Sort by ' + id()\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"_handleClick()\">\n <ng-content />\n <div class=\"ngs-sort-header-arrow\"\n [class.ngs-sort-header-arrow-asc]=\"_getArrowState() === 'asc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'asc')\"\n [class.ngs-sort-header-arrow-desc]=\"_getArrowState() === 'desc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'desc')\"\n [class.ngs-sort-header-arrow-hint]=\"_getArrowState() === 'void' && !_isDisabled()\">\n <svg viewBox=\"0 0 24 24\" focusable=\"false\" class=\"ngs-sort-header-arrow-svg\">\n <path d=\"M7 10l5 5 5-5z\"/>\n </svg>\n </div>\n </div>\n</div>\n",
310
+ styles: [":host .ngs-sort-header-container{display:flex;align-items:center;cursor:pointer;position:relative;justify-content:flex-start;-webkit-user-select:text;user-select:text}:host .ngs-sort-header-button{border:none;background:transparent;padding:0;font:inherit;color:inherit;cursor:pointer;display:flex;align-items:center;width:100%;text-align:inherit;justify-content:inherit;-webkit-user-select:text;user-select:text}:host .ngs-sort-header-arrow{display:flex;align-items:center;justify-content:center;margin-left:calc(var(--spacing, .25rem) * .5);opacity:0;transition:transform .2s cubic-bezier(.4,0,.2,1),opacity .2s cubic-bezier(.4,0,.2,1)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-asc{opacity:1;transform:translateY(0)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-desc{opacity:1;transform:translateY(0) rotate(180deg)}:host .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:0}:host:hover:not(.ngs-sort-header-disabled) .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:.54}:host .ngs-sort-header-arrow-svg{width:20px;height:20px;fill:currentColor}:host.ngs-sort-header-disabled{cursor:default}:host.ngs-sort-header-disabled .ngs-sort-header-button{cursor:default}:host.ngs-sort-header-disabled:hover .ngs-sort-header-arrow.ngs-sort-header-arrow-hint{opacity:0}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
311
+ }]
312
+ }],
313
+ propDecorators: {
314
+ id: [{
315
+ type: i0.Input,
316
+ args: [{
317
+ isSignal: true,
318
+ alias: "ngs-sort-header",
319
+ required: false
320
+ }]
321
+ }],
322
+ sortActionDescription: [{
323
+ type: i0.Input,
324
+ args: [{
325
+ isSignal: true,
326
+ alias: "sortActionDescription",
327
+ required: false
328
+ }]
329
+ }],
330
+ disabled: [{
331
+ type: i0.Input,
332
+ args: [{
333
+ isSignal: true,
334
+ alias: "disabled",
335
+ required: false
336
+ }]
337
+ }]
338
+ }
339
+ });
340
+ var SortModule = class SortModule {
341
+ static ɵfac = i0.ɵɵngDeclareFactory({
342
+ minVersion: "12.0.0",
343
+ version: "22.3.0",
344
+ ngImport: i0,
345
+ type: SortModule,
346
+ deps: [],
347
+ target: i0.ɵɵFactoryTarget.NgModule
348
+ });
349
+ static ɵmod = i0.ɵɵngDeclareNgModule({
350
+ minVersion: "14.0.0",
351
+ version: "22.3.0",
352
+ ngImport: i0,
353
+ type: SortModule,
354
+ imports: [SortDirective, SortHeader],
355
+ exports: [SortDirective, SortHeader]
356
+ });
357
+ static ɵinj = i0.ɵɵngDeclareInjector({
358
+ minVersion: "12.0.0",
359
+ version: "22.3.0",
360
+ ngImport: i0,
361
+ type: SortModule
362
+ });
363
+ };
364
+ i0.ɵɵngDeclareClassMetadata({
365
+ minVersion: "12.0.0",
366
+ version: "22.3.0",
367
+ ngImport: i0,
368
+ type: SortModule,
369
+ decorators: [{
370
+ type: NgModule,
371
+ args: [{
372
+ imports: [SortDirective, SortHeader],
373
+ exports: [SortDirective, SortHeader]
374
+ }]
375
+ }]
376
+ });
147
377
  export { SORT, SortDirective, SortHeader, SortModule };
148
- //# sourceMappingURL=ngstarter-ui-components-sort.mjs.map
378
+
379
+ //# sourceMappingURL=ngstarter-ui-components-sort.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-sort.mjs","sources":["../../../projects/components/sort/src/sort/sort-interface.ts","../../../projects/components/sort/src/sort/sort.ts","../../../projects/components/sort/src/sort/sort-header.ts","../../../projects/components/sort/src/sort/sort-header.html","../../../projects/components/sort/src/sort/sort-module.ts","../../../projects/components/sort/ngstarter-ui-components-sort.ts"],"sourcesContent":["import { InjectionToken, OutputEmitterRef } from '@angular/core';\nimport { SortDirection } from './sort-direction';\nimport { Observable } from 'rxjs';\n\nexport interface Sort {\n readonly active: string;\n readonly direction: SortDirection;\n}\n\nexport interface NgsSort {\n readonly active: string | (() => string);\n readonly direction: SortDirection | (() => SortDirection);\n readonly sortChange: Observable<Sort> | OutputEmitterRef<Sort>;\n readonly initialized?: Observable<void>;\n}\n\nexport const SORT = new InjectionToken<NgsSort>('SORT');\n","import {\n Directive,\n input,\n model,\n OnChanges,\n OnDestroy,\n OnInit,\n output\n} from '@angular/core';\nimport { SortDirection } from './sort-direction';\nimport { Sort, NgsSort, SORT } from './sort-interface';\nimport { Subject } from 'rxjs';\n\n@Directive({\n selector: '[ngsSort]',\n exportAs: 'ngsSort',\n providers: [{ provide: SORT, useExisting: SortDirective }],\n standalone: true,\n})\nexport class SortDirective implements OnInit, OnChanges, OnDestroy, NgsSort {\n active = model('', { alias: 'ngsSortActive' });\n\n start = input<SortDirection>('asc', { alias: 'ngsSortStart' });\n\n direction = model<SortDirection>('', { alias: 'ngsSortDirection' });\n\n disableClear = input(false, {\n alias: 'ngsSortDisableClear',\n transform: (value: boolean | string) => typeof value === 'string' ? value === '' || value === 'true' : value\n });\n\n disabled = input(false, {\n alias: 'ngsSortDisabled',\n transform: (value: boolean | string) => typeof value === 'string' ? value === '' || value === 'true' : value\n });\n\n readonly sortChange = output<Sort>({ alias: 'ngsSortChange' });\n\n readonly _stateChanges = new Subject<void>();\n\n private readonly _initialized = new Subject<void>();\n readonly initialized = this._initialized.asObservable();\n\n ngOnInit() {\n this._initialized.next();\n this._initialized.complete();\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n sort(id: string) {\n const direction = this.getNextSortDirection(id);\n this.active.set(id);\n this.direction.set(direction);\n this.sortChange.emit({ active: id, direction });\n this._stateChanges.next();\n }\n\n getNextSortDirection(id: string): SortDirection {\n if (this.active() !== id) {\n return this.start() || 'asc';\n }\n\n if (this.direction() === 'asc') {\n return 'desc';\n }\n\n if (this.direction() === 'desc' && !this.disableClear()) {\n return '';\n }\n\n return 'asc';\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { SORT } from './sort-interface';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: '[ngs-sort-header]',\n exportAs: 'ngsSortHeader',\n templateUrl: './sort-header.html',\n styleUrl: './sort-header.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'ngs-sort-header',\n '[class.ngs-sort-header-disabled]': '_isDisabled()',\n },\n})\nexport class SortHeader implements OnInit, OnDestroy {\n private _rerenderSubscription: Subscription | undefined;\n private _cdr = inject(ChangeDetectorRef);\n\n id = input('', { alias: 'ngs-sort-header' });\n sortActionDescription = input<string>('');\n disabled = input(false, {\n transform: (value: boolean | string) => typeof value === 'string' ? value === '' || value === 'true' : value\n });\n\n _sort = inject(SORT, { optional: true });\n\n ngOnInit() {\n if (this._sort && (this._sort as any)._stateChanges) {\n this._rerenderSubscription = (this._sort as any)._stateChanges.subscribe(() => {\n this._cdr.markForCheck();\n });\n }\n }\n\n ngOnDestroy() {\n this._rerenderSubscription?.unsubscribe();\n }\n\n _handleClick() {\n if (!this._isDisabled() && this._sort) {\n (this._sort as any).sort(this.id());\n }\n }\n\n _handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault(); event.stopPropagation(); this._handleClick();\n }\n }\n\n _getNextSortDirection(): string {\n if (!this._sort || this._isDisabled()) {\n return '';\n }\n return (this._sort as any).getNextSortDirection(this.id());\n }\n\n _isSorted(): boolean {\n if (!this._sort) {\n return false;\n }\n\n const active = typeof this._sort.active === 'function' ? this._sort.active() : this._sort.active;\n const direction = typeof this._sort.direction === 'function' ? this._sort.direction() : this._sort.direction;\n return !!(active === this.id() && direction);\n }\n\n _isDisabled(): boolean {\n return this.disabled() || this._isSortDisabled();\n }\n\n _isSortDisabled(): boolean {\n return typeof (this._sort as any)?.disabled === 'function' ? (this._sort as any).disabled() : (this._sort as any)?.disabled;\n }\n\n _getArrowState() {\n if (!this._sort) {\n return 'void';\n }\n\n const active = typeof this._sort.active === 'function' ? this._sort.active() : this._sort.active;\n const direction = typeof this._sort.direction === 'function' ? this._sort.direction() : this._sort.direction;\n return active === this.id() ? direction : 'void';\n }\n}\n","<div class=\"ngs-sort-header-container\"\n [class.ngs-sort-header-sorted]=\"_isSorted()\">\n <div class=\"ngs-sort-header-button relative\"\n role=\"button\" [attr.tabindex]=\"_isDisabled() ? -1 : 0\" [attr.aria-disabled]=\"_isDisabled()\"\n [attr.aria-label]=\"sortActionDescription() || 'Sort by ' + id()\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"_handleClick()\">\n <ng-content />\n <div class=\"ngs-sort-header-arrow\"\n [class.ngs-sort-header-arrow-asc]=\"_getArrowState() === 'asc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'asc')\"\n [class.ngs-sort-header-arrow-desc]=\"_getArrowState() === 'desc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'desc')\"\n [class.ngs-sort-header-arrow-hint]=\"_getArrowState() === 'void' && !_isDisabled()\">\n <svg viewBox=\"0 0 24 24\" focusable=\"false\" class=\"ngs-sort-header-arrow-svg\">\n <path d=\"M7 10l5 5 5-5z\"/>\n </svg>\n </div>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { SortDirective } from './sort';\nimport { SortHeader } from './sort-header';\n\n@NgModule({\n imports: [SortDirective, SortHeader],\n exports: [SortDirective, SortHeader],\n})\nexport class SortModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAgBa,IAAI,GAAG,IAAI,cAAc,CAAU,MAAM;;MCGzC,aAAa,CAAA;IACxB,MAAM,GAAG,KAAK,CAAC,EAAE,8EAAI,KAAK,EAAE,eAAe,EAAA,CAAG;IAE9C,KAAK,GAAG,KAAK,CAAgB,KAAK,6EAAI,KAAK,EAAE,cAAc,EAAA,CAAG;IAE9D,SAAS,G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
+ {"version":3,"file":"ngstarter-ui-components-sort.mjs","names":[],"sources":["../../../projects/components/sort/src/sort/sort-interface.ts","../../../projects/components/sort/src/sort/sort.ts","../../../projects/components/sort/src/sort/sort-header.ts","../../../projects/components/sort/src/sort/sort-header.html","../../../projects/components/sort/src/sort/sort-module.ts"],"sourcesContent":["import { InjectionToken, OutputEmitterRef } from '@angular/core';\nimport { SortDirection } from './sort-direction';\nimport { Observable } from 'rxjs';\n\nexport interface Sort {\n readonly active: string;\n readonly direction: SortDirection;\n}\n\nexport interface NgsSort {\n readonly active: string | (() => string);\n readonly direction: SortDirection | (() => SortDirection);\n readonly sortChange: Observable<Sort> | OutputEmitterRef<Sort>;\n readonly initialized?: Observable<void>;\n}\n\nexport const SORT = new InjectionToken<NgsSort>('SORT');\n","import {\n Directive,\n input,\n model,\n OnChanges,\n OnDestroy,\n OnInit,\n output\n} from '@angular/core';\nimport { SortDirection } from './sort-direction';\nimport { Sort, NgsSort, SORT } from './sort-interface';\nimport { Subject } from 'rxjs';\n\n@Directive({\n selector: '[ngsSort]',\n exportAs: 'ngsSort',\n providers: [{ provide: SORT, useExisting: SortDirective }],\n standalone: true,\n})\nexport class SortDirective implements OnInit, OnChanges, OnDestroy, NgsSort {\n active = model('', { alias: 'ngsSortActive' });\n\n start = input<SortDirection>('asc', { alias: 'ngsSortStart' });\n\n direction = model<SortDirection>('', { alias: 'ngsSortDirection' });\n\n disableClear = input(false, {\n alias: 'ngsSortDisableClear',\n transform: (value: boolean | string) => typeof value === 'string' ? value === '' || value === 'true' : value\n });\n\n disabled = input(false, {\n alias: 'ngsSortDisabled',\n transform: (value: boolean | string) => typeof value === 'string' ? value === '' || value === 'true' : value\n });\n\n readonly sortChange = output<Sort>({ alias: 'ngsSortChange' });\n\n readonly _stateChanges = new Subject<void>();\n\n private readonly _initialized = new Subject<void>();\n readonly initialized = this._initialized.asObservable();\n\n ngOnInit() {\n this._initialized.next();\n this._initialized.complete();\n }\n\n ngOnChanges() {\n this._stateChanges.next();\n }\n\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n\n sort(id: string) {\n const direction = this.getNextSortDirection(id);\n this.active.set(id);\n this.direction.set(direction);\n this.sortChange.emit({ active: id, direction });\n this._stateChanges.next();\n }\n\n getNextSortDirection(id: string): SortDirection {\n if (this.active() !== id) {\n return this.start() || 'asc';\n }\n\n if (this.direction() === 'asc') {\n return 'desc';\n }\n\n if (this.direction() === 'desc' && !this.disableClear()) {\n return '';\n }\n\n return 'asc';\n }\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { SORT } from './sort-interface';\nimport { Subscription } from 'rxjs';\n\n@Component({\n selector: '[ngs-sort-header]',\n exportAs: 'ngsSortHeader',\n templateUrl: './sort-header.html',\n styleUrl: './sort-header.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'ngs-sort-header',\n '[class.ngs-sort-header-disabled]': '_isDisabled()',\n },\n})\nexport class SortHeader implements OnInit, OnDestroy {\n private _rerenderSubscription: Subscription | undefined;\n private _cdr = inject(ChangeDetectorRef);\n\n id = input('', { alias: 'ngs-sort-header' });\n sortActionDescription = input<string>('');\n disabled = input(false, {\n transform: (value: boolean | string) => typeof value === 'string' ? value === '' || value === 'true' : value\n });\n\n _sort = inject(SORT, { optional: true });\n\n ngOnInit() {\n if (this._sort && (this._sort as any)._stateChanges) {\n this._rerenderSubscription = (this._sort as any)._stateChanges.subscribe(() => {\n this._cdr.markForCheck();\n });\n }\n }\n\n ngOnDestroy() {\n this._rerenderSubscription?.unsubscribe();\n }\n\n _handleClick() {\n if (!this._isDisabled() && this._sort) {\n (this._sort as any).sort(this.id());\n }\n }\n\n _handleKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault(); event.stopPropagation(); this._handleClick();\n }\n }\n\n _getNextSortDirection(): string {\n if (!this._sort || this._isDisabled()) {\n return '';\n }\n return (this._sort as any).getNextSortDirection(this.id());\n }\n\n _isSorted(): boolean {\n if (!this._sort) {\n return false;\n }\n\n const active = typeof this._sort.active === 'function' ? this._sort.active() : this._sort.active;\n const direction = typeof this._sort.direction === 'function' ? this._sort.direction() : this._sort.direction;\n return !!(active === this.id() && direction);\n }\n\n _isDisabled(): boolean {\n return this.disabled() || this._isSortDisabled();\n }\n\n _isSortDisabled(): boolean {\n return typeof (this._sort as any)?.disabled === 'function' ? (this._sort as any).disabled() : (this._sort as any)?.disabled;\n }\n\n _getArrowState() {\n if (!this._sort) {\n return 'void';\n }\n\n const active = typeof this._sort.active === 'function' ? this._sort.active() : this._sort.active;\n const direction = typeof this._sort.direction === 'function' ? this._sort.direction() : this._sort.direction;\n return active === this.id() ? direction : 'void';\n }\n}\n","<div class=\"ngs-sort-header-container\"\n [class.ngs-sort-header-sorted]=\"_isSorted()\">\n <div class=\"ngs-sort-header-button relative\"\n role=\"button\" [attr.tabindex]=\"_isDisabled() ? -1 : 0\" [attr.aria-disabled]=\"_isDisabled()\"\n [attr.aria-label]=\"sortActionDescription() || 'Sort by ' + id()\"\n (keydown)=\"_handleKeydown($event)\"\n (click)=\"_handleClick()\">\n <ng-content />\n <div class=\"ngs-sort-header-arrow\"\n [class.ngs-sort-header-arrow-asc]=\"_getArrowState() === 'asc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'asc')\"\n [class.ngs-sort-header-arrow-desc]=\"_getArrowState() === 'desc' || (!_isDisabled() && _getArrowState() === 'void' && _getNextSortDirection() === 'desc')\"\n [class.ngs-sort-header-arrow-hint]=\"_getArrowState() === 'void' && !_isDisabled()\">\n <svg viewBox=\"0 0 24 24\" focusable=\"false\" class=\"ngs-sort-header-arrow-svg\">\n <path d=\"M7 10l5 5 5-5z\"/>\n </svg>\n </div>\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { SortDirective } from './sort';\nimport { SortHeader } from './sort-header';\n\n@NgModule({\n imports: [SortDirective, SortHe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