@sdcorejs/angular 22.3.1 → 22.3.3

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 (386) hide show
  1. package/assets/STYLE-GUIDE.md +25 -5
  2. package/assets/THEME.md +289 -5
  3. package/assets/licenses/tiptap-oss-NOTICES.txt +332 -0
  4. package/assets/scss/ckeditor5.scss +2 -88
  5. package/assets/scss/core/_control.scss +39 -0
  6. package/assets/scss/core/form.scss +444 -45
  7. package/assets/scss/core/view.scss +24 -0
  8. package/assets/scss/editor-content.scss +173 -0
  9. package/assets/scss/sd-core.scss +1 -0
  10. package/assets/scss/themes/_component-tokens.scss +123 -32
  11. package/assets/scss/themes/_material-tokens.scss +112 -0
  12. package/assets/scss/themes/_presets.scss +25 -0
  13. package/assets/scss/themes/_scales.scss +10 -0
  14. package/assets/scss/themes/_semantic.scss +13 -0
  15. package/assets/scss/themes/default.scss +8 -2
  16. package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs +5 -5
  17. package/fesm2022/sdcorejs-angular-components-api-contract-builder.mjs.map +1 -1
  18. package/fesm2022/sdcorejs-angular-components-avatar.mjs +166 -11
  19. package/fesm2022/sdcorejs-angular-components-avatar.mjs.map +1 -1
  20. package/fesm2022/sdcorejs-angular-components-badge.mjs +590 -24
  21. package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
  22. package/fesm2022/sdcorejs-angular-components-button.mjs +35 -3
  23. package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
  24. package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs +5 -20
  25. package/fesm2022/sdcorejs-angular-components-ckeditor-styles.mjs.map +1 -1
  26. package/fesm2022/sdcorejs-angular-components-data-state.mjs +1 -1
  27. package/fesm2022/sdcorejs-angular-components-data-state.mjs.map +1 -1
  28. package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1906 -0
  29. package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -0
  30. package/fesm2022/sdcorejs-angular-components-editor.mjs +461 -757
  31. package/fesm2022/sdcorejs-angular-components-editor.mjs.map +1 -1
  32. package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +69 -37
  33. package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
  34. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +2195 -1182
  35. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  36. package/fesm2022/sdcorejs-angular-components-history.mjs +5 -2
  37. package/fesm2022/sdcorejs-angular-components-history.mjs.map +1 -1
  38. package/fesm2022/sdcorejs-angular-components-image-editor.mjs +1 -1
  39. package/fesm2022/sdcorejs-angular-components-image-editor.mjs.map +1 -1
  40. package/fesm2022/sdcorejs-angular-components-import-excel.mjs +21 -6
  41. package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
  42. package/fesm2022/sdcorejs-angular-components-inform.mjs +1 -1
  43. package/fesm2022/sdcorejs-angular-components-inform.mjs.map +1 -1
  44. package/fesm2022/sdcorejs-angular-components-kanban.mjs +12 -2
  45. package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -1
  46. package/fesm2022/sdcorejs-angular-components-mini-editor.mjs +182 -284
  47. package/fesm2022/sdcorejs-angular-components-mini-editor.mjs.map +1 -1
  48. package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs +1 -316
  49. package/fesm2022/sdcorejs-angular-components-modal-resizable.mjs.map +1 -1
  50. package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
  51. package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
  52. package/fesm2022/sdcorejs-angular-components-operator.mjs +274 -44
  53. package/fesm2022/sdcorejs-angular-components-operator.mjs.map +1 -1
  54. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +12 -12
  55. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  56. package/fesm2022/sdcorejs-angular-components-query-builder.mjs +1 -1
  57. package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
  58. package/fesm2022/sdcorejs-angular-components-section.mjs +17 -5
  59. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  60. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
  61. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  62. package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
  63. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +574 -95
  64. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  65. package/fesm2022/sdcorejs-angular-components-table.mjs +1034 -119
  66. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  67. package/fesm2022/sdcorejs-angular-components-tree.mjs +1 -1
  68. package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
  69. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +932 -174
  70. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  71. package/fesm2022/sdcorejs-angular-components-view.mjs +2 -2
  72. package/fesm2022/sdcorejs-angular-components-view.mjs.map +1 -1
  73. package/fesm2022/sdcorejs-angular-components-window.mjs +498 -0
  74. package/fesm2022/sdcorejs-angular-components-window.mjs.map +1 -0
  75. package/fesm2022/sdcorejs-angular-components.mjs +1 -0
  76. package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
  77. package/fesm2022/sdcorejs-angular-configurations.mjs.map +1 -1
  78. package/fesm2022/sdcorejs-angular-directives.mjs +18 -1
  79. package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
  80. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +20 -2
  81. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  82. package/fesm2022/sdcorejs-angular-forms-checkbox.mjs +2 -2
  83. package/fesm2022/sdcorejs-angular-forms-checkbox.mjs.map +1 -1
  84. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +483 -126
  85. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  86. package/fesm2022/sdcorejs-angular-forms-chip.mjs +437 -122
  87. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  88. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +86 -13
  89. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  90. package/fesm2022/sdcorejs-angular-forms-date.mjs +81 -18
  91. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  92. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +79 -16
  93. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  94. package/fesm2022/sdcorejs-angular-forms-directives.mjs +90 -2
  95. package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
  96. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +2 -2
  97. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
  98. package/fesm2022/sdcorejs-angular-forms-input-color.mjs +1 -1
  99. package/fesm2022/sdcorejs-angular-forms-input-color.mjs.map +1 -1
  100. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +63 -6
  101. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  102. package/fesm2022/sdcorejs-angular-forms-input.mjs +60 -7
  103. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  104. package/fesm2022/sdcorejs-angular-forms-models.mjs +88 -5
  105. package/fesm2022/sdcorejs-angular-forms-models.mjs.map +1 -1
  106. package/fesm2022/sdcorejs-angular-forms-radio.mjs +2 -2
  107. package/fesm2022/sdcorejs-angular-forms-radio.mjs.map +1 -1
  108. package/fesm2022/sdcorejs-angular-forms-segmented.mjs +5 -4
  109. package/fesm2022/sdcorejs-angular-forms-segmented.mjs.map +1 -1
  110. package/fesm2022/sdcorejs-angular-forms-select.mjs +95 -33
  111. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  112. package/fesm2022/sdcorejs-angular-forms-switch.mjs +2 -2
  113. package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
  114. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +16 -3
  115. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  116. package/fesm2022/sdcorejs-angular-forms-time.mjs +2 -2
  117. package/fesm2022/sdcorejs-angular-forms-time.mjs.map +1 -1
  118. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
  119. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
  120. package/fesm2022/sdcorejs-angular-i18n.mjs +1745 -22
  121. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  122. package/fesm2022/sdcorejs-angular-interceptors.mjs +1 -1
  123. package/fesm2022/sdcorejs-angular-interceptors.mjs.map +1 -1
  124. package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs +509 -0
  125. package/fesm2022/sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs.map +1 -0
  126. package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs +232 -0
  127. package/fesm2022/sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs.map +1 -0
  128. package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs +294 -0
  129. package/fesm2022/sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs.map +1 -0
  130. package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs +1556 -0
  131. package/fesm2022/sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs.map +1 -0
  132. package/fesm2022/sdcorejs-angular-modules-generic.mjs +2 -0
  133. package/fesm2022/sdcorejs-angular-modules-generic.mjs.map +1 -0
  134. package/fesm2022/sdcorejs-angular-modules-icon.mjs +96 -3
  135. package/fesm2022/sdcorejs-angular-modules-icon.mjs.map +1 -1
  136. package/fesm2022/sdcorejs-angular-modules-layout.mjs +2178 -38
  137. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  138. package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs +23 -0
  139. package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs.map +1 -0
  140. package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs +16 -0
  141. package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs.map +1 -0
  142. package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-Cfmr0L_5.mjs +51 -0
  143. package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-Cfmr0L_5.mjs.map +1 -0
  144. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-C7-itJqB.mjs +134 -0
  145. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-C7-itJqB.mjs.map +1 -0
  146. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CxgmaNod.mjs +132 -0
  147. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CxgmaNod.mjs.map +1 -0
  148. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C2GdGhkJ.mjs +100 -0
  149. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C2GdGhkJ.mjs.map +1 -0
  150. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CzJh4LMR.mjs +119 -0
  151. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CzJh4LMR.mjs.map +1 -0
  152. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DIivNX4o.mjs +469 -0
  153. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DIivNX4o.mjs.map +1 -0
  154. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +18 -0
  155. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +1 -0
  156. package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-B0nhFd_M.mjs +67 -0
  157. package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-B0nhFd_M.mjs.map +1 -0
  158. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-D1dqsKX0.mjs +152 -0
  159. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-D1dqsKX0.mjs.map +1 -0
  160. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Dkmm0a2Y.mjs +479 -0
  161. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Dkmm0a2Y.mjs.map +1 -0
  162. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-WK0AcxNJ.mjs +175 -0
  163. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-WK0AcxNJ.mjs.map +1 -0
  164. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-yJ5fPyYU.mjs +92 -0
  165. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-yJ5fPyYU.mjs.map +1 -0
  166. package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BvhEMUgY.mjs +533 -0
  167. package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-BvhEMUgY.mjs.map +1 -0
  168. package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-Ydotvlyc.mjs +64 -0
  169. package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-Ydotvlyc.mjs.map +1 -0
  170. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs +92 -0
  171. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs.map +1 -0
  172. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs +242 -0
  173. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs.map +1 -0
  174. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-cxNRkeRU.mjs +179 -0
  175. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-cxNRkeRU.mjs.map +1 -0
  176. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs +72 -0
  177. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs.map +1 -0
  178. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-D1zWXyN6.mjs +100 -0
  179. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-D1zWXyN6.mjs.map +1 -0
  180. package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BK__9Mzb.mjs +541 -0
  181. package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BK__9Mzb.mjs.map +1 -0
  182. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-1Xn1WaAP.mjs +647 -0
  183. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-1Xn1WaAP.mjs.map +1 -0
  184. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6Ndq542.mjs +120 -0
  185. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6Ndq542.mjs.map +1 -0
  186. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Bv_l7vnz.mjs +73 -0
  187. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Bv_l7vnz.mjs.map +1 -0
  188. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CaXgC8wK.mjs +172 -0
  189. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CaXgC8wK.mjs.map +1 -0
  190. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-ChwTb4BU.mjs +118 -0
  191. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-ChwTb4BU.mjs.map +1 -0
  192. package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-DKK3NmbN.mjs +1069 -0
  193. package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-DKK3NmbN.mjs.map +1 -0
  194. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs +186 -0
  195. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs.map +1 -0
  196. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs +97 -0
  197. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs.map +1 -0
  198. package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs +12 -0
  199. package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs.map +1 -0
  200. package/fesm2022/sdcorejs-angular-modules-pattern-product.service-GSlXwL2Z.mjs +49 -0
  201. package/fesm2022/sdcorejs-angular-modules-pattern-product.service-GSlXwL2Z.mjs.map +1 -0
  202. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-DPBwMafn.mjs +301 -0
  203. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-DPBwMafn.mjs.map +1 -0
  204. package/fesm2022/sdcorejs-angular-modules-pattern-routes-1kifjm82.mjs +100 -0
  205. package/fesm2022/sdcorejs-angular-modules-pattern-routes-1kifjm82.mjs.map +1 -0
  206. package/fesm2022/sdcorejs-angular-modules-pattern-routes-B6z9lJYB.mjs +45 -0
  207. package/fesm2022/sdcorejs-angular-modules-pattern-routes-B6z9lJYB.mjs.map +1 -0
  208. package/fesm2022/sdcorejs-angular-modules-pattern-routes-D1fsRfRB.mjs +66 -0
  209. package/fesm2022/sdcorejs-angular-modules-pattern-routes-D1fsRfRB.mjs.map +1 -0
  210. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DdCFCwxY.mjs +50 -0
  211. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DdCFCwxY.mjs.map +1 -0
  212. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DeThmv4f.mjs +74 -0
  213. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DeThmv4f.mjs.map +1 -0
  214. package/fesm2022/sdcorejs-angular-modules-pattern-routes-bQpdxKlY.mjs +166 -0
  215. package/fesm2022/sdcorejs-angular-modules-pattern-routes-bQpdxKlY.mjs.map +1 -0
  216. package/fesm2022/sdcorejs-angular-modules-pattern-routes-h66efEeH.mjs +74 -0
  217. package/fesm2022/sdcorejs-angular-modules-pattern-routes-h66efEeH.mjs.map +1 -0
  218. package/fesm2022/sdcorejs-angular-modules-pattern-routes-t3O2L2J5.mjs +43 -0
  219. package/fesm2022/sdcorejs-angular-modules-pattern-routes-t3O2L2J5.mjs.map +1 -0
  220. package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-B6w4N6wo.mjs +413 -0
  221. package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-B6w4N6wo.mjs.map +1 -0
  222. package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BIYHlzVQ.mjs +325 -0
  223. package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BIYHlzVQ.mjs.map +1 -0
  224. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DKgmhJT2.mjs +146 -0
  225. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DKgmhJT2.mjs.map +1 -0
  226. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-nnldn2cz.mjs +135 -0
  227. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-nnldn2cz.mjs.map +1 -0
  228. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-C0Bewuwz.mjs +129 -0
  229. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-C0Bewuwz.mjs.map +1 -0
  230. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Qlh3Lm2p.mjs +360 -0
  231. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Qlh3Lm2p.mjs.map +1 -0
  232. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-p9R5-eou.mjs +101 -0
  233. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-p9R5-eou.mjs.map +1 -0
  234. package/fesm2022/sdcorejs-angular-modules-pattern.mjs +2 -0
  235. package/fesm2022/sdcorejs-angular-modules-pattern.mjs.map +1 -0
  236. package/fesm2022/sdcorejs-angular-modules.mjs +1 -0
  237. package/fesm2022/sdcorejs-angular-modules.mjs.map +1 -1
  238. package/fesm2022/sdcorejs-angular-pipes.mjs +27 -7
  239. package/fesm2022/sdcorejs-angular-pipes.mjs.map +1 -1
  240. package/fesm2022/sdcorejs-angular-services-confirm.mjs +1 -1
  241. package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
  242. package/fesm2022/sdcorejs-angular-services-date-time.mjs +143 -0
  243. package/fesm2022/sdcorejs-angular-services-date-time.mjs.map +1 -0
  244. package/fesm2022/sdcorejs-angular-services-storage.mjs +44 -8
  245. package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
  246. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +104 -4
  247. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
  248. package/fesm2022/sdcorejs-angular-services.mjs +1 -0
  249. package/fesm2022/sdcorejs-angular-services.mjs.map +1 -1
  250. package/fesm2022/sdcorejs-angular-utilities-read-state.mjs +4 -0
  251. package/fesm2022/sdcorejs-angular-utilities-read-state.mjs.map +1 -1
  252. package/fesm2022/sdcorejs-angular-utilities-theme.mjs +10 -0
  253. package/fesm2022/sdcorejs-angular-utilities-theme.mjs.map +1 -1
  254. package/modules/pattern/README.md +76 -0
  255. package/modules/pattern/docs/detail.md +237 -0
  256. package/modules/pattern/docs/drawer.md +484 -0
  257. package/modules/pattern/docs/flow.md +631 -0
  258. package/modules/pattern/docs/form.md +518 -0
  259. package/modules/pattern/docs/header-actions.md +342 -0
  260. package/modules/pattern/docs/list.md +247 -0
  261. package/modules/pattern/docs/relation.md +180 -0
  262. package/modules/pattern/docs/select.md +206 -0
  263. package/modules/pattern/docs/split.md +350 -0
  264. package/modules/pattern/docs/states.md +168 -0
  265. package/modules/pattern/features/approval/entity.resolver.ts +21 -0
  266. package/modules/pattern/features/approval/pages/detail/detail.component.ts +139 -0
  267. package/modules/pattern/features/approval/pages/list/approval-inbox.ts +7 -0
  268. package/modules/pattern/features/approval/pages/list/list.component.html +20 -0
  269. package/modules/pattern/features/approval/pages/list/list.component.ts +149 -0
  270. package/modules/pattern/features/approval/routes.ts +30 -0
  271. package/modules/pattern/features/approval/services/approval.model.ts +38 -0
  272. package/modules/pattern/features/approval/services/approval.service.ts +23 -0
  273. package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +123 -0
  274. package/modules/pattern/features/category/components/general-information-form/general-information-form.component.ts +61 -0
  275. package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +134 -0
  276. package/modules/pattern/features/category/entity.resolver.ts +27 -0
  277. package/modules/pattern/features/category/pages/list/list.component.html +20 -0
  278. package/modules/pattern/features/category/pages/list/list.component.ts +105 -0
  279. package/modules/pattern/features/category/routes.ts +42 -0
  280. package/modules/pattern/features/category/services/category.model.ts +39 -0
  281. package/modules/pattern/features/category/services/category.service.ts +36 -0
  282. package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +131 -0
  283. package/modules/pattern/features/customer/components/customer-select/customer-select.component.ts +72 -0
  284. package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.ts +30 -0
  285. package/modules/pattern/features/customer/components/debts-view/debts-view.component.ts +28 -0
  286. package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +106 -0
  287. package/modules/pattern/features/customer/components/documents-view/documents-view.component.ts +50 -0
  288. package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.ts +140 -0
  289. package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.ts +39 -0
  290. package/modules/pattern/features/customer/components/orders-view/orders-view.component.ts +35 -0
  291. package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +101 -0
  292. package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +127 -0
  293. package/modules/pattern/features/customer/entity.resolver.ts +21 -0
  294. package/modules/pattern/features/customer/pages/list/list.component.html +22 -0
  295. package/modules/pattern/features/customer/pages/list/list.component.ts +113 -0
  296. package/modules/pattern/features/customer/pages/profile/profile.component.ts +120 -0
  297. package/modules/pattern/features/customer/pipes/customer-detail.pipe.ts +18 -0
  298. package/modules/pattern/features/customer/routes.ts +59 -0
  299. package/modules/pattern/features/customer/services/customer.model.ts +87 -0
  300. package/modules/pattern/features/customer/services/customer.service.ts +79 -0
  301. package/modules/pattern/features/import/components/mapping-form/mapping-form.component.ts +41 -0
  302. package/modules/pattern/features/import/components/preview-view/preview-view.component.ts +44 -0
  303. package/modules/pattern/features/import/pages/flow/flow.component.ts +269 -0
  304. package/modules/pattern/features/import/routes.ts +19 -0
  305. package/modules/pattern/features/import/services/import.model.ts +82 -0
  306. package/modules/pattern/features/import/services/import.service.ts +18 -0
  307. package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +74 -0
  308. package/modules/pattern/features/order/components/bulk-result/bulk-result.component.ts +46 -0
  309. package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +96 -0
  310. package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +205 -0
  311. package/modules/pattern/features/order/components/lines-view/lines-view.component.ts +42 -0
  312. package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +128 -0
  313. package/modules/pattern/features/order/entity.resolver.ts +37 -0
  314. package/modules/pattern/features/order/pages/create/create.component.ts +99 -0
  315. package/modules/pattern/features/order/pages/detail/detail.component.ts +222 -0
  316. package/modules/pattern/features/order/pages/list/list.component.html +38 -0
  317. package/modules/pattern/features/order/pages/list/list.component.ts +291 -0
  318. package/modules/pattern/features/order/pages/update/update.component.ts +119 -0
  319. package/modules/pattern/features/order/routes.ts +54 -0
  320. package/modules/pattern/features/order/services/order.model.ts +109 -0
  321. package/modules/pattern/features/order/services/order.service.ts +63 -0
  322. package/modules/pattern/features/partner/pages/create/create.component.ts +324 -0
  323. package/modules/pattern/features/partner/routes.ts +20 -0
  324. package/modules/pattern/features/partner/services/partner.model.ts +30 -0
  325. package/modules/pattern/features/partner/services/partner.service.ts +17 -0
  326. package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +88 -0
  327. package/modules/pattern/features/product/components/product-select/product-select.component.ts +65 -0
  328. package/modules/pattern/features/product/components/product-status-select/product-status-select.component.ts +30 -0
  329. package/modules/pattern/features/product/entity.resolver.ts +21 -0
  330. package/modules/pattern/features/product/pages/create/create.component.ts +85 -0
  331. package/modules/pattern/features/product/pages/detail/detail.component.ts +53 -0
  332. package/modules/pattern/features/product/pages/list/list.component.html +30 -0
  333. package/modules/pattern/features/product/pages/list/list.component.ts +71 -0
  334. package/modules/pattern/features/product/pages/update/update.component.ts +86 -0
  335. package/modules/pattern/features/product/pipes/product-detail.pipe.ts +18 -0
  336. package/modules/pattern/features/product/routes.ts +48 -0
  337. package/modules/pattern/features/product/services/product.model.ts +38 -0
  338. package/modules/pattern/features/product/services/product.service.ts +48 -0
  339. package/modules/pattern/features/settings/pages/update/update.component.ts +227 -0
  340. package/modules/pattern/features/settings/routes.ts +24 -0
  341. package/modules/pattern/features/settings/services/settings.model.ts +18 -0
  342. package/modules/pattern/features/settings/services/settings.service.ts +15 -0
  343. package/modules/pattern/features/settings/settings.resolver.ts +8 -0
  344. package/package.json +44 -7
  345. package/types/sdcorejs-angular-components-avatar.d.ts +67 -2
  346. package/types/sdcorejs-angular-components-badge.d.ts +206 -6
  347. package/types/sdcorejs-angular-components-button.d.ts +20 -1
  348. package/types/sdcorejs-angular-components-ckeditor-styles.d.ts +3 -18
  349. package/types/sdcorejs-angular-components-editor-engine.d.ts +246 -0
  350. package/types/sdcorejs-angular-components-editor.d.ts +20 -17
  351. package/types/sdcorejs-angular-components-file-explorer.d.ts +4 -2
  352. package/types/sdcorejs-angular-components-form-generic.d.ts +246 -35
  353. package/types/sdcorejs-angular-components-mini-editor.d.ts +33 -70
  354. package/types/sdcorejs-angular-components-modal-resizable.d.ts +1 -124
  355. package/types/sdcorejs-angular-components-operator.d.ts +137 -8
  356. package/types/sdcorejs-angular-components-section.d.ts +13 -1
  357. package/types/sdcorejs-angular-components-splitter.d.ts +1 -1
  358. package/types/sdcorejs-angular-components-tab-router.d.ts +74 -19
  359. package/types/sdcorejs-angular-components-table.d.ts +210 -18
  360. package/types/sdcorejs-angular-components-upload-file.d.ts +181 -21
  361. package/types/sdcorejs-angular-components-window.d.ts +81 -0
  362. package/types/sdcorejs-angular-components.d.ts +1 -0
  363. package/types/sdcorejs-angular-configurations.d.ts +8 -1
  364. package/types/sdcorejs-angular-forms-autocomplete.d.ts +5 -0
  365. package/types/sdcorejs-angular-forms-chip-calendar.d.ts +163 -18
  366. package/types/sdcorejs-angular-forms-chip.d.ts +136 -26
  367. package/types/sdcorejs-angular-forms-date-range.d.ts +24 -2
  368. package/types/sdcorejs-angular-forms-date.d.ts +23 -2
  369. package/types/sdcorejs-angular-forms-directives.d.ts +47 -2
  370. package/types/sdcorejs-angular-forms-input-number.d.ts +23 -2
  371. package/types/sdcorejs-angular-forms-input.d.ts +23 -2
  372. package/types/sdcorejs-angular-forms-models.d.ts +38 -3
  373. package/types/sdcorejs-angular-forms-select.d.ts +32 -2
  374. package/types/sdcorejs-angular-i18n.d.ts +344 -2
  375. package/types/sdcorejs-angular-modules-generic.d.ts +316 -0
  376. package/types/sdcorejs-angular-modules-icon.d.ts +37 -6
  377. package/types/sdcorejs-angular-modules-layout.d.ts +622 -89
  378. package/types/sdcorejs-angular-modules-pattern.d.ts +50 -0
  379. package/types/sdcorejs-angular-modules.d.ts +1 -0
  380. package/types/sdcorejs-angular-pipes.d.ts +2 -0
  381. package/types/sdcorejs-angular-services-date-time.d.ts +57 -0
  382. package/types/sdcorejs-angular-services-storage.d.ts +8 -1
  383. package/types/sdcorejs-angular-services-unsaved-changes.d.ts +11 -0
  384. package/types/sdcorejs-angular-services.d.ts +1 -0
  385. package/types/sdcorejs-angular-utilities-read-state.d.ts +2 -0
  386. package/types/sdcorejs-angular-utilities-theme.d.ts +1 -1
