@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,6 +1,4 @@
1
- var index = null;
1
+ var components_default = null;
2
+ export { components_default as default };
2
3
 
3
- /**
4
- * Generated bundle index. Do not edit.
5
- */
6
- //# sourceMappingURL=ngstarter-ui-components.mjs.map
4
+ //# sourceMappingURL=ngstarter-ui-components.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components.mjs","sources":["../../../projects/components/index.ts","../../../projects/components/ngstarter-ui-components.ts"],"sourcesContent":["export default null;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA,YAAe,IAAI;;ACAnB;;AAEG"}
1
+ {"version":3,"file":"ngstarter-ui-components.mjs","names":[],"sources":["../../../projects/components/index.ts"],"sourcesContent":["export default null;\n"],"mappings":"AAAA,IAAA,qBAAe"}
@@ -0,0 +1,264 @@
1
+ import { f as contentEditorText, i as cloneContentEditorValue, n as CONTENT_BUILDER, r as CONTENT_EDITOR_BLOCK, t as ContentBuilderStore } from "./content-builder.store-D622mHxt.mjs";
2
+ import { t as ContentEditorContentEditableDirective } from "./content-editor-content-editable.directive-WzD9_71s.mjs";
3
+ import { t as CursorController } from "./cursor-controller-DKfBII1n.mjs";
4
+ import * as i0 from "@angular/core";
5
+ import { ChangeDetectionStrategy, Component, DestroyRef, effect, forwardRef, inject, input, signal, untracked, viewChild } from "@angular/core";
6
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
7
+ var ParagraphBlockComponent = class ParagraphBlockComponent {
8
+ _store = inject(ContentBuilderStore);
9
+ _contentBuilder = inject(CONTENT_BUILDER);
10
+ _destroyRef = inject(DestroyRef);
11
+ _contentRef = viewChild.required("contentRef", ...ngDevMode ? [{ debugName: "_contentRef" }] : /* istanbul ignore next */ []);
12
+ id = input.required(...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
13
+ content = input.required(...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
14
+ settings = input.required(...ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []);
15
+ props = input([], ...ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []);
16
+ index = input.required(...ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []);
17
+ placeholder = input("Enter text here", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
18
+ _content = signal([], ...ngDevMode ? [{ debugName: "_content" }] : /* istanbul ignore next */ []);
19
+ _props = signal([], ...ngDevMode ? [{ debugName: "_props" }] : /* istanbul ignore next */ []);
20
+ _isEmpty = signal(true, ...ngDevMode ? [{ debugName: "_isEmpty" }] : /* istanbul ignore next */ []);
21
+ initialized = signal(false, ...ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []);
22
+ constructor() {
23
+ effect(() => {
24
+ const content = this.content();
25
+ const props = this.props();
26
+ untracked(() => {
27
+ this._content.set(content);
28
+ this._props.set(cloneContentEditorValue(props));
29
+ this._isEmpty.set(!contentEditorText(content).trim());
30
+ });
31
+ });
32
+ }
33
+ ngOnInit() {
34
+ this._content.set(this.content());
35
+ this._props.set(this.props());
36
+ this._isEmpty.set(!contentEditorText(this.content()).trim());
37
+ this._contentBuilder.focusChanged.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
38
+ if (this._store.focusedBlockId() === this.id()) this.focus();
39
+ });
40
+ }
41
+ focus() {
42
+ const element = this._contentRef().nativeElement;
43
+ new CursorController(element).setToEnd();
44
+ }
45
+ getData() {
46
+ return {
47
+ content: this._content(),
48
+ props: this._props(),
49
+ settings: { ...this.settings() }
50
+ };
51
+ }
52
+ isEmpty() {
53
+ return !contentEditorText(this._content()).trim();
54
+ }
55
+ onContentChanged(content) {
56
+ if (!this.initialized()) return;
57
+ this._content.set(content);
58
+ this._isEmpty.set(!contentEditorText(content).trim());
59
+ this.update();
60
+ }
61
+ onPropsChanged(props) {
62
+ this._props.set(props);
63
+ this.update();
64
+ }
65
+ onPressedEnter(event) {
66
+ event.preventDefault();
67
+ event.stopPropagation();
68
+ this._contentBuilder.insertEmptyBlock(this.index());
69
+ }
70
+ onContentEditableInitialized() {
71
+ if (this._store.focusedBlockId() === this.id()) this.focus();
72
+ this.initialized.set(true);
73
+ }
74
+ _onKeyDown(event) {
75
+ if (event.key === "Backspace" && !contentEditorText(this._content())) this._contentBuilder.deleteBlock(this.id());
76
+ }
77
+ update() {
78
+ this._contentBuilder.updateParagraph(this.id(), {
79
+ ...this.getData(),
80
+ isEmpty: this.isEmpty()
81
+ });
82
+ this._contentBuilder.emitContentChangeEvent();
83
+ }
84
+ static ɵfac = i0.ɵɵngDeclareFactory({
85
+ minVersion: "12.0.0",
86
+ version: "22.3.0",
87
+ ngImport: i0,
88
+ type: ParagraphBlockComponent,
89
+ deps: [],
90
+ target: i0.ɵɵFactoryTarget.Component
91
+ });
92
+ static ɵcmp = i0.ɵɵngDeclareComponent({
93
+ minVersion: "17.2.0",
94
+ version: "22.3.0",
95
+ type: ParagraphBlockComponent,
96
+ isStandalone: true,
97
+ selector: "ngs-paragraph-block",
98
+ inputs: {
99
+ id: {
100
+ classPropertyName: "id",
101
+ publicName: "id",
102
+ isSignal: true,
103
+ isRequired: true,
104
+ transformFunction: null
105
+ },
106
+ content: {
107
+ classPropertyName: "content",
108
+ publicName: "content",
109
+ isSignal: true,
110
+ isRequired: true,
111
+ transformFunction: null
112
+ },
113
+ settings: {
114
+ classPropertyName: "settings",
115
+ publicName: "settings",
116
+ isSignal: true,
117
+ isRequired: true,
118
+ transformFunction: null
119
+ },
120
+ props: {
121
+ classPropertyName: "props",
122
+ publicName: "props",
123
+ isSignal: true,
124
+ isRequired: false,
125
+ transformFunction: null
126
+ },
127
+ index: {
128
+ classPropertyName: "index",
129
+ publicName: "index",
130
+ isSignal: true,
131
+ isRequired: true,
132
+ transformFunction: null
133
+ },
134
+ placeholder: {
135
+ classPropertyName: "placeholder",
136
+ publicName: "placeholder",
137
+ isSignal: true,
138
+ isRequired: false,
139
+ transformFunction: null
140
+ }
141
+ },
142
+ host: {
143
+ properties: { "class.is-empty": "_isEmpty()" },
144
+ classAttribute: "ngs-paragraph-block"
145
+ },
146
+ providers: [{
147
+ provide: CONTENT_EDITOR_BLOCK,
148
+ useExisting: forwardRef(() => ParagraphBlockComponent),
149
+ multi: true
150
+ }],
151
+ viewQueries: [{
152
+ propertyName: "_contentRef",
153
+ first: true,
154
+ predicate: ["contentRef"],
155
+ descendants: true,
156
+ isSignal: true
157
+ }],
158
+ ngImport: i0,
159
+ template: "<div #contentRef\n class=\"content\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"_content()\"\n [settings]=\"settings()\"\n [props]=\"props()\"\n (propsChanged)=\"onPropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"\n (keydown)=\"_onKeyDown($event)\"\n (initialized)=\"onContentEditableInitialized()\"></div>\n",
160
+ styles: [":host{display:block;position:relative}:host p{line-height:var(--ngs-content-editor-line-height, 1.6)}:host .content{outline:none}:host-context(.block.is-active) .content:empty:before,:host-context(.block.cdk-focused) .content:empty:before{content:attr(data-empty-placeholder);color:var(--ngs-content-editor-placeholder-color, var(--ngs-color-on-surface-variant))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
161
+ dependencies: [{
162
+ kind: "directive",
163
+ type: ContentEditorContentEditableDirective,
164
+ selector: "[ngsContentEditorContentEditable]",
165
+ inputs: [
166
+ "ngsContentEditorContentEditable",
167
+ "settings",
168
+ "props",
169
+ "singleLine"
170
+ ],
171
+ outputs: [
172
+ "contentChanged",
173
+ "propsChanged",
174
+ "pressedEnter",
175
+ "initialized"
176
+ ],
177
+ exportAs: ["ngsContentEditorContentEditable"]
178
+ }],
179
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
180
+ });
181
+ };
182
+ i0.ɵɵngDeclareClassMetadata({
183
+ minVersion: "12.0.0",
184
+ version: "22.3.0",
185
+ ngImport: i0,
186
+ type: ParagraphBlockComponent,
187
+ decorators: [{
188
+ type: Component,
189
+ args: [{
190
+ selector: "ngs-paragraph-block",
191
+ imports: [ContentEditorContentEditableDirective],
192
+ providers: [{
193
+ provide: CONTENT_EDITOR_BLOCK,
194
+ useExisting: forwardRef(() => ParagraphBlockComponent),
195
+ multi: true
196
+ }],
197
+ changeDetection: ChangeDetectionStrategy.OnPush,
198
+ host: {
199
+ "class": "ngs-paragraph-block",
200
+ "[class.is-empty]": "_isEmpty()"
201
+ },
202
+ template: "<div #contentRef\n class=\"content\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"_content()\"\n [settings]=\"settings()\"\n [props]=\"props()\"\n (propsChanged)=\"onPropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"\n (keydown)=\"_onKeyDown($event)\"\n (initialized)=\"onContentEditableInitialized()\"></div>\n",
203
+ styles: [":host{display:block;position:relative}:host p{line-height:var(--ngs-content-editor-line-height, 1.6)}:host .content{outline:none}:host-context(.block.is-active) .content:empty:before,:host-context(.block.cdk-focused) .content:empty:before{content:attr(data-empty-placeholder);color:var(--ngs-content-editor-placeholder-color, var(--ngs-color-on-surface-variant))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
204
+ }]
205
+ }],
206
+ ctorParameters: () => [],
207
+ propDecorators: {
208
+ _contentRef: [{
209
+ type: i0.ViewChild,
210
+ args: ["contentRef", { isSignal: true }]
211
+ }],
212
+ id: [{
213
+ type: i0.Input,
214
+ args: [{
215
+ isSignal: true,
216
+ alias: "id",
217
+ required: true
218
+ }]
219
+ }],
220
+ content: [{
221
+ type: i0.Input,
222
+ args: [{
223
+ isSignal: true,
224
+ alias: "content",
225
+ required: true
226
+ }]
227
+ }],
228
+ settings: [{
229
+ type: i0.Input,
230
+ args: [{
231
+ isSignal: true,
232
+ alias: "settings",
233
+ required: true
234
+ }]
235
+ }],
236
+ props: [{
237
+ type: i0.Input,
238
+ args: [{
239
+ isSignal: true,
240
+ alias: "props",
241
+ required: false
242
+ }]
243
+ }],
244
+ index: [{
245
+ type: i0.Input,
246
+ args: [{
247
+ isSignal: true,
248
+ alias: "index",
249
+ required: true
250
+ }]
251
+ }],
252
+ placeholder: [{
253
+ type: i0.Input,
254
+ args: [{
255
+ isSignal: true,
256
+ alias: "placeholder",
257
+ required: false
258
+ }]
259
+ }]
260
+ }
261
+ });
262
+ export { ParagraphBlockComponent };
263
+
264
+ //# sourceMappingURL=paragraph-block.component-Csk8Gu3x.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paragraph-block.component-Csk8Gu3x.mjs","names":[],"sources":["../../../projects/components/content-editor/src/_builder/paragraph-block/paragraph-block.component.ts","../../../projects/components/content-editor/src/_builder/paragraph-block/paragraph-block.component.html"],"sourcesContent":["import { NgsHeadlessEditorText } from '@ngstarter-ui/components/headless-editor';\nimport { contentEditorText, cloneContentEditorValue } from '../../document';\nimport {\n ChangeDetectionStrategy,\n Component, effect, untracked, DestroyRef,\n ElementRef, forwardRef,\n inject,\n input,\n OnInit, signal,\n viewChild\n} from '@angular/core';\nimport { ContentEditorContentEditableDirective } from '../../content-editor-content-editable.directive';\nimport { ContentBuilderComponent } from '../../content-builder/content-builder.component';\nimport {\n CONTENT_BUILDER,\n CONTENT_EDITOR_BLOCK,\n ContentEditorDataBlock,\n ContentEditorItemProperty\n} from '../../types';\nimport { ContentBuilderStore } from '../../content-builder.store';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { CursorController } from '../../utils/cursor-controller';\n\n@Component({\n selector: 'ngs-paragraph-block',\n imports: [\n ContentEditorContentEditableDirective\n ],\n providers: [\n {\n provide: CONTENT_EDITOR_BLOCK,\n useExisting: forwardRef(() => ParagraphBlockComponent),\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './paragraph-block.component.html',\n styleUrl: './paragraph-block.component.scss',\n host: {\n 'class': 'ngs-paragraph-block',\n '[class.is-empty]': '_isEmpty()'\n }\n})\nexport class ParagraphBlockComponent implements OnInit, ContentEditorDataBlock {\n private _store = inject(ContentBuilderStore);\n private _contentBuilder = inject<ContentBuilderComponent>(CONTENT_BUILDER);\n private _destroyRef = inject(DestroyRef);\n\n private _contentRef = viewChild.required<ElementRef<HTMLParagraphElement>>('contentRef');\n\n id = input.required<string>();\n content = input.required<readonly NgsHeadlessEditorText[]>();\n settings = input.required<any>();\n props = input<ContentEditorItemProperty[]>([]);\n index = input.required<number>();\n placeholder = input('Enter text here');\n\n protected _content = signal<readonly NgsHeadlessEditorText[]>([]);\n protected _props = signal<ContentEditorItemProperty[]>([]);\n protected _isEmpty = signal<boolean>(true);\n readonly initialized = signal(false);\n\n constructor() {\n effect(() => {\n const content = this.content();\n const props = this.props();\n untracked(() => {\n this._content.set(content);\n this._props.set(cloneContentEditorValue(props));\n this._isEmpty.set(!contentEditorText(content).trim());\n });\n });\n }\n\n ngOnInit() {\n this._content.set(this.content());\n this._props.set(this.props());\n this._isEmpty.set(!contentEditorText(this.content()).trim());\n this._contentBuilder\n .focusChanged\n .pipe(takeUntilDestroyed(this._destroyRef))\n .subscribe(() => {\n if (this._store.focusedBlockId() === this.id()) {\n this.focus();\n }\n });\n }\n\n focus() {\n const element = this._contentRef().nativeElement;\n const cursorController = new CursorController(element);\n cursorController.setToEnd();\n }\n\n getData(): any {\n return {\n content: this._content(),\n props: this._props(),\n settings: {\n ...this.settings(),\n }\n };\n }\n\n isEmpty(): boolean {\n return !contentEditorText(this._content()).trim();\n }\n\n protected onContentChanged(content: readonly NgsHeadlessEditorText[]) {\n if (!this.initialized()) {\n return;\n }\n\n this._content.set(content);\n this._isEmpty.set(!contentEditorText(content).trim());\n\n this.update();\n }\n\n protected onPropsChanged(props: ContentEditorItemProperty[]) {\n this._props.set(props);\n this.update();\n }\n\n protected onPressedEnter(event: KeyboardEvent) {\n event.preventDefault();\n event.stopPropagation();\n this._contentBuilder.insertEmptyBlock(this.index());\n }\n\n protected onContentEditableInitialized() {\n if (this._store.focusedBlockId() === this.id()) {\n this.focus();\n }\n\n this.initialized.set(true);\n }\n\n protected _onKeyDown(event: KeyboardEvent) {\n if (event.key === 'Backspace' && !contentEditorText(this._content())) {\n this._contentBuilder.deleteBlock(this.id());\n }\n }\n\n private update() {\n this._contentBuilder.updateParagraph(this.id(), {...this.getData(), isEmpty: this.isEmpty()});\n this._contentBuilder.emitContentChangeEvent();\n }\n}\n","<div #contentRef\n class=\"content\"\n [singleLine]=\"true\"\n [ngsContentEditorContentEditable]=\"_content()\"\n [settings]=\"settings()\"\n [props]=\"props()\"\n (propsChanged)=\"onPropsChanged($event)\"\n [attr.data-empty-placeholder]=\"placeholder()\"\n (contentChanged)=\"onContentChanged($event)\"\n (pressedEnter)=\"onPressedEnter($event)\"\n (keydown)=\"_onKeyDown($event)\"\n (initialized)=\"onContentEditableInitialized()\"></div>\n"],"mappings":";;;;;;AA2CA,IAAa,0BAAb,MAAa,wBAAuB;CAC1B,SAAS,OAAO,mBAAmB;CACnC,kBAAkB,OAAgC,eAAe;CACjE,cAAc,OAAO,UAAU;CAE/B,cAAc,UAAU,SAA2C,cAAa,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAExF,KAAK,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,KA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,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -0,0 +1,354 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, computed, input, viewChild } from "@angular/core";
3
+ import { Icon } from "@ngstarter-ui/components/icon";
4
+ import { Button } from "@ngstarter-ui/components/button";
5
+ import { Error, FormField, Hint, Label } from "@ngstarter-ui/components/form-field";
6
+ import * as i1 from "@angular/forms";
7
+ import { FormsModule } from "@angular/forms";
8
+ import { Input as Input$1 } from "@ngstarter-ui/components/input";
9
+ import { SlideToggle } from "@ngstarter-ui/components/slide-toggle";
10
+ var PlainTextFormBuilderSettings = class PlainTextFormBuilderSettings {
11
+ field = input.required(...ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []);
12
+ update = input.required(...ngDevMode ? [{ debugName: "update" }] : /* istanbul ignore next */ []);
13
+ updateField = input(...ngDevMode ? [void 0, { debugName: "updateField" }] : /* istanbul ignore next */ []);
14
+ updateSection = input(...ngDevMode ? [void 0, { debugName: "updateSection" }] : /* istanbul ignore next */ []);
15
+ textInput = viewChild("textInput", ...ngDevMode ? [{ debugName: "textInput" }] : /* istanbul ignore next */ []);
16
+ expressionEnabled = computed(() => this.field().settings?.["expression"] === true, ...ngDevMode ? [{ debugName: "expressionEnabled" }] : /* istanbul ignore next */ []);
17
+ expressions = computed(() => normalizeExpressions(this.field().settings?.["expressions"]), ...ngDevMode ? [{ debugName: "expressions" }] : /* istanbul ignore next */ []);
18
+ patchText(text) {
19
+ this.patchSettings({ text });
20
+ }
21
+ patchExpressionEnabled(expression) {
22
+ this.patchSettings({
23
+ expression,
24
+ expressions: expression ? this.expressions() : this.field().settings?.["expressions"] ?? []
25
+ });
26
+ }
27
+ addExpression() {
28
+ const expressions = this.expressions();
29
+ const id = uniqueExpressionId(expressions);
30
+ this.patchSettings({ expressions: [...expressions, {
31
+ id,
32
+ expression: ""
33
+ }] });
34
+ }
35
+ updateExpression(index, changes) {
36
+ const expressions = this.expressions();
37
+ if (!expressions[index]) return;
38
+ this.patchSettings({ expressions: expressions.map((item, itemIndex) => itemIndex === index ? {
39
+ ...item,
40
+ ...changes,
41
+ id: changes.id !== void 0 ? normalizeExpressionId(changes.id) : item.id
42
+ } : item) });
43
+ }
44
+ removeExpression(index) {
45
+ this.patchSettings({ expressions: this.expressions().filter((_, itemIndex) => itemIndex !== index) });
46
+ }
47
+ insertToken(id) {
48
+ const token = `{${id}}`;
49
+ const text = stringValue(this.field().settings?.["text"]);
50
+ const input = this.textInput()?.nativeElement;
51
+ if (!input) {
52
+ this.patchText(`${text}${token}`);
53
+ return;
54
+ }
55
+ const start = input.selectionStart ?? text.length;
56
+ const end = input.selectionEnd ?? start;
57
+ const nextText = `${text.slice(0, start)}${token}${text.slice(end)}`;
58
+ this.patchText(nextText);
59
+ queueMicrotask(() => {
60
+ input.focus();
61
+ input.setSelectionRange(start + token.length, start + token.length);
62
+ });
63
+ }
64
+ expressionIdError(id) {
65
+ if (!id) return "ID is required.";
66
+ return /^[A-Za-z_][A-Za-z0-9_-]*$/.test(id) ? "" : "Use letters, numbers, underscore, or dash. Start with a letter or underscore.";
67
+ }
68
+ tokenHint(id) {
69
+ return `Inserted into text as {${id || "id"}}.`;
70
+ }
71
+ patchSettings(changes) {
72
+ (this.updateField() ?? this.update())({ settings: {
73
+ ...this.field().settings,
74
+ ...changes
75
+ } });
76
+ }
77
+ static ɵfac = i0.ɵɵngDeclareFactory({
78
+ minVersion: "12.0.0",
79
+ version: "22.3.0",
80
+ ngImport: i0,
81
+ type: PlainTextFormBuilderSettings,
82
+ deps: [],
83
+ target: i0.ɵɵFactoryTarget.Component
84
+ });
85
+ static ɵcmp = i0.ɵɵngDeclareComponent({
86
+ minVersion: "17.0.0",
87
+ version: "22.3.0",
88
+ type: PlainTextFormBuilderSettings,
89
+ isStandalone: true,
90
+ selector: "ngs-plain-text-form-builder-settings",
91
+ inputs: {
92
+ field: {
93
+ classPropertyName: "field",
94
+ publicName: "field",
95
+ isSignal: true,
96
+ isRequired: true,
97
+ transformFunction: null
98
+ },
99
+ update: {
100
+ classPropertyName: "update",
101
+ publicName: "update",
102
+ isSignal: true,
103
+ isRequired: true,
104
+ transformFunction: null
105
+ },
106
+ updateField: {
107
+ classPropertyName: "updateField",
108
+ publicName: "updateField",
109
+ isSignal: true,
110
+ isRequired: false,
111
+ transformFunction: null
112
+ },
113
+ updateSection: {
114
+ classPropertyName: "updateSection",
115
+ publicName: "updateSection",
116
+ isSignal: true,
117
+ isRequired: false,
118
+ transformFunction: null
119
+ }
120
+ },
121
+ host: { classAttribute: "ngs-plain-text-form-builder-settings" },
122
+ viewQueries: [{
123
+ propertyName: "textInput",
124
+ first: true,
125
+ predicate: ["textInput"],
126
+ descendants: true,
127
+ isSignal: true
128
+ }],
129
+ exportAs: ["ngsPlainTextFormBuilderSettings"],
130
+ ngImport: i0,
131
+ template: "<div class=\"plain-text-settings\">\n <ngs-form-field>\n <ngs-label>Text</ngs-label>\n <textarea #textInput\n ngsInput\n rows=\"5\"\n [ngModel]=\"field().settings?.['text'] || ''\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"patchText($event)\"></textarea>\n <ngs-hint>Use tokens such as &#123;count_total&#125; when Expression is enabled.</ngs-hint>\n </ngs-form-field>\n\n <div class=\"plain-text-expression-toggle\">\n <ngs-slide-toggle [ngModel]=\"expressionEnabled()\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"patchExpressionEnabled($event)\">\n Expression\n </ngs-slide-toggle>\n </div>\n\n @if (expressionEnabled()) {\n <div class=\"plain-text-expression-panel\">\n @if (expressions().length) {\n <div class=\"plain-text-expression-list\">\n @for (expression of expressions(); track $index) {\n <section class=\"plain-text-expression-item\">\n <div class=\"plain-text-expression-item-header\">\n <span>Expression {{ $index + 1 }}</span>\n <div class=\"plain-text-expression-actions\">\n <button ngsIconButton\n type=\"button\"\n aria-label=\"Insert token\"\n [disabled]=\"!!expressionIdError(expression.id)\"\n (click)=\"insertToken(expression.id)\">\n <ngs-icon name=\"fluent:braces-24-regular\"/>\n </button>\n\n <button ngsIconButton\n type=\"button\"\n aria-label=\"Remove expression\"\n (click)=\"removeExpression($index)\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n </button>\n </div>\n </div>\n\n <ngs-form-field>\n <ngs-label>ID</ngs-label>\n <input ngsInput\n [ngModel]=\"expression.id\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateExpression($index, { id: $event })\">\n @if (expressionIdError(expression.id); as error) {\n <ngs-error>{{ error }}</ngs-error>\n }\n <ngs-hint [textContent]=\"tokenHint(expression.id)\"></ngs-hint>\n </ngs-form-field>\n\n <ngs-form-field>\n <ngs-label>Expression</ngs-label>\n <textarea ngsInput\n rows=\"3\"\n [ngModel]=\"expression.expression\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateExpression($index, { expression: $event })\"></textarea>\n <ngs-hint>Example: ROUND(item_quantity * item_price, 2)</ngs-hint>\n </ngs-form-field>\n </section>\n }\n </div>\n }\n\n <div>\n <button ngsButton=\"outlined\" type=\"button\" (click)=\"addExpression()\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n Add expression\n </button>\n </div>\n </div>\n }\n</div>\n",
132
+ styles: [":host{display:block}:host .plain-text-settings{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}:host .plain-text-expression-toggle{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 3)}:host .plain-text-expression-list{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3)}:host .plain-text-expression-panel{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3)}:host .plain-text-expression-add{display:flex;justify-content:flex-start}:host .plain-text-expression-item{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3);border-radius:var(--ngs-radius-md);padding:calc(var(--spacing, .25rem) * 3);outline:1px solid var(--ngs-color-outline-variant)}:host .plain-text-expression-item-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);color:var(--ngs-color-on-surface);font-size:var(--ngs-font-size-sm);font-weight:600}:host .plain-text-expression-actions{display:flex;align-items:center;gap:var(--spacing, .25rem)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
133
+ dependencies: [
134
+ {
135
+ kind: "ngmodule",
136
+ type: FormsModule
137
+ },
138
+ {
139
+ kind: "directive",
140
+ type: i1.DefaultValueAccessor,
141
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
142
+ },
143
+ {
144
+ kind: "directive",
145
+ type: i1.NgControlStatus,
146
+ selector: "[formControlName],[ngModel],[formControl]"
147
+ },
148
+ {
149
+ kind: "directive",
150
+ type: i1.NgModel,
151
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
152
+ inputs: [
153
+ "name",
154
+ "disabled",
155
+ "ngModel",
156
+ "ngModelOptions"
157
+ ],
158
+ outputs: ["ngModelChange"],
159
+ exportAs: ["ngModel"]
160
+ },
161
+ {
162
+ kind: "component",
163
+ type: Button,
164
+ selector: "\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n ",
165
+ inputs: [
166
+ "ngsButton",
167
+ "ngsIconButton",
168
+ "loading",
169
+ "disabled",
170
+ "disabledInteractive",
171
+ "disableRipple",
172
+ "reverse",
173
+ "fullWidth",
174
+ "hideTextOnMobile"
175
+ ],
176
+ exportAs: ["ngsButton"]
177
+ },
178
+ {
179
+ kind: "component",
180
+ type: FormField,
181
+ selector: "ngs-form-field",
182
+ inputs: [
183
+ "labelMode",
184
+ "subscriptHiddenIfEmpty",
185
+ "sameHeightAsButton"
186
+ ],
187
+ exportAs: ["ngsFormField"]
188
+ },
189
+ {
190
+ kind: "component",
191
+ type: Error,
192
+ selector: "ngs-error",
193
+ exportAs: ["ngsError"]
194
+ },
195
+ {
196
+ kind: "component",
197
+ type: Hint,
198
+ selector: "ngs-hint",
199
+ inputs: ["align"],
200
+ exportAs: ["ngsHint"]
201
+ },
202
+ {
203
+ kind: "component",
204
+ type: Icon,
205
+ selector: "ngs-icon",
206
+ inputs: ["name"],
207
+ exportAs: ["ngsIcon"]
208
+ },
209
+ {
210
+ kind: "directive",
211
+ type: Input$1,
212
+ selector: "input[ngsInput], textarea[ngsInput]",
213
+ inputs: [
214
+ "id",
215
+ "placeholder",
216
+ "required",
217
+ "disabled",
218
+ "readonly",
219
+ "errorStateMatcher"
220
+ ],
221
+ exportAs: ["ngsInput"]
222
+ },
223
+ {
224
+ kind: "component",
225
+ type: Label,
226
+ selector: "ngs-label"
227
+ },
228
+ {
229
+ kind: "component",
230
+ type: SlideToggle,
231
+ selector: "ngs-slide-toggle",
232
+ inputs: [
233
+ "id",
234
+ "name",
235
+ "labelPosition",
236
+ "aria-label",
237
+ "aria-labelledby",
238
+ "aria-describedby",
239
+ "required",
240
+ "disabled",
241
+ "disableRipple",
242
+ "tabIndex",
243
+ "hideIcon",
244
+ "color",
245
+ "checked",
246
+ "readonly"
247
+ ],
248
+ outputs: [
249
+ "checkedChange",
250
+ "change",
251
+ "toggleChange",
252
+ "touch"
253
+ ],
254
+ exportAs: ["ngsSlideToggle"]
255
+ }
256
+ ],
257
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
258
+ });
259
+ };
260
+ i0.ɵɵngDeclareClassMetadata({
261
+ minVersion: "12.0.0",
262
+ version: "22.3.0",
263
+ ngImport: i0,
264
+ type: PlainTextFormBuilderSettings,
265
+ decorators: [{
266
+ type: Component,
267
+ args: [{
268
+ selector: "ngs-plain-text-form-builder-settings",
269
+ exportAs: "ngsPlainTextFormBuilderSettings",
270
+ imports: [
271
+ FormsModule,
272
+ Button,
273
+ FormField,
274
+ Error,
275
+ Hint,
276
+ Icon,
277
+ Input$1,
278
+ Label,
279
+ SlideToggle
280
+ ],
281
+ changeDetection: ChangeDetectionStrategy.OnPush,
282
+ host: { "class": "ngs-plain-text-form-builder-settings" },
283
+ template: "<div class=\"plain-text-settings\">\n <ngs-form-field>\n <ngs-label>Text</ngs-label>\n <textarea #textInput\n ngsInput\n rows=\"5\"\n [ngModel]=\"field().settings?.['text'] || ''\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"patchText($event)\"></textarea>\n <ngs-hint>Use tokens such as &#123;count_total&#125; when Expression is enabled.</ngs-hint>\n </ngs-form-field>\n\n <div class=\"plain-text-expression-toggle\">\n <ngs-slide-toggle [ngModel]=\"expressionEnabled()\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"patchExpressionEnabled($event)\">\n Expression\n </ngs-slide-toggle>\n </div>\n\n @if (expressionEnabled()) {\n <div class=\"plain-text-expression-panel\">\n @if (expressions().length) {\n <div class=\"plain-text-expression-list\">\n @for (expression of expressions(); track $index) {\n <section class=\"plain-text-expression-item\">\n <div class=\"plain-text-expression-item-header\">\n <span>Expression {{ $index + 1 }}</span>\n <div class=\"plain-text-expression-actions\">\n <button ngsIconButton\n type=\"button\"\n aria-label=\"Insert token\"\n [disabled]=\"!!expressionIdError(expression.id)\"\n (click)=\"insertToken(expression.id)\">\n <ngs-icon name=\"fluent:braces-24-regular\"/>\n </button>\n\n <button ngsIconButton\n type=\"button\"\n aria-label=\"Remove expression\"\n (click)=\"removeExpression($index)\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n </button>\n </div>\n </div>\n\n <ngs-form-field>\n <ngs-label>ID</ngs-label>\n <input ngsInput\n [ngModel]=\"expression.id\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateExpression($index, { id: $event })\">\n @if (expressionIdError(expression.id); as error) {\n <ngs-error>{{ error }}</ngs-error>\n }\n <ngs-hint [textContent]=\"tokenHint(expression.id)\"></ngs-hint>\n </ngs-form-field>\n\n <ngs-form-field>\n <ngs-label>Expression</ngs-label>\n <textarea ngsInput\n rows=\"3\"\n [ngModel]=\"expression.expression\"\n [ngModelOptions]=\"{standalone: true}\"\n (ngModelChange)=\"updateExpression($index, { expression: $event })\"></textarea>\n <ngs-hint>Example: ROUND(item_quantity * item_price, 2)</ngs-hint>\n </ngs-form-field>\n </section>\n }\n </div>\n }\n\n <div>\n <button ngsButton=\"outlined\" type=\"button\" (click)=\"addExpression()\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n Add expression\n </button>\n </div>\n </div>\n }\n</div>\n",
284
+ styles: [":host{display:block}:host .plain-text-settings{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 4)}:host .plain-text-expression-toggle{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 3)}:host .plain-text-expression-list{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3)}:host .plain-text-expression-panel{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3)}:host .plain-text-expression-add{display:flex;justify-content:flex-start}:host .plain-text-expression-item{display:flex;flex-direction:column;gap:calc(var(--spacing, .25rem) * 3);border-radius:var(--ngs-radius-md);padding:calc(var(--spacing, .25rem) * 3);outline:1px solid var(--ngs-color-outline-variant)}:host .plain-text-expression-item-header{display:flex;align-items:center;justify-content:space-between;gap:calc(var(--spacing, .25rem) * 2);color:var(--ngs-color-on-surface);font-size:var(--ngs-font-size-sm);font-weight:600}:host .plain-text-expression-actions{display:flex;align-items:center;gap:var(--spacing, .25rem)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
285
+ }]
286
+ }],
287
+ propDecorators: {
288
+ field: [{
289
+ type: i0.Input,
290
+ args: [{
291
+ isSignal: true,
292
+ alias: "field",
293
+ required: true
294
+ }]
295
+ }],
296
+ update: [{
297
+ type: i0.Input,
298
+ args: [{
299
+ isSignal: true,
300
+ alias: "update",
301
+ required: true
302
+ }]
303
+ }],
304
+ updateField: [{
305
+ type: i0.Input,
306
+ args: [{
307
+ isSignal: true,
308
+ alias: "updateField",
309
+ required: false
310
+ }]
311
+ }],
312
+ updateSection: [{
313
+ type: i0.Input,
314
+ args: [{
315
+ isSignal: true,
316
+ alias: "updateSection",
317
+ required: false
318
+ }]
319
+ }],
320
+ textInput: [{
321
+ type: i0.ViewChild,
322
+ args: ["textInput", { isSignal: true }]
323
+ }]
324
+ }
325
+ });
326
+ function normalizeExpressions(value) {
327
+ if (!Array.isArray(value)) return [];
328
+ return value.filter(isRecord).map((item) => ({
329
+ id: normalizeExpressionId(item["id"]),
330
+ expression: stringValue(item["expression"])
331
+ }));
332
+ }
333
+ function uniqueExpressionId(expressions) {
334
+ const existing = new Set(expressions.map((item) => item.id));
335
+ let index = expressions.length + 1;
336
+ let id = `expression_${index}`;
337
+ while (existing.has(id)) {
338
+ index += 1;
339
+ id = `expression_${index}`;
340
+ }
341
+ return id;
342
+ }
343
+ function normalizeExpressionId(value) {
344
+ return stringValue(value).trim().replace(/[^\w-]/g, "_").replace(/^[^A-Za-z_]+/, "");
345
+ }
346
+ function stringValue(value) {
347
+ return typeof value === "string" ? value : "";
348
+ }
349
+ function isRecord(value) {
350
+ return typeof value === "object" && value !== null && !Array.isArray(value);
351
+ }
352
+ export { PlainTextFormBuilderSettings };
353
+
354
+ //# sourceMappingURL=plain-text-settings-BnxCxLhA.mjs.map