@ngstarter-ui/components 1.0.21

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 (415) hide show
  1. package/README.md +0 -0
  2. package/fesm2022/ngstarter-ui-components-action-required.mjs +42 -0
  3. package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -0
  4. package/fesm2022/ngstarter-ui-components-alert.mjs +132 -0
  5. package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -0
  6. package/fesm2022/ngstarter-ui-components-announcement.mjs +86 -0
  7. package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -0
  8. package/fesm2022/ngstarter-ui-components-autocomplete.mjs +360 -0
  9. package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -0
  10. package/fesm2022/ngstarter-ui-components-avatar.mjs +235 -0
  11. package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -0
  12. package/fesm2022/ngstarter-ui-components-badge.mjs +97 -0
  13. package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -0
  14. package/fesm2022/ngstarter-ui-components-block-loader.mjs +48 -0
  15. package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -0
  16. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +327 -0
  17. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -0
  18. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +209 -0
  19. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -0
  20. package/fesm2022/ngstarter-ui-components-button-toggle.mjs +175 -0
  21. package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -0
  22. package/fesm2022/ngstarter-ui-components-button.mjs +70 -0
  23. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -0
  24. package/fesm2022/ngstarter-ui-components-card-overlay.mjs +49 -0
  25. package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -0
  26. package/fesm2022/ngstarter-ui-components-card.mjs +199 -0
  27. package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -0
  28. package/fesm2022/ngstarter-ui-components-carousel.mjs +614 -0
  29. package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -0
  30. package/fesm2022/ngstarter-ui-components-checkbox.mjs +300 -0
  31. package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -0
  32. package/fesm2022/ngstarter-ui-components-chips.mjs +589 -0
  33. package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -0
  34. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +347 -0
  35. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -0
  36. package/fesm2022/ngstarter-ui-components-color-picker.mjs +713 -0
  37. package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -0
  38. package/fesm2022/ngstarter-ui-components-color-scheme.mjs +106 -0
  39. package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -0
  40. package/fesm2022/ngstarter-ui-components-color-switcher.mjs +72 -0
  41. package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -0
  42. package/fesm2022/ngstarter-ui-components-command-bar.mjs +57 -0
  43. package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -0
  44. package/fesm2022/ngstarter-ui-components-comment-editor.mjs +1024 -0
  45. package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -0
  46. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +177 -0
  47. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -0
  48. package/fesm2022/ngstarter-ui-components-confirm.mjs +85 -0
  49. package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -0
  50. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-Bk6QTli8.mjs +173 -0
  51. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-Bk6QTli8.mjs.map +1 -0
  52. package/fesm2022/ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs +124 -0
  53. package/fesm2022/ngstarter-ui-components-content-editor-content-editor-content-editable.directive-Bvfa2dqh.mjs.map +1 -0
  54. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +99 -0
  55. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +1 -0
  56. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-C_iRTCPH.mjs +33 -0
  57. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-C_iRTCPH.mjs.map +1 -0
  58. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-BbkC_t86.mjs +354 -0
  59. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-BbkC_t86.mjs.map +1 -0
  60. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-D9_CxTY1.mjs +114 -0
  61. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-D9_CxTY1.mjs.map +1 -0
  62. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B4zJyUg1.mjs +146 -0
  63. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-B4zJyUg1.mjs.map +1 -0
  64. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-Cv6wx5Xe.mjs +215 -0
  65. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-Cv6wx5Xe.mjs.map +1 -0
  66. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-1Zi2nAX5.mjs +2548 -0
  67. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-1Zi2nAX5.mjs.map +1 -0
  68. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-C9bQvDYU.mjs +110 -0
  69. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-C9bQvDYU.mjs.map +1 -0
  70. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BbHds2r2.mjs +141 -0
  71. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-BbHds2r2.mjs.map +1 -0
  72. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-DlDh7Fnn.mjs +1604 -0
  73. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-DlDh7Fnn.mjs.map +1 -0
  74. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-m4DTihP2.mjs +175 -0
  75. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-m4DTihP2.mjs.map +1 -0
  76. package/fesm2022/ngstarter-ui-components-content-editor.mjs +2 -0
  77. package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -0
  78. package/fesm2022/ngstarter-ui-components-content-fade.mjs +35 -0
  79. package/fesm2022/ngstarter-ui-components-content-fade.mjs.map +1 -0
  80. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +107 -0
  81. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -0
  82. package/fesm2022/ngstarter-ui-components-core.mjs +1330 -0
  83. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -0
  84. package/fesm2022/ngstarter-ui-components-country-select.mjs +489 -0
  85. package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -0
  86. package/fesm2022/ngstarter-ui-components-crop.mjs +183 -0
  87. package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -0
  88. package/fesm2022/ngstarter-ui-components-currency-select.mjs +397 -0
  89. package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -0
  90. package/fesm2022/ngstarter-ui-components-data-view.mjs +1494 -0
  91. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -0
  92. package/fesm2022/ngstarter-ui-components-date-format-select.mjs +154 -0
  93. package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -0
  94. package/fesm2022/ngstarter-ui-components-datepicker.mjs +1159 -0
  95. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -0
  96. package/fesm2022/ngstarter-ui-components-dialog.mjs +357 -0
  97. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -0
  98. package/fesm2022/ngstarter-ui-components-divider.mjs +42 -0
  99. package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -0
  100. package/fesm2022/ngstarter-ui-components-drawer.mjs +132 -0
  101. package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -0
  102. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +245 -0
  103. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -0
  104. package/fesm2022/ngstarter-ui-components-empty-state.mjs +75 -0
  105. package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -0
  106. package/fesm2022/ngstarter-ui-components-expand.mjs +56 -0
  107. package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -0
  108. package/fesm2022/ngstarter-ui-components-expansion.mjs +193 -0
  109. package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -0
  110. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +333 -0
  111. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -0
  112. package/fesm2022/ngstarter-ui-components-form-field.mjs +230 -0
  113. package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -0
  114. package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BKQVlZHV.mjs +124 -0
  115. package/fesm2022/ngstarter-ui-components-form-renderer-autocomplete-many-field-BKQVlZHV.mjs.map +1 -0
  116. package/fesm2022/ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs +22 -0
  117. package/fesm2022/ngstarter-ui-components-form-renderer-checkbox-field-CoyKdvhV.mjs.map +1 -0
  118. package/fesm2022/ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs +44 -0
  119. package/fesm2022/ngstarter-ui-components-form-renderer-datepicker-field-Bzc0TPO9.mjs.map +1 -0
  120. package/fesm2022/ngstarter-ui-components-form-renderer-divider-content-CwGzDCZv.mjs +17 -0
  121. package/fesm2022/ngstarter-ui-components-form-renderer-divider-content-CwGzDCZv.mjs.map +1 -0
  122. package/fesm2022/ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs +17 -0
  123. package/fesm2022/ngstarter-ui-components-form-renderer-image-content-ICTwkZPa.mjs.map +1 -0
  124. package/fesm2022/ngstarter-ui-components-form-renderer-input-field-RYxi-Mpw.mjs +35 -0
  125. package/fesm2022/ngstarter-ui-components-form-renderer-input-field-RYxi-Mpw.mjs.map +1 -0
  126. package/fesm2022/ngstarter-ui-components-form-renderer-radio-group-field-Cv3AGpoq.mjs +38 -0
  127. package/fesm2022/ngstarter-ui-components-form-renderer-radio-group-field-Cv3AGpoq.mjs.map +1 -0
  128. package/fesm2022/ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs +39 -0
  129. package/fesm2022/ngstarter-ui-components-form-renderer-select-field-eLcwI-BY.mjs.map +1 -0
  130. package/fesm2022/ngstarter-ui-components-form-renderer-text-content-BjzH_M3-.mjs +24 -0
  131. package/fesm2022/ngstarter-ui-components-form-renderer-text-content-BjzH_M3-.mjs.map +1 -0
  132. package/fesm2022/ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs +37 -0
  133. package/fesm2022/ngstarter-ui-components-form-renderer-textarea-field-4zH7FTQ1.mjs.map +1 -0
  134. package/fesm2022/ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs +35 -0
  135. package/fesm2022/ngstarter-ui-components-form-renderer-timezone-field-BpH65Hd-.mjs.map +1 -0
  136. package/fesm2022/ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs +22 -0
  137. package/fesm2022/ngstarter-ui-components-form-renderer-toggle-field-iyqUrWxt.mjs.map +1 -0
  138. package/fesm2022/ngstarter-ui-components-form-renderer.mjs +317 -0
  139. package/fesm2022/ngstarter-ui-components-form-renderer.mjs.map +1 -0
  140. package/fesm2022/ngstarter-ui-components-gauge.mjs +44 -0
  141. package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -0
  142. package/fesm2022/ngstarter-ui-components-grid.mjs +78 -0
  143. package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -0
  144. package/fesm2022/ngstarter-ui-components-guided-tour.mjs +736 -0
  145. package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -0
  146. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +192 -0
  147. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -0
  148. package/fesm2022/ngstarter-ui-components-icon.mjs +61 -0
  149. package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -0
  150. package/fesm2022/ngstarter-ui-components-image-designer.mjs +4016 -0
  151. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -0
  152. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +20 -0
  153. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -0
  154. package/fesm2022/ngstarter-ui-components-image-resizer.mjs +151 -0
  155. package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -0
  156. package/fesm2022/ngstarter-ui-components-image-viewer.mjs +349 -0
  157. package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -0
  158. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +162 -0
  159. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -0
  160. package/fesm2022/ngstarter-ui-components-incidents.mjs +257 -0
  161. package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -0
  162. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +179 -0
  163. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -0
  164. package/fesm2022/ngstarter-ui-components-input-mask.mjs +180 -0
  165. package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -0
  166. package/fesm2022/ngstarter-ui-components-input-validator.mjs +24 -0
  167. package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -0
  168. package/fesm2022/ngstarter-ui-components-input.mjs +152 -0
  169. package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -0
  170. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +156 -0
  171. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -0
  172. package/fesm2022/ngstarter-ui-components-kbd.mjs +31 -0
  173. package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -0
  174. package/fesm2022/ngstarter-ui-components-layout.mjs +199 -0
  175. package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -0
  176. package/fesm2022/ngstarter-ui-components-list.mjs +279 -0
  177. package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -0
  178. package/fesm2022/ngstarter-ui-components-logo.mjs +51 -0
  179. package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -0
  180. package/fesm2022/ngstarter-ui-components-marquee.mjs +76 -0
  181. package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -0
  182. package/fesm2022/ngstarter-ui-components-menu.mjs +851 -0
  183. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -0
  184. package/fesm2022/ngstarter-ui-components-micro-chart.mjs +928 -0
  185. package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -0
  186. package/fesm2022/ngstarter-ui-components-navigation.mjs +439 -0
  187. package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -0
  188. package/fesm2022/ngstarter-ui-components-notifications.mjs +181 -0
  189. package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -0
  190. package/fesm2022/ngstarter-ui-components-number-input.mjs +293 -0
  191. package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -0
  192. package/fesm2022/ngstarter-ui-components-option.mjs +157 -0
  193. package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -0
  194. package/fesm2022/ngstarter-ui-components-overlay.mjs +112 -0
  195. package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -0
  196. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +77 -0
  197. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -0
  198. package/fesm2022/ngstarter-ui-components-paginator.mjs +297 -0
  199. package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -0
  200. package/fesm2022/ngstarter-ui-components-panel.mjs +123 -0
  201. package/fesm2022/ngstarter-ui-components-panel.mjs.map +1 -0
  202. package/fesm2022/ngstarter-ui-components-password-strength.mjs +335 -0
  203. package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -0
  204. package/fesm2022/ngstarter-ui-components-phone-input.mjs +651 -0
  205. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -0
  206. package/fesm2022/ngstarter-ui-components-pin-input.mjs +193 -0
  207. package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -0
  208. package/fesm2022/ngstarter-ui-components-popover.mjs +302 -0
  209. package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -0
  210. package/fesm2022/ngstarter-ui-components-progress-bar.mjs +68 -0
  211. package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -0
  212. package/fesm2022/ngstarter-ui-components-radio-card.mjs +102 -0
  213. package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -0
  214. package/fesm2022/ngstarter-ui-components-radio.mjs +147 -0
  215. package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -0
  216. package/fesm2022/ngstarter-ui-components-rail-nav.mjs +87 -0
  217. package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -0
  218. package/fesm2022/ngstarter-ui-components-resizable-container.mjs +74 -0
  219. package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -0
  220. package/fesm2022/ngstarter-ui-components-screen-loader.mjs +95 -0
  221. package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -0
  222. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +219 -0
  223. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -0
  224. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +459 -0
  225. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -0
  226. package/fesm2022/ngstarter-ui-components-segmented.mjs +218 -0
  227. package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -0
  228. package/fesm2022/ngstarter-ui-components-select.mjs +496 -0
  229. package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -0
  230. package/fesm2022/ngstarter-ui-components-side-panel.mjs +107 -0
  231. package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -0
  232. package/fesm2022/ngstarter-ui-components-sidebar.mjs +435 -0
  233. package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -0
  234. package/fesm2022/ngstarter-ui-components-sidenav.mjs +354 -0
  235. package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -0
  236. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +452 -0
  237. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -0
  238. package/fesm2022/ngstarter-ui-components-skeleton.mjs +22 -0
  239. package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -0
  240. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +93 -0
  241. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -0
  242. package/fesm2022/ngstarter-ui-components-slider.mjs +481 -0
  243. package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -0
  244. package/fesm2022/ngstarter-ui-components-snack-bar.mjs +354 -0
  245. package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -0
  246. package/fesm2022/ngstarter-ui-components-sort.mjs +140 -0
  247. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -0
  248. package/fesm2022/ngstarter-ui-components-spinner.mjs +75 -0
  249. package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -0
  250. package/fesm2022/ngstarter-ui-components-splash-screen.mjs +93 -0
  251. package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -0
  252. package/fesm2022/ngstarter-ui-components-split.mjs +948 -0
  253. package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -0
  254. package/fesm2022/ngstarter-ui-components-stepper.mjs +103 -0
  255. package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -0
  256. package/fesm2022/ngstarter-ui-components-suggestions.mjs +72 -0
  257. package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -0
  258. package/fesm2022/ngstarter-ui-components-tab-panel.mjs +265 -0
  259. package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -0
  260. package/fesm2022/ngstarter-ui-components-table.mjs +648 -0
  261. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -0
  262. package/fesm2022/ngstarter-ui-components-tabs.mjs +591 -0
  263. package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -0
  264. package/fesm2022/ngstarter-ui-components-text-editor.mjs +1012 -0
  265. package/fesm2022/ngstarter-ui-components-text-editor.mjs.map +1 -0
  266. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +212 -0
  267. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -0
  268. package/fesm2022/ngstarter-ui-components-tiles.mjs +634 -0
  269. package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -0
  270. package/fesm2022/ngstarter-ui-components-timeline.mjs +122 -0
  271. package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -0
  272. package/fesm2022/ngstarter-ui-components-timepicker.mjs +486 -0
  273. package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -0
  274. package/fesm2022/ngstarter-ui-components-timezone-select.mjs +371 -0
  275. package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -0
  276. package/fesm2022/ngstarter-ui-components-toolbar.mjs +299 -0
  277. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -0
  278. package/fesm2022/ngstarter-ui-components-tooltip.mjs +506 -0
  279. package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -0
  280. package/fesm2022/ngstarter-ui-components-tree.mjs +200 -0
  281. package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -0
  282. package/fesm2022/ngstarter-ui-components-upload.mjs +330 -0
  283. package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -0
  284. package/fesm2022/ngstarter-ui-components-video-player.mjs +516 -0
  285. package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -0
  286. package/fesm2022/ngstarter-ui-components-video-viewer.mjs +218 -0
  287. package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -0
  288. package/fesm2022/ngstarter-ui-components-visual-builder.mjs +18 -0
  289. package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -0
  290. package/fesm2022/ngstarter-ui-components.mjs +6 -0
  291. package/fesm2022/ngstarter-ui-components.mjs.map +1 -0
  292. package/package.json +535 -0
  293. package/styles/_common.scss +456 -0
  294. package/styles/_global.scss +91 -0
  295. package/styles/themes/default.scss +2 -0
  296. package/types/ngstarter-ui-components-action-required.d.ts +14 -0
  297. package/types/ngstarter-ui-components-alert.d.ts +50 -0
  298. package/types/ngstarter-ui-components-announcement.d.ts +59 -0
  299. package/types/ngstarter-ui-components-autocomplete.d.ts +83 -0
  300. package/types/ngstarter-ui-components-avatar.d.ts +69 -0
  301. package/types/ngstarter-ui-components-badge.d.ts +38 -0
  302. package/types/ngstarter-ui-components-block-loader.d.ts +21 -0
  303. package/types/ngstarter-ui-components-bottom-sheet.d.ts +149 -0
  304. package/types/ngstarter-ui-components-breadcrumbs.d.ts +104 -0
  305. package/types/ngstarter-ui-components-button-toggle.d.ts +54 -0
  306. package/types/ngstarter-ui-components-button.d.ts +27 -0
  307. package/types/ngstarter-ui-components-card-overlay.d.ts +20 -0
  308. package/types/ngstarter-ui-components-card.d.ts +85 -0
  309. package/types/ngstarter-ui-components-carousel.d.ts +76 -0
  310. package/types/ngstarter-ui-components-checkbox.d.ts +94 -0
  311. package/types/ngstarter-ui-components-chips.d.ts +189 -0
  312. package/types/ngstarter-ui-components-code-highlighter.d.ts +28 -0
  313. package/types/ngstarter-ui-components-color-picker.d.ts +92 -0
  314. package/types/ngstarter-ui-components-color-scheme.d.ts +44 -0
  315. package/types/ngstarter-ui-components-color-switcher.d.ts +26 -0
  316. package/types/ngstarter-ui-components-command-bar.d.ts +28 -0
  317. package/types/ngstarter-ui-components-comment-editor.d.ts +194 -0
  318. package/types/ngstarter-ui-components-comparison-slider.d.ts +42 -0
  319. package/types/ngstarter-ui-components-confirm.d.ts +34 -0
  320. package/types/ngstarter-ui-components-content-editor.d.ts +321 -0
  321. package/types/ngstarter-ui-components-content-fade.d.ts +17 -0
  322. package/types/ngstarter-ui-components-cookie-popup.d.ts +41 -0
  323. package/types/ngstarter-ui-components-core.d.ts +421 -0
  324. package/types/ngstarter-ui-components-country-select.d.ts +78 -0
  325. package/types/ngstarter-ui-components-crop.d.ts +59 -0
  326. package/types/ngstarter-ui-components-currency-select.d.ts +82 -0
  327. package/types/ngstarter-ui-components-data-view.d.ts +391 -0
  328. package/types/ngstarter-ui-components-date-format-select.d.ts +59 -0
  329. package/types/ngstarter-ui-components-datepicker.d.ts +384 -0
  330. package/types/ngstarter-ui-components-dialog.d.ts +115 -0
  331. package/types/ngstarter-ui-components-divider.d.ts +18 -0
  332. package/types/ngstarter-ui-components-drawer.d.ts +32 -0
  333. package/types/ngstarter-ui-components-emoji-picker.d.ts +49 -0
  334. package/types/ngstarter-ui-components-empty-state.d.ts +33 -0
  335. package/types/ngstarter-ui-components-expand.d.ts +26 -0
  336. package/types/ngstarter-ui-components-expansion.d.ts +68 -0
  337. package/types/ngstarter-ui-components-filter-builder.d.ts +106 -0
  338. package/types/ngstarter-ui-components-form-field.d.ts +107 -0
  339. package/types/ngstarter-ui-components-form-renderer.d.ts +121 -0
  340. package/types/ngstarter-ui-components-gauge.d.ts +21 -0
  341. package/types/ngstarter-ui-components-grid.d.ts +45 -0
  342. package/types/ngstarter-ui-components-guided-tour.d.ts +227 -0
  343. package/types/ngstarter-ui-components-headless-stepper.d.ts +65 -0
  344. package/types/ngstarter-ui-components-icon.d.ts +17 -0
  345. package/types/ngstarter-ui-components-image-designer.d.ts +357 -0
  346. package/types/ngstarter-ui-components-image-placeholder.d.ts +8 -0
  347. package/types/ngstarter-ui-components-image-resizer.d.ts +35 -0
  348. package/types/ngstarter-ui-components-image-viewer.d.ts +63 -0
  349. package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +34 -0
  350. package/types/ngstarter-ui-components-incidents.d.ts +119 -0
  351. package/types/ngstarter-ui-components-inline-text-edit.d.ts +39 -0
  352. package/types/ngstarter-ui-components-input-mask.d.ts +36 -0
  353. package/types/ngstarter-ui-components-input-validator.d.ts +5 -0
  354. package/types/ngstarter-ui-components-input.d.ts +53 -0
  355. package/types/ngstarter-ui-components-kanban-board.d.ts +68 -0
  356. package/types/ngstarter-ui-components-kbd.d.ts +13 -0
  357. package/types/ngstarter-ui-components-layout.d.ts +83 -0
  358. package/types/ngstarter-ui-components-list.d.ts +98 -0
  359. package/types/ngstarter-ui-components-logo.d.ts +26 -0
  360. package/types/ngstarter-ui-components-marquee.d.ts +27 -0
  361. package/types/ngstarter-ui-components-menu.d.ts +199 -0
  362. package/types/ngstarter-ui-components-micro-chart.d.ts +195 -0
  363. package/types/ngstarter-ui-components-navigation.d.ts +136 -0
  364. package/types/ngstarter-ui-components-notifications.d.ts +84 -0
  365. package/types/ngstarter-ui-components-number-input.d.ts +99 -0
  366. package/types/ngstarter-ui-components-option.d.ts +61 -0
  367. package/types/ngstarter-ui-components-overlay.d.ts +12 -0
  368. package/types/ngstarter-ui-components-page-loading-bar.d.ts +20 -0
  369. package/types/ngstarter-ui-components-paginator.d.ts +145 -0
  370. package/types/ngstarter-ui-components-panel.d.ts +59 -0
  371. package/types/ngstarter-ui-components-password-strength.d.ts +109 -0
  372. package/types/ngstarter-ui-components-phone-input.d.ts +103 -0
  373. package/types/ngstarter-ui-components-pin-input.d.ts +48 -0
  374. package/types/ngstarter-ui-components-popover.d.ts +94 -0
  375. package/types/ngstarter-ui-components-progress-bar.d.ts +30 -0
  376. package/types/ngstarter-ui-components-radio-card.d.ts +37 -0
  377. package/types/ngstarter-ui-components-radio.d.ts +45 -0
  378. package/types/ngstarter-ui-components-rail-nav.d.ts +36 -0
  379. package/types/ngstarter-ui-components-resizable-container.d.ts +25 -0
  380. package/types/ngstarter-ui-components-screen-loader.d.ts +34 -0
  381. package/types/ngstarter-ui-components-scroll-spy.d.ts +63 -0
  382. package/types/ngstarter-ui-components-scrollbar-area.d.ts +67 -0
  383. package/types/ngstarter-ui-components-segmented.d.ts +65 -0
  384. package/types/ngstarter-ui-components-select.d.ts +126 -0
  385. package/types/ngstarter-ui-components-side-panel.d.ts +42 -0
  386. package/types/ngstarter-ui-components-sidebar.d.ts +143 -0
  387. package/types/ngstarter-ui-components-sidenav.d.ts +86 -0
  388. package/types/ngstarter-ui-components-signature-pad.d.ts +49 -0
  389. package/types/ngstarter-ui-components-skeleton.d.ts +9 -0
  390. package/types/ngstarter-ui-components-slide-toggle.d.ts +41 -0
  391. package/types/ngstarter-ui-components-slider.d.ts +85 -0
  392. package/types/ngstarter-ui-components-snack-bar.d.ts +142 -0
  393. package/types/ngstarter-ui-components-sort.d.ts +66 -0
  394. package/types/ngstarter-ui-components-spinner.d.ts +28 -0
  395. package/types/ngstarter-ui-components-splash-screen.d.ts +31 -0
  396. package/types/ngstarter-ui-components-split.d.ts +210 -0
  397. package/types/ngstarter-ui-components-stepper.d.ts +44 -0
  398. package/types/ngstarter-ui-components-suggestions.d.ts +32 -0
  399. package/types/ngstarter-ui-components-tab-panel.d.ts +96 -0
  400. package/types/ngstarter-ui-components-table.d.ts +277 -0
  401. package/types/ngstarter-ui-components-tabs.d.ts +145 -0
  402. package/types/ngstarter-ui-components-text-editor.d.ts +191 -0
  403. package/types/ngstarter-ui-components-thumbnail-maker.d.ts +35 -0
  404. package/types/ngstarter-ui-components-tiles.d.ts +109 -0
  405. package/types/ngstarter-ui-components-timeline.d.ts +57 -0
  406. package/types/ngstarter-ui-components-timepicker.d.ts +115 -0
  407. package/types/ngstarter-ui-components-timezone-select.d.ts +75 -0
  408. package/types/ngstarter-ui-components-toolbar.d.ts +74 -0
  409. package/types/ngstarter-ui-components-tooltip.d.ts +52 -0
  410. package/types/ngstarter-ui-components-tree.d.ts +60 -0
  411. package/types/ngstarter-ui-components-upload.d.ts +134 -0
  412. package/types/ngstarter-ui-components-video-player.d.ts +67 -0
  413. package/types/ngstarter-ui-components-video-viewer.d.ts +98 -0
  414. package/types/ngstarter-ui-components-visual-builder.d.ts +8 -0
  415. package/types/ngstarter-ui-components.d.ts +2 -0