@@ -1,338 +1,236 @@
1
1
  import * as i0 from '@angular/core';
2
- import { output, input, forwardRef, Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { CommonModule } from '@angular/common';
4
- import * as i1 from '@ckeditor/ckeditor5-angular';
5
- import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
6
- import { SdCKEditorStyles } from '@sdcorejs/angular/components/ckeditor-styles';
7
- import { ClassicEditor, Essentials, FontColor, Paragraph, Bold, Italic, Underline, Link, List, Undo, Widget, Markdown, Mention, HtmlDataProcessor } from 'ckeditor5';
8
- import { Subscription, Subject } from 'rxjs';
9
- import { throttleTime } from 'rxjs/operators';
2
+ import { input, output, signal, computed, inject, ChangeDetectorRef, effect, forwardRef, HostBinding, Input, ChangeDetectionStrategy, Component } from '@angular/core';
10
3
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
11
- import { sdSanitizeEditorHtml } from '@sdcorejs/angular/utilities/extensions';
4
+ import { SdEditorSurface } from '@sdcorejs/angular/components/editor-engine';
5
+ export { SdEditorImportError } from '@sdcorejs/angular/components/editor-engine';
12
6
 
13
- /**
14
- * Component sd-mini-editor - Editor đơn giản cho comment input
15
- * Sử dụng CKEditor với chế độ đơn giản (bold, italic, link)
16
- * Hỗ trợ mention và output format (html/markdown)
17
- *
18
- * @example
19
- * ```html
20
- * <sd-mini-editor
21
- * [option]="editorOption"
22
- * [(ngModel)]="content"
23
- * (contentChange)="onContentChange($event)"
24
- * >
25
- * </sd-mini-editor>
26
- * ```
27
- */
7
+ /** Compact Core toolbar with the same document schema as SdEditor. */
28
8
  class SdMiniEditor {
29
- /** Cấu hình option cho editor */
30
9
  option;
31
- get maxEditorHeight() {
32
- return this.option?.maxHeight;
33
- }
34
- /** NgModel binding - nội dung HTML/Markdown */
35
10
  value = '';
11
+ disabled = input(false, /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
36
13
  valueChange = output();
37
- /** Event emitter khi content thay đổi */
38
14
  contentChange = output();
39
- /** Event emitter khi blur */
40
15
  blur = output();
41
- /** Event emitter khi focus */
42
16
  focus = output();
43
- /** Disabled state */
44
- disabled = input(false, /* @ts-ignore */
45
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
46
- Editor = ClassicEditor;
47
- #editor;
48
- #subscription = new Subscription();
49
- #contentChangeSubject = new Subject();
50
- // Build editor config dynamically
51
- get editorConfig() {
52
- const enableMention = this.option?.enableMention ?? false;
53
- const useMarkdown = this.option?.outputFormat === 'markdown';
54
- const plugins = [Essentials, FontColor, Paragraph, Bold, Italic, Underline, Link, List, Undo, Widget];
55
- // Add Markdown plugin if outputFormat is markdown
56
- if (useMarkdown) {
57
- plugins.push(Markdown);
58
- }
59
- // Add Mention plugin if enabled
60
- if (enableMention) {
61
- plugins.push(Mention);
62
- }
63
- // Build base config
64
- const config = {
65
- licenseKey: 'GPL',
66
- getOption: () => this.option,
67
- plugins,
68
- toolbar: {
69
- items: ['bold', 'italic', 'underline', '|', 'fontColor', '|', 'bulletedList', 'numberedList', '|', 'link'],
70
- shouldNotGroupWhenFull: true,
71
- },
72
- placeholder: this.option?.placeholder,
73
- link: {
74
- addTargetToExternalLinks: true,
75
- defaultProtocol: 'https://',
76
- // why: mặc định CKEditor cho cả ftp/ftps; link trong bình luận chỉ cần web, mail và điện thoại.
77
- allowedProtocols: ['https', 'http', 'mailto', 'tel'],
78
- },
79
- fontColor: {
80
- columns: 5,
81
- documentColors: 10,
82
- colorPicker: { format: 'hex' },
83
- },
84
- };
85
- // Add mention configuration if enabled
86
- if (enableMention && this.option?.mentionConfig?.feeds) {
87
- config.mention = {
88
- feeds: this.option.mentionConfig.feeds,
89
- };
90
- }
91
- return config;
17
+ importWarning = output();
18
+ #diagnostics = signal([], /* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "#diagnostics" }] : /* istanbul ignore next */ []));
20
+ importDiagnostics = this.#diagnostics.asReadonly();
21
+ surfaceContent = signal('', /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "surfaceContent" }] : /* istanbul ignore next */ []));
23
+ #formDisabled = signal(false, /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "#formDisabled" }] : /* istanbul ignore next */ []));
25
+ effectiveDisabled = computed(() => this.disabled() || this.#formDisabled(), /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
27
+ #cdRef = inject(ChangeDetectorRef);
28
+ #engine;
29
+ #timer;
30
+ #trailing;
31
+ #deadline;
32
+ #composing = false;
33
+ #formatPending = false;
34
+ #destroyed = false;
35
+ #onChange = () => { };
36
+ #onTouched = () => { };
37
+ get maxEditorHeight() {
38
+ return this.option?.maxHeight;
92
39
  }
93
40
  constructor() {
94
- // Setup debounce cho content change
95
- this.#subscription.add(this.#contentChangeSubject.pipe(throttleTime(500, undefined, { leading: true, trailing: true })).subscribe(() => {
96
- const output = this.#convertOutput();
97
- this.value = output;
98
- this.#onChange(output);
99
- this.valueChange.emit(output);
100
- this.contentChange.emit(output);
101
- this.option?.onChange?.(output);
102
- }));
41
+ effect(() => {
42
+ if (this.effectiveDisabled())
43
+ this.onSourceChange();
44
+ });
103
45
  }
104
- ngOnDestroy() {
105
- this.#subscription.unsubscribe();
106
- this.#editor?.destroy?.();
46
+ ngOnChanges(changes) {
47
+ if (changes['value'])
48
+ this.setContent(this.value);
107
49
  }
108
- /**
109
- * Kiểm tra có nên enable mention plugin không
110
- */
111
- #shouldEnableMention() {
112
- return this.option?.enableMention ?? false;
50
+ onEngineReady(engine) {
51
+ this.onSourceChange();
52
+ this.#composing = false;
53
+ this.#engine = engine;
113
54
  }
114
- /**
115
- * Xử lý khi editor ready
116
- */
117
- onReady(editor) {
118
- this.#editor = editor;
119
- // Set initial content
120
- if (this.value) {
121
- this.setContent(this.value);
55
+ /** Cancel a stale throttle window before replacing an authoritative source. */
56
+ onSourceChange(reason = 'source') {
57
+ this.#clearTimer();
58
+ if (reason === 'format') {
59
+ this.#formatPending = true;
60
+ return;
122
61
  }
123
- // Lắng nghe sự kiện thay đổi nội dung
124
- editor.model.document.on('change:data', () => {
125
- this.#contentChangeSubject.next();
126
- });
127
- // Lắng nghe focus/blur events
128
- editor.editing.view.document.on('focus', evt => {
129
- const domEvent = evt.domEvent;
130
- this.focus.emit(domEvent);
131
- this.option?.onFocus?.(domEvent);
132
- });
133
- editor.editing.view.document.on('blur', evt => {
134
- const domEvent = evt.domEvent;
135
- this.blur.emit(domEvent);
136
- this.option?.onBlur?.(domEvent);
137
- });
138
- // Lắng nghe sự kiện mention được chọn
139
- if (this.#shouldEnableMention()) {
140
- editor.commands.get('mention')?.on('execute', (_evt, data) => {
141
- const mentionData = data[0];
142
- this.option?.onMentionSelect?.(mentionData.mention);
143
- // Trigger content change sau khi insert mention
144
- this.#contentChangeSubject.next();
145
- });
146
- // Custom downcast converter để thay đổi cấu trúc mention HTML
147
- editor.conversion.for('downcast').attributeToElement({
148
- model: 'mention',
149
- view: (mentionData, { writer }) => {
150
- const data = mentionData;
151
- const rawId = data?.id || '';
152
- const marker = rawId[0];
153
- const cleanId = rawId.slice(1);
154
- return writer.createAttributeElement('span', {
155
- class: 'ck-custom-mention',
156
- 'data-id': cleanId,
157
- 'data-marker': marker,
158
- contenteditable: 'false',
159
- });
160
- },
161
- converterPriority: 'highest',
162
- });
163
- // Xử lý keyboard để xóa mention 1 lần
164
- editor.editing.view.document.on('keydown', (evt, data) => {
165
- const keyEvent = data;
166
- // Delete (46) hoặc Backspace (8)
167
- if (keyEvent.keyCode === 46 || keyEvent.keyCode === 8) {
168
- const model = editor.model;
169
- const selection = model.document.selection;
170
- const position = selection.getFirstPosition();
171
- if (!position)
172
- return;
173
- // Tìm text node có mention attribute
174
- const node = position.textNode || position.nodeBefore || position.nodeAfter;
175
- if (node && node.is('$text')) {
176
- const mentionAttr = node.getAttribute('mention');
177
- if (mentionAttr) {
178
- // Xóa toàn bộ text node chứa mention
179
- model.change(writer => {
180
- writer.remove(node);
181
- });
182
- evt.stop();
183
- }
184
- }
185
- }
186
- });
62
+ this.#formatPending = false;
63
+ this.#deadline = undefined;
64
+ this.#trailing = undefined;
65
+ }
66
+ onFormatChange(value) {
67
+ if (this.#destroyed || this.effectiveDisabled())
68
+ return;
69
+ // A refused conversion stays paused until a supported representation is
70
+ // restored. Retain the live pending edit without exporting stale HTML.
71
+ if (value === undefined)
72
+ return;
73
+ this.#formatPending = false;
74
+ this.#trailing = undefined;
75
+ if (value !== this.value)
76
+ this.onSurfaceChange(value);
77
+ if (this.#deadline !== undefined)
78
+ this.#scheduleWindow();
79
+ }
80
+ onSurfaceChange(value) {
81
+ if (this.#destroyed || this.effectiveDisabled())
82
+ return;
83
+ if (this.#composing || this.#formatPending) {
84
+ this.#trailing = value;
85
+ return;
187
86
  }
87
+ if (this.#deadline === undefined) {
88
+ // App callbacks can replace content synchronously; establish the window first.
89
+ this.#startWindow();
90
+ this.#emit(value);
91
+ }
92
+ else
93
+ this.#trailing = value;
94
+ }
95
+ #startWindow() {
96
+ this.#deadline = Date.now() + 500;
97
+ this.#scheduleWindow();
98
+ }
99
+ #scheduleWindow() {
100
+ if (this.#deadline === undefined || this.#composing || this.#formatPending || this.#destroyed)
101
+ return;
102
+ this.#clearTimer();
103
+ this.#timer = setTimeout(() => {
104
+ this.#timer = undefined;
105
+ this.#deadline = undefined;
106
+ const trailing = this.#trailing;
107
+ this.#trailing = undefined;
108
+ if (trailing !== undefined && !this.#destroyed && !this.#composing && !this.effectiveDisabled()) {
109
+ this.#startWindow();
110
+ this.#emit(trailing);
111
+ }
112
+ }, Math.max(0, this.#deadline - Date.now()));
113
+ }
114
+ onCompositionChange(composing) {
115
+ this.#composing = composing;
116
+ this.#clearTimer();
117
+ if (composing || this.#formatPending || this.#destroyed || this.effectiveDisabled())
118
+ return;
119
+ if (this.#deadline !== undefined)
120
+ this.#scheduleWindow();
121
+ else if (this.#trailing !== undefined) {
122
+ const value = this.#trailing;
123
+ this.#trailing = undefined;
124
+ this.#startWindow();
125
+ this.#emit(value);
126
+ }
127
+ }
128
+ #clearTimer() {
129
+ if (this.#timer !== undefined)
130
+ clearTimeout(this.#timer);
131
+ this.#timer = undefined;
132
+ }
133
+ #emit(value) {
134
+ this.value = value;
135
+ this.#onChange(value);
136
+ this.valueChange.emit(value);
137
+ this.contentChange.emit(value);
138
+ this.option?.onChange?.(value);
139
+ this.#cdRef.markForCheck();
140
+ }
141
+ onSurfaceFocus(event) {
142
+ this.focus.emit(event);
143
+ this.option?.onFocus?.(event);
188
144
  }
189
- /**
190
- * Nội dung phát ra ngoài theo `outputFormat`: HTML đã lọc, hoặc Markdown dựng từ HTML đã lọc.
191
- * Là điểm ra duy nhất cho cả luồng throttle (valueChange/contentChange/form) lẫn `getContent()` (D-032).
192
- */
193
- #convertOutput() {
194
- const editor = this.#editor;
195
- if (!editor)
196
- return '';
197
- const html = this.#readSanitizedHtml(editor);
198
- if (!this.#isMarkdown())
199
- return html;
200
- // why: dựng Markdown từ HTML ĐÃ lọc, để `[text](javascript:...)` không thể lọt vào chuỗi Markdown.
201
- const htmlProcessor = new HtmlDataProcessor(editor.data.viewDocument);
202
- return editor.data.processor.toData(htmlProcessor.toView(html));
145
+ onSurfaceBlur(event) {
146
+ this.#onTouched();
147
+ this.blur.emit(event);
148
+ this.option?.onBlur?.(event);
149
+ this.#cdRef.markForCheck();
203
150
  }
204
- #isMarkdown() {
205
- return this.option?.outputFormat === 'markdown';
151
+ onDiagnostics(diagnostics) {
152
+ this.#diagnostics.set(diagnostics);
153
+ this.importWarning.emit(diagnostics);
206
154
  }
207
- /** HTML hiện tại của editor (kể cả ở chế độ Markdown), đã qua `sdSanitizeEditorHtml`. */
208
- #readSanitizedHtml(editor) {
209
- if (!this.#isMarkdown())
210
- return sdSanitizeEditorHtml(editor.getData());
211
- // why: với plugin Markdown, `getData()` trả Markdown. Lấy HTML từ data view (đúng thứ getData() dùng)
212
- // để lọc trước khi chuyển.
213
- const root = editor.model.document.getRoot();
214
- if (!root)
215
- return '';
216
- const htmlProcessor = new HtmlDataProcessor(editor.data.viewDocument);
217
- return sdSanitizeEditorHtml(htmlProcessor.toData(editor.data.toView(root)));
155
+ onMentionSelected(item) {
156
+ this.option?.onMentionSelect?.(item);
218
157
  }
219
- /**
220
- * Set nội dung cho editor
221
- */
222
158
  setContent(content) {
223
- this.#editor?.setData?.(content);
159
+ const value = content ?? '';
160
+ this.value = value;
161
+ // Consumer echoes must not replay content or reset the current selection/history.
162
+ if (this.#isCurrentContent(value))
163
+ return;
164
+ this.onSourceChange();
165
+ this.surfaceContent.set(value);
166
+ this.#engine?.setContent(value, this.option?.outputFormat ?? 'html');
167
+ this.#cdRef.markForCheck();
168
+ }
169
+ #isCurrentContent(value) {
170
+ if (!this.#engine)
171
+ return value === this.surfaceContent();
172
+ try {
173
+ return this.#engine.format === (this.option?.outputFormat ?? 'html') && value === this.#engine.getContent();
174
+ }
175
+ catch {
176
+ return false;
177
+ }
224
178
  }
225
- /**
226
- * Get nội dung từ editor
227
- */
228
179
  getContent() {
229
- return this.#convertOutput();
180
+ return this.#engine?.getContent() ?? '';
230
181
  }
231
- /**
232
- * Nội dung dạng HTML (đã lọc), bất kể `outputFormat`.
233
- */
234
182
  getHtmlContent() {
235
- return this.#editor ? this.#readSanitizedHtml(this.#editor) : '';
183
+ return this.#engine?.getHtml() ?? '';
236
184
  }
237
- /**
238
- * Focus vào editor
239
- */
240
185
  focusEditor() {
241
- this.#editor?.editing?.view?.focus?.();
186
+ if (!this.effectiveDisabled())
187
+ this.#engine?.focus();
242
188
  }
243
- /**
244
- * Insert mention vào vị trí con trỏ hiện tại
245
- */
246
189
  insertMention(item) {
247
- if (!this.#editor)
190
+ if (!this.#engine || !this.option?.enableMention || this.effectiveDisabled() || this.importDiagnostics().length)
248
191
  return;
249
- const firstFeed = this.option?.mentionConfig?.feeds?.[0];
250
- const marker = item.marker || firstFeed?.marker || '@';
251
- // Sử dụng CKEditor mention command
252
- this.#editor.execute('mention', {
253
- marker,
254
- mention: {
255
- id: item.id,
256
- text: `${marker}${item.name}`,
257
- },
258
- });
192
+ const marker = item.marker ?? this.option.mentionConfig?.feeds?.[0]?.marker ?? '@';
193
+ this.#engine.insertMention({ ...item, marker });
194
+ this.option.onMentionSelect?.({ id: item.id, name: item.name, text: `${marker}${item.name}` });
259
195
  }
260
- /**
261
- * Get danh sách mentions trong nội dung
262
- */
263
196
  getMentions() {
264
- if (!this.#editor)
265
- return [];
266
- const mentions = [];
267
- const root = this.#editor.model.document.getRoot();
268
- if (!root)
269
- return mentions;
270
- const range = this.#editor.model.createRangeIn(root);
271
- for (const item of range.getItems()) {
272
- if (item.is('$text')) {
273
- const mentionAttr = item.getAttribute('mention');
274
- if (mentionAttr) {
275
- const text = item.data;
276
- const marker = text.charAt(0);
277
- const name = text.substring(1);
278
- const id = item.getAttribute('data-user-id');
279
- mentions.push({ id, name, marker });
280
- }
281
- }
282
- }
283
- return mentions;
197
+ return this.#engine?.getMentions() ?? [];
284
198
  }
285
- /**
286
- * ControlValueAccessor: Write value
287
- */
288
199
  writeValue(value) {
289
- this.value = value || '';
290
- if (this.#editor) {
291
- this.setContent(this.value);
292
- }
200
+ this.setContent(value || '');
293
201
  }
294
- /**
295
- * ControlValueAccessor: Register change callback
296
- */
297
202
  registerOnChange(fn) {
298
203
  this.#onChange = fn;
299
204
  }
300
- /**
301
- * ControlValueAccessor: Register touched callback
302
- */
303
205
  registerOnTouched(fn) {
304
206
  this.#onTouched = fn;
305
207
  }
306
- /** ControlValueAccessor callbacks */
307
- #onChange = () => { };
308
- #onTouched = () => { };
208
+ setDisabledState(disabled) {
209
+ this.#formDisabled.set(disabled);
210
+ if (disabled)
211
+ this.onSourceChange();
212
+ this.#cdRef.markForCheck();
213
+ }
214
+ ngOnDestroy() {
215
+ this.#destroyed = true;
216
+ this.onSourceChange();
217
+ this.#engine = undefined; // Surface owns engine destruction.
218
+ }
309
219
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdMiniEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
310
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: SdMiniEditor, isStandalone: true, selector: "sd-mini-editor", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: false, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", contentChange: "contentChange", blur: "blur", focus: "focus" }, host: { properties: { "style.--sd-mini-editor-max-height": "this.maxEditorHeight" } }, providers: [
311
- {
312
- provide: NG_VALUE_ACCESSOR,
313
- useExisting: forwardRef(() => SdMiniEditor),
314
- multi: true,
315
- },
316
- ], ngImport: i0, template: "<sd-ckeditor-styles />\n<ckeditor class=\"sd-mini-editor\" [editor]=\"Editor\" [config]=\"editorConfig\" [disabled]=\"disabled()\" (ready)=\"onReady($event)\"> </ckeditor>\n", styles: [".sd-mini-editor{display:block}::ng-deep .ck-powered-by-balloon{display:none!important}::ng-deep .ck-mentions .ck-button.ck-on{background:var(--sd-primary)!important;color:var(--sd-text-on-solid, #ffffff)!important}::ng-deep .ck-mentions .ck-button.ck-on *{color:var(--sd-text-on-solid, #ffffff)!important}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__editable_inline{border:var(--ck-focus-ring);border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:var(--sd-mini-editor-max-height);overflow:auto}:host ::ng-deep .ck-toolbar{border-radius:0;border:0!important}:host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{padding-left:20px!important;margin-left:0!important}:host ::ng-deep .ck-custom-mention{font-weight:var(--sd-font-weight-semibold, 600);padding:0 2px;display:inline-block;pointer-events:none;-webkit-user-select:none;user-select:none;color:var(--sd-primary, #005cbb)}:host ::ng-deep .ck-custom-mention:before{content:attr(data-marker)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: CKEditorModule }, { kind: "component", type: i1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableWatchdog", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "component", type: SdCKEditorStyles, selector: "sd-ckeditor-styles" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
220
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: SdMiniEditor, isStandalone: true, selector: "sd-mini-editor", inputs: { option: { classPropertyName: "option", publicName: "option", isSignal: false, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", contentChange: "contentChange", blur: "blur", focus: "focus", importWarning: "importWarning" }, host: { properties: { "style.--sd-mini-editor-max-height": "this.maxEditorHeight" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SdMiniEditor), multi: true }], usesOnChanges: true, ngImport: i0, template: "<sd-editor-surface\n class=\"sd-mini-editor\"\n variant=\"compact\"\n [content]=\"surfaceContent()\"\n [format]=\"option?.outputFormat ?? 'html'\"\n [editable]=\"!effectiveDisabled()\"\n [placeholder]=\"option?.placeholder\"\n [disabled]=\"effectiveDisabled()\"\n [height]=\"option?.height\"\n [maxHeight]=\"option?.maxHeight\"\n [mentionFeeds]=\"option?.enableMention ? option?.mentionConfig?.feeds : undefined\"\n (engineReady)=\"onEngineReady($event)\"\n (sourceChange)=\"onSourceChange($event)\"\n (formatChange)=\"onFormatChange($event)\"\n (compositionChange)=\"onCompositionChange($event)\"\n (change)=\"onSurfaceChange($event)\"\n (focus)=\"onSurfaceFocus($event)\"\n (blur)=\"onSurfaceBlur($event)\"\n (diagnostics)=\"onDiagnostics($event)\"\n (mentionSelected)=\"onMentionSelected($event)\" />\n", styles: [":host,.sd-mini-editor{display:block}\n"], dependencies: [{ kind: "component", type: SdEditorSurface, selector: "sd-editor-surface", inputs: ["content", "format", "variant", "editable", "disabled", "readonly", "placeholder", "mentionFeeds", "uploadEnabled", "height", "maxHeight", "label", "describedBy", "invalid", "id"], outputs: ["engineReady", "change", "focus", "blur", "diagnostics", "sourceChange", "formatChange", "compositionChange", "mentionSelected", "filesSelected"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
317
221
  }
318
222
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdMiniEditor, decorators: [{
319
223
  type: Component,
320
- args: [{ changeDetection: ChangeDetectionStrategy.Eager, selector: 'sd-mini-editor', standalone: true, imports: [CommonModule, CKEditorModule, SdCKEditorStyles], providers: [
321
- {
322
- provide: NG_VALUE_ACCESSOR,
323
- useExisting: forwardRef(() => SdMiniEditor),
324
- multi: true,
325
- },
326
- ], template: "<sd-ckeditor-styles />\n<ckeditor class=\"sd-mini-editor\" [editor]=\"Editor\" [config]=\"editorConfig\" [disabled]=\"disabled()\" (ready)=\"onReady($event)\"> </ckeditor>\n", styles: [".sd-mini-editor{display:block}::ng-deep .ck-powered-by-balloon{display:none!important}::ng-deep .ck-mentions .ck-button.ck-on{background:var(--sd-primary)!important;color:var(--sd-text-on-solid, #ffffff)!important}::ng-deep .ck-mentions .ck-button.ck-on *{color:var(--sd-text-on-solid, #ffffff)!important}:host ::ng-deep .ck-editor{--ck-content-font-size: 14px;--ck-content-line-height: 1.5}:host ::ng-deep .ck-editor__editable_inline{border:var(--ck-focus-ring);border-top-left-radius:0!important;border-top-right-radius:0!important;max-height:var(--sd-mini-editor-max-height);overflow:auto}:host ::ng-deep .ck-toolbar{border-radius:0;border:0!important}:host ::ng-deep .ck-content img{max-width:100%!important;height:auto!important;object-fit:contain}:host ::ng-deep .ck-content p{margin-bottom:var(--ck-spacing-large);text-indent:0}:host ::ng-deep .ck-content ul,:host ::ng-deep .ck-content ol{padding-left:20px!important;margin-left:0!important}:host ::ng-deep .ck-custom-mention{font-weight:var(--sd-font-weight-semibold, 600);padding:0 2px;display:inline-block;pointer-events:none;-webkit-user-select:none;user-select:none;color:var(--sd-primary, #005cbb)}:host ::ng-deep .ck-custom-mention:before{content:attr(data-marker)}\n"] }]
224
+ args: [{ changeDetection: ChangeDetectionStrategy.Eager, selector: 'sd-mini-editor', standalone: true, imports: [SdEditorSurface], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SdMiniEditor), multi: true }], template: "<sd-editor-surface\n class=\"sd-mini-editor\"\n variant=\"compact\"\n [content]=\"surfaceContent()\"\n [format]=\"option?.outputFormat ?? 'html'\"\n [editable]=\"!effectiveDisabled()\"\n [placeholder]=\"option?.placeholder\"\n [disabled]=\"effectiveDisabled()\"\n [height]=\"option?.height\"\n [maxHeight]=\"option?.maxHeight\"\n [mentionFeeds]=\"option?.enableMention ? option?.mentionConfig?.feeds : undefined\"\n (engineReady)=\"onEngineReady($event)\"\n (sourceChange)=\"onSourceChange($event)\"\n (formatChange)=\"onFormatChange($event)\"\n (compositionChange)=\"onCompositionChange($event)\"\n (change)=\"onSurfaceChange($event)\"\n (focus)=\"onSurfaceFocus($event)\"\n (blur)=\"onSurfaceBlur($event)\"\n (diagnostics)=\"onDiagnostics($event)\"\n (mentionSelected)=\"onMentionSelected($event)\" />\n", styles: [":host,.sd-mini-editor{display:block}\n"] }]
327
225
  }], ctorParameters: () => [], propDecorators: { option: [{
328
226
  type: Input,
329
227
  args: [{ required: true }]
330
- }], maxEditorHeight: [{
331
- type: HostBinding,
332
- args: ['style.--sd-mini-editor-max-height']
333
228
  }], value: [{
334
229
  type: Input
335
- }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], contentChange: [{ type: i0.Output, args: ["contentChange"] }], blur: [{ type: i0.Output, args: ["blur"] }], focus: [{ type: i0.Output, args: ["focus"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
230
+ }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], contentChange: [{ type: i0.Output, args: ["contentChange"] }], blur: [{ type: i0.Output, args: ["blur"] }], focus: [{ type: i0.Output, args: ["focus"] }], importWarning: [{ type: i0.Output, args: ["importWarning"] }], maxEditorHeight: [{
231
+ type: HostBinding,
232
+ args: ['style.--sd-mini-editor-max-height']
233
+ }] } });
336
234
 
337
235
  /**
338
236
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-components-mini-editor.mjs","sources":["../../../projects/sdcorejs-angular/components/mini-editor/src/mini-editor.component.ts","../../../projects/sdcorejs-angular/components/mini-editor/src/mini-editor.component.html","../../../projects/sdcorejs-angular/components/mini-editor/sdcorejs-angular-components-mini-editor.ts"],"sourcesContent":["import { ChangeDetectionStrategy as SdAngular22ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Component, HostBinding, Input, forwardRef, OnDestroy, input, output } from '@angular/core';\nimport { CKEditorModule } from '@ckeditor/ckeditor5-angular';\nimport { SdCKEditorStyles } from '@sdcorejs/angular/components/ckeditor-styles';\nimport {\n Bold,\n ClassicEditor,\n Essentials,\n Italic,\n Link,\n List,\n FontColor,\n HtmlDataProcessor,\n Markdown,\n Mention,\n Paragraph,\n Underline,\n Undo,\n Widget,\n} from 'ckeditor5';\nimport { Subject, Subscription } from 'rxjs';\nimport { throttleTime } from 'rxjs/operators';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { sdSanitizeEditorHtml } from '@sdcorejs/angular/utilities/extensions';\n\nimport { SdMiniEditorOption, SdMiniEditorConfig, SdMiniEditorMentionItem } from './mini-editor.model';\n\n/**\n * Component sd-mini-editor - Editor đơn giản cho comment input\n * Sử dụng CKEditor với chế độ đơn giản (bold, italic, link)\n * Hỗ trợ mention và output format (html/markdown)\n *\n * @example\n * ```html\n * <sd-mini-editor\n * [option]=\"editorOption\"\n * [(ngModel)]=\"content\"\n * (contentChange)=\"onContentChange($event)\"\n * >\n * </sd-mini-editor>\n * ```\n */\n@Component({\n changeDetection: SdAngular22ChangeDetectionStrategy.Eager,\n selector: 'sd-mini-editor',\n standalone: true,\n imports: [CommonModule, CKEditorModule, SdCKEditorStyles],\n templateUrl: './mini-editor.component.html',\n styleUrl: './mini-editor.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SdMiniEditor),\n multi: true,\n },\n ],\n})\nexport class SdMiniEditor implements ControlValueAccessor, OnDestroy {\n /** Cấu hình option cho editor */\n @Input({ required: true }) option!: SdMiniEditorOption;\n\n @HostBinding('style.--sd-mini-editor-max-height')\n get maxEditorHeight(): string | undefined {\n return this.option?.maxHeight;\n }\n\n /** NgModel binding - nội dung HTML/Markdown */\n @Input() value = '';\n readonly valueChange = output<string>();\n\n /** Event emitter khi content thay đổi */\n readonly contentChange = output<string>();\n\n /** Event emitter khi blur */\n readonly blur = output<FocusEvent>();\n\n /** Event emitter khi focus */\n readonly focus = output<FocusEvent>();\n\n /** Disabled state */\n readonly disabled = input(false);\n\n Editor = ClassicEditor;\n #editor!: ClassicEditor;\n #subscription = new Subscription();\n #contentChangeSubject = new Subject<void>();\n\n // Build editor config dynamically\n get editorConfig(): SdMiniEditorConfig {\n const enableMention = this.option?.enableMention ?? false;\n const useMarkdown = this.option?.outputFormat === 'markdown';\n const plugins: any[] = [Essentials, FontColor, Paragraph, Bold, Italic, Underline, Link, List, Undo, Widget];\n\n // Add Markdown plugin if outputFormat is markdown\n if (useMarkdown) {\n plugins.push(Markdown);\n }\n\n // Add Mention plugin if enabled\n if (enableMention) {\n plugins.push(Mention);\n }\n\n // Build base config\n const config: SdMiniEditorConfig = {\n licenseKey: 'GPL',\n getOption: () => this.option,\n plugins,\n toolbar: {\n items: ['bold', 'italic', 'underline', '|', 'fontColor', '|', 'bulletedList', 'numberedList', '|', 'link'],\n shouldNotGroupWhenFull: true,\n },\n placeholder: this.option?.placeholder,\n link: {\n addTargetToExternalLinks: true,\n defaultProtocol: 'https://',\n // why: mặc định CKEditor cho cả ftp/ftps; link trong bình luận chỉ cần web, mail và điện thoại.\n allowedProtocols: ['https', 'http', 'mailto', 'tel'],\n },\n fontColor: {\n columns: 5,\n documentColors: 10,\n colorPicker: { format: 'hex' },\n },\n };\n\n // Add mention configuration if enabled\n if (enableMention && this.option?.mentionConfig?.feeds) {\n config.mention = {\n feeds: this.option.mentionConfig.feeds,\n };\n }\n\n return config;\n }\n\n constructor() {\n // Setup debounce cho content change\n this.#subscription.add(\n this.#contentChangeSubject.pipe(throttleTime(500, undefined, { leading: true, trailing: true })).subscribe(() => {\n const output = this.#convertOutput();\n this.value = output;\n this.#onChange(output);\n this.valueChange.emit(output);\n this.contentChange.emit(output);\n this.option?.onChange?.(output);\n })\n );\n }\n\n ngOnDestroy() {\n this.#subscription.unsubscribe();\n this.#editor?.destroy?.();\n }\n\n /**\n * Kiểm tra có nên enable mention plugin không\n */\n #shouldEnableMention(): boolean {\n return this.option?.enableMention ?? false;\n }\n\n /**\n * Xử lý khi editor ready\n */\n onReady(editor: ClassicEditor) {\n this.#editor = editor;\n\n // Set initial content\n if (this.value) {\n this.setContent(this.value);\n }\n\n // Lắng nghe sự kiện thay đổi nội dung\n editor.model.document.on('change:data', () => {\n this.#contentChangeSubject.next();\n });\n\n // Lắng nghe focus/blur events\n editor.editing.view.document.on('focus', evt => {\n const domEvent = (evt as any).domEvent as FocusEvent;\n this.focus.emit(domEvent);\n this.option?.onFocus?.(domEvent);\n });\n\n editor.editing.view.document.on('blur', evt => {\n const domEvent = (evt as any).domEvent as FocusEvent;\n this.blur.emit(domEvent);\n this.option?.onBlur?.(domEvent);\n });\n\n // Lắng nghe sự kiện mention được chọn\n if (this.#shouldEnableMention()) {\n editor.commands.get('mention')?.on('execute', (_evt, data: any) => {\n const mentionData = data[0];\n this.option?.onMentionSelect?.(mentionData.mention);\n // Trigger content change sau khi insert mention\n this.#contentChangeSubject.next();\n });\n\n // Custom downcast converter để thay đổi cấu trúc mention HTML\n editor.conversion.for('downcast').attributeToElement({\n model: 'mention',\n view: (mentionData, { writer }) => {\n const data = mentionData as SdMiniEditorMentionItem;\n const rawId = data?.id || '';\n const marker = rawId[0];\n const cleanId = rawId.slice(1);\n\n return writer.createAttributeElement('span', {\n class: 'ck-custom-mention',\n 'data-id': cleanId,\n 'data-marker': marker,\n contenteditable: 'false',\n });\n },\n converterPriority: 'highest',\n });\n\n // Xử lý keyboard để xóa mention 1 lần\n editor.editing.view.document.on('keydown', (evt, data) => {\n const keyEvent = data as { keyCode: number; domEvent: KeyboardEvent };\n // Delete (46) hoặc Backspace (8)\n if (keyEvent.keyCode === 46 || keyEvent.keyCode === 8) {\n const model = editor.model;\n const selection = model.document.selection;\n const position = selection.getFirstPosition();\n if (!position) return;\n\n // Tìm text node có mention attribute\n const node = position.textNode || position.nodeBefore || position.nodeAfter;\n if (node && node.is('$text')) {\n const mentionAttr = node.getAttribute('mention');\n if (mentionAttr) {\n // Xóa toàn bộ text node chứa mention\n model.change(writer => {\n writer.remove(node);\n });\n evt.stop();\n }\n }\n }\n });\n }\n }\n\n /**\n * Nội dung phát ra ngoài theo `outputFormat`: HTML đã lọc, hoặc Markdown dựng từ HTML đã lọc.\n * Là điểm ra duy nhất cho cả luồng throttle (valueChange/contentChange/form) lẫn `getContent()` (D-032).\n */\n #convertOutput(): string {\n const editor = this.#editor;\n if (!editor) return '';\n const html = this.#readSanitizedHtml(editor);\n if (!this.#isMarkdown()) return html;\n // why: dựng Markdown từ HTML ĐÃ lọc, để `[text](javascript:...)` không thể lọt vào chuỗi Markdown.\n const htmlProcessor = new HtmlDataProcessor(editor.data.viewDocument);\n return editor.data.processor.toData(htmlProcessor.toView(html));\n }\n\n #isMarkdown(): boolean {\n return this.option?.outputFormat === 'markdown';\n }\n\n /** HTML hiện tại của editor (kể cả ở chế độ Markdown), đã qua `sdSanitizeEditorHtml`. */\n #readSanitizedHtml(editor: ClassicEditor): string {\n if (!this.#isMarkdown()) return sdSanitizeEditorHtml(editor.getData());\n // why: với plugin Markdown, `getData()` trả Markdown. Lấy HTML từ data view (đúng thứ getData() dùng)\n // để lọc trước khi chuyển.\n const root = editor.model.document.getRoot();\n if (!root) return '';\n const htmlProcessor = new HtmlDataProcessor(editor.data.viewDocument);\n return sdSanitizeEditorHtml(htmlProcessor.toData(editor.data.toView(root)));\n }\n\n /**\n * Set nội dung cho editor\n */\n setContent(content: string) {\n this.#editor?.setData?.(content);\n }\n\n /**\n * Get nội dung từ editor\n */\n getContent(): string {\n return this.#convertOutput();\n }\n\n /**\n * Nội dung dạng HTML (đã lọc), bất kể `outputFormat`.\n */\n getHtmlContent(): string {\n return this.#editor ? this.#readSanitizedHtml(this.#editor) : '';\n }\n\n /**\n * Focus vào editor\n */\n focusEditor() {\n this.#editor?.editing?.view?.focus?.();\n }\n\n /**\n * Insert mention vào vị trí con trỏ hiện tại\n */\n insertMention(item: { id: string; name: string; marker?: string }) {\n if (!this.#editor) return;\n\n const firstFeed = this.option?.mentionConfig?.feeds?.[0];\n const marker = item.marker || (firstFeed as any)?.marker || '@';\n\n // Sử dụng CKEditor mention command\n this.#editor.execute('mention', {\n marker,\n mention: {\n id: item.id,\n text: `${marker}${item.name}`,\n },\n });\n }\n\n /**\n * Get danh sách mentions trong nội dung\n */\n getMentions(): { id: string; name: string; marker: string }[] {\n if (!this.#editor) return [];\n\n const mentions: { id: string; name: string; marker: string }[] = [];\n const root = this.#editor.model.document.getRoot();\n if (!root) return mentions;\n\n const range = this.#editor.model.createRangeIn(root);\n\n for (const item of range.getItems()) {\n if (item.is('$text')) {\n const mentionAttr = item.getAttribute('mention');\n if (mentionAttr) {\n const text = (item as any).data as string;\n const marker = text.charAt(0);\n const name = text.substring(1);\n const id = item.getAttribute('data-user-id') as string;\n\n mentions.push({ id, name, marker });\n }\n }\n }\n\n return mentions;\n }\n\n /**\n * ControlValueAccessor: Write value\n */\n writeValue(value: string): void {\n this.value = value || '';\n if (this.#editor) {\n this.setContent(this.value);\n }\n }\n\n /**\n * ControlValueAccessor: Register change callback\n */\n registerOnChange(fn: (value: string) => void): void {\n this.#onChange = fn;\n }\n\n /**\n * ControlValueAccessor: Register touched callback\n */\n registerOnTouched(fn: () => void): void {\n this.#onTouched = fn;\n }\n\n /** ControlValueAccessor callbacks */\n #onChange: (value: string) => void = () => {};\n #onTouched: () => void = () => {};\n}\n","<sd-ckeditor-styles />\n<ckeditor class=\"sd-mini-editor\" [editor]=\"Editor\" [config]=\"editorConfig\" [disabled]=\"disabled()\" (ready)=\"onReady($event)\"> </ckeditor>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["SdAngular22ChangeDetectionStrategy"],"mappings":";;;;;;;;;;;;AA6BA;;;;;;;;;;;;;;AAcG;MAgBU,YAAY,CAAA;;AAEI,IAAA,MAAM;AAEjC,IAAA,IACI,eAAe,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,MAAM,EAAE,SAAS;IAC/B;;IAGS,KAAK,GAAG,EAAE;IACV,WAAW,GAAG,MAAM,EAAU;;IAG9B,aAAa,GAAG,MAAM,EAAU;;IAGhC,IAAI,GAAG,MAAM,EAAc;;IAG3B,KAAK,GAAG,MAAM,EAAc;;IAG5B,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;IAEhC,MAAM,GAAG,aAAa;AACtB,IAAA,OAAO;AACP,IAAA,aAAa,GAAG,IAAI,YAAY,EAAE;AAClC,IAAA,qBAAqB,GAAG,IAAI,O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AAA,EAAA,IAAA,EAAE,cAAc,gTAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,KAAA,EAAA,CAAA;;2FAW7C,YAAY,EAAA,UAAA,EAAA,CAAA;kBAfxB,SAAS;AACS,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAAA,uBAAkC,CAAC,KAAK,EAAA,QAAA,EAC/C,gBAAgB,cACd,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,cAAc,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAG9C;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC;AAC3C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,+KAAA,EAAA,MAAA,EAAA,CAAA,ktCAAA,CAAA,EAAA;;sBAIA,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBAExB,WAAW;uBAAC,mCAAmC;;sBAM/C;;;AErEH;;AAEG;;"}
1
+ {"version":3,"file":"sdcorejs-angular-components-mini-editor.mjs","sources":["../../../projects/sdcorejs-angular/components/mini-editor/src/mini-editor.component.ts","../../../projects/sdcorejs-angular/components/mini-editor/src/mini-editor.component.html","../../../projects/sdcorejs-angular/components/mini-editor/sdcorejs-angular-components-mini-editor.ts"],"sourcesContent":["import { ChangeDetectionStrategy as SdAngular22ChangeDetectionStrategy } from '@angular/core';\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Input,\n OnChanges,\n OnDestroy,\n SimpleChanges,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n SdEditorEngine,\n SdEditorImportDiagnostic,\n SdEditorMentionItem,\n SdEditorSourceChangeReason,\n SdEditorSurface,\n} from '@sdcorejs/angular/components/editor-engine';\nimport { SdMiniEditorOption } from './mini-editor.model';\n\n/** Compact Core toolbar with the same document schema as SdEditor. */\n@Component({\n changeDetection: SdAngular22ChangeDetectionStrategy.Eager,\n selector: 'sd-mini-editor',\n standalone: true,\n imports: [SdEditorSurface],\n templateUrl: './mini-editor.component.html',\n styleUrl: './mini-editor.component.scss',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SdMiniEditor), multi: true }],\n})\nexport class SdMiniEditor implements ControlValueAccessor, OnChanges, OnDestroy {\n @Input({ required: true }) option!: SdMiniEditorOption;\n @Input() value = '';\n readonly disabled = input(false);\n readonly valueChange = output<string>();\n readonly contentChange = output<string>();\n readonly blur = output<FocusEvent>();\n readonly focus = output<FocusEvent>();\n readonly importWarning = output<readonly SdEditorImportDiagnostic[]>();\n readonly #diagnostics = signal<readonly SdEditorImportDiagnostic[]>([]);\n readonly importDiagnostics = this.#diagnostics.asReadonly();\n readonly surfaceContent = signal('');\n readonly #formDisabled = signal(false);\n readonly effectiveDisabled = computed(() => this.disabled() || this.#formDisabled());\n readonly #cdRef = inject(ChangeDetectorRef);\n #engine?: SdEditorEngine;\n #timer?: ReturnType<typeof setTimeout>;\n #trailing?: string;\n #deadline?: number;\n #composing = false;\n #formatPending = false;\n #destroyed = false;\n #onChange: (value: string) => void = () => {};\n #onTouched: () => void = () => {};\n\n @HostBinding('style.--sd-mini-editor-max-height')\n get maxEditorHeight(): string | undefined {\n return this.option?.maxHeight;\n }\n\n constructor() {\n effect(() => {\n if (this.effectiveDisabled()) this.onSourceChange();\n });\n }\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['value']) this.setContent(this.value);\n }\n onEngineReady(engine: SdEditorEngine): void {\n this.onSourceChange();\n this.#composing = false;\n this.#engine = engine;\n }\n /** Cancel a stale throttle window before replacing an authoritative source. */\n onSourceChange(reason: SdEditorSourceChangeReason = 'source'): void {\n this.#clearTimer();\n if (reason === 'format') {\n this.#formatPending = true;\n return;\n }\n this.#formatPending = false;\n this.#deadline = undefined;\n this.#trailing = undefined;\n }\n onFormatChange(value: string | undefined): void {\n if (this.#destroyed || this.effectiveDisabled()) return;\n // A refused conversion stays paused until a supported representation is\n // restored. Retain the live pending edit without exporting stale HTML.\n if (value === undefined) return;\n this.#formatPending = false;\n this.#trailing = undefined;\n if (value !== this.value) this.onSurfaceChange(value);\n if (this.#deadline !== undefined) this.#scheduleWindow();\n }\n onSurfaceChange(value: string): void {\n if (this.#destroyed || this.effectiveDisabled()) return;\n if (this.#composing || this.#formatPending) {\n this.#trailing = value;\n return;\n }\n if (this.#deadline === undefined) {\n // App callbacks can replace content synchronously; establish the window first.\n this.#startWindow();\n this.#emit(value);\n } else this.#trailing = value;\n }\n #startWindow(): void {\n this.#deadline = Date.now() + 500;\n this.#scheduleWindow();\n }\n #scheduleWindow(): void {\n if (this.#deadline === undefined || this.#composing || this.#formatPending || this.#destroyed) return;\n this.#clearTimer();\n this.#timer = setTimeout(\n () => {\n this.#timer = undefined;\n this.#deadline = undefined;\n const trailing = this.#trailing;\n this.#trailing = undefined;\n if (trailing !== undefined && !this.#destroyed && !this.#composing && !this.effectiveDisabled()) {\n this.#startWindow();\n this.#emit(trailing);\n }\n },\n Math.max(0, this.#deadline - Date.now())\n );\n }\n onCompositionChange(composing: boolean): void {\n this.#composing = composing;\n this.#clearTimer();\n if (composing || this.#formatPending || this.#destroyed || this.effectiveDisabled()) return;\n if (this.#deadline !== undefined) this.#scheduleWindow();\n else if (this.#trailing !== undefined) {\n const value = this.#trailing;\n this.#trailing = undefined;\n this.#startWindow();\n this.#emit(value);\n }\n }\n #clearTimer(): void {\n if (this.#timer !== undefined) clearTimeout(this.#timer);\n this.#timer = undefined;\n }\n #emit(value: string): void {\n this.value = value;\n this.#onChange(value);\n this.valueChange.emit(value);\n this.contentChange.emit(value);\n this.option?.onChange?.(value);\n this.#cdRef.markForCheck();\n }\n onSurfaceFocus(event: FocusEvent): void {\n this.focus.emit(event);\n this.option?.onFocus?.(event);\n }\n onSurfaceBlur(event: FocusEvent): void {\n this.#onTouched();\n this.blur.emit(event);\n this.option?.onBlur?.(event);\n this.#cdRef.markForCheck();\n }\n onDiagnostics(diagnostics: readonly SdEditorImportDiagnostic[]): void {\n this.#diagnostics.set(diagnostics);\n this.importWarning.emit(diagnostics);\n }\n onMentionSelected(item: SdEditorMentionItem): void {\n this.option?.onMentionSelect?.(item);\n }\n setContent(content: string): void {\n const value = content ?? '';\n this.value = value;\n // Consumer echoes must not replay content or reset the current selection/history.\n if (this.#isCurrentContent(value)) return;\n this.onSourceChange();\n this.surfaceContent.set(value);\n this.#engine?.setContent(value, this.option?.outputFormat ?? 'html');\n this.#cdRef.markForCheck();\n }\n #isCurrentContent(value: string): boolean {\n if (!this.#engine) return value === this.surfaceContent();\n try {\n return this.#engine.format === (this.option?.outputFormat ?? 'html') && value === this.#engine.getContent();\n } catch {\n return false;\n }\n }\n getContent(): string {\n return this.#engine?.getContent() ?? '';\n }\n getHtmlContent(): string {\n return this.#engine?.getHtml() ?? '';\n }\n focusEditor(): void {\n if (!this.effectiveDisabled()) this.#engine?.focus();\n }\n insertMention(item: { id: string; name: string; marker?: string }): void {\n if (!this.#engine || !this.option?.enableMention || this.effectiveDisabled() || this.importDiagnostics().length) return;\n const marker = item.marker ?? this.option.mentionConfig?.feeds?.[0]?.marker ?? '@';\n this.#engine.insertMention({ ...item, marker });\n this.option.onMentionSelect?.({ id: item.id, name: item.name, text: `${marker}${item.name}` });\n }\n getMentions(): { id: string; name: string; marker: string }[] {\n return this.#engine?.getMentions() ?? [];\n }\n writeValue(value: string): void {\n this.setContent(value || '');\n }\n registerOnChange(fn: (value: string) => void): void {\n this.#onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.#onTouched = fn;\n }\n setDisabledState(disabled: boolean): void {\n this.#formDisabled.set(disabled);\n if (disabled) this.onSourceChange();\n this.#cdRef.markForCheck();\n }\n ngOnDestroy(): void {\n this.#destroyed = true;\n this.onSourceChange();\n this.#engine = undefined; // Surface owns engine destruction.\n }\n}\n","<sd-editor-surface\n class=\"sd-mini-editor\"\n variant=\"compact\"\n [content]=\"surfaceContent()\"\n [format]=\"option?.outputFormat ?? 'html'\"\n [editable]=\"!effectiveDisabled()\"\n [placeholder]=\"option?.placeholder\"\n [disabled]=\"effectiveDisabled()\"\n [height]=\"option?.height\"\n [maxHeight]=\"option?.maxHeight\"\n [mentionFeeds]=\"option?.enableMention ? option?.mentionConfig?.feeds : undefined\"\n (engineReady)=\"onEngineReady($event)\"\n (sourceChange)=\"onSourceChange($event)\"\n (formatChange)=\"onFormatChange($event)\"\n (compositionChange)=\"onCompositionChange($event)\"\n (change)=\"onSurfaceChange($event)\"\n (focus)=\"onSurfaceFocus($event)\"\n (blur)=\"onSurfaceBlur($event)\"\n (diagnostics)=\"onDiagnostics($event)\"\n (mentionSelected)=\"onMentionSelected($event)\" />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["SdAngular22ChangeDetectionStrategy"],"mappings":";;;;;;AA2BA;MAUa,YAAY,CAAA;AACI,IAAA,MAAM;IACxB,KAAK,GAAG,EAAE;IACV,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;IACvB,WAAW,GAAG,MAAM,EAAU;IAC9B,aAAa,GAAG,MAAM,EAAU;IAChC,IAAI,GAAG,MAAM,EAAc;IAC3B,KAAK,GAAG,MAAM,EAAc;IAC5B,aAAa,GAAG,MAAM,EAAuC;IAC7D,YAAY,GAAG,MAAM,CAAsC,EAAE;qFAAC;AAC9D,IAAA,iBAAiB,GAAG,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE;IAClD,cAAc,GAAG,MAAM,CAAC,EAAE;uFAAC;IAC3B,aAAa,GAAG,MAAM,CAAC,KAAK;sFAAC;AAC7B,IAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,aAAa,EAAE;0FAAC;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