@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 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-incidents.mjs","sources":["../../../projects/components/incidents/src/properties.ts","../../../projects/components/incidents/src/incidents/incidents.ts","../../../projects/components/incidents/src/incidents/incidents.html","../../../projects/components/incidents/src/incidents-bar/incidents-bar.ts","../../../projects/components/incidents/src/incidents-bar/incidents-bar.html","../../../projects/components/incidents/src/incidents-list/incidents-list.ts","../../../projects/components/incidents/src/incidents-list/incidents-list.html","../../../projects/components/incidents/src/incidents.store.ts","../../../projects/components/incidents/src/incident/incident.ts","../../../projects/components/incidents/src/incident/incident.html","../../../projects/components/incidents/src/incident-title/incident-title.ts","../../../projects/components/incidents/src/incident-title/incident-title.html","../../../projects/components/incidents/src/incident-details/incident-details.ts","../../../projects/components/incidents/src/incident-details/incident-details.html","../../../projects/components/incidents/src/incident-button.directive.ts","../../../projects/components/incidents/src/incidents-title/incidents-title.ts","../../../projects/components/incidents/src/incidents-title/incidents-title.html","../../../projects/components/incidents/src/incidents-description/incidents-description.ts","../../../projects/components/incidents/src/incidents-description/incidents-description.html","../../../projects/components/incidents/src/incidents-toggle-icon.directive.ts","../../../projects/components/incidents/src/incident-close.directive.ts","../../../projects/components/incidents/src/incidents-container/incidents-container.ts","../../../projects/components/incidents/src/incidents-container/incidents-container.html","../../../projects/components/incidents/src/incident-icon.directive.ts","../../../projects/components/incidents/ngstarter-ui-components-incidents.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const INCIDENTS = new InjectionToken('INCIDENTS');\n","import {\n Component,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { INCIDENTS } from '../properties';\n\n@Component({\n selector: 'ngs-incidents',\n exportAs: 'ngsIncidents',\n templateUrl: './incidents.html',\n styleUrl: './incidents.scss',\n providers: [\n {\n provide: INCIDENTS,\n useExisting: Incidents\n }\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents',\n '[class.is-visible]': 'isVisible',\n }\n})\nexport class Incidents {\n isVisible = false;\n\n toggleVisibility() {\n this.isVisible = !this.isVisible;\n }\n}\n","<ng-content select=\"ngs-incidents-bar\" />\n<ng-content select=\"ngs-incidents-list\" />\n","import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { INCIDENTS } from '../properties';\nimport { Incidents } from '../incidents/incidents';\nimport { Button } from '@ngstarter-ui/components/button';\n\n@Component({\n selector: 'ngs-incidents-bar',\n exportAs: 'ngsIncidentsBar',\n imports: [\n\n Button\n ],\n templateUrl: './incidents-bar.html',\n styleUrl: './incidents-bar.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-bar',\n '(click)': '_handleClick($event)'\n }\n})\nexport class IncidentsBar {\n private _parent = inject<Incidents>(INCIDENTS, { optional: true });\n\n _handleClick(_event?: Event) {\n this._parent?.toggleVisibility();\n }\n}\n","<div class=\"flex flex-col gap-0.5\">\n <ng-content select=\"ngs-incidents-title\"/>\n <ng-content select=\"ngs-incidents-description\"/>\n</div>\n<button ngsIconButton class=\"ms-auto toggle-icon\">\n <ng-content select=\"[ngsIncidentsToggleIcon]\"/>\n</button>\n","import { booleanAttribute, Component, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { Incidents } from '../incidents/incidents';\nimport { INCIDENTS } from '../properties';\n\n@Component({\n selector: 'ngs-incidents-list',\n exportAs: 'ngs-incidents-list',\n templateUrl: './incidents-list.html',\n styleUrl: './incidents-list.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-list',\n '[class.is-fixed]': 'fixed()',\n '(click)': '_handleClick($event)'\n }\n})\nexport class IncidentsList {\n private _parent = inject<Incidents>(INCIDENTS, { optional: true });\n\n fixed = input(false, {\n transform: booleanAttribute\n });\n\n _handleClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n\n if (target.closest('.ngs-incident') === null) {\n this._parent?.toggleVisibility();\n }\n }\n}\n","<div class=\"container\">\n <ng-content select=\"ngs-incident\"/>\n</div>\n","import { patchState, signalStore, withMethods, withState } from '@ngrx/signals';\nimport { Incident } from './types';\n\nexport interface IncidentsState {\n incidents: Incident[],\n title: string;\n description: string;\n}\n\nconst initialState: IncidentsState = {\n incidents: [],\n title: '',\n description: '',\n};\n\nexport const IncidentsStore = signalStore(\n { providedIn: 'root' },\n withState(initialState),\n withMethods((store) => ({\n show(state: IncidentsState): void {\n patchState(store, {\n ...state\n });\n },\n hide(): void {\n patchState(store, {\n incidents: []\n });\n }\n }))\n);\n","import { Component, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { IncidentsStore } from '../incidents.store';\nimport { Button } from '@ngstarter-ui/components/button';\n\nlet incidentId = 0;\n\n@Component({\n selector: 'ngs-incident,[ngs-incident]',\n exportAs: 'ngsIncident',\n imports: [\n\n Button\n ],\n templateUrl: './incident.html',\n styleUrl: './incident.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incident'\n }\n})\nexport class Incident {\n private _incidentsStore = inject(IncidentsStore);\n\n incidentId = input(`incident-${incidentId++}`);\n\n close() {\n this._incidentsStore.hide();\n }\n}\n","<div class=\"icon\">\n <ng-content select=\"[ngsIncidentIcon]\"/>\n</div>\n<div class=\"content\">\n <div class=\"data\">\n <ng-content select=\"ngs-incident-title\"/>\n <ng-content select=\"ngs-incident-details\"/>\n </div>\n <ng-content select=\"[ngsIncidentButton]\"/>\n</div>\n<button ngsIconButton class=\"close -ms-2\" (click)=\"close()\">\n <ng-content select=\"[ngsIncidentClose]\"/>\n</button>\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-incident-title',\n exportAs: 'ngsIncidentTitle',\n templateUrl: './incident-title.html',\n styleUrl: './incident-title.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incident-title',\n }\n})\nexport class IncidentTitle {\n\n}\n","<ng-content />\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-incident-details',\n exportAs: 'ngsIncidentDetails',\n templateUrl: './incident-details.html',\n styleUrl: './incident-details.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incident-details',\n }\n})\nexport class IncidentDetails {\n\n}\n","<ng-content />\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsIncidentButton]',\n exportAs: 'ngsIncidentButton',\n host: {\n 'class': 'ngs-incident-button',\n }\n})\nexport class IncidentButtonDirective {\n\n}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-incidents-title',\n exportAs: 'ngsIncidentTitle',\n templateUrl: './incidents-title.html',\n styleUrl: './incidents-title.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-title',\n }\n})\nexport class IncidentsTitle {\n\n}\n","<ng-content />\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-incidents-description',\n exportAs: 'ngsIncidentsDescription',\n templateUrl: './incidents-description.html',\n styleUrl: './incidents-description.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-description'\n }\n})\nexport class IncidentsDescription {\n\n}\n","<ng-content />\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsIncidentsToggleIcon]',\n exportAs: 'ngsIncidentsToggleIcon',\n host: {\n 'class': 'ngs-incidents-toggle-icon',\n }\n})\nexport class IncidentsToggleIconDirective {\n\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsIncidentClose]',\n exportAs: 'ngsIncidentClose',\n host: {\n 'class': 'ngs-incident-close'\n }\n})\nexport class IncidentCloseDirective {\n\n}\n","import { Component, computed, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { IncidentsStore } from '../incidents.store';\nimport { Incidents } from '../incidents/incidents';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { IncidentsTitle } from '../incidents-title/incidents-title';\nimport { IncidentDetails } from '../incident-details/incident-details';\nimport { IncidentsBar } from '../incidents-bar/incidents-bar';\nimport { IncidentsDescription } from '../incidents-description/incidents-description';\nimport { IncidentsToggleIconDirective } from '../incidents-toggle-icon.directive';\nimport { IncidentTitle } from '../incident-title/incident-title';\nimport { IncidentCloseDirective } from '../incident-close.directive';\nimport { Incident } from '../incident/incident';\nimport { IncidentsList } from '../incidents-list/incidents-list';\n\n@Component({\n selector: 'ngs-incidents-container,ngs-incidents-global',\n exportAs: 'ngsIncidentsGlobal',\n imports: [\n Incidents,\n Icon,\n IncidentsTitle,\n IncidentDetails,\n IncidentsBar,\n IncidentsDescription,\n IncidentsToggleIconDirective,\n IncidentTitle,\n IncidentsList,\n IncidentCloseDirective,\n Incident\n ],\n templateUrl: './incidents-container.html',\n styleUrl: './incidents-container.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-global',\n '[class.is-active]': 'hasIncidents()'\n }\n})\nexport class IncidentsContainer {\n protected _incidentsStore = inject(IncidentsStore);\n\n hasIncidents = computed<boolean>(() => {\n return this._incidentsStore.incidents().length > 0;\n });\n title = computed(() => {\n return this._incidentsStore.title();\n });\n description = computed(() => {\n return this._incidentsStore.description();\n });\n incidents = computed(() => {\n return this._incidentsStore.incidents();\n });\n}\n","@if (hasIncidents()) {\n <ngs-incidents>\n <ngs-incidents-bar>\n <ngs-incidents-title>{{ title() }}</ngs-incidents-title>\n @if (description()) {\n <ngs-incidents-description>{{ description() }}</ngs-incidents-description>\n }\n <ngs-icon name=\"fluent:chevron-down-24-regular\" ngsIncidentsToggleIcon/>\n </ngs-incidents-bar>\n <ngs-incidents-list fixed>\n @for (incident of incidents(); track incident) {\n <ngs-incident>\n <ngs-icon name=\"fluent:info-24-regular\" ngsIncidentIcon/>\n <ngs-icon name=\"fluent:dismiss-24-regular\" ngsIncidentClose/>\n <ngs-incident-title>{{ incident.title }}</ngs-incident-title>\n @if (incident.details) {\n <ngs-incident-details>{{ incident.details }}</ngs-incident-details>\n }\n </ngs-incident>\n }\n </ngs-incidents-list>\n </ngs-incidents>\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsIncidentIcon]',\n exportAs: 'ngsIncidentIcon',\n host: {\n 'class': 'ngs-incident-icon'\n }\n})\nexport class IncidentIconDirective {\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC;;MCqB3C,SAAS,CAAA;IACpB,SAAS,GAAG,KAAK;IAEjB,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS;IAClC;uGALW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAT,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,kBAAA,EAAA,WAAA,EAAA,EAAA,cAAA,EAAA,eAAA,EAAA,EAAA,SAAA,EAZT;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,SAAS;AA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wBAAA,OAAO,EAAE;AACV;AACF,iBAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-incidents.mjs","names":[],"sources":["../../../projects/components/incidents/src/properties.ts","../../../projects/components/incidents/src/incidents/incidents.ts","../../../projects/components/incidents/src/incidents/incidents.html","../../../projects/components/incidents/src/incidents-bar/incidents-bar.ts","../../../projects/components/incidents/src/incidents-bar/incidents-bar.html","../../../projects/components/incidents/src/incidents-list/incidents-list.ts","../../../projects/components/incidents/src/incidents-list/incidents-list.html","../../../projects/components/incidents/src/incidents.store.ts","../../../projects/components/incidents/src/incident/incident.ts","../../../projects/components/incidents/src/incident/incident.html","../../../projects/components/incidents/src/incident-title/incident-title.ts","../../../projects/components/incidents/src/incident-title/incident-title.html","../../../projects/components/incidents/src/incident-details/incident-details.ts","../../../projects/components/incidents/src/incident-details/incident-details.html","../../../projects/components/incidents/src/incident-button.directive.ts","../../../projects/components/incidents/src/incidents-title/incidents-title.ts","../../../projects/components/incidents/src/incidents-title/incidents-title.html","../../../projects/components/incidents/src/incidents-description/incidents-description.ts","../../../projects/components/incidents/src/incidents-description/incidents-description.html","../../../projects/components/incidents/src/incidents-toggle-icon.directive.ts","../../../projects/components/incidents/src/incident-close.directive.ts","../../../projects/components/incidents/src/incidents-container/incidents-container.ts","../../../projects/components/incidents/src/incidents-container/incidents-container.html","../../../projects/components/incidents/src/incident-icon.directive.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const INCIDENTS = new InjectionToken('INCIDENTS');\n","import {\n Component,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport { INCIDENTS } from '../properties';\n\n@Component({\n selector: 'ngs-incidents',\n exportAs: 'ngsIncidents',\n templateUrl: './incidents.html',\n styleUrl: './incidents.scss',\n providers: [\n {\n provide: INCIDENTS,\n useExisting: Incidents\n }\n ],\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents',\n '[class.is-visible]': 'isVisible',\n }\n})\nexport class Incidents {\n isVisible = false;\n\n toggleVisibility() {\n this.isVisible = !this.isVisible;\n }\n}\n","<ng-content select=\"ngs-incidents-bar\" />\n<ng-content select=\"ngs-incidents-list\" />\n","import { Component, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { INCIDENTS } from '../properties';\nimport { Incidents } from '../incidents/incidents';\nimport { Button } from '@ngstarter-ui/components/button';\n\n@Component({\n selector: 'ngs-incidents-bar',\n exportAs: 'ngsIncidentsBar',\n imports: [\n\n Button\n ],\n templateUrl: './incidents-bar.html',\n styleUrl: './incidents-bar.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-bar',\n '(click)': '_handleClick($event)'\n }\n})\nexport class IncidentsBar {\n private _parent = inject<Incidents>(INCIDENTS, { optional: true });\n\n _handleClick(_event?: Event) {\n this._parent?.toggleVisibility();\n }\n}\n","<div class=\"flex flex-col gap-0.5\">\n <ng-content select=\"ngs-incidents-title\"/>\n <ng-content select=\"ngs-incidents-description\"/>\n</div>\n<button ngsIconButton class=\"ms-auto toggle-icon\">\n <ng-content select=\"[ngsIncidentsToggleIcon]\"/>\n</button>\n","import { booleanAttribute, Component, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { Incidents } from '../incidents/incidents';\nimport { INCIDENTS } from '../properties';\n\n@Component({\n selector: 'ngs-incidents-list',\n exportAs: 'ngs-incidents-list',\n templateUrl: './incidents-list.html',\n styleUrl: './incidents-list.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-list',\n '[class.is-fixed]': 'fixed()',\n '(click)': '_handleClick($event)'\n }\n})\nexport class IncidentsList {\n private _parent = inject<Incidents>(INCIDENTS, { optional: true });\n\n fixed = input(false, {\n transform: booleanAttribute\n });\n\n _handleClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n\n if (target.closest('.ngs-incident') === null) {\n this._parent?.toggleVisibility();\n }\n }\n}\n","<div class=\"container\">\n <ng-content select=\"ngs-incident\"/>\n</div>\n","import { patchState, signalStore, withMethods, withState } from '@ngrx/signals';\nimport { Incident } from './types';\n\nexport interface IncidentsState {\n incidents: Incident[],\n title: string;\n description: string;\n}\n\nconst initialState: IncidentsState = {\n incidents: [],\n title: '',\n description: '',\n};\n\nexport const IncidentsStore = signalStore(\n { providedIn: 'root' },\n withState(initialState),\n withMethods((store) => ({\n show(state: IncidentsState): void {\n patchState(store, {\n ...state\n });\n },\n hide(): void {\n patchState(store, {\n incidents: []\n });\n }\n }))\n);\n","import { Component, inject, input, ChangeDetectionStrategy } from '@angular/core';\nimport { IncidentsStore } from '../incidents.store';\nimport { Button } from '@ngstarter-ui/components/button';\n\nlet incidentId = 0;\n\n@Component({\n selector: 'ngs-incident,[ngs-incident]',\n exportAs: 'ngsIncident',\n imports: [\n\n Button\n ],\n templateUrl: './incident.html',\n styleUrl: './incident.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incident'\n }\n})\nexport class Incident {\n private _incidentsStore = inject(IncidentsStore);\n\n incidentId = input(`incident-${incidentId++}`);\n\n close() {\n this._incidentsStore.hide();\n }\n}\n","<div class=\"icon\">\n <ng-content select=\"[ngsIncidentIcon]\"/>\n</div>\n<div class=\"content\">\n <div class=\"data\">\n <ng-content select=\"ngs-incident-title\"/>\n <ng-content select=\"ngs-incident-details\"/>\n </div>\n <ng-content select=\"[ngsIncidentButton]\"/>\n</div>\n<button ngsIconButton class=\"close -ms-2\" (click)=\"close()\">\n <ng-content select=\"[ngsIncidentClose]\"/>\n</button>\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-incident-title',\n exportAs: 'ngsIncidentTitle',\n templateUrl: './incident-title.html',\n styleUrl: './incident-title.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incident-title',\n }\n})\nexport class IncidentTitle {\n\n}\n","<ng-content />\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-incident-details',\n exportAs: 'ngsIncidentDetails',\n templateUrl: './incident-details.html',\n styleUrl: './incident-details.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incident-details',\n }\n})\nexport class IncidentDetails {\n\n}\n","<ng-content />\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsIncidentButton]',\n exportAs: 'ngsIncidentButton',\n host: {\n 'class': 'ngs-incident-button',\n }\n})\nexport class IncidentButtonDirective {\n\n}\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-incidents-title',\n exportAs: 'ngsIncidentTitle',\n templateUrl: './incidents-title.html',\n styleUrl: './incidents-title.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-title',\n }\n})\nexport class IncidentsTitle {\n\n}\n","<ng-content />\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\n\n@Component({\n selector: 'ngs-incidents-description',\n exportAs: 'ngsIncidentsDescription',\n templateUrl: './incidents-description.html',\n styleUrl: './incidents-description.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-description'\n }\n})\nexport class IncidentsDescription {\n\n}\n","<ng-content />\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsIncidentsToggleIcon]',\n exportAs: 'ngsIncidentsToggleIcon',\n host: {\n 'class': 'ngs-incidents-toggle-icon',\n }\n})\nexport class IncidentsToggleIconDirective {\n\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsIncidentClose]',\n exportAs: 'ngsIncidentClose',\n host: {\n 'class': 'ngs-incident-close'\n }\n})\nexport class IncidentCloseDirective {\n\n}\n","import { Component, computed, inject, ChangeDetectionStrategy } from '@angular/core';\nimport { IncidentsStore } from '../incidents.store';\nimport { Incidents } from '../incidents/incidents';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { IncidentsTitle } from '../incidents-title/incidents-title';\nimport { IncidentDetails } from '../incident-details/incident-details';\nimport { IncidentsBar } from '../incidents-bar/incidents-bar';\nimport { IncidentsDescription } from '../incidents-description/incidents-description';\nimport { IncidentsToggleIconDirective } from '../incidents-toggle-icon.directive';\nimport { IncidentTitle } from '../incident-title/incident-title';\nimport { IncidentCloseDirective } from '../incident-close.directive';\nimport { Incident } from '../incident/incident';\nimport { IncidentsList } from '../incidents-list/incidents-list';\n\n@Component({\n selector: 'ngs-incidents-container,ngs-incidents-global',\n exportAs: 'ngsIncidentsGlobal',\n imports: [\n Incidents,\n Icon,\n IncidentsTitle,\n IncidentDetails,\n IncidentsBar,\n IncidentsDescription,\n IncidentsToggleIconDirective,\n IncidentTitle,\n IncidentsList,\n IncidentCloseDirective,\n Incident\n ],\n templateUrl: './incidents-container.html',\n styleUrl: './incidents-container.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-incidents-global',\n '[class.is-active]': 'hasIncidents()'\n }\n})\nexport class IncidentsContainer {\n protected _incidentsStore = inject(IncidentsStore);\n\n hasIncidents = computed<boolean>(() => {\n return this._incidentsStore.incidents().length > 0;\n });\n title = computed(() => {\n return this._incidentsStore.title();\n });\n description = computed(() => {\n return this._incidentsStore.description();\n });\n incidents = computed(() => {\n return this._incidentsStore.incidents();\n });\n}\n","@if (hasIncidents()) {\n <ngs-incidents>\n <ngs-incidents-bar>\n <ngs-incidents-title>{{ title() }}</ngs-incidents-title>\n @if (description()) {\n <ngs-incidents-description>{{ description() }}</ngs-incidents-description>\n }\n <ngs-icon name=\"fluent:chevron-down-24-regular\" ngsIncidentsToggleIcon/>\n </ngs-incidents-bar>\n <ngs-incidents-list fixed>\n @for (incident of incidents(); track incident) {\n <ngs-incident>\n <ngs-icon name=\"fluent:info-24-regular\" ngsIncidentIcon/>\n <ngs-icon name=\"fluent:dismiss-24-regular\" ngsIncidentClose/>\n <ngs-incident-title>{{ incident.title }}</ngs-incident-title>\n @if (incident.details) {\n <ngs-incident-details>{{ incident.details }}</ngs-incident-details>\n }\n </ngs-incident>\n }\n </ngs-incidents-list>\n </ngs-incidents>\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[ngsIncidentIcon]',\n exportAs: 'ngsIncidentIcon',\n host: {\n 'class': 'ngs-incident-icon'\n }\n})\nexport class IncidentIconDirective {\n\n}\n"],"mappings":";;;;;AAEA,MAAa,YAAY,IAAI,eAAe,WAAW;ACqBvD,IAAa,YAAb,MAAa,UAAS;CACpB,YAAY;CAEZ,mBAAgB;EACd,KAAK,YAAY,CAAC,KAAK;CACzB;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAS,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAT,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAS,cAAA;EAAA,UAAA;EAAA,MAAA;GAAA,YAAA,EAAA,oBAAA,YAAA;GAAA,gBAAA;EAAA;EAAA,WAZT,CACT;GACE,SAAS;GACT,aAAa;EACd,CACF;EAAA,UAAA,CAAA,cAAA;EAAA,UAAA;EAAA,UChBH;EAEA,QAAA,CAAA,wlDAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;ADqBa,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAjBrB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,UACf;GAAc,WAGb,CACT;IACE,SAAS;IACT,aAAW;GACZ,CACF;GAAA,iBACgB,wBAAwB;GAAK,MACxC;IACJ,SAAS;IACT,sBAAsB;GACvB;GAAA,UAAA;GAAA,QAAA,CAAA,wlDAAA;EAAA,CAAA;;;AEDH,IAAa,eAAb,MAAa,aAAY;CACf,UAAU,OAAkB,WAAW,EAAE,UAAU,KAAI,CAAE;CAEjE,aAAa,QAAc;EACzB,KAAK,SAAS,iBAAgB;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A,SAAA;EAAA,UAAA;EAAA,MAAA;EAAqB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAArB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAqB,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,oBAAA;EAAA,UAAA,CAAA,iBAAA;EAAA,UAAA;CAAA,CAAA;;AAArB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAPjC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,MAAM,EACJ,SAAS,oBACV;EACF,CAAA"}
@@ -1,183 +1,245 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, PLATFORM_ID, DOCUMENT, input, numberAttribute, output, signal, ElementRef, Renderer2, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { isPlatformServer } from '@angular/common';
4
-
5
- class InlineTextEdit {
6
- platformId = inject(PLATFORM_ID);
7
- document = inject(DOCUMENT);
8
- enabled = input(true, /* @ts-ignore */
9
- ...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
10
- placeholder = input('', /* @ts-ignore */
11
- ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
12
- delay = input(0, { ...(ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
13
- contentChanged = output();
14
- isEditing = signal(false, /* @ts-ignore */
15
- ...(ngDevMode ? [{ debugName: "isEditing" }] : /* istanbul ignore next */ []));
16
- isFocused = signal(false, /* @ts-ignore */
17
- ...(ngDevMode ? [{ debugName: "isFocused" }] : /* istanbul ignore next */ []));
18
- previousValue = '';
19
- minHeightSet = false;
20
- elementRef = inject((ElementRef));
21
- renderer = inject(Renderer2);
22
- emitTimeoutId = null;
23
- constructor() {
24
- afterNextRender(() => {
25
- this.setInitialMinHeight();
26
- });
27
- }
28
- ngAfterViewInit() {
29
- this.previousValue = this.elementRef.nativeElement.textContent;
30
- }
31
- get isContentEditable() {
32
- return true;
33
- }
34
- ngAfterContentChecked() {
35
- if (isPlatformServer(this.platformId)) {
36
- return;
37
- }
38
- this.setInitialMinHeight();
39
- }
40
- ngOnDestroy() {
41
- this.clearPendingEmission();
42
- }
43
- setInitialMinHeight() {
44
- if (this.minHeightSet) {
45
- return;
46
- }
47
- const el = this.elementRef.nativeElement;
48
- let height = el.getBoundingClientRect().height;
49
- if (!height || height < 1) {
50
- const cs = getComputedStyle(el);
51
- let lh = parseFloat(cs.lineHeight);
52
- if (isNaN(lh) || lh <= 0) {
53
- const fs = parseFloat(cs.fontSize) || 16;
54
- lh = fs * 1.5;
55
- }
56
- height = lh;
57
- }
58
- if (height && height > 0) {
59
- this.renderer.setStyle(el, 'min-height', `${Math.ceil(height)}px`);
60
- this.minHeightSet = true;
61
- }
62
- }
63
- onFocus() {
64
- this.isFocused.set(true);
65
- }
66
- onBlur() {
67
- this.isFocused.set(false);
68
- this.finishEdit();
69
- }
70
- onEnter(event) {
71
- event.preventDefault();
72
- this.finishEdit();
73
- }
74
- onEscape() {
75
- this.cancelEdit();
76
- }
77
- onPaste(event) {
78
- event.preventDefault();
79
- const text = event.clipboardData?.getData('text/plain') ?? '';
80
- this.document.execCommand('insertText', false, text);
81
- }
82
- onInput() {
83
- this.isEditing.set(true);
84
- // Track live changes and normalize empty content.
85
- // Browsers may insert a <br> (or wrappers like <div><br></div>) in empty contenteditable elements.
86
- const el = this.elementRef.nativeElement;
87
- const html = (el.innerHTML ?? '').trim().toLowerCase();
88
- const text = (el.textContent ?? '').trim();
89
- const isEffectivelyEmpty = text.length === 0 ||
90
- html === '' ||
91
- html === '<br>' ||
92
- html === '<br/>' ||
93
- html === '<div><br></div>';
94
- if (isEffectivelyEmpty && el.innerHTML !== '') {
95
- // Clear to a truly empty state so placeholders and styling work correctly.
96
- el.innerHTML = '';
97
- }
98
- }
99
- finishEdit() {
100
- if (!this.isEditing()) {
101
- return;
102
- }
103
- const newValue = this.elementRef.nativeElement.textContent?.trim() ?? '';
104
- if (newValue !== this.previousValue) {
105
- this.previousValue = newValue;
106
- this.emitWithDelay(newValue);
107
- }
108
- this.isEditing.set(false);
109
- }
110
- cancelEdit() {
111
- if (!this.isEditing()) {
112
- return;
113
- }
114
- this.elementRef.nativeElement.textContent = this.previousValue;
115
- // Keep focus and move caret to the end of the restored content for better UX.
116
- this.placeCaretAtEnd();
117
- this.isEditing.set(false);
118
- // Cancel any pending emission since the edit was canceled.
119
- this.clearPendingEmission();
120
- }
121
- placeCaretAtEnd() {
122
- if (isPlatformServer(this.platformId)) {
123
- return;
124
- }
125
- const el = this.elementRef.nativeElement;
126
- // Ensure the host is focused so caret positioning is visible.
127
- el.focus();
128
- const selection = this.document.getSelection?.();
129
- if (!selection) {
130
- return;
131
- }
132
- const range = this.document.createRange();
133
- range.selectNodeContents(el);
134
- range.collapse(false); // collapse to end
135
- selection.removeAllRanges();
136
- selection.addRange(range);
137
- }
138
- emitWithDelay(value) {
139
- const d = this.delay();
140
- // Always clear a previous scheduled emission to ensure only the latest value is emitted
141
- this.clearPendingEmission();
142
- if (d > 0) {
143
- this.emitTimeoutId = setTimeout(() => {
144
- this.emitTimeoutId = null;
145
- this.contentChanged.emit(value);
146
- }, d);
147
- }
148
- else {
149
- this.contentChanged.emit(value);
150
- }
151
- }
152
- clearPendingEmission() {
153
- if (this.emitTimeoutId) {
154
- clearTimeout(this.emitTimeoutId);
155
- this.emitTimeoutId = null;
156
- }
157
- }
158
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: InlineTextEdit, deps: [], target: i0.ɵɵFactoryTarget.Component });
159
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.7", type: InlineTextEdit, isStandalone: true, selector: "ngs-inline-text-edit,[ngs-inline-text-edit]", inputs: { enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { contentChanged: "contentChanged" }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "keydown.enter": "onEnter($event)", "keydown.escape": "onEscape()", "paste": "onPaste($event)", "input": "onInput()" }, properties: { "attr.contenteditable": "isContentEditable", "attr.data-placeholder": "placeholder()", "class.editing": "isEditing()", "class.focused": "isFocused()" }, classAttribute: "ngs-inline-text-edit" }, ngImport: i0, template: "<ng-content/>\n", styles: [":host{display:block;padding:4px 10px;position:relative;transition:border-color .15s cubic-bezier(.25,.8,.25,1);border:var(--ngs-form-field-outlined-outline-width, 1px) solid transparent;outline:none;border-radius:var(--ngs-field-radius);cursor:text;margin-left:-10px;margin-right:-10px;word-wrap:break-word}:host:hover{border-color:var(--ngs-form-field-outlined-outline-color, var(--ngs-color-outline))}:host.editing{color:var(--ngs-form-field-outlined-input-text-color, var(--ngs-color-on-surface));caret-color:var(--ngs-form-field-outlined-caret-color, var(--ngs-color-primary))}:host.focused{border-color:var(--ngs-color-primary);outline:1px solid var(--ngs-color-primary)}:host:empty:before{position:absolute;content:attr(data-placeholder);inset:0;z-index:0;color:var(--ngs-color-neutral-500);font-size:inherit;padding:inherit;word-wrap:break-word}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
160
- }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: InlineTextEdit, decorators: [{
162
- type: Component,
163
- args: [{ selector: 'ngs-inline-text-edit,[ngs-inline-text-edit]', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
164
- 'class': 'ngs-inline-text-edit',
165
- '[attr.contenteditable]': 'isContentEditable',
166
- '[attr.data-placeholder]': 'placeholder()',
167
- '[class.editing]': 'isEditing()',
168
- '[class.focused]': 'isFocused()',
169
- '(focus)': 'onFocus()',
170
- '(blur)': 'onBlur()',
171
- '(keydown.enter)': 'onEnter($event)',
172
- '(keydown.escape)': 'onEscape()',
173
- '(paste)': 'onPaste($event)',
174
- '(input)': 'onInput()',
175
- }, template: "<ng-content/>\n", styles: [":host{display:block;padding:4px 10px;position:relative;transition:border-color .15s cubic-bezier(.25,.8,.25,1);border:var(--ngs-form-field-outlined-outline-width, 1px) solid transparent;outline:none;border-radius:var(--ngs-field-radius);cursor:text;margin-left:-10px;margin-right:-10px;word-wrap:break-word}:host:hover{border-color:var(--ngs-form-field-outlined-outline-color, var(--ngs-color-outline))}:host.editing{color:var(--ngs-form-field-outlined-input-text-color, var(--ngs-color-on-surface));caret-color:var(--ngs-form-field-outlined-caret-color, var(--ngs-color-primary))}:host.focused{border-color:var(--ngs-color-primary);outline:1px solid var(--ngs-color-primary)}:host:empty:before{position:absolute;content:attr(data-placeholder);inset:0;z-index:0;color:var(--ngs-color-neutral-500);font-size:inherit;padding:inherit;word-wrap:break-word}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
176
- }], ctorParameters: () => [], propDecorators: { enabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "enabled", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], contentChanged: [{ type: i0.Output, args: ["contentChanged"] }] } });
177
-
178
- /**
179
- * Generated bundle index. Do not edit.
180
- */
181
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DOCUMENT, ElementRef, PLATFORM_ID, Renderer2, afterNextRender, inject, input, numberAttribute, output, signal } from "@angular/core";
3
+ import { isPlatformServer } from "@angular/common";
4
+ var InlineTextEdit = class InlineTextEdit {
5
+ platformId = inject(PLATFORM_ID);
6
+ document = inject(DOCUMENT);
7
+ enabled = input(true, ...ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []);
8
+ placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
9
+ delay = input(0, {
10
+ ...ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {},
11
+ transform: numberAttribute
12
+ });
13
+ contentChanged = output();
14
+ isEditing = signal(false, ...ngDevMode ? [{ debugName: "isEditing" }] : /* istanbul ignore next */ []);
15
+ isFocused = signal(false, ...ngDevMode ? [{ debugName: "isFocused" }] : /* istanbul ignore next */ []);
16
+ previousValue = "";
17
+ minHeightSet = false;
18
+ elementRef = inject(ElementRef);
19
+ renderer = inject(Renderer2);
20
+ emitTimeoutId = null;
21
+ constructor() {
22
+ afterNextRender(() => {
23
+ this.setInitialMinHeight();
24
+ });
25
+ }
26
+ ngAfterViewInit() {
27
+ this.previousValue = this.elementRef.nativeElement.textContent;
28
+ }
29
+ get isContentEditable() {
30
+ return true;
31
+ }
32
+ ngAfterContentChecked() {
33
+ if (isPlatformServer(this.platformId)) return;
34
+ this.setInitialMinHeight();
35
+ }
36
+ ngOnDestroy() {
37
+ this.clearPendingEmission();
38
+ }
39
+ setInitialMinHeight() {
40
+ if (this.minHeightSet) return;
41
+ const el = this.elementRef.nativeElement;
42
+ let height = el.getBoundingClientRect().height;
43
+ if (!height || height < 1) {
44
+ const cs = getComputedStyle(el);
45
+ let lh = parseFloat(cs.lineHeight);
46
+ if (isNaN(lh) || lh <= 0) lh = (parseFloat(cs.fontSize) || 16) * 1.5;
47
+ height = lh;
48
+ }
49
+ if (height && height > 0) {
50
+ this.renderer.setStyle(el, "min-height", `${Math.ceil(height)}px`);
51
+ this.minHeightSet = true;
52
+ }
53
+ }
54
+ onFocus() {
55
+ this.isFocused.set(true);
56
+ }
57
+ onBlur() {
58
+ this.isFocused.set(false);
59
+ this.finishEdit();
60
+ }
61
+ onEnter(event) {
62
+ event.preventDefault();
63
+ this.finishEdit();
64
+ }
65
+ onEscape() {
66
+ this.cancelEdit();
67
+ }
68
+ onPaste(event) {
69
+ event.preventDefault();
70
+ const text = event.clipboardData?.getData("text/plain") ?? "";
71
+ this.document.execCommand("insertText", false, text);
72
+ }
73
+ onInput() {
74
+ this.isEditing.set(true);
75
+ const el = this.elementRef.nativeElement;
76
+ const html = (el.innerHTML ?? "").trim().toLowerCase();
77
+ if (((el.textContent ?? "").trim().length === 0 || html === "" || html === "<br>" || html === "<br/>" || html === "<div><br></div>") && el.innerHTML !== "") el.innerHTML = "";
78
+ }
79
+ finishEdit() {
80
+ if (!this.isEditing()) return;
81
+ const newValue = this.elementRef.nativeElement.textContent?.trim() ?? "";
82
+ if (newValue !== this.previousValue) {
83
+ this.previousValue = newValue;
84
+ this.emitWithDelay(newValue);
85
+ }
86
+ this.isEditing.set(false);
87
+ }
88
+ cancelEdit() {
89
+ if (!this.isEditing()) return;
90
+ this.elementRef.nativeElement.textContent = this.previousValue;
91
+ this.placeCaretAtEnd();
92
+ this.isEditing.set(false);
93
+ this.clearPendingEmission();
94
+ }
95
+ placeCaretAtEnd() {
96
+ if (isPlatformServer(this.platformId)) return;
97
+ const el = this.elementRef.nativeElement;
98
+ el.focus();
99
+ const selection = this.document.getSelection?.();
100
+ if (!selection) return;
101
+ const range = this.document.createRange();
102
+ range.selectNodeContents(el);
103
+ range.collapse(false);
104
+ selection.removeAllRanges();
105
+ selection.addRange(range);
106
+ }
107
+ emitWithDelay(value) {
108
+ const d = this.delay();
109
+ this.clearPendingEmission();
110
+ if (d > 0) this.emitTimeoutId = setTimeout(() => {
111
+ this.emitTimeoutId = null;
112
+ this.contentChanged.emit(value);
113
+ }, d);
114
+ else this.contentChanged.emit(value);
115
+ }
116
+ clearPendingEmission() {
117
+ if (this.emitTimeoutId) {
118
+ clearTimeout(this.emitTimeoutId);
119
+ this.emitTimeoutId = null;
120
+ }
121
+ }
122
+ static ɵfac = i0.ɵɵngDeclareFactory({
123
+ minVersion: "12.0.0",
124
+ version: "22.3.0",
125
+ ngImport: i0,
126
+ type: InlineTextEdit,
127
+ deps: [],
128
+ target: i0.ɵɵFactoryTarget.Component
129
+ });
130
+ static ɵcmp = i0.ɵɵngDeclareComponent({
131
+ minVersion: "17.1.0",
132
+ version: "22.3.0",
133
+ type: InlineTextEdit,
134
+ isStandalone: true,
135
+ selector: "ngs-inline-text-edit,[ngs-inline-text-edit]",
136
+ inputs: {
137
+ enabled: {
138
+ classPropertyName: "enabled",
139
+ publicName: "enabled",
140
+ isSignal: true,
141
+ isRequired: false,
142
+ transformFunction: null
143
+ },
144
+ placeholder: {
145
+ classPropertyName: "placeholder",
146
+ publicName: "placeholder",
147
+ isSignal: true,
148
+ isRequired: false,
149
+ transformFunction: null
150
+ },
151
+ delay: {
152
+ classPropertyName: "delay",
153
+ publicName: "delay",
154
+ isSignal: true,
155
+ isRequired: false,
156
+ transformFunction: null
157
+ }
158
+ },
159
+ outputs: { contentChanged: "contentChanged" },
160
+ host: {
161
+ listeners: {
162
+ "focus": "onFocus()",
163
+ "blur": "onBlur()",
164
+ "keydown.enter": "onEnter($event)",
165
+ "keydown.escape": "onEscape()",
166
+ "paste": "onPaste($event)",
167
+ "input": "onInput()"
168
+ },
169
+ properties: {
170
+ "attr.contenteditable": "isContentEditable",
171
+ "attr.data-placeholder": "placeholder()",
172
+ "class.editing": "isEditing()",
173
+ "class.focused": "isFocused()"
174
+ },
175
+ classAttribute: "ngs-inline-text-edit"
176
+ },
177
+ ngImport: i0,
178
+ template: "<ng-content/>\n",
179
+ styles: [":host{display:block;padding:4px 10px;position:relative;transition:border-color .15s cubic-bezier(.25,.8,.25,1);border:var(--ngs-form-field-outlined-outline-width, 1px) solid transparent;outline:none;border-radius:var(--ngs-field-radius);cursor:text;margin-left:-10px;margin-right:-10px;word-wrap:break-word}:host:hover{border-color:var(--ngs-form-field-outlined-outline-color, var(--ngs-color-outline))}:host.editing{color:var(--ngs-form-field-outlined-input-text-color, var(--ngs-color-on-surface));caret-color:var(--ngs-form-field-outlined-caret-color, var(--ngs-color-primary))}:host.focused{border-color:var(--ngs-color-primary);outline:1px solid var(--ngs-color-primary)}:host:empty:before{position:absolute;content:attr(data-placeholder);inset:0;z-index:0;color:var(--ngs-color-neutral-500);font-size:inherit;padding:inherit;word-wrap:break-word}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
180
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
181
+ });
182
+ };
183
+ i0.ɵɵngDeclareClassMetadata({
184
+ minVersion: "12.0.0",
185
+ version: "22.3.0",
186
+ ngImport: i0,
187
+ type: InlineTextEdit,
188
+ decorators: [{
189
+ type: Component,
190
+ args: [{
191
+ selector: "ngs-inline-text-edit,[ngs-inline-text-edit]",
192
+ standalone: true,
193
+ changeDetection: ChangeDetectionStrategy.OnPush,
194
+ host: {
195
+ "class": "ngs-inline-text-edit",
196
+ "[attr.contenteditable]": "isContentEditable",
197
+ "[attr.data-placeholder]": "placeholder()",
198
+ "[class.editing]": "isEditing()",
199
+ "[class.focused]": "isFocused()",
200
+ "(focus)": "onFocus()",
201
+ "(blur)": "onBlur()",
202
+ "(keydown.enter)": "onEnter($event)",
203
+ "(keydown.escape)": "onEscape()",
204
+ "(paste)": "onPaste($event)",
205
+ "(input)": "onInput()"
206
+ },
207
+ template: "<ng-content/>\n",
208
+ styles: [":host{display:block;padding:4px 10px;position:relative;transition:border-color .15s cubic-bezier(.25,.8,.25,1);border:var(--ngs-form-field-outlined-outline-width, 1px) solid transparent;outline:none;border-radius:var(--ngs-field-radius);cursor:text;margin-left:-10px;margin-right:-10px;word-wrap:break-word}:host:hover{border-color:var(--ngs-form-field-outlined-outline-color, var(--ngs-color-outline))}:host.editing{color:var(--ngs-form-field-outlined-input-text-color, var(--ngs-color-on-surface));caret-color:var(--ngs-form-field-outlined-caret-color, var(--ngs-color-primary))}:host.focused{border-color:var(--ngs-color-primary);outline:1px solid var(--ngs-color-primary)}:host:empty:before{position:absolute;content:attr(data-placeholder);inset:0;z-index:0;color:var(--ngs-color-neutral-500);font-size:inherit;padding:inherit;word-wrap:break-word}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
209
+ }]
210
+ }],
211
+ ctorParameters: () => [],
212
+ propDecorators: {
213
+ enabled: [{
214
+ type: i0.Input,
215
+ args: [{
216
+ isSignal: true,
217
+ alias: "enabled",
218
+ required: false
219
+ }]
220
+ }],
221
+ placeholder: [{
222
+ type: i0.Input,
223
+ args: [{
224
+ isSignal: true,
225
+ alias: "placeholder",
226
+ required: false
227
+ }]
228
+ }],
229
+ delay: [{
230
+ type: i0.Input,
231
+ args: [{
232
+ isSignal: true,
233
+ alias: "delay",
234
+ required: false
235
+ }]
236
+ }],
237
+ contentChanged: [{
238
+ type: i0.Output,
239
+ args: ["contentChanged"]
240
+ }]
241
+ }
242
+ });
182
243
  export { InlineTextEdit };
183
- //# sourceMappingURL=ngstarter-ui-components-inline-text-edit.mjs.map
244
+
245
+ //# sourceMappingURL=ngstarter-ui-components-inline-text-edit.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-inline-text-edit.mjs","sources":["../../../projects/components/inline-text-edit/src/inline-text-edit/inline-text-edit.ts","../../../projects/components/inline-text-edit/src/inline-text-edit/inline-text-edit.html","../../../projects/components/inline-text-edit/ngstarter-ui-components-inline-text-edit.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n input,\n output,\n signal,\n Renderer2,\n PLATFORM_ID,\n AfterContentChecked,\n OnDestroy,\n afterNextRender, DOCUMENT, numberAttribute, AfterViewInit,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'ngs-inline-text-edit,[ngs-inline-text-edit]',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './inline-text-edit.html',\n styleUrl: './inline-text-edit.scss',\n host: {\n 'class': 'ngs-inline-text-edit',\n '[attr.contenteditable]': 'isContentEditable',\n '[attr.data-placeholder]': 'placeholder()',\n '[class.editing]': 'isEditing()',\n '[class.focused]': 'isFocused()',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(keydown.enter)': 'onEnter($event)',\n '(keydown.escape)': 'onEscape()',\n '(paste)': 'onPaste($event)',\n '(input)': 'onInput()',\n },\n})\nexport class InlineTextEdit implements AfterViewInit, AfterContentChecked, OnDestroy {\n private platformId = inject(PLATFORM_ID);\n private document = inject(DOCUMENT);\n\n enabled = input(true);\n placeholder = input('');\n delay = input(0, {\n transform: numberAttribute\n });\n\n readonly contentChanged = output<string>();\n\n isEditing = signal(false);\n isFocused = signal(false);\n\n private previousValue = '';\n private minHeightSet = false;\n private elementRef = inject(ElementRef<HTMLElement>);\n private renderer = inject(Renderer2);\n private emitTimeoutId: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n afterNextRender(() => {\n this.setInitialMinHeight();\n });\n }\n\n ngAfterViewInit() {\n this.previousValue = this.elementRef.nativeElement.textContent;\n }\n\n get isContentEditable() {\n return true;\n }\n\n ngAfterContentChecked() {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n this.setInitialMinHeight();\n }\n\n ngOnDestroy(): void {\n this.clearPendingEmission();\n }\n\n private setInitialMinHeight(): void {\n if (this.minHeightSet) {\n return;\n }\n\n const el = this.elementRef.nativeElement;\n let height = el.getBoundingClientRect().height;\n\n if (!height || height < 1) {\n const cs = getComputedStyle(el);\n let lh = parseFloat(cs.lineHeight);\n\n if (isNaN(lh) || lh <= 0) {\n const fs = parseFloat(cs.fontSize) || 16;\n lh = fs * 1.5;\n }\n\n height = lh;\n }\n\n if (height && height > 0) {\n this.renderer.setStyle(el, 'min-height', `${Math.ceil(height)}px`);\n this.minHeightSet = true;\n }\n }\n\n onFocus(): void {\n this.isFocused.set(true);\n }\n\n onBlur(): void {\n this.isFocused.set(false);\n this.finishEdit();\n }\n\n onEnter(event: Event): void {\n event.preventDefault();\n this.finishEdit();\n }\n\n onEscape(): void {\n this.cancelEdit();\n }\n\n onPaste(event: ClipboardEvent): void {\n event.preventDefault();\n const text = event.clipboardData?.getData('text/plain') ?? '';\n this.document.execCommand('insertText', false, text);\n }\n\n onInput(): void {\n this.isEditing.set(true);\n // Track live changes and normalize empty content.\n // Browsers may insert a <br> (or wrappers like <div><br></div>) in empty contenteditable elements.\n const el = this.elementRef.nativeElement;\n const html = (el.innerHTML ?? '').trim().toLowerCase();\n const text = (el.textContent ?? '').trim();\n\n const isEffectivelyEmpty =\n text.length === 0 ||\n html === '' ||\n html === '<br>' ||\n html === '<br/>' ||\n html === '<div><br></div>';\n\n if (isEffectivelyEmpty && el.innerHTML !== '') {\n // Clear to a truly empty state so placeholders and styling work correctly.\n el.innerHTML = '';\n }\n }\n\n private finishEdit(): void {\n if (!this.isEditing()) {\n return;\n }\n\n const newValue = this.elementRef.nativeElement.textContent?.trim() ?? '';\n\n if (newValue !== this.previousValue) {\n this.previousValue = newValue;\n this.emitWithDelay(newValue);\n }\n\n this.isEditing.set(false);\n }\n\n private cancelEdit(): void {\n if (!this.isEditing()) {\n return;\n }\n\n this.elementRef.nativeElement.textContent = this.previousValue;\n // Keep focus and move caret to the end of the restored content for better UX.\n this.placeCaretAtEnd();\n this.isEditing.set(false);\n // Cancel any pending emission since the edit was canceled.\n this.clearPendingEmission();\n }\n\n private placeCaretAtEnd(): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n const el = this.elementRef.nativeElement;\n // Ensure the host is focused so caret positioning is visible.\n el.focus();\n\n const selection = this.document.getSelection?.();\n if (!selection) {\n return;\n }\n\n const range = this.document.createRange();\n range.selectNodeContents(el);\n range.collapse(false); // collapse to end\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n private emitWithDelay(value: string): void {\n const d = this.delay();\n // Always clear a previous scheduled emission to ensure only the latest value is emitted\n this.clearPendingEmission();\n\n if (d > 0) {\n this.emitTimeoutId = setTimeout(() => {\n this.emitTimeoutId = null;\n this.contentChanged.emit(value);\n }, d);\n } else {\n this.contentChanged.emit(value);\n }\n }\n\n private clearPendingEmission(): void {\n if (this.emitTimeoutId) {\n clearTimeout(this.emitTimeoutId);\n this.emitTimeoutId = null;\n }\n }\n}\n","<ng-content/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAoCa,cAAc,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;IAEnC,OAAO,GAAG,KAAK,CAAC,IAAI;gFAAC;IACrB,WAAW,GAAG,KAAK,CAAC,EAAE;oFAAC;IACvB,KAAK,GAAG,KAAK,CAAC,CAAC,6EACb,SAAS,EAAE,eAAe,EAAA,CAC1B;IAEO,cAAc,GAAG,MAAM,EAAU;IAE1C,SAAS,GAAG,MAAM,CAAC,KAAK;kFAAC;IACzB,SAAS,GAAG,MAAM,CAAC,KAAK;kFAAC;IAEjB,aAAa,GAAG,EAAE;IAClB,YAAY,GAAG,KAAK;AACpB,IAAA,UAAU,GAAG,MAAM,EAAC,UAAuB,EAAC;AAC5C,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;IAC5B,aAAa,GAAyC,IAAI;AAElE,IAAA,WAAA,GAAA;QACE,eAAe,CAAC,MAAK;YACnB,IAAI,CAAC,mBAAmB,EAAE;AAC5B,QAAA,CAAC,CAAC;IACJ;IAEA,eAAe,GAAA;QACb,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW;IAChE;AAEA,IAAA,IAAI,iBAAiB,GAAA;AACnB,QAAA,OAAO,IAAI;IACb;IAEA,qBAAqB,GAAA;AACnB,QAAA,IAAI,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;YACrC;QACF;QAEA,IAAI,CAAC,mBAAmB,EAAE;IAC5B;IAEA,WAAW,GAAA;QACT,IAAI,CAAC,oBAAoB,EAAE;IAC7B;IAEQ,mBAAmB,GAAA;A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-inline-text-edit.mjs","names":[],"sources":["../../../projects/components/inline-text-edit/src/inline-text-edit/inline-text-edit.ts","../../../projects/components/inline-text-edit/src/inline-text-edit/inline-text-edit.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n input,\n output,\n signal,\n Renderer2,\n PLATFORM_ID,\n AfterContentChecked,\n OnDestroy,\n afterNextRender, DOCUMENT, numberAttribute, AfterViewInit,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\n@Component({\n selector: 'ngs-inline-text-edit,[ngs-inline-text-edit]',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './inline-text-edit.html',\n styleUrl: './inline-text-edit.scss',\n host: {\n 'class': 'ngs-inline-text-edit',\n '[attr.contenteditable]': 'isContentEditable',\n '[attr.data-placeholder]': 'placeholder()',\n '[class.editing]': 'isEditing()',\n '[class.focused]': 'isFocused()',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(keydown.enter)': 'onEnter($event)',\n '(keydown.escape)': 'onEscape()',\n '(paste)': 'onPaste($event)',\n '(input)': 'onInput()',\n },\n})\nexport class InlineTextEdit implements AfterViewInit, AfterContentChecked, OnDestroy {\n private platformId = inject(PLATFORM_ID);\n private document = inject(DOCUMENT);\n\n enabled = input(true);\n placeholder = input('');\n delay = input(0, {\n transform: numberAttribute\n });\n\n readonly contentChanged = output<string>();\n\n isEditing = signal(false);\n isFocused = signal(false);\n\n private previousValue = '';\n private minHeightSet = false;\n private elementRef = inject(ElementRef<HTMLElement>);\n private renderer = inject(Renderer2);\n private emitTimeoutId: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n afterNextRender(() => {\n this.setInitialMinHeight();\n });\n }\n\n ngAfterViewInit() {\n this.previousValue = this.elementRef.nativeElement.textContent;\n }\n\n get isContentEditable() {\n return true;\n }\n\n ngAfterContentChecked() {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n this.setInitialMinHeight();\n }\n\n ngOnDestroy(): void {\n this.clearPendingEmission();\n }\n\n private setInitialMinHeight(): void {\n if (this.minHeightSet) {\n return;\n }\n\n const el = this.elementRef.nativeElement;\n let height = el.getBoundingClientRect().height;\n\n if (!height || height < 1) {\n const cs = getComputedStyle(el);\n let lh = parseFloat(cs.lineHeight);\n\n if (isNaN(lh) || lh <= 0) {\n const fs = parseFloat(cs.fontSize) || 16;\n lh = fs * 1.5;\n }\n\n height = lh;\n }\n\n if (height && height > 0) {\n this.renderer.setStyle(el, 'min-height', `${Math.ceil(height)}px`);\n this.minHeightSet = true;\n }\n }\n\n onFocus(): void {\n this.isFocused.set(true);\n }\n\n onBlur(): void {\n this.isFocused.set(false);\n this.finishEdit();\n }\n\n onEnter(event: Event): void {\n event.preventDefault();\n this.finishEdit();\n }\n\n onEscape(): void {\n this.cancelEdit();\n }\n\n onPaste(event: ClipboardEvent): void {\n event.preventDefault();\n const text = event.clipboardData?.getData('text/plain') ?? '';\n this.document.execCommand('insertText', false, text);\n }\n\n onInput(): void {\n this.isEditing.set(true);\n // Track live changes and normalize empty content.\n // Browsers may insert a <br> (or wrappers like <div><br></div>) in empty contenteditable elements.\n const el = this.elementRef.nativeElement;\n const html = (el.innerHTML ?? '').trim().toLowerCase();\n const text = (el.textContent ?? '').trim();\n\n const isEffectivelyEmpty =\n text.length === 0 ||\n html === '' ||\n html === '<br>' ||\n html === '<br/>' ||\n html === '<div><br></div>';\n\n if (isEffectivelyEmpty && el.innerHTML !== '') {\n // Clear to a truly empty state so placeholders and styling work correctly.\n el.innerHTML = '';\n }\n }\n\n private finishEdit(): void {\n if (!this.isEditing()) {\n return;\n }\n\n const newValue = this.elementRef.nativeElement.textContent?.trim() ?? '';\n\n if (newValue !== this.previousValue) {\n this.previousValue = newValue;\n this.emitWithDelay(newValue);\n }\n\n this.isEditing.set(false);\n }\n\n private cancelEdit(): void {\n if (!this.isEditing()) {\n return;\n }\n\n this.elementRef.nativeElement.textContent = this.previousValue;\n // Keep focus and move caret to the end of the restored content for better UX.\n this.placeCaretAtEnd();\n this.isEditing.set(false);\n // Cancel any pending emission since the edit was canceled.\n this.clearPendingEmission();\n }\n\n private placeCaretAtEnd(): void {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n\n const el = this.elementRef.nativeElement;\n // Ensure the host is focused so caret positioning is visible.\n el.focus();\n\n const selection = this.document.getSelection?.();\n if (!selection) {\n return;\n }\n\n const range = this.document.createRange();\n range.selectNodeContents(el);\n range.collapse(false); // collapse to end\n selection.removeAllRanges();\n selection.addRange(range);\n }\n\n private emitWithDelay(value: string): void {\n const d = this.delay();\n // Always clear a previous scheduled emission to ensure only the latest value is emitted\n this.clearPendingEmission();\n\n if (d > 0) {\n this.emitTimeoutId = setTimeout(() => {\n this.emitTimeoutId = null;\n this.contentChanged.emit(value);\n }, d);\n } else {\n this.contentChanged.emit(value);\n }\n }\n\n private clearPendingEmission(): void {\n if (this.emitTimeoutId) {\n clearTimeout(this.emitTimeoutId);\n this.emitTimeoutId = null;\n }\n }\n}\n","<ng-content/>\n"],"mappings":";;;AAoCA,IAAa,iBAAb,MAAa,eAAc;CACjB,aAAa,OAAO,WAAW;CAC/B,WAAW,OAAO,QAAQ;CAElC,UAAU,MAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACrB,cAAc,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,QAAQ,MAAM,GAAC;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EACb,WAAW;CAAe,CAAA;CAGnB,iBAAiB,OAAM;CAEhC,YAAY,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACzB,YAAY,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAEjB,gBAAgB;CAChB,eAAe;CACf,aA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