@@ -0,0 +1,1024 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, ApplicationRef, createComponent, ElementRef, input, Component, inject, PLATFORM_ID, DOCUMENT, ChangeDetectorRef, Injector, viewChild, booleanAttribute, output, forwardRef, Directive, DestroyRef } from '@angular/core';
3
+ import { NodeView, Node, mergeAttributes, Editor } from '@tiptap/core';
4
+ import Document from '@tiptap/extension-document';
5
+ import Paragraph from '@tiptap/extension-paragraph';
6
+ import Text from '@tiptap/extension-text';
7
+ import Bold from '@tiptap/extension-bold';
8
+ import Italic from '@tiptap/extension-italic';
9
+ import Strike from '@tiptap/extension-strike';
10
+ import CodeBlock from '@tiptap/extension-code-block';
11
+ import { Blockquote } from '@tiptap/extension-blockquote';
12
+ import BulletList from '@tiptap/extension-bullet-list';
13
+ import OrderedList from '@tiptap/extension-ordered-list';
14
+ import ListItem from '@tiptap/extension-list-item';
15
+ import Link from '@tiptap/extension-link';
16
+ import Placeholder from '@tiptap/extension-placeholder';
17
+ import Youtube from '@tiptap/extension-youtube';
18
+ import BubbleMenu from '@tiptap/extension-bubble-menu';
19
+ import Code from '@tiptap/extension-code';
20
+ import History from '@tiptap/extension-history';
21
+ import Dropcursor from '@tiptap/extension-dropcursor';
22
+ import Image$1 from '@tiptap/extension-image';
23
+ import { isPlatformServer } from '@angular/common';
24
+ import { Button } from '@ngstarter-ui/components/button';
25
+ import { ProgressSpinner } from '@ngstarter-ui/components/spinner';
26
+ import * as i1 from '@ngstarter-ui/components/upload';
27
+ import { UploadTriggerDirective } from '@ngstarter-ui/components/upload';
28
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
29
+ import { DialogRef, DIALOG_DATA, DialogActions, DialogContent, DialogTitle, Dialog } from '@ngstarter-ui/components/dialog';
30
+ import * as i1$1 from '@angular/forms';
31
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
32
+ import { Input } from '@ngstarter-ui/components/input';
33
+ import { FormField, Label } from '@ngstarter-ui/components/form-field';
34
+
35
+ const COMMENT_EDITOR = new InjectionToken('COMMENT_EDITOR');
36
+ const COMMENT_EDITOR_BUBBLE_MENU = new InjectionToken('COMMENT_EDITOR_BUBBLE_MENU');
37
+
38
+ class AngularRenderer {
39
+ applicationRef;
40
+ componentRef;
41
+ constructor(ViewComponent, injector, props) {
42
+ this.applicationRef = injector.get(ApplicationRef);
43
+ this.componentRef = createComponent(ViewComponent, {
44
+ environmentInjector: this.applicationRef.injector,
45
+ elementInjector: injector,
46
+ });
47
+ // set input props to the component
48
+ this.updateProps(props);
49
+ this.applicationRef.attachView(this.componentRef.hostView);
50
+ }
51
+ get instance() {
52
+ return this.componentRef.instance;
53
+ }
54
+ get elementRef() {
55
+ return this.componentRef.injector.get(ElementRef);
56
+ }
57
+ get dom() {
58
+ return this.elementRef.nativeElement;
59
+ }
60
+ updateProps(props) {
61
+ Object.entries(props).forEach(([key, value]) => {
62
+ this.componentRef.setInput(key, value);
63
+ });
64
+ }
65
+ detectChanges() {
66
+ this.componentRef.changeDetectorRef.detectChanges();
67
+ }
68
+ destroy() {
69
+ this.componentRef.destroy();
70
+ this.applicationRef.detachView(this.componentRef.hostView);
71
+ }
72
+ }
73
+
74
+ class AngularNodeViewContainer extends NodeView {
75
+ renderer;
76
+ contentDOMElement;
77
+ mount() {
78
+ const injector = this.options.injector;
79
+ const props = {
80
+ editor: this.editor,
81
+ node: this.node,
82
+ // @ts-ignore
83
+ decorations: this.decorations,
84
+ selected: false,
85
+ extension: this.extension,
86
+ getPos: () => this.getPos(),
87
+ updateAttributes: (attributes = {}) => this.updateAttributes(attributes),
88
+ deleteNode: () => this.deleteNode(),
89
+ };
90
+ this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);
91
+ this.editor.on('selectionUpdate', this.handleSelectionUpdate);
92
+ // create renderer
93
+ this.renderer = new AngularRenderer(this.component, injector, props);
94
+ // Register drag handler
95
+ if (this.extension.config.draggable) {
96
+ this.renderer.elementRef.nativeElement.ondragstart = (e) => {
97
+ this.onDragStart(e);
98
+ };
99
+ }
100
+ this.contentDOMElement = this.node.isLeaf ? null : document.createElement(this.node.isInline ? 'span' : 'div');
101
+ if (this.contentDOMElement) {
102
+ // For some reason the whiteSpace prop is not inherited properly in Chrome and Safari
103
+ // With this fix it seems to work fine
104
+ // See: https://github.com/ueberdosis/tiptap/issues/1197
105
+ this.contentDOMElement.style.whiteSpace = 'inherit';
106
+ // Required for editable node views
107
+ // The content won't be rendered if `editable` is set to `false`
108
+ this.renderer.detectChanges();
109
+ }
110
+ this.appendContendDom();
111
+ }
112
+ get dom() {
113
+ return this.renderer.dom;
114
+ }
115
+ get contentDOM() {
116
+ if (this.node.isLeaf) {
117
+ return null;
118
+ }
119
+ return this.contentDOMElement;
120
+ }
121
+ appendContendDom() {
122
+ const contentElement = this.dom.querySelector('[data-node-view-content]');
123
+ if (this.contentDOMElement
124
+ && contentElement
125
+ && !contentElement.contains(this.contentDOMElement)) {
126
+ contentElement.appendChild(this.contentDOMElement);
127
+ }
128
+ }
129
+ handleSelectionUpdate() {
130
+ const { from, to } = this.editor.state.selection;
131
+ if (from <= this.getPos() && to >= this.getPos() + this.node.nodeSize) {
132
+ this.selectNode();
133
+ }
134
+ else {
135
+ this.deselectNode();
136
+ }
137
+ }
138
+ update(node, decorations) {
139
+ const updateProps = () => {
140
+ this.renderer.updateProps({ node, decorations });
141
+ };
142
+ if (this.options.update) {
143
+ const oldNode = this.node;
144
+ const oldDecorations = this.decorations;
145
+ this.node = node;
146
+ this.decorations = decorations;
147
+ return this.options.update({
148
+ oldNode,
149
+ // @ts-ignore
150
+ oldDecorations,
151
+ newNode: node,
152
+ newDecorations: decorations,
153
+ updateProps: () => updateProps(),
154
+ });
155
+ }
156
+ if (node.type !== this.node.type) {
157
+ return false;
158
+ }
159
+ if (node === this.node && this.decorations === decorations) {
160
+ return true;
161
+ }
162
+ this.node = node;
163
+ this.decorations = decorations;
164
+ updateProps();
165
+ return true;
166
+ }
167
+ selectNode() {
168
+ this.renderer.updateProps({ selected: true });
169
+ }
170
+ deselectNode() {
171
+ this.renderer.updateProps({ selected: false });
172
+ }
173
+ destroy() {
174
+ this.renderer.destroy();
175
+ this.editor.off('selectionUpdate', this.handleSelectionUpdate);
176
+ this.contentDOMElement = null;
177
+ }
178
+ }
179
+ const AngularNodeViewRenderer = (ViewComponent, options) => {
180
+ // @ts-ignore
181
+ return (props) => {
182
+ return new AngularNodeViewContainer(ViewComponent, props, options);
183
+ };
184
+ };
185
+
186
+ class AngularNodeView {
187
+ editor = input.required(...(ngDevMode ? [{ debugName: "editor" }] : /* istanbul ignore next */ []));
188
+ node = input.required(...(ngDevMode ? [{ debugName: "node" }] : /* istanbul ignore next */ []));
189
+ decorations = input.required(...(ngDevMode ? [{ debugName: "decorations" }] : /* istanbul ignore next */ []));
190
+ selected = input.required(...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
191
+ extension = input.required(...(ngDevMode ? [{ debugName: "extension" }] : /* istanbul ignore next */ []));
192
+ getPos = input.required(...(ngDevMode ? [{ debugName: "getPos" }] : /* istanbul ignore next */ []));
193
+ updateAttributes = input.required(...(ngDevMode ? [{ debugName: "updateAttributes" }] : /* istanbul ignore next */ []));
194
+ deleteNode = input.required(...(ngDevMode ? [{ debugName: "deleteNode" }] : /* istanbul ignore next */ []));
195
+ HTMLAttributes = input({}, ...(ngDevMode ? [{ debugName: "HTMLAttributes" }] : /* istanbul ignore next */ []));
196
+ innerDecorations = input(undefined, ...(ngDevMode ? [{ debugName: "innerDecorations" }] : /* istanbul ignore next */ []));
197
+ view = input(undefined, ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
198
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AngularNodeView, deps: [], target: i0.ɵɵFactoryTarget.Component });
199
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.4", type: AngularNodeView, isStandalone: true, selector: "ng-component", inputs: { editor: { classPropertyName: "editor", publicName: "editor", isSignal: true, isRequired: true, transformFunction: null }, node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: true, transformFunction: null }, decorations: { classPropertyName: "decorations", publicName: "decorations", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: true, transformFunction: null }, extension: { classPropertyName: "extension", publicName: "extension", isSignal: true, isRequired: true, transformFunction: null }, getPos: { classPropertyName: "getPos", publicName: "getPos", isSignal: true, isRequired: true, transformFunction: null }, updateAttributes: { classPropertyName: "updateAttributes", publicName: "updateAttributes", isSignal: true, isRequired: true, transformFunction: null }, deleteNode: { classPropertyName: "deleteNode", publicName: "deleteNode", isSignal: true, isRequired: true, transformFunction: null }, HTMLAttributes: { classPropertyName: "HTMLAttributes", publicName: "HTMLAttributes", isSignal: true, isRequired: false, transformFunction: null }, innerDecorations: { classPropertyName: "innerDecorations", publicName: "innerDecorations", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true });
200
+ }
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: AngularNodeView, decorators: [{
202
+ type: Component,
203
+ args: [{ standalone: true, template: '' }]
204
+ }], propDecorators: { editor: [{ type: i0.Input, args: [{ isSignal: true, alias: "editor", required: true }] }], node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: true }] }], decorations: [{ type: i0.Input, args: [{ isSignal: true, alias: "decorations", required: true }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: true }] }], extension: [{ type: i0.Input, args: [{ isSignal: true, alias: "extension", required: true }] }], getPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "getPos", required: true }] }], updateAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "updateAttributes", required: true }] }], deleteNode: [{ type: i0.Input, args: [{ isSignal: true, alias: "deleteNode", required: true }] }], HTMLAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "HTMLAttributes", required: false }] }], innerDecorations: [{ type: i0.Input, args: [{ isSignal: true, alias: "innerDecorations", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }] } });
205
+
206
+ class ImageUploadingPlaceholder extends AngularNodeView {
207
+ src;
208
+ error;
209
+ _canceled = false;
210
+ ngOnInit() {
211
+ const uploadFn = this.extension().options['uploadFn'];
212
+ this.src = this.node().attrs['src'];
213
+ const blob = this._dataURItoBlob(this.src);
214
+ uploadFn(blob).then((src) => {
215
+ if (this._canceled) {
216
+ return;
217
+ }
218
+ const image = new Image();
219
+ image.src = src;
220
+ image.onload = () => {
221
+ this.editor().chain().focus().setImage({ src }).run();
222
+ };
223
+ }, (error) => {
224
+ this.error = error;
225
+ });
226
+ }
227
+ ngOnDestroy() {
228
+ this._canceled = true;
229
+ }
230
+ _dataURItoBlob(dataURI) {
231
+ // convert base64 to raw binary data held in a string
232
+ // doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
233
+ const byteString = atob(dataURI.split(',')[1]);
234
+ // separate out the mime component
235
+ const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];
236
+ // write the bytes of the string to an ArrayBuffer
237
+ const ab = new ArrayBuffer(byteString.length);
238
+ const ia = new Uint8Array(ab);
239
+ for (var i = 0; i < byteString.length; i++) {
240
+ ia[i] = byteString.charCodeAt(i);
241
+ }
242
+ return new Blob([ab], { type: mimeString });
243
+ }
244
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ImageUploadingPlaceholder, deps: null, target: i0.ɵɵFactoryTarget.Component });
245
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: ImageUploadingPlaceholder, isStandalone: true, selector: "ngs-image-uploading-placeholder", host: { properties: { "class.selected": "selected()" }, classAttribute: "ngs-image-uploading-placeholder" }, usesInheritance: true, ngImport: i0, template: "@if (src) {\n <div class=\"flex items-center justify-center relative\">\n @if (error) {\n <div class=\"absolute top-0 start-0 right-0 min-h-8 bg-error z-[2]\n text-on-error text-tiny flex items-center px-3\">{{ error }}</div>\n }\n <div class=\"w-max absolute start-1/2 top-1/2 z-[1] -translate-y-1/2 -translate-x-1/2\">\n @if (!error) {\n <ngs-progress-spinner />\n }\n </div>\n <img [src]=\"src\" alt=\"\" class=\"max-w-full opacity-70\">\n </div>\n}\n", styles: [":host{display:block}:host.selected{outline:var(--sys-tertiary) solid 4px}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: ProgressSpinner, selector: "ngs-progress-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["ngsProgressSpinner"] }] });
246
+ }
247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ImageUploadingPlaceholder, decorators: [{
248
+ type: Component,
249
+ args: [{ selector: 'ngs-image-uploading-placeholder', imports: [
250
+ ProgressSpinner
251
+ ], host: {
252
+ 'class': 'ngs-image-uploading-placeholder',
253
+ '[class.selected]': 'selected()'
254
+ }, template: "@if (src) {\n <div class=\"flex items-center justify-center relative\">\n @if (error) {\n <div class=\"absolute top-0 start-0 right-0 min-h-8 bg-error z-[2]\n text-on-error text-tiny flex items-center px-3\">{{ error }}</div>\n }\n <div class=\"w-max absolute start-1/2 top-1/2 z-[1] -translate-y-1/2 -translate-x-1/2\">\n @if (!error) {\n <ngs-progress-spinner />\n }\n </div>\n <img [src]=\"src\" alt=\"\" class=\"max-w-full opacity-70\">\n </div>\n}\n", styles: [":host{display:block}:host.selected{outline:var(--sys-tertiary) solid 4px}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
255
+ }] });
256
+
257
+ const ImageUploadingPlaceholderExtension = (injector, options) => {
258
+ return Node.create({
259
+ name: 'imageUploadingPlaceholder',
260
+ draggable: false,
261
+ group: 'block',
262
+ addOptions() {
263
+ return {
264
+ uploadFn: options.uploadFn
265
+ };
266
+ },
267
+ addAttributes() {
268
+ return {
269
+ uploadId: {
270
+ default: ''
271
+ },
272
+ src: {
273
+ default: null
274
+ }
275
+ };
276
+ },
277
+ addCommands() {
278
+ return {
279
+ addImageUploadingPlaceholder: options => ({ commands }) => {
280
+ return commands.insertContent({
281
+ type: this.name,
282
+ attrs: {
283
+ src: options.src
284
+ }
285
+ });
286
+ },
287
+ };
288
+ },
289
+ addNodeView() {
290
+ return AngularNodeViewRenderer(ImageUploadingPlaceholder, { injector });
291
+ },
292
+ parseHTML() {
293
+ return [
294
+ {
295
+ tag: 'image-uploading-placeholder',
296
+ }
297
+ ];
298
+ },
299
+ renderHTML({ HTMLAttributes }) {
300
+ return [
301
+ 'image-uploading-placeholder', mergeAttributes(HTMLAttributes),
302
+ ];
303
+ }
304
+ });
305
+ };
306
+
307
+ class CommentEditor {
308
+ _platformId = inject(PLATFORM_ID);
309
+ _document = inject(DOCUMENT);
310
+ _cdr = inject(ChangeDetectorRef);
311
+ _injector = inject(Injector);
312
+ _content = viewChild.required('content');
313
+ _bubbleMenu = viewChild.required('bubbleMenu');
314
+ _imageBubbleMenu = viewChild.required('imageBubbleMenu');
315
+ _value = '';
316
+ editor;
317
+ showToolbar = false;
318
+ fullView = false;
319
+ contentMaxHeight = input(...(ngDevMode ? [undefined, { debugName: "contentMaxHeight" }] : /* istanbul ignore next */ []));
320
+ buttonCancelLabel = input('Cancel', ...(ngDevMode ? [{ debugName: "buttonCancelLabel" }] : /* istanbul ignore next */ []));
321
+ buttonSendLabel = input('Send', ...(ngDevMode ? [{ debugName: "buttonSendLabel" }] : /* istanbul ignore next */ []));
322
+ placeholder = input('Write something …', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
323
+ toolbarAlwaysVisible = input(false, { ...(ngDevMode ? { debugName: "toolbarAlwaysVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
324
+ fullViewMode = input(false, { ...(ngDevMode ? { debugName: "fullViewMode" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
325
+ cancelButtonAlwaysVisible = input(false, { ...(ngDevMode ? { debugName: "cancelButtonAlwaysVisible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
326
+ imageUploadFn = input(...(ngDevMode ? [undefined, { debugName: "imageUploadFn" }] : /* istanbul ignore next */ []));
327
+ sent = output();
328
+ canceled = output();
329
+ ngOnInit() {
330
+ this._init();
331
+ }
332
+ get api() {
333
+ return {
334
+ isCommandDisabled: (command) => this.isCommandDisabled(command),
335
+ isActive: (command) => this.editor?.isActive(command),
336
+ runCommand: (command) => this._runCommand(command),
337
+ editor: () => this.editor,
338
+ isToolbarActive: () => this.showToolbar,
339
+ toggleToolbar: () => this.toggleToolbar(),
340
+ isEditorActivated: () => this.fullView || this.fullViewMode()
341
+ };
342
+ }
343
+ isCommandDisabled(command) {
344
+ if (!this.editor) {
345
+ return true;
346
+ }
347
+ try {
348
+ const canFocus = this.editor.can().chain().focus();
349
+ return !canFocus[command]().run() || null;
350
+ }
351
+ catch (e) {
352
+ return true;
353
+ }
354
+ }
355
+ ngOnDestroy() {
356
+ this.editor?.destroy();
357
+ }
358
+ send(event) {
359
+ event.stopPropagation();
360
+ event.preventDefault();
361
+ this.sent.emit(this._value);
362
+ this.showToolbar = false;
363
+ this.fullView = false;
364
+ this._value = '';
365
+ this.editor.commands.clearContent(true);
366
+ }
367
+ activateFullView() {
368
+ if (this.fullView) {
369
+ return;
370
+ }
371
+ this.fullView = true;
372
+ }
373
+ toggleToolbar() {
374
+ this.showToolbar = !this.showToolbar;
375
+ }
376
+ cancel(event) {
377
+ event.stopPropagation();
378
+ event.preventDefault();
379
+ this.showToolbar = false;
380
+ this.fullView = false;
381
+ this._value = '';
382
+ this.editor.commands.clearContent(true);
383
+ this.canceled.emit();
384
+ }
385
+ _runCommand(command) {
386
+ if (!this.editor) {
387
+ return;
388
+ }
389
+ const chainFocus = this.editor.chain().focus();
390
+ chainFocus[command]().run();
391
+ }
392
+ _init() {
393
+ if (isPlatformServer(this._platformId)) {
394
+ return;
395
+ }
396
+ this.editor = new Editor({
397
+ element: this._content().nativeElement,
398
+ extensions: [
399
+ Document,
400
+ Paragraph,
401
+ Text,
402
+ Bold,
403
+ Italic,
404
+ Strike,
405
+ Blockquote,
406
+ CodeBlock,
407
+ BulletList,
408
+ OrderedList,
409
+ ListItem,
410
+ Code,
411
+ History,
412
+ Dropcursor,
413
+ Youtube.configure({
414
+ controls: false,
415
+ nocookie: true,
416
+ }),
417
+ ImageUploadingPlaceholderExtension(this._injector, {
418
+ uploadFn: this.imageUploadFn(),
419
+ }),
420
+ Image$1.configure({
421
+ inline: true,
422
+ allowBase64: true
423
+ }),
424
+ Link.configure({
425
+ openOnClick: false,
426
+ defaultProtocol: 'https',
427
+ }),
428
+ Placeholder.configure({
429
+ placeholder: this.placeholder()
430
+ }),
431
+ // FloatingMenu.configure({
432
+ // element: this._floatingMenu().nativeElement
433
+ // }),
434
+ BubbleMenu.configure({
435
+ pluginKey: 'imageBubbleMenu',
436
+ element: this._imageBubbleMenu().nativeElement,
437
+ shouldShow: ({ editor, view, state, oldState, from, to }) => {
438
+ // return editor.isActive('image');
439
+ return false;
440
+ },
441
+ }),
442
+ BubbleMenu.configure({
443
+ pluginKey: 'bubbleMenu',
444
+ element: this._bubbleMenu().nativeElement,
445
+ tippyOptions: {
446
+ appendTo: this._document.body,
447
+ zIndex: 999
448
+ },
449
+ shouldShow: ({ editor, view, state, oldState, from, to }) => {
450
+ return !editor.isActive('image') &&
451
+ !editor.isActive('youtube') &&
452
+ !editor.isActive('imageUploadingPlaceholder') &&
453
+ !editor.view.state.selection.empty;
454
+ },
455
+ })
456
+ ],
457
+ content: '',
458
+ onUpdate: ({ editor }) => {
459
+ this._value = !editor.isEmpty ? editor.getHTML() : '';
460
+ }
461
+ });
462
+ this._cdr.detectChanges();
463
+ }
464
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
465
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CommentEditor, isStandalone: true, selector: "ngs-comment-editor", inputs: { contentMaxHeight: { classPropertyName: "contentMaxHeight", publicName: "contentMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, buttonCancelLabel: { classPropertyName: "buttonCancelLabel", publicName: "buttonCancelLabel", isSignal: true, isRequired: false, transformFunction: null }, buttonSendLabel: { classPropertyName: "buttonSendLabel", publicName: "buttonSendLabel", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, toolbarAlwaysVisible: { classPropertyName: "toolbarAlwaysVisible", publicName: "toolbarAlwaysVisible", isSignal: true, isRequired: false, transformFunction: null }, fullViewMode: { classPropertyName: "fullViewMode", publicName: "fullViewMode", isSignal: true, isRequired: false, transformFunction: null }, cancelButtonAlwaysVisible: { classPropertyName: "cancelButtonAlwaysVisible", publicName: "cancelButtonAlwaysVisible", isSignal: true, isRequired: false, transformFunction: null }, imageUploadFn: { classPropertyName: "imageUploadFn", publicName: "imageUploadFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sent: "sent", canceled: "canceled" }, host: { listeners: { "click": "activateFullView()" }, properties: { "class.full-view": "fullView || fullViewMode()" }, classAttribute: "ngs-comment-editor" }, providers: [
466
+ {
467
+ provide: COMMENT_EDITOR,
468
+ useExisting: forwardRef(() => CommentEditor)
469
+ }
470
+ ], viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "_bubbleMenu", first: true, predicate: ["bubbleMenu"], descendants: true, isSignal: true }, { propertyName: "_imageBubbleMenu", first: true, predicate: ["imageBubbleMenu"], descendants: true, isSignal: true }], exportAs: ["ngsCommentEditor"], ngImport: i0, template: "@if ((showToolbar || toolbarAlwaysVisible()) && (fullView || fullViewMode())) {\n <div class=\"toolbar\">\n <ng-content select=\"ngs-comment-editor-toolbar\" />\n </div>\n}\n<div #content class=\"content prose dark:prose-invert max-w-full\"></div>\n<div class=\"footer\">\n <div class=\"flex items-center gap-0.5\">\n <ng-content select=\"ngs-comment-editor-footer-bar\"/>\n </div>\n <div class=\"flex items-center gap-2\">\n @if ((fullView && !fullViewMode()) || cancelButtonAlwaysVisible()) {\n <button ngsButton (click)=\"cancel($event)\">{{ buttonCancelLabel() }}</button>\n }\n\n <button ngsButton=\"filled\" [disabled]=\"!_value || null\" (click)=\"send($event)\">{{ buttonSendLabel() }}</button>\n </div>\n</div>\n<div #imageBubbleMenu class=\"ngs-comment-editor-bubble-menu\">\n</div>\n<div #bubbleMenu>\n <ng-content select=\"ngs-comment-editor-bubble-menu\"/>\n</div>\n<!--<div #floatingMenu class=\"floating-menu\">-->\n<!-- @if (editor) {-->\n<!-- <div class=\"flex items-center gap-1.5\">-->\n<!-- <button class=\"button\"-->\n<!-- [disabled]=\"isCommandDisabled('toggleCodeBlock')\"-->\n<!-- [class.active]=\"editor && editor.isActive('codeBlock')\"-->\n<!-- (click)=\"onButtonClick('toggleCodeBlock')\">-->\n<!-- <ngs-icon name=\"fluent:code-24-regular\"/>-->\n<!-- </button>-->\n<!-- <button class=\"button\">-->\n<!-- <ngs-icon name=\"fluent:image-24-regular\"/>-->\n<!-- </button>-->\n<!-- </div>-->\n<!-- }-->\n<!--</div>-->\n", styles: [":host{--ngs-comment-editor-bg: transparent;--ngs-comment-editor-content-max-height: 9999px;display:block;position:relative;overflow:hidden;background:var(--ngs-comment-editor-bg)}:host .floating-menu{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;background:var(--dropdown-bg);padding-top:calc(var(--spacing, .25rem) * 1.5);padding-bottom:calc(var(--spacing, .25rem) * 1.5);padding-inline-start:calc(var(--spacing, .25rem) * 2);padding-inline-end:calc(var(--spacing, .25rem) * 2);border:1px solid var(--color-border);border-radius:calc(infinity * 1px)}:host .floating-menu .button:hover{color:var(--color-primary);border-radius:calc(infinity * 1px)}:host .floating-menu .button ngs-icon{width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);font-size:1.25rem;line-height:1.25}:host .floating-menu .button:disabled{pointer-events:none;opacity:70%}:host .content{position:absolute;inset:0;height:calc(var(--spacing, .25rem) * 14)}:host .content ::ng-deep .tiptap{padding:calc(var(--spacing, .25rem) * 4);min-height:calc(var(--spacing, .25rem) * 10)}:host .content ::ng-deep .tiptap:focus{outline:none}:host .content ::ng-deep .tiptap div[data-youtube-video]{cursor:move;background:var(--color-neutral-100);padding:calc(var(--spacing, .25rem) * 6);display:flex;align-items:center;justify-content:center}:host .content ::ng-deep .tiptap div[data-youtube-video] iframe{width:100%;aspect-ratio:16/9;border:none;display:block;min-height:200px;min-width:200px;outline:none}:host .content ::ng-deep .tiptap div[data-youtube-video].ProseMirror-selectednode iframe{outline:var(--sys-tertiary) solid 4px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content ::ng-deep .tiptap img{display:block;height:auto;margin:calc(var(--spacing, .25rem) * 6) 0;max-width:100%}:host .content ::ng-deep .tiptap img.ProseMirror-selectednode{outline:var(--sys-tertiary) solid 4px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content ::ng-deep .tiptap p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--color-neutral-500);float:left;height:0;pointer-events:none;font-size:14px}:host .content ::ng-deep .tiptap.ProseMirror-focused p.is-editor-empty:first-child:before{content:none}:host .content ::ng-deep .tiptap p.is-empty:before{content:attr(data-placeholder);color:var(--color-neutral-500);float:left;height:0;pointer-events:none;font-size:14px}:host .content ::ng-deep p:first-child,:host .content ::ng-deep pre:first-child{margin-top:0}:host .content ::ng-deep p:last-child,:host .content ::ng-deep pre:last-child{margin-bottom:0}:host.full-view .content{position:static;height:auto;min-height:calc(var(--spacing, .25rem) * 12);max-height:var(--ngs-comment-editor-content-max-height);overflow-y:auto}:host .footer{height:calc(var(--spacing, .25rem) * 14);padding:0 calc(var(--spacing, .25rem) * 2.5);display:flex;align-items:center;justify-content:space-between}:host .toolbar{border-bottom:1px solid var(--color-border);height:calc(var(--spacing, .25rem) * 14);padding:0 calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:space-between}:host .button.active,:host ::ng-deep .button.active{background:var(--color-neutral-200)}:host-context(html.dark) .button.active,:host-context(html.dark) ::ng-deep .button.active{background:var(--color-neutral-650);color:var(--color-neutral-200)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }] });
471
+ }
472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditor, decorators: [{
473
+ type: Component,
474
+ args: [{ selector: 'ngs-comment-editor', exportAs: 'ngsCommentEditor', imports: [
475
+ Button
476
+ ], providers: [
477
+ {
478
+ provide: COMMENT_EDITOR,
479
+ useExisting: forwardRef(() => CommentEditor)
480
+ }
481
+ ], host: {
482
+ 'class': 'ngs-comment-editor',
483
+ '[class.full-view]': 'fullView || fullViewMode()',
484
+ '(click)': 'activateFullView()'
485
+ }, template: "@if ((showToolbar || toolbarAlwaysVisible()) && (fullView || fullViewMode())) {\n <div class=\"toolbar\">\n <ng-content select=\"ngs-comment-editor-toolbar\" />\n </div>\n}\n<div #content class=\"content prose dark:prose-invert max-w-full\"></div>\n<div class=\"footer\">\n <div class=\"flex items-center gap-0.5\">\n <ng-content select=\"ngs-comment-editor-footer-bar\"/>\n </div>\n <div class=\"flex items-center gap-2\">\n @if ((fullView && !fullViewMode()) || cancelButtonAlwaysVisible()) {\n <button ngsButton (click)=\"cancel($event)\">{{ buttonCancelLabel() }}</button>\n }\n\n <button ngsButton=\"filled\" [disabled]=\"!_value || null\" (click)=\"send($event)\">{{ buttonSendLabel() }}</button>\n </div>\n</div>\n<div #imageBubbleMenu class=\"ngs-comment-editor-bubble-menu\">\n</div>\n<div #bubbleMenu>\n <ng-content select=\"ngs-comment-editor-bubble-menu\"/>\n</div>\n<!--<div #floatingMenu class=\"floating-menu\">-->\n<!-- @if (editor) {-->\n<!-- <div class=\"flex items-center gap-1.5\">-->\n<!-- <button class=\"button\"-->\n<!-- [disabled]=\"isCommandDisabled('toggleCodeBlock')\"-->\n<!-- [class.active]=\"editor && editor.isActive('codeBlock')\"-->\n<!-- (click)=\"onButtonClick('toggleCodeBlock')\">-->\n<!-- <ngs-icon name=\"fluent:code-24-regular\"/>-->\n<!-- </button>-->\n<!-- <button class=\"button\">-->\n<!-- <ngs-icon name=\"fluent:image-24-regular\"/>-->\n<!-- </button>-->\n<!-- </div>-->\n<!-- }-->\n<!--</div>-->\n", styles: [":host{--ngs-comment-editor-bg: transparent;--ngs-comment-editor-content-max-height: 9999px;display:block;position:relative;overflow:hidden;background:var(--ngs-comment-editor-bg)}:host .floating-menu{box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;background:var(--dropdown-bg);padding-top:calc(var(--spacing, .25rem) * 1.5);padding-bottom:calc(var(--spacing, .25rem) * 1.5);padding-inline-start:calc(var(--spacing, .25rem) * 2);padding-inline-end:calc(var(--spacing, .25rem) * 2);border:1px solid var(--color-border);border-radius:calc(infinity * 1px)}:host .floating-menu .button:hover{color:var(--color-primary);border-radius:calc(infinity * 1px)}:host .floating-menu .button ngs-icon{width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);font-size:1.25rem;line-height:1.25}:host .floating-menu .button:disabled{pointer-events:none;opacity:70%}:host .content{position:absolute;inset:0;height:calc(var(--spacing, .25rem) * 14)}:host .content ::ng-deep .tiptap{padding:calc(var(--spacing, .25rem) * 4);min-height:calc(var(--spacing, .25rem) * 10)}:host .content ::ng-deep .tiptap:focus{outline:none}:host .content ::ng-deep .tiptap div[data-youtube-video]{cursor:move;background:var(--color-neutral-100);padding:calc(var(--spacing, .25rem) * 6);display:flex;align-items:center;justify-content:center}:host .content ::ng-deep .tiptap div[data-youtube-video] iframe{width:100%;aspect-ratio:16/9;border:none;display:block;min-height:200px;min-width:200px;outline:none}:host .content ::ng-deep .tiptap div[data-youtube-video].ProseMirror-selectednode iframe{outline:var(--sys-tertiary) solid 4px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content ::ng-deep .tiptap img{display:block;height:auto;margin:calc(var(--spacing, .25rem) * 6) 0;max-width:100%}:host .content ::ng-deep .tiptap img.ProseMirror-selectednode{outline:var(--sys-tertiary) solid 4px;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host .content ::ng-deep .tiptap p.is-editor-empty:first-child:before{content:attr(data-placeholder);color:var(--color-neutral-500);float:left;height:0;pointer-events:none;font-size:14px}:host .content ::ng-deep .tiptap.ProseMirror-focused p.is-editor-empty:first-child:before{content:none}:host .content ::ng-deep .tiptap p.is-empty:before{content:attr(data-placeholder);color:var(--color-neutral-500);float:left;height:0;pointer-events:none;font-size:14px}:host .content ::ng-deep p:first-child,:host .content ::ng-deep pre:first-child{margin-top:0}:host .content ::ng-deep p:last-child,:host .content ::ng-deep pre:last-child{margin-bottom:0}:host.full-view .content{position:static;height:auto;min-height:calc(var(--spacing, .25rem) * 12);max-height:var(--ngs-comment-editor-content-max-height);overflow-y:auto}:host .footer{height:calc(var(--spacing, .25rem) * 14);padding:0 calc(var(--spacing, .25rem) * 2.5);display:flex;align-items:center;justify-content:space-between}:host .toolbar{border-bottom:1px solid var(--color-border);height:calc(var(--spacing, .25rem) * 14);padding:0 calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:space-between}:host .button.active,:host ::ng-deep .button.active{background:var(--color-neutral-200)}:host-context(html.dark) .button.active,:host-context(html.dark) ::ng-deep .button.active{background:var(--color-neutral-650);color:var(--color-neutral-200)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
486
+ }], propDecorators: { _content: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], _bubbleMenu: [{ type: i0.ViewChild, args: ['bubbleMenu', { isSignal: true }] }], _imageBubbleMenu: [{ type: i0.ViewChild, args: ['imageBubbleMenu', { isSignal: true }] }], contentMaxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentMaxHeight", required: false }] }], buttonCancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonCancelLabel", required: false }] }], buttonSendLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonSendLabel", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], toolbarAlwaysVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "toolbarAlwaysVisible", required: false }] }], fullViewMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullViewMode", required: false }] }], cancelButtonAlwaysVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelButtonAlwaysVisible", required: false }] }], imageUploadFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUploadFn", required: false }] }], sent: [{ type: i0.Output, args: ["sent"] }], canceled: [{ type: i0.Output, args: ["canceled"] }] } });
487
+
488
+ class CommentEditorDivider {
489
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
490
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorDivider, isStandalone: true, selector: "ngs-comment-editor-divider", ngImport: i0, template: "<div class=\"divider\"></div>\n", styles: [":host{display:block;padding:0 calc(var(--spacing, .25rem) * 2)}:host .divider{height:calc(var(--spacing, .25rem) * 6);background:var(--color-neutral-300);width:1px}:host-context(html.dark) .divider{background:var(--color-neutral-500)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
491
+ }
492
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorDivider, decorators: [{
493
+ type: Component,
494
+ args: [{ selector: 'ngs-comment-editor-divider', imports: [], template: "<div class=\"divider\"></div>\n", styles: [":host{display:block;padding:0 calc(var(--spacing, .25rem) * 2)}:host .divider{height:calc(var(--spacing, .25rem) * 6);background:var(--color-neutral-300);width:1px}:host-context(html.dark) .divider{background:var(--color-neutral-500)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
495
+ }] });
496
+
497
+ class CommentEditorToolbar {
498
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorToolbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
499
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorToolbar, isStandalone: true, selector: "ngs-comment-editor-toolbar", host: { classAttribute: "ngs-comment-editor-toolbar" }, exportAs: ["ngsCommentEditorToolbar"], ngImport: i0, template: "<ng-content select=\"[ngsCommentEditorCommand],ngs-comment-editor-divider\" />\n", styles: [":host{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * .5)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
500
+ }
501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorToolbar, decorators: [{
502
+ type: Component,
503
+ args: [{ selector: 'ngs-comment-editor-toolbar', exportAs: 'ngsCommentEditorToolbar', host: {
504
+ 'class': 'ngs-comment-editor-toolbar',
505
+ }, template: "<ng-content select=\"[ngsCommentEditorCommand],ngs-comment-editor-divider\" />\n", styles: [":host{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * .5)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
506
+ }] });
507
+
508
+ class CommentEditorBubbleMenu {
509
+ commentEditor = inject(COMMENT_EDITOR);
510
+ getLinkUrl() {
511
+ return (this.commentEditor.api.editor()?.getAttributes('link')).href || null;
512
+ }
513
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorBubbleMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
514
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: CommentEditorBubbleMenu, isStandalone: true, selector: "ngs-comment-editor-bubble-menu", host: { classAttribute: "ngs-comment-editor-bubble-menu" }, providers: [
515
+ {
516
+ provide: COMMENT_EDITOR_BUBBLE_MENU,
517
+ useExisting: forwardRef(() => CommentEditorBubbleMenu)
518
+ }
519
+ ], exportAs: ["ngsCommentEditorBubbleMenu"], ngImport: i0, template: "@if (this.commentEditor.api.isActive('link') && getLinkUrl()) {\n <div class=\"flex items-center gap-1 h-11 border-b border-b-muted border-b-neutral-700\">\n <div class=\"grow text-sm overflow-hidden text-ellipsis whitespace-nowrap w-[116px]\">\n <a [href]=\"getLinkUrl()\" target=\"_blank\" class=\"link\">{{ getLinkUrl() }}</a>\n </div>\n <div class=\"flex items-center flex-none\">\n <ng-content select=\"[ngsCommentEditorCommandEditLink],[ngsCommentEditorCommandUnsetLink]\" />\n </div>\n </div>\n}\n<div class=\"h-12 flex items-center justify-center gap-0.5\">\n <ng-content select=\"[ngsCommentEditorCommand],ngs-comment-editor-divider\" />\n</div>\n", styles: [":host{display:block;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;background:var(--color-neutral-950);color:var(--color-neutral-200);min-height:calc(var(--spacing, .25rem) * 12);border-radius:1rem;top:1px;padding-inline-start:calc(var(--spacing, .25rem) * 2);padding-inline-end:calc(var(--spacing, .25rem) * 2)}:host .button,:host ::ng-deep .button{width:calc(var(--spacing, .25rem) * 10);height:calc(var(--spacing, .25rem) * 10);display:flex;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);--icon-size: 1.25rem}:host .button:hover,:host ::ng-deep .button:hover{color:var(--color-tertiary-300);background:var(--color-neutral-700);border-radius:calc(infinity * 1px);padding:calc(var(--spacing, .25rem) * 1.5)}:host .button.active,:host ::ng-deep .button.active{color:var(--color-tertiary-300);background:var(--color-neutral-700)}:host .button ngs-icon,:host ::ng-deep .button ngs-icon{width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);font-size:1.25rem;line-height:1.25}:host .button:disabled,:host ::ng-deep .button:disabled{pointer-events:none;opacity:70%}:host .link{color:var(--color-tertiary-300);position:relative;top:1px}:host .link:hover{color:var(--color-tertiary-100)}:host-context(html.dark){background:var(--color-tertiary-200);color:var(--color-neutral-900)}:host-context(html.dark) .link{color:var(--color-tertiary-700)}:host-context(html.dark) .link:hover{color:var(--color-tertiary-800)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
520
+ }
521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorBubbleMenu, decorators: [{
522
+ type: Component,
523
+ args: [{ selector: 'ngs-comment-editor-bubble-menu', exportAs: 'ngsCommentEditorBubbleMenu', providers: [
524
+ {
525
+ provide: COMMENT_EDITOR_BUBBLE_MENU,
526
+ useExisting: forwardRef(() => CommentEditorBubbleMenu)
527
+ }
528
+ ], host: {
529
+ 'class': 'ngs-comment-editor-bubble-menu',
530
+ }, template: "@if (this.commentEditor.api.isActive('link') && getLinkUrl()) {\n <div class=\"flex items-center gap-1 h-11 border-b border-b-muted border-b-neutral-700\">\n <div class=\"grow text-sm overflow-hidden text-ellipsis whitespace-nowrap w-[116px]\">\n <a [href]=\"getLinkUrl()\" target=\"_blank\" class=\"link\">{{ getLinkUrl() }}</a>\n </div>\n <div class=\"flex items-center flex-none\">\n <ng-content select=\"[ngsCommentEditorCommandEditLink],[ngsCommentEditorCommandUnsetLink]\" />\n </div>\n </div>\n}\n<div class=\"h-12 flex items-center justify-center gap-0.5\">\n <ng-content select=\"[ngsCommentEditorCommand],ngs-comment-editor-divider\" />\n</div>\n", styles: [":host{display:block;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;background:var(--color-neutral-950);color:var(--color-neutral-200);min-height:calc(var(--spacing, .25rem) * 12);border-radius:1rem;top:1px;padding-inline-start:calc(var(--spacing, .25rem) * 2);padding-inline-end:calc(var(--spacing, .25rem) * 2)}:host .button,:host ::ng-deep .button{width:calc(var(--spacing, .25rem) * 10);height:calc(var(--spacing, .25rem) * 10);display:flex;align-items:center;justify-content:center;border-radius:calc(infinity * 1px);--icon-size: 1.25rem}:host .button:hover,:host ::ng-deep .button:hover{color:var(--color-tertiary-300);background:var(--color-neutral-700);border-radius:calc(infinity * 1px);padding:calc(var(--spacing, .25rem) * 1.5)}:host .button.active,:host ::ng-deep .button.active{color:var(--color-tertiary-300);background:var(--color-neutral-700)}:host .button ngs-icon,:host ::ng-deep .button ngs-icon{width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);font-size:1.25rem;line-height:1.25}:host .button:disabled,:host ::ng-deep .button:disabled{pointer-events:none;opacity:70%}:host .link{color:var(--color-tertiary-300);position:relative;top:1px}:host .link:hover{color:var(--color-tertiary-100)}:host-context(html.dark){background:var(--color-tertiary-200);color:var(--color-neutral-900)}:host-context(html.dark) .link{color:var(--color-tertiary-700)}:host-context(html.dark) .link:hover{color:var(--color-tertiary-800)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
531
+ }] });
532
+
533
+ class CommentEditorFooterBar {
534
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorFooterBar, deps: [], target: i0.ɵɵFactoryTarget.Component });
535
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorFooterBar, isStandalone: true, selector: "ngs-comment-editor-footer-bar", host: { classAttribute: "ngs-comment-editor-footer-bar" }, exportAs: ["ngsCommentEditorFooterBar"], ngImport: i0, template: "<ng-content select=\"[ngsCommentEditorCommand],ngs-comment-editor-divider\" />\n", styles: [":host{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * .5)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] });
536
+ }
537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorFooterBar, decorators: [{
538
+ type: Component,
539
+ args: [{ selector: 'ngs-comment-editor-footer-bar', exportAs: 'ngsCommentEditorFooterBar', host: {
540
+ 'class': 'ngs-comment-editor-footer-bar',
541
+ }, template: "<ng-content select=\"[ngsCommentEditorCommand],ngs-comment-editor-divider\" />\n", styles: [":host{display:flex;align-items:center;gap:calc(var(--spacing, .25rem) * .5)}\n/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
542
+ }] });
543
+
544
+ class CommentEditorCommandDirective {
545
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
546
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandDirective, isStandalone: true, selector: "[ngsCommentEditorCommand]", host: { properties: { "class.button": "true" } }, ngImport: i0 });
547
+ }
548
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandDirective, decorators: [{
549
+ type: Directive,
550
+ args: [{
551
+ selector: '[ngsCommentEditorCommand]',
552
+ standalone: true,
553
+ host: {
554
+ '[class.button]': 'true'
555
+ }
556
+ }]
557
+ }] });
558
+
559
+ class CommentEditorCommandBoldDirective {
560
+ commentEditor = inject(COMMENT_EDITOR);
561
+ onClick() {
562
+ this.commentEditor.api.runCommand('toggleBold');
563
+ }
564
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandBoldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
565
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandBoldDirective, isStandalone: true, selector: "[ngsCommentEditorCommandBold]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleBold')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('bold')" } }, exportAs: ["ngsCommentEditorCommandBold"], ngImport: i0 });
566
+ }
567
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandBoldDirective, decorators: [{
568
+ type: Directive,
569
+ args: [{
570
+ selector: '[ngsCommentEditorCommandBold]',
571
+ exportAs: 'ngsCommentEditorCommandBold',
572
+ standalone: true,
573
+ host: {
574
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleBold')) ? '' : null`,
575
+ '[class.active]': `commentEditor && commentEditor.api.isActive('bold')`,
576
+ '(click)': `onClick()`
577
+ }
578
+ }]
579
+ }] });
580
+
581
+ class CommentEditorCommandItalicDirective {
582
+ commentEditor = inject(COMMENT_EDITOR);
583
+ onClick() {
584
+ this.commentEditor.api.runCommand('toggleItalic');
585
+ }
586
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandItalicDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
587
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandItalicDirective, isStandalone: true, selector: "[ngsCommentEditorCommandItalic]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleItalic')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('italic')" } }, ngImport: i0 });
588
+ }
589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandItalicDirective, decorators: [{
590
+ type: Directive,
591
+ args: [{
592
+ selector: '[ngsCommentEditorCommandItalic]',
593
+ standalone: true,
594
+ host: {
595
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleItalic')) ? '' : null`,
596
+ '[class.active]': `commentEditor && commentEditor.api.isActive('italic')`,
597
+ '(click)': `onClick()`
598
+ }
599
+ }]
600
+ }] });
601
+
602
+ class CommentEditorCommandStrikeDirective {
603
+ commentEditor = inject(COMMENT_EDITOR);
604
+ onClick() {
605
+ this.commentEditor.api.runCommand('toggleStrike');
606
+ }
607
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandStrikeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
608
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandStrikeDirective, isStandalone: true, selector: "[ngsCommentEditorCommandStrike]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleStrike')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('strike')" } }, ngImport: i0 });
609
+ }
610
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandStrikeDirective, decorators: [{
611
+ type: Directive,
612
+ args: [{
613
+ selector: '[ngsCommentEditorCommandStrike]',
614
+ standalone: true,
615
+ host: {
616
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleStrike')) ? '' : null`,
617
+ '[class.active]': `commentEditor && commentEditor.api.isActive('strike')`,
618
+ '(click)': `onClick()`
619
+ }
620
+ }]
621
+ }] });
622
+
623
+ class CommentEditorCommandBulletListDirective {
624
+ commentEditor = inject(COMMENT_EDITOR);
625
+ onClick() {
626
+ this.commentEditor.api.runCommand('toggleBulletList');
627
+ }
628
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandBulletListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
629
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandBulletListDirective, isStandalone: true, selector: "[ngsCommentEditorCommandBulletList]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleBulletList')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('bulletList')" } }, ngImport: i0 });
630
+ }
631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandBulletListDirective, decorators: [{
632
+ type: Directive,
633
+ args: [{
634
+ selector: '[ngsCommentEditorCommandBulletList]',
635
+ standalone: true,
636
+ host: {
637
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleBulletList')) ? '' : null`,
638
+ '[class.active]': `commentEditor && commentEditor.api.isActive('bulletList')`,
639
+ '(click)': `onClick()`
640
+ }
641
+ }]
642
+ }] });
643
+
644
+ class CommentEditorCommandOrderedListDirective {
645
+ commentEditor = inject(COMMENT_EDITOR);
646
+ onClick() {
647
+ this.commentEditor.api.runCommand('toggleOrderedList');
648
+ }
649
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandOrderedListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
650
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandOrderedListDirective, isStandalone: true, selector: "[ngsCommentEditorCommandOrderedList]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleOrderedList')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('orderedList')" } }, ngImport: i0 });
651
+ }
652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandOrderedListDirective, decorators: [{
653
+ type: Directive,
654
+ args: [{
655
+ selector: '[ngsCommentEditorCommandOrderedList]',
656
+ standalone: true,
657
+ host: {
658
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleOrderedList')) ? '' : null`,
659
+ '[class.active]': `commentEditor && commentEditor.api.isActive('orderedList')`,
660
+ '(click)': `onClick()`
661
+ }
662
+ }]
663
+ }] });
664
+
665
+ class CommentEditorCommandBlockquoteDirective {
666
+ commentEditor = inject(COMMENT_EDITOR);
667
+ onClick() {
668
+ this.commentEditor.api.runCommand('toggleBlockquote');
669
+ }
670
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandBlockquoteDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
671
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandBlockquoteDirective, isStandalone: true, selector: "[ngsCommentEditorCommandBlockquote]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleBlockquote')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('blockquote')" } }, ngImport: i0 });
672
+ }
673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandBlockquoteDirective, decorators: [{
674
+ type: Directive,
675
+ args: [{
676
+ selector: '[ngsCommentEditorCommandBlockquote]',
677
+ standalone: true,
678
+ host: {
679
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleBlockquote')) ? '' : null`,
680
+ '[class.active]': `commentEditor && commentEditor.api.isActive('blockquote')`,
681
+ '(click)': `onClick()`
682
+ }
683
+ }]
684
+ }] });
685
+
686
+ class CommentEditorCommandCodeBlockDirective {
687
+ commentEditor = inject(COMMENT_EDITOR);
688
+ onClick() {
689
+ this.commentEditor.api.runCommand('toggleCodeBlock');
690
+ }
691
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandCodeBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
692
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandCodeBlockDirective, isStandalone: true, selector: "[ngsCommentEditorCommandCodeBlock]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleCodeBlock')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('codeBlock')" } }, ngImport: i0 });
693
+ }
694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandCodeBlockDirective, decorators: [{
695
+ type: Directive,
696
+ args: [{
697
+ selector: '[ngsCommentEditorCommandCodeBlock]',
698
+ standalone: true,
699
+ host: {
700
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleCodeBlock')) ? '' : null`,
701
+ '[class.active]': `commentEditor && commentEditor.api.isActive('codeBlock')`,
702
+ '(click)': `onClick()`
703
+ }
704
+ }]
705
+ }] });
706
+
707
+ class CommentEditorCommandImageDirective {
708
+ commentEditor = inject(COMMENT_EDITOR);
709
+ onImageSelected(event) {
710
+ const file = event.files[0];
711
+ const reader = new FileReader();
712
+ reader.readAsDataURL(file);
713
+ reader.onload = () => {
714
+ const src = reader.result;
715
+ this.commentEditor.api.editor().chain().focus().addImageUploadingPlaceholder({ src, file }).run();
716
+ };
717
+ }
718
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
719
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandImageDirective, isStandalone: true, selector: "[ngsCommentEditorCommandImage]", host: { listeners: { "fileSelected": "onImageSelected($event)" }, properties: { "attr.accept": "\"image/*\"" } }, hostDirectives: [{ directive: i1.UploadTriggerDirective, outputs: ["fileSelected", "fileSelected"] }], ngImport: i0 });
720
+ }
721
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandImageDirective, decorators: [{
722
+ type: Directive,
723
+ args: [{
724
+ selector: '[ngsCommentEditorCommandImage]',
725
+ standalone: true,
726
+ hostDirectives: [
727
+ {
728
+ directive: UploadTriggerDirective,
729
+ outputs: ['fileSelected']
730
+ }
731
+ ],
732
+ host: {
733
+ '[attr.accept]': '"image/*"',
734
+ '(fileSelected)': `onImageSelected($event)`
735
+ }
736
+ }]
737
+ }] });
738
+
739
+ class YoutubeDialog {
740
+ _dialogRef = inject(DialogRef);
741
+ _data = inject(DIALOG_DATA);
742
+ linkUrl = this._data.linkUrl || '';
743
+ isUpdate = !!this._data.linkUrl;
744
+ onSubmit() {
745
+ this._dialogRef.close(this.linkUrl);
746
+ }
747
+ _onNoClick() {
748
+ this._dialogRef.close();
749
+ }
750
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: YoutubeDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
751
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: YoutubeDialog, isStandalone: true, selector: "ngs-youtube", ngImport: i0, template: "<form class=\"w-[500px]\" (ngSubmit)=\"onSubmit()\">\n <h3 ngs-dialog-title>\n @if (isUpdate) {\n Update Youtube\n } @else {\n Add Youtube\n }\n </h3>\n <ngs-dialog-content>\n <div class=\"pt-4\">\n <ngs-form-field class=\"w-full\">\n <ngs-label>Paste Url</ngs-label>\n <input name=\"linkUrl\" ngsInput [(ngModel)]=\"linkUrl\">\n </ngs-form-field>\n </div>\n </ngs-dialog-content>\n <div ngs-dialog-actions align=\"end\">\n <button ngsButton (click)=\"_onNoClick()\">Cancel</button>\n <button type=\"submit\" ngsButton=\"filled\" color=\"primary\"\n cdkFocusInitial [disabled]=\"!linkUrl.trim() || null\">\n @if (isUpdate) {\n Save\n } @else {\n Add url\n }\n </button>\n </div>\n</form>\n", styles: ["/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: DialogActions, selector: "ngs-dialog-actions, [ngs-dialog-actions], [ngsDialogActions]", inputs: ["align"] }, { kind: "component", type: DialogContent, selector: "ngs-dialog-content,[ngs-dialog-content],[ngsDialogContent]" }, { kind: "component", type: DialogTitle, selector: "ngs-dialog-title, [ngs-dialog-title], [ngsDialogTitle]", inputs: ["id"], exportAs: ["ngsDialogTitle"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty"], exportAs: ["ngsFormField"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "ngmodule", type: ReactiveFormsModule }] });
752
+ }
753
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: YoutubeDialog, decorators: [{
754
+ type: Component,
755
+ args: [{ selector: 'ngs-youtube', imports: [
756
+ FormsModule,
757
+ Button,
758
+ DialogActions,
759
+ DialogContent,
760
+ DialogTitle,
761
+ FormField,
762
+ Input,
763
+ Label,
764
+ ReactiveFormsModule
765
+ ], template: "<form class=\"w-[500px]\" (ngSubmit)=\"onSubmit()\">\n <h3 ngs-dialog-title>\n @if (isUpdate) {\n Update Youtube\n } @else {\n Add Youtube\n }\n </h3>\n <ngs-dialog-content>\n <div class=\"pt-4\">\n <ngs-form-field class=\"w-full\">\n <ngs-label>Paste Url</ngs-label>\n <input name=\"linkUrl\" ngsInput [(ngModel)]=\"linkUrl\">\n </ngs-form-field>\n </div>\n </ngs-dialog-content>\n <div ngs-dialog-actions align=\"end\">\n <button ngsButton (click)=\"_onNoClick()\">Cancel</button>\n <button type=\"submit\" ngsButton=\"filled\" color=\"primary\"\n cdkFocusInitial [disabled]=\"!linkUrl.trim() || null\">\n @if (isUpdate) {\n Save\n } @else {\n Add url\n }\n </button>\n </div>\n</form>\n", styles: ["/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
766
+ }] });
767
+
768
+ class CommentEditorCommandYoutubeDirective {
769
+ commentEditor = inject(COMMENT_EDITOR);
770
+ _dialog = inject(Dialog);
771
+ _destroyRef = inject(DestroyRef);
772
+ onClick() {
773
+ const dialogRef = this._dialog.open(YoutubeDialog, {
774
+ data: {
775
+ linkUrl: this.commentEditor.api.editor().getAttributes('iframe').src
776
+ }
777
+ });
778
+ dialogRef
779
+ .afterClosed()
780
+ .pipe(takeUntilDestroyed(this._destroyRef))
781
+ .subscribe((linkUrl) => {
782
+ if (typeof linkUrl === 'undefined') {
783
+ return;
784
+ }
785
+ this.commentEditor.api.editor().commands.setYoutubeVideo({
786
+ src: linkUrl
787
+ });
788
+ });
789
+ }
790
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandYoutubeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
791
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandYoutubeDirective, isStandalone: true, selector: "[ngsCommentEditorCommandYoutube]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleBlockquote')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('blockquote')" } }, ngImport: i0 });
792
+ }
793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandYoutubeDirective, decorators: [{
794
+ type: Directive,
795
+ args: [{
796
+ selector: '[ngsCommentEditorCommandYoutube]',
797
+ standalone: true,
798
+ host: {
799
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleBlockquote')) ? '' : null`,
800
+ '[class.active]': `commentEditor && commentEditor.api.isActive('blockquote')`,
801
+ '(click)': `onClick()`
802
+ }
803
+ }]
804
+ }] });
805
+
806
+ class LinkDialog {
807
+ _dialogRef = inject(DialogRef);
808
+ _data = inject(DIALOG_DATA);
809
+ linkUrl = this._data.linkUrl || '';
810
+ isUpdate = !!this._data.linkUrl;
811
+ onSubmit() {
812
+ this._dialogRef.close(this.linkUrl);
813
+ }
814
+ _onNoClick() {
815
+ this._dialogRef.close();
816
+ }
817
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LinkDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
818
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", type: LinkDialog, isStandalone: true, selector: "ngs-link", ngImport: i0, template: "<form class=\"w-[500px]\" (ngSubmit)=\"onSubmit()\">\n <h3 ngs-dialog-title>\n @if (isUpdate) {\n Update Link\n } @else {\n Add Link\n }</h3>\n <ngs-dialog-content>\n <div class=\"pt-4\">\n <ngs-form-field class=\"w-full\">\n <ngs-label>Paste Link</ngs-label>\n <input name=\"linkUrl\" ngsInput [(ngModel)]=\"linkUrl\">\n </ngs-form-field>\n </div>\n </ngs-dialog-content>\n <div ngs-dialog-actions align=\"end\">\n <button ngsButton (click)=\"_onNoClick()\">Cancel</button>\n <button type=\"submit\" ngsButton=\"filled\" color=\"primary\"\n cdkFocusInitial [disabled]=\"!linkUrl.trim() || null\">\n @if (isUpdate) {\n Save\n } @else {\n Add link\n }\n </button>\n </div>\n</form>\n", styles: ["/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: DialogActions, selector: "ngs-dialog-actions, [ngs-dialog-actions], [ngsDialogActions]", inputs: ["align"] }, { kind: "component", type: DialogContent, selector: "ngs-dialog-content,[ngs-dialog-content],[ngsDialogContent]" }, { kind: "component", type: DialogTitle, selector: "ngs-dialog-title, [ngs-dialog-title], [ngsDialogTitle]", inputs: ["id"], exportAs: ["ngsDialogTitle"] }, { kind: "component", type: FormField, selector: "ngs-form-field", inputs: ["subscriptHiddenIfEmpty"], exportAs: ["ngsFormField"] }, { kind: "directive", type: Input, selector: "input[ngsInput], textarea[ngsInput]", inputs: ["id", "placeholder", "required", "disabled", "readonly", "errorStateMatcher"], exportAs: ["ngsInput"] }, { kind: "component", type: Label, selector: "ngs-label" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }] });
819
+ }
820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LinkDialog, decorators: [{
821
+ type: Component,
822
+ args: [{ selector: 'ngs-link', imports: [
823
+ Button,
824
+ DialogActions,
825
+ DialogContent,
826
+ DialogTitle,
827
+ FormField,
828
+ Input,
829
+ Label,
830
+ ReactiveFormsModule,
831
+ FormsModule
832
+ ], template: "<form class=\"w-[500px]\" (ngSubmit)=\"onSubmit()\">\n <h3 ngs-dialog-title>\n @if (isUpdate) {\n Update Link\n } @else {\n Add Link\n }</h3>\n <ngs-dialog-content>\n <div class=\"pt-4\">\n <ngs-form-field class=\"w-full\">\n <ngs-label>Paste Link</ngs-label>\n <input name=\"linkUrl\" ngsInput [(ngModel)]=\"linkUrl\">\n </ngs-form-field>\n </div>\n </ngs-dialog-content>\n <div ngs-dialog-actions align=\"end\">\n <button ngsButton (click)=\"_onNoClick()\">Cancel</button>\n <button type=\"submit\" ngsButton=\"filled\" color=\"primary\"\n cdkFocusInitial [disabled]=\"!linkUrl.trim() || null\">\n @if (isUpdate) {\n Save\n } @else {\n Add link\n }\n </button>\n </div>\n</form>\n", styles: ["/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */\n"] }]
833
+ }] });
834
+
835
+ class CommentEditorCommandLinkDirective {
836
+ _destroyRef = inject(DestroyRef);
837
+ _dialog = inject(Dialog);
838
+ commentEditor = inject(COMMENT_EDITOR);
839
+ setLinkActive = false;
840
+ onClick() {
841
+ this.setLinkActive = true;
842
+ const dialogRef = this._dialog.open(LinkDialog, {
843
+ data: {
844
+ linkUrl: this.commentEditor.api.editor().getAttributes('link').href
845
+ }
846
+ });
847
+ dialogRef
848
+ .afterClosed()
849
+ .pipe(takeUntilDestroyed(this._destroyRef))
850
+ .subscribe((linkUrl) => {
851
+ this.setLinkActive = false;
852
+ if (typeof linkUrl === 'undefined') {
853
+ return;
854
+ }
855
+ this._setLink(linkUrl);
856
+ });
857
+ }
858
+ _setLink(url) {
859
+ // cancelled
860
+ if (url === null) {
861
+ return;
862
+ }
863
+ // empty
864
+ if (url === '') {
865
+ this.commentEditor.api.editor()
866
+ .chain()
867
+ .focus()
868
+ .extendMarkRange('link')
869
+ .unsetLink()
870
+ .run();
871
+ return;
872
+ }
873
+ // update link
874
+ this.commentEditor.api.editor()
875
+ .chain()
876
+ .focus()
877
+ .extendMarkRange('link')
878
+ .setLink({ href: url })
879
+ .run();
880
+ }
881
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
882
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandLinkDirective, isStandalone: true, selector: "[ngsCommentEditorCommandLink]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleLink')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('link')" } }, ngImport: i0 });
883
+ }
884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandLinkDirective, decorators: [{
885
+ type: Directive,
886
+ args: [{
887
+ selector: '[ngsCommentEditorCommandLink]',
888
+ standalone: true,
889
+ host: {
890
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleLink')) ? '' : null`,
891
+ '[class.active]': `commentEditor && commentEditor.api.isActive('link')`,
892
+ '(click)': `onClick()`
893
+ }
894
+ }]
895
+ }] });
896
+
897
+ class CommentEditorCommandCodeDirective {
898
+ commentEditor = inject(COMMENT_EDITOR);
899
+ onClick() {
900
+ this.commentEditor.api.runCommand('toggleCode');
901
+ }
902
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandCodeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
903
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandCodeDirective, isStandalone: true, selector: "[ngsCommentEditorCommandCode]", host: { listeners: { "click": "onClick()" }, properties: { "attr.disabled": "(commentEditor && commentEditor.api.isCommandDisabled('toggleCode')) ? '' : null", "class.active": "commentEditor && commentEditor.api.isActive('code')" } }, ngImport: i0 });
904
+ }
905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandCodeDirective, decorators: [{
906
+ type: Directive,
907
+ args: [{
908
+ selector: '[ngsCommentEditorCommandCode]',
909
+ standalone: true,
910
+ host: {
911
+ '[attr.disabled]': `(commentEditor && commentEditor.api.isCommandDisabled('toggleCode')) ? '' : null`,
912
+ '[class.active]': `commentEditor && commentEditor.api.isActive('code')`,
913
+ '(click)': `onClick()`
914
+ }
915
+ }]
916
+ }] });
917
+
918
+ class CommentEditorCommandEditLinkDirective {
919
+ _destroyRef = inject(DestroyRef);
920
+ _dialog = inject(Dialog);
921
+ commentEditor = inject(COMMENT_EDITOR);
922
+ setLinkActive = false;
923
+ onClick() {
924
+ this.setLinkActive = true;
925
+ const dialogRef = this._dialog.open(LinkDialog, {
926
+ data: {
927
+ linkUrl: this.commentEditor.api.editor().getAttributes('link').href
928
+ }
929
+ });
930
+ dialogRef
931
+ .afterClosed()
932
+ .pipe(takeUntilDestroyed(this._destroyRef))
933
+ .subscribe((linkUrl) => {
934
+ this.setLinkActive = false;
935
+ if (typeof linkUrl === 'undefined') {
936
+ return;
937
+ }
938
+ this._setLink(linkUrl);
939
+ });
940
+ }
941
+ _setLink(url) {
942
+ // cancelled
943
+ if (url === null) {
944
+ return;
945
+ }
946
+ // empty
947
+ if (url === '') {
948
+ this.commentEditor.api.editor()
949
+ .chain()
950
+ .focus()
951
+ .extendMarkRange('link')
952
+ .unsetLink()
953
+ .run();
954
+ return;
955
+ }
956
+ // update link
957
+ this.commentEditor.api.editor()
958
+ .chain()
959
+ .focus()
960
+ .extendMarkRange('link')
961
+ .setLink({ href: url })
962
+ .run();
963
+ }
964
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandEditLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
965
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandEditLinkDirective, isStandalone: true, selector: "[ngsCommentEditorCommandEditLink]", host: { listeners: { "click": "onClick()" }, properties: { "class.button": "true" } }, ngImport: i0 });
966
+ }
967
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandEditLinkDirective, decorators: [{
968
+ type: Directive,
969
+ args: [{
970
+ selector: '[ngsCommentEditorCommandEditLink]',
971
+ standalone: true,
972
+ host: {
973
+ '[class.button]': 'true',
974
+ '(click)': `onClick()`
975
+ }
976
+ }]
977
+ }] });
978
+
979
+ class CommentEditorCommandUnsetLinkDirective {
980
+ commentEditor = inject(COMMENT_EDITOR);
981
+ onClick() {
982
+ this.commentEditor.api.editor().commands.unsetLink();
983
+ }
984
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandUnsetLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
985
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandUnsetLinkDirective, isStandalone: true, selector: "[ngsCommentEditorCommandUnsetLink]", host: { listeners: { "click": "onClick()" }, properties: { "class.button": "true" } }, ngImport: i0 });
986
+ }
987
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandUnsetLinkDirective, decorators: [{
988
+ type: Directive,
989
+ args: [{
990
+ selector: '[ngsCommentEditorCommandUnsetLink]',
991
+ standalone: true,
992
+ host: {
993
+ '[class.button]': 'true',
994
+ '(click)': `onClick()`
995
+ }
996
+ }]
997
+ }] });
998
+
999
+ class CommentEditorCommandToggleToolbarDirective {
1000
+ commentEditor = inject(COMMENT_EDITOR);
1001
+ onClick() {
1002
+ this.commentEditor.api.toggleToolbar();
1003
+ }
1004
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandToggleToolbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1005
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.4", type: CommentEditorCommandToggleToolbarDirective, isStandalone: true, selector: "[ngsCommentEditorCommandToggleToolbar]", host: { listeners: { "click": "onClick()" }, properties: { "class.active": "commentEditor && commentEditor.api.isToolbarActive()" } }, ngImport: i0 });
1006
+ }
1007
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: CommentEditorCommandToggleToolbarDirective, decorators: [{
1008
+ type: Directive,
1009
+ args: [{
1010
+ selector: '[ngsCommentEditorCommandToggleToolbar]',
1011
+ standalone: true,
1012
+ host: {
1013
+ '[class.active]': `commentEditor && commentEditor.api.isToolbarActive()`,
1014
+ '(click)': `onClick()`
1015
+ }
1016
+ }]
1017
+ }] });
1018
+
1019
+ /**
1020
+ * Generated bundle index. Do not edit.
1021
+ */
1022
+
1023
+ export { COMMENT_EDITOR, COMMENT_EDITOR_BUBBLE_MENU, CommentEditor, CommentEditorBubbleMenu, CommentEditorCommandBlockquoteDirective, CommentEditorCommandBoldDirective, CommentEditorCommandBulletListDirective, CommentEditorCommandCodeBlockDirective, CommentEditorCommandCodeDirective, CommentEditorCommandDirective, CommentEditorCommandEditLinkDirective, CommentEditorCommandImageDirective, CommentEditorCommandItalicDirective, CommentEditorCommandLinkDirective, CommentEditorCommandOrderedListDirective, CommentEditorCommandStrikeDirective, CommentEditorCommandToggleToolbarDirective, CommentEditorCommandUnsetLinkDirective, CommentEditorCommandYoutubeDirective, CommentEditorDivider, CommentEditorFooterBar, CommentEditorToolbar };
1024
+ //# sourceMappingURL=ngstarter-ui-components-comment-editor.mjs.map