@sd-angular/core 19.0.0-beta.8 → 19.0.0-beta.80

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 (292) hide show
  1. package/README.md +686 -33
  2. package/assets/scss/ckeditor5.scss +61 -4
  3. package/assets/scss/core/bootstrap.scss +17 -0
  4. package/assets/scss/core/form.scss +32 -6
  5. package/assets/scss/core/grid.scss +40 -0
  6. package/assets/scss/sd-core.scss +5 -0
  7. package/assets/scss/themes/material-theme.scss +82 -40
  8. package/components/anchor-v2/src/components/anchor-item-v2/anchor-item-v2.component.d.ts +5 -5
  9. package/components/anchor-v2/src/components/anchor-v2/anchor-v2.component.d.ts +12 -18
  10. package/components/anchor-v2/src/components/anchor-vertical-v2/anchor-vertical-list-v2.component.d.ts +9 -10
  11. package/components/anchor-v2/src/models/sd-anchor-v2.model.d.ts +3 -3
  12. package/components/avatar/index.d.ts +1 -0
  13. package/components/avatar/src/avatar.component.d.ts +19 -0
  14. package/components/badge/src/badge.component.d.ts +77 -19
  15. package/components/button/src/button.component.d.ts +30 -28
  16. package/components/chart/index.d.ts +4 -0
  17. package/components/chart/src/bar-chart.component.d.ts +18 -0
  18. package/components/chart/src/doughnut-chart.component.d.ts +16 -0
  19. package/components/chart/src/line-chart.component.d.ts +18 -0
  20. package/components/chart/src/pie-chart.component.d.ts +16 -0
  21. package/components/code-editor/index.d.ts +1 -0
  22. package/components/code-editor/src/code-editor.component.d.ts +25 -0
  23. package/components/document-builder/index.d.ts +1 -0
  24. package/components/document-builder/src/document-builder.component.d.ts +12 -41
  25. package/components/document-builder/src/document-builder.model.d.ts +14 -11
  26. package/components/document-builder/src/plugins/block-space/block-space.plugin.d.ts +9 -0
  27. package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.d.ts +44 -0
  28. package/components/document-builder/src/plugins/ck-comment/ck-comment.plugin.model.d.ts +57 -0
  29. package/components/document-builder/src/plugins/heading/heading.plugin.d.ts +1 -0
  30. package/components/document-builder/src/plugins/highlight-range/highlight-range.plugin.d.ts +4 -0
  31. package/components/document-builder/src/plugins/image-custom/image-custom.plugin.d.ts +31 -0
  32. package/components/document-builder/src/plugins/index.d.ts +7 -2
  33. package/components/document-builder/src/plugins/page-orientation/page-orientation.plugin.d.ts +2 -2
  34. package/components/document-builder/src/plugins/paste-handler/filters/bookmark.d.ts +14 -0
  35. package/components/document-builder/src/plugins/paste-handler/filters/br.d.ts +15 -0
  36. package/components/document-builder/src/plugins/paste-handler/filters/image.d.ts +25 -0
  37. package/components/document-builder/src/plugins/paste-handler/filters/list.d.ts +29 -0
  38. package/components/document-builder/src/plugins/paste-handler/filters/parse.d.ts +35 -0
  39. package/components/document-builder/src/plugins/paste-handler/filters/removeboldwrapper.d.ts +15 -0
  40. package/components/document-builder/src/plugins/paste-handler/filters/removegooglesheetstag.d.ts +15 -0
  41. package/components/document-builder/src/plugins/paste-handler/filters/removeinvalidtablewidth.d.ts +15 -0
  42. package/components/document-builder/src/plugins/paste-handler/filters/removemsattributes.d.ts +15 -0
  43. package/components/document-builder/src/plugins/paste-handler/filters/removestyleblock.d.ts +15 -0
  44. package/components/document-builder/src/plugins/paste-handler/filters/removexmlns.d.ts +15 -0
  45. package/components/document-builder/src/plugins/paste-handler/filters/replacemsfootnotes.d.ts +54 -0
  46. package/components/document-builder/src/plugins/paste-handler/filters/replacetabswithinprewithspaces.d.ts +24 -0
  47. package/components/document-builder/src/plugins/paste-handler/filters/space.d.ts +27 -0
  48. package/components/document-builder/src/plugins/paste-handler/filters/table.d.ts +16 -0
  49. package/components/document-builder/src/plugins/paste-handler/filters/utils.d.ts +25 -0
  50. package/components/document-builder/src/plugins/paste-handler/index.d.ts +35 -0
  51. package/components/document-builder/src/plugins/paste-handler/normalizers/googledocsnormalizer.d.ts +31 -0
  52. package/components/document-builder/src/plugins/paste-handler/normalizers/googlesheetsnormalizer.d.ts +31 -0
  53. package/components/document-builder/src/plugins/paste-handler/normalizers/mswordnormalizer.d.ts +29 -0
  54. package/components/document-builder/src/plugins/paste-handler/types.d.ts +30 -0
  55. package/components/document-builder/src/plugins/table-custom/index.d.ts +34 -0
  56. package/components/document-builder/src/plugins/variable/variable.plugin.d.ts +39 -0
  57. package/components/index.d.ts +5 -0
  58. package/components/mini-editor/index.d.ts +2 -0
  59. package/components/mini-editor/src/mini-editor.component.d.ts +91 -0
  60. package/components/mini-editor/src/mini-editor.model.d.ts +44 -0
  61. package/components/modal/index.d.ts +1 -1
  62. package/components/modal/src/modal.component.d.ts +26 -0
  63. package/components/section/index.d.ts +1 -0
  64. package/components/section/src/section-item/section-item.component.d.ts +7 -0
  65. package/components/section/src/section.component.d.ts +11 -11
  66. package/components/side-drawer/src/side-drawer.component.d.ts +11 -24
  67. package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +4 -1
  68. package/components/tab-router/src/components/tab-router-outlet/tab-router-outlet.component.d.ts +3 -15
  69. package/components/table/index.d.ts +2 -0
  70. package/components/table/src/components/column-filter/column-filter.component.d.ts +3 -3
  71. package/components/table/src/components/column-title/column-title.component.d.ts +10 -0
  72. package/components/table/src/components/desktop-cell/desktop-cell.component.d.ts +18 -11
  73. package/components/table/src/components/desktop-cell/view/view.component.d.ts +24 -0
  74. package/components/table/src/components/external-filter/external-filter.component.d.ts +1 -1
  75. package/components/table/src/components/index.d.ts +1 -0
  76. package/components/table/src/components/selector-action/action-filter.pipe.d.ts +11 -10
  77. package/components/table/src/components/selector-action/selector-action.component.d.ts +5 -3
  78. package/components/table/src/directives/index.d.ts +4 -0
  79. package/components/table/src/directives/sd-table-cell-def.directive.d.ts +2 -3
  80. package/components/table/src/directives/sd-table-column-filter-def.directive.d.ts +8 -0
  81. package/components/table/src/directives/sd-table-expand-def.directive.d.ts +0 -1
  82. package/components/table/src/directives/sd-table-filter-def.directive.d.ts +4 -6
  83. package/components/table/src/directives/sd-table-footer-def.directive.d.ts +2 -3
  84. package/components/table/src/directives/sd-table-title-def.directive.d.ts +8 -0
  85. package/components/table/src/directives/sticky-shadow.directive.d.ts +17 -0
  86. package/components/table/src/models/table-column.model.d.ts +49 -40
  87. package/components/table/src/models/table-command.model.d.ts +7 -3
  88. package/components/table/src/models/table-item.model.d.ts +5 -4
  89. package/components/table/src/models/table-option-config.model.d.ts +3 -0
  90. package/components/table/src/models/table-option-export.model.d.ts +3 -2
  91. package/components/table/src/models/table-option-selector.model.d.ts +17 -10
  92. package/components/table/src/models/table-option.model.d.ts +15 -8
  93. package/components/table/src/services/index.d.ts +3 -0
  94. package/components/table/src/services/table-export/table-export.service.d.ts +26 -0
  95. package/components/table/src/services/table-filter/table-filter.model.d.ts +6 -5
  96. package/components/table/src/services/table-format/table-format.service.d.ts +16 -0
  97. package/components/table/src/table.component.d.ts +46 -53
  98. package/components/upload-file/src/configurations/upload-file.configuration.d.ts +34 -1
  99. package/components/upload-file/src/services/upload-file.service.d.ts +0 -1
  100. package/components/upload-file/src/upload-file.component.d.ts +52 -54
  101. package/components/view/index.d.ts +1 -0
  102. package/components/view/src/view.component.d.ts +16 -0
  103. package/components/workflow/src/models/form-generic-component.model.d.ts +5 -4
  104. package/components/workflow/src/models/form-generic-expression.model.d.ts +1 -0
  105. package/components/workflow/src/models/index.d.ts +1 -0
  106. package/components/workflow/src/pipes/html.pipe.d.ts +4 -4
  107. package/directives/index.d.ts +2 -0
  108. package/directives/src/sd-href.directive.d.ts +9 -0
  109. package/directives/src/sd-tooltip.directive.d.ts +26 -0
  110. package/fesm2022/sd-angular-core-components-anchor-v2.mjs +79 -154
  111. package/fesm2022/sd-angular-core-components-anchor-v2.mjs.map +1 -1
  112. package/fesm2022/sd-angular-core-components-avatar.mjs +103 -0
  113. package/fesm2022/sd-angular-core-components-avatar.mjs.map +1 -0
  114. package/fesm2022/sd-angular-core-components-badge.mjs +101 -91
  115. package/fesm2022/sd-angular-core-components-badge.mjs.map +1 -1
  116. package/fesm2022/sd-angular-core-components-button.mjs +70 -96
  117. package/fesm2022/sd-angular-core-components-button.mjs.map +1 -1
  118. package/fesm2022/sd-angular-core-components-chart.mjs +290 -0
  119. package/fesm2022/sd-angular-core-components-chart.mjs.map +1 -0
  120. package/fesm2022/sd-angular-core-components-code-editor.mjs +127 -0
  121. package/fesm2022/sd-angular-core-components-code-editor.mjs.map +1 -0
  122. package/fesm2022/sd-angular-core-components-document-builder.mjs +4006 -611
  123. package/fesm2022/sd-angular-core-components-document-builder.mjs.map +1 -1
  124. package/fesm2022/sd-angular-core-components-history.mjs +1 -1
  125. package/fesm2022/sd-angular-core-components-history.mjs.map +1 -1
  126. package/fesm2022/sd-angular-core-components-import-excel.mjs +1 -1
  127. package/fesm2022/sd-angular-core-components-import-excel.mjs.map +1 -1
  128. package/fesm2022/sd-angular-core-components-mini-editor.mjs +332 -0
  129. package/fesm2022/sd-angular-core-components-mini-editor.mjs.map +1 -0
  130. package/fesm2022/sd-angular-core-components-modal.mjs +63 -92
  131. package/fesm2022/sd-angular-core-components-modal.mjs.map +1 -1
  132. package/fesm2022/sd-angular-core-components-preview.mjs +1 -1
  133. package/fesm2022/sd-angular-core-components-preview.mjs.map +1 -1
  134. package/fesm2022/sd-angular-core-components-quick-action.mjs +2 -2
  135. package/fesm2022/sd-angular-core-components-quick-action.mjs.map +1 -1
  136. package/fesm2022/sd-angular-core-components-section.mjs +41 -43
  137. package/fesm2022/sd-angular-core-components-section.mjs.map +1 -1
  138. package/fesm2022/sd-angular-core-components-side-drawer.mjs +78 -84
  139. package/fesm2022/sd-angular-core-components-side-drawer.mjs.map +1 -1
  140. package/fesm2022/sd-angular-core-components-tab-router.mjs +151 -241
  141. package/fesm2022/sd-angular-core-components-tab-router.mjs.map +1 -1
  142. package/fesm2022/sd-angular-core-components-table.mjs +1394 -1254
  143. package/fesm2022/sd-angular-core-components-table.mjs.map +1 -1
  144. package/fesm2022/sd-angular-core-components-upload-file.mjs +390 -443
  145. package/fesm2022/sd-angular-core-components-upload-file.mjs.map +1 -1
  146. package/fesm2022/sd-angular-core-components-view.mjs +45 -0
  147. package/fesm2022/sd-angular-core-components-view.mjs.map +1 -0
  148. package/fesm2022/sd-angular-core-components-workflow.mjs +165 -168
  149. package/fesm2022/sd-angular-core-components-workflow.mjs.map +1 -1
  150. package/fesm2022/sd-angular-core-components.mjs +5 -0
  151. package/fesm2022/sd-angular-core-components.mjs.map +1 -1
  152. package/fesm2022/sd-angular-core-directives.mjs +286 -27
  153. package/fesm2022/sd-angular-core-directives.mjs.map +1 -1
  154. package/fesm2022/sd-angular-core-forms-autocomplete.mjs +289 -363
  155. package/fesm2022/sd-angular-core-forms-autocomplete.mjs.map +1 -1
  156. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs +170 -189
  157. package/fesm2022/sd-angular-core-forms-chip-calendar.mjs.map +1 -1
  158. package/fesm2022/sd-angular-core-forms-chip.mjs +184 -194
  159. package/fesm2022/sd-angular-core-forms-chip.mjs.map +1 -1
  160. package/fesm2022/sd-angular-core-forms-date-range.mjs +180 -242
  161. package/fesm2022/sd-angular-core-forms-date-range.mjs.map +1 -1
  162. package/fesm2022/sd-angular-core-forms-date.mjs +178 -270
  163. package/fesm2022/sd-angular-core-forms-date.mjs.map +1 -1
  164. package/fesm2022/sd-angular-core-forms-datetime.mjs +177 -285
  165. package/fesm2022/sd-angular-core-forms-datetime.mjs.map +1 -1
  166. package/fesm2022/sd-angular-core-forms-input-number.mjs +210 -337
  167. package/fesm2022/sd-angular-core-forms-input-number.mjs.map +1 -1
  168. package/fesm2022/sd-angular-core-forms-input.mjs +169 -286
  169. package/fesm2022/sd-angular-core-forms-input.mjs.map +1 -1
  170. package/fesm2022/sd-angular-core-forms-radio.mjs +3 -2
  171. package/fesm2022/sd-angular-core-forms-radio.mjs.map +1 -1
  172. package/fesm2022/sd-angular-core-forms-select.mjs +390 -447
  173. package/fesm2022/sd-angular-core-forms-select.mjs.map +1 -1
  174. package/fesm2022/sd-angular-core-forms-textarea.mjs +167 -226
  175. package/fesm2022/sd-angular-core-forms-textarea.mjs.map +1 -1
  176. package/fesm2022/sd-angular-core-modules-authom.mjs +359 -0
  177. package/fesm2022/sd-angular-core-modules-authom.mjs.map +1 -0
  178. package/fesm2022/sd-angular-core-modules-keycloak.mjs +126 -0
  179. package/fesm2022/sd-angular-core-modules-keycloak.mjs.map +1 -0
  180. package/fesm2022/sd-angular-core-modules-layout.mjs +709 -456
  181. package/fesm2022/sd-angular-core-modules-layout.mjs.map +1 -1
  182. package/fesm2022/sd-angular-core-modules-permission.mjs +160 -74
  183. package/fesm2022/sd-angular-core-modules-permission.mjs.map +1 -1
  184. package/fesm2022/sd-angular-core-modules.mjs +2 -1
  185. package/fesm2022/sd-angular-core-modules.mjs.map +1 -1
  186. package/fesm2022/sd-angular-core-services-api.mjs +5 -10
  187. package/fesm2022/sd-angular-core-services-api.mjs.map +1 -1
  188. package/fesm2022/sd-angular-core-services-confirm.mjs +9 -7
  189. package/fesm2022/sd-angular-core-services-confirm.mjs.map +1 -1
  190. package/fesm2022/sd-angular-core-services-docx.mjs +173 -0
  191. package/fesm2022/sd-angular-core-services-docx.mjs.map +1 -0
  192. package/fesm2022/sd-angular-core-services-notify.mjs +2 -2
  193. package/fesm2022/sd-angular-core-services-notify.mjs.map +1 -1
  194. package/fesm2022/sd-angular-core-services.mjs +1 -0
  195. package/fesm2022/sd-angular-core-services.mjs.map +1 -1
  196. package/fesm2022/sd-angular-core-utilities-extensions.mjs +58 -80
  197. package/fesm2022/sd-angular-core-utilities-extensions.mjs.map +1 -1
  198. package/fesm2022/sd-angular-core-utilities-models.mjs +15 -1
  199. package/fesm2022/sd-angular-core-utilities-models.mjs.map +1 -1
  200. package/fesm2022/sd-angular-core.mjs +0 -1
  201. package/fesm2022/sd-angular-core.mjs.map +1 -1
  202. package/forms/autocomplete/src/autocomplete.component.d.ts +55 -55
  203. package/forms/chip/src/chip.component.d.ts +37 -40
  204. package/forms/chip-calendar/src/chip-calendar.component.d.ts +37 -38
  205. package/forms/date/src/date.component.d.ts +48 -46
  206. package/forms/date-range/src/date-range.component.d.ts +35 -34
  207. package/forms/datetime/src/datetime.component.d.ts +48 -49
  208. package/forms/input/src/input.component.d.ts +54 -57
  209. package/forms/input-number/src/input-number.component.d.ts +53 -54
  210. package/forms/select/src/select.component.d.ts +67 -64
  211. package/forms/textarea/src/textarea.component.d.ts +40 -43
  212. package/modules/authom/authom.configuration.d.ts +17 -0
  213. package/modules/authom/authom.interceptor.d.ts +3 -0
  214. package/modules/authom/authom.module.d.ts +16 -0
  215. package/modules/authom/authom.service.d.ts +32 -0
  216. package/modules/authom/index.d.ts +35 -0
  217. package/modules/index.d.ts +2 -1
  218. package/modules/keycloak/index.d.ts +4 -0
  219. package/modules/keycloak/keycloak.configuration.d.ts +11 -0
  220. package/modules/keycloak/keycloak.interceptor.d.ts +2 -0
  221. package/modules/keycloak/keycloak.module.d.ts +18 -0
  222. package/modules/keycloak/keycloak.service.d.ts +14 -0
  223. package/modules/layout/components/index.d.ts +2 -0
  224. package/modules/layout/components/layout-main/layout-main.component.d.ts +8 -12
  225. package/modules/layout/components/page/page.component.d.ts +5 -7
  226. package/modules/layout/components/sidebar-mobile-v1/components/sidebar/sidebar.component.d.ts +35 -0
  227. package/modules/layout/components/sidebar-mobile-v1/components/user/user.component.d.ts +24 -0
  228. package/modules/layout/components/sidebar-mobile-v1/main.component.d.ts +21 -0
  229. package/modules/layout/components/sidebar-v1/components/sidebar/sidebar.component.d.ts +22 -29
  230. package/modules/layout/components/sidebar-v1/components/user/user.component.d.ts +11 -17
  231. package/modules/layout/components/sidebar-v1/main.component.d.ts +14 -14
  232. package/modules/layout/configurations/layout.configuration.d.ts +46 -3
  233. package/modules/layout/modules/forbidden/pages/root/root.component.d.ts +3 -8
  234. package/modules/layout/modules/home/components/home-page/home-page.component.d.ts +2 -5
  235. package/modules/layout/modules/not-found/pages/root/root.component.d.ts +3 -8
  236. package/modules/layout/pipes/high-light-search.pipe.d.ts +1 -1
  237. package/modules/layout/services/index.d.ts +1 -0
  238. package/modules/layout/services/layout.service.d.ts +10 -0
  239. package/modules/layout/services/menu/menu.model.d.ts +4 -1
  240. package/modules/layout/services/storage/storage.service.d.ts +0 -3
  241. package/modules/permission/src/configurations/permission.configuration.d.ts +56 -2
  242. package/modules/permission/src/directives/permission.directive.d.ts +5 -8
  243. package/modules/permission/src/guards/permission.guard.d.ts +2 -1
  244. package/modules/permission/src/services/permission.service.d.ts +6 -9
  245. package/package.json +93 -69
  246. package/public-api.d.ts +0 -1
  247. package/sd-angular-core-19.0.0-beta.80.tgz +0 -0
  248. package/services/api/src/api.model.d.ts +6 -1
  249. package/services/confirm/src/lib/confirm.service.d.ts +5 -0
  250. package/services/docx/index.d.ts +1 -0
  251. package/services/docx/src/lib/docx.model.d.ts +9 -0
  252. package/services/docx/src/lib/docx.service.d.ts +13 -0
  253. package/services/docx/src/public-api.d.ts +2 -0
  254. package/services/index.d.ts +1 -0
  255. package/services/notify/index.d.ts +1 -0
  256. package/services/notify/src/notify.model.d.ts +1 -1
  257. package/services/notify/src/notify.service.d.ts +5 -5
  258. package/utilities/extensions/src/string.extension.d.ts +3 -0
  259. package/utilities/extensions/src/utility.extension.d.ts +1 -0
  260. package/utilities/models/index.d.ts +3 -0
  261. package/utilities/models/src/filter.model.d.ts +17 -4
  262. package/utilities/models/src/icon.model.d.ts +2 -0
  263. package/utilities/models/src/nested-key-of.model.d.ts +5 -0
  264. package/utilities/models/src/order.model.d.ts +2 -1
  265. package/utilities/models/src/paging.model.d.ts +2 -1
  266. package/utilities/models/src/pattern.model.d.ts +1 -1
  267. package/utilities/models/src/unwrap-signal.model.d.ts +6 -0
  268. package/components/document-builder/src/plugins/comment/comment.plugin.d.ts +0 -4
  269. package/components/document-builder/src/plugins/table-fit/table-fit.plugin.d.ts +0 -4
  270. package/components/modal/src/modal/modal.component.d.ts +0 -31
  271. package/components/table/src/components/desktop-cell-view/desktop-cell-view.component.d.ts +0 -14
  272. package/fesm2022/sd-angular-core-guards-permission.mjs +0 -155
  273. package/fesm2022/sd-angular-core-guards-permission.mjs.map +0 -1
  274. package/fesm2022/sd-angular-core-guards.mjs +0 -6
  275. package/fesm2022/sd-angular-core-guards.mjs.map +0 -1
  276. package/fesm2022/sd-angular-core-modules-oidc.mjs +0 -127
  277. package/fesm2022/sd-angular-core-modules-oidc.mjs.map +0 -1
  278. package/guards/index.d.ts +0 -1
  279. package/guards/permission/index.d.ts +0 -4
  280. package/guards/permission/src/configurations/index.d.ts +0 -1
  281. package/guards/permission/src/configurations/permission.configuration.d.ts +0 -8
  282. package/guards/permission/src/directives/index.d.ts +0 -1
  283. package/guards/permission/src/directives/permission.directive.d.ts +0 -12
  284. package/guards/permission/src/guards/index.d.ts +0 -1
  285. package/guards/permission/src/guards/permission.guard.d.ts +0 -13
  286. package/guards/permission/src/services/index.d.ts +0 -1
  287. package/guards/permission/src/services/permission.service.d.ts +0 -15
  288. package/modules/oidc/dynamic-sts.loader.d.ts +0 -11
  289. package/modules/oidc/index.d.ts +0 -2
  290. package/modules/oidc/oidc.configuration.d.ts +0 -11
  291. package/modules/oidc/oidc.module.d.ts +0 -14
  292. package/sd-angular-core-19.0.0-beta.8.tgz +0 -0
@@ -1,24 +1,29 @@
1
+ import { ENTER, COMMA } from '@angular/cdk/keycodes';
1
2
  import * as i1 from '@angular/common';
2
3
  import { CommonModule } from '@angular/common';
3
4
  import * as i0 from '@angular/core';
4
- import { Pipe, EventEmitter, ContentChild, ViewChild, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
5
+ import { Pipe, inject, ChangeDetectorRef, input, booleanAttribute, output, contentChild, effect, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
5
6
  import * as i2 from '@angular/forms';
6
- import { NgForm, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
+ import { FormControl, NgForm, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
7
8
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
8
- import * as i5 from '@angular/material/chips';
9
+ import * as i6 from '@angular/material/chips';
9
10
  import { MatChipsModule } from '@angular/material/chips';
10
- import * as i6 from '@angular/material/datepicker';
11
+ import { MatNativeDateModule } from '@angular/material/core';
12
+ import * as i7 from '@angular/material/datepicker';
11
13
  import { MatDatepickerModule, MatCalendar } from '@angular/material/datepicker';
12
14
  import { MatFormFieldModule } from '@angular/material/form-field';
13
- import * as i4 from '@angular/material/icon';
15
+ import * as i5 from '@angular/material/icon';
14
16
  import { MatIconModule } from '@angular/material/icon';
15
17
  import * as i3 from '@angular/material/input';
16
18
  import { MatInputModule } from '@angular/material/input';
17
- import * as i7 from '@angular/material/menu';
19
+ import * as i8 from '@angular/material/menu';
18
20
  import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
19
21
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
22
+ import * as i4 from '@angular/material/tooltip';
20
23
  import { MatTooltipModule } from '@angular/material/tooltip';
24
+ import { SdView } from '@sd-angular/core/components/view';
21
25
  import { SdViewDefDirective, SdLabelDefDirective } from '@sd-angular/core/forms/directives';
26
+ import { SdLabel } from '@sd-angular/core/forms/label';
22
27
  import { SdFormControl } from '@sd-angular/core/forms/models';
23
28
  import { DateUtilities } from '@sd-angular/core/utilities';
24
29
  import { Subscription } from 'rxjs';
@@ -42,7 +47,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
42
47
  }]
43
48
  }], ctorParameters: () => [] });
44
49
 
45
- class SdChipErrotStateMatcher {
50
+ class SdChipCalendarErrorStateMatcher {
46
51
  formControl;
47
52
  constructor(formControl) {
48
53
  this.formControl = formControl;
@@ -53,216 +58,234 @@ class SdChipErrotStateMatcher {
53
58
  }
54
59
  }
55
60
  class SdChipCalendar {
56
- ref;
57
- menuTrigger;
58
- calendar;
59
- autoId;
60
- set _autoId(val) {
61
- if (!val) {
62
- return;
63
- }
64
- this.autoId = `forms-chip-calendar-${val}`;
65
- }
61
+ #ref = inject(ChangeDetectorRef);
62
+ #subscription = new Subscription();
66
63
  #name = uuid.v4();
67
- set _name(val) {
68
- if (val) {
69
- this.#name = val;
70
- }
71
- }
72
- appearance = 'outline';
73
- size = 'md';
74
64
  #form;
75
- set form(val) {
76
- if (val) {
77
- if (val instanceof NgForm) {
78
- this.#form = val.form;
65
+ #isBlurring = false;
66
+ menuTrigger;
67
+ calendar;
68
+ autoId = input();
69
+ name = input();
70
+ appearance = input('outline');
71
+ floatLabel = input('auto');
72
+ size = input('md');
73
+ form = input();
74
+ label = input('');
75
+ placeholder = input();
76
+ removable = input(true);
77
+ hideInlineError = input(false, { transform: booleanAttribute });
78
+ model = input();
79
+ required = input(false, { transform: booleanAttribute });
80
+ min = input(0);
81
+ max = input(0);
82
+ disabled = input(false, { transform: booleanAttribute });
83
+ viewed = input(false, { transform: booleanAttribute });
84
+ hyperlink = input();
85
+ modelChange = output();
86
+ sdChange = output();
87
+ input;
88
+ sdViewDef = contentChild(SdViewDefDirective);
89
+ sdLabelDef = contentChild(SdLabelDefDirective);
90
+ sdLabelTemplate = contentChild('sdLabel');
91
+ sdValueTemplate = contentChild('sdValue');
92
+ isFocused = false;
93
+ #inputControl = new FormControl();
94
+ #formControl = new SdFormControl();
95
+ #matcher;
96
+ separatorKeysCodes = [ENTER, COMMA];
97
+ constructor() {
98
+ effect(() => {
99
+ const formInput = this.form();
100
+ if (formInput) {
101
+ if (formInput instanceof NgForm) {
102
+ this.#form = formInput.form;
103
+ }
104
+ else {
105
+ this.#form = formInput;
106
+ }
107
+ }
108
+ });
109
+ effect(() => {
110
+ this.required();
111
+ this.min();
112
+ this.max();
113
+ this.#updateValidator();
114
+ });
115
+ effect(() => {
116
+ const values = this.model();
117
+ if (Array.isArray(values)) {
118
+ this.#formControl.setValue(values);
119
+ }
120
+ });
121
+ effect(() => {
122
+ const isDisabled = this.disabled();
123
+ if (isDisabled) {
124
+ this.#formControl.disable();
125
+ this.#inputControl.disable();
79
126
  }
80
127
  else {
81
- this.#form = val;
128
+ this.#formControl.enable();
129
+ this.#inputControl.enable();
82
130
  }
83
- }
84
- }
85
- label = '';
86
- placeholder;
87
- removable = true;
88
- set _removable(val) {
89
- this.removable = val === '' || val;
90
- }
91
- hideInlineError = false;
92
- set _hideInlineError(val) {
93
- this.hideInlineError = val === '' || !!val;
94
- }
95
- // Model
96
- set model(values) {
97
- if (!Array.isArray(values)) {
98
- values = [];
99
- }
100
- this.formControl.setValue(values);
101
- }
102
- // Validator
103
- required = false;
104
- set _required(val) {
105
- this.required = val === '' || !!val;
106
- this.#updateValidator();
131
+ });
132
+ effect(() => {
133
+ const nameVal = this.name();
134
+ if (nameVal) {
135
+ this.#name = nameVal;
136
+ }
137
+ });
138
+ this.#matcher = new SdChipCalendarErrorStateMatcher(this.#formControl);
107
139
  }
108
- min;
109
- set pMin(val) {
110
- this.min = +val || 0;
111
- this.#updateValidator();
140
+ get formControl() {
141
+ return this.#formControl;
112
142
  }
113
- max;
114
- set pMax(val) {
115
- this.max = +val || 0;
116
- this.#updateValidator();
143
+ get inputControl() {
144
+ return this.#inputControl;
117
145
  }
118
- modelChange = new EventEmitter();
119
- // Optional
120
- set disabled(val) {
121
- val = val === '' || val;
122
- if (val) {
123
- this.formControl.disable();
124
- this.inputControl.disable();
125
- }
126
- else {
127
- this.formControl.enable();
128
- this.inputControl.enable();
129
- }
146
+ get errorTooltipMessage() {
147
+ const errors = this.#formControl.errors;
148
+ if (!errors)
149
+ return undefined;
150
+ if (errors['required'])
151
+ return 'Vui lòng nhập thông tin';
152
+ if (errors['minlength'])
153
+ return `Vui lòng nhập ít nhất ${this.min()} giá trị`;
154
+ if (errors['maxlength'])
155
+ return `Vui lòng nhập tối đa ${this.max()} giá trị`;
156
+ return undefined;
130
157
  }
131
- sdChange = new EventEmitter();
132
- input;
133
- sdView;
134
- sdLabelDef;
135
- isBlurring = false;
136
- isFocused = false;
137
- inputControl = new FormControl();
138
- formControl = new SdFormControl();
139
- matcher = new SdChipErrotStateMatcher(this.formControl);
140
- #subscription = new Subscription();
141
- constructor(ref) {
142
- this.ref = ref;
158
+ get matcher() {
159
+ return this.#matcher;
143
160
  }
144
161
  ngAfterViewInit() {
145
- this.#subscription.add(this.formControl.sdChanges.subscribe(() => {
146
- this.ref.markForCheck();
162
+ this.#subscription.add(this.#formControl.sdChanges.subscribe(() => {
163
+ this.#ref.markForCheck();
147
164
  }));
148
- this.#form?.addControl(this.#name, this.formControl);
165
+ this.#form?.addControl(this.#name, this.#formControl);
149
166
  }
150
167
  ngOnDestroy() {
151
168
  this.#form?.removeControl(this.#name);
152
169
  this.#subscription.unsubscribe();
153
170
  }
154
171
  #updateValidator = () => {
155
- this.formControl.clearValidators();
156
- this.formControl.clearAsyncValidators();
172
+ this.#formControl.clearValidators();
173
+ this.#formControl.clearAsyncValidators();
157
174
  const validators = [];
158
175
  const asyncValidators = [];
159
- if (this.required) {
176
+ if (this.required()) {
160
177
  validators.push(Validators.required);
161
178
  }
162
- if (this.min > 0) {
163
- validators.push(Validators.minLength(this.min));
179
+ if (this.min() > 0) {
180
+ validators.push(Validators.minLength(this.min()));
164
181
  }
165
- if (this.max > 0) {
166
- validators.push(Validators.maxLength(this.max));
182
+ if (this.max() > 0) {
183
+ validators.push(Validators.maxLength(this.max()));
167
184
  }
168
- this.formControl.setValidators(validators);
169
- this.formControl.setAsyncValidators(asyncValidators);
170
- this.formControl.updateValueAndValidity();
185
+ this.#formControl.setValidators(validators);
186
+ this.#formControl.setAsyncValidators(asyncValidators);
187
+ this.#formControl.updateValueAndValidity();
171
188
  };
172
- onClickChip = ($event, item) => {
173
- $event.stopPropagation();
174
- $event.stopImmediatePropagation();
175
- if (!this.formControl.disabled) {
189
+ #clickChip = (event, item) => {
190
+ event.stopPropagation();
191
+ event.stopImmediatePropagation();
192
+ if (!this.#formControl.disabled) {
176
193
  this.#focus();
177
194
  }
178
195
  };
179
- onRemove = (item) => {
180
- const values = this.formControl.value ?? [];
196
+ #remove = (item) => {
197
+ const values = this.#formControl.value ?? [];
181
198
  if (typeof item === 'string') {
182
- this.formControl.setValue(values.filter(value => item !== value));
183
- this.modelChange.emit(this.formControl.value);
184
- this.sdChange.emit(this.formControl.value);
199
+ this.#formControl.setValue(values.filter(value => item !== value));
200
+ this.modelChange.emit(this.#formControl.value);
201
+ this.sdChange.emit(this.#formControl.value);
185
202
  }
186
- this.inputControl.setValue('');
203
+ this.#inputControl.setValue('');
187
204
  this.#focus();
188
205
  };
189
- onSelect = (event) => {
206
+ #select = (event) => {
190
207
  const item = event.option.value;
191
- const values = this.formControl.value ?? [];
208
+ const values = this.#formControl.value ?? [];
192
209
  if (item) {
193
210
  if (typeof item === 'string' || typeof item === 'number') {
194
211
  if (!values.includes(item)) {
195
212
  values.push(item);
196
- this.formControl.setValue(values);
197
- this.modelChange.emit(this.formControl.value);
198
- this.sdChange.emit(this.formControl.value);
213
+ this.#formControl.setValue(values);
214
+ this.modelChange.emit(this.#formControl.value);
215
+ this.sdChange.emit(this.#formControl.value);
199
216
  }
200
217
  }
201
218
  this.input.nativeElement.value = '';
202
- this.inputControl.setValue('', {
219
+ this.#inputControl.setValue('', {
203
220
  emitEvent: false,
204
221
  });
205
222
  }
206
223
  };
207
- onClick = () => {
208
- if (this.sdView?.templateRef) {
209
- if (!this.formControl.disabled && !this.isFocused) {
224
+ #onClick = () => {
225
+ if (this.sdViewDef()?.templateRef) {
226
+ if (!this.#formControl.disabled && !this.isFocused) {
210
227
  this.#focus();
211
228
  }
212
229
  }
213
230
  };
214
231
  #focus = () => {
215
232
  this.isFocused = true;
216
- this.isBlurring = false;
233
+ this.#isBlurring = false;
217
234
  setTimeout(() => {
218
235
  if (this.isFocused) {
219
236
  this.input?.nativeElement?.focus();
220
237
  }
221
238
  }, 100);
222
239
  };
223
- onClear = ($event) => {
224
- $event?.stopPropagation();
225
- this.inputControl.setValue('');
226
- this.formControl.setValue([]);
227
- this.modelChange.emit(this.formControl.value);
228
- this.sdChange.emit(this.formControl.value);
229
- this.ref.detectChanges();
240
+ #clear = (evt) => {
241
+ evt?.stopPropagation();
242
+ this.#inputControl.setValue('');
243
+ this.#formControl.setValue([]);
244
+ this.modelChange.emit(this.#formControl.value);
245
+ this.sdChange.emit(this.#formControl.value);
246
+ this.#ref.detectChanges();
230
247
  };
231
- onSelectDate = (date) => {
248
+ #selectDate = (date) => {
232
249
  const value = DateUtilities.toFormat(date, 'yyyy/MM/dd');
233
- const values = this.formControl.value ?? [];
250
+ const values = this.#formControl.value ?? [];
234
251
  if (value) {
235
252
  if (!values.includes(value)) {
236
- // Nếu chưa có thì add vào
237
253
  values.push(value);
238
- this.formControl.setValue(values);
239
- this.modelChange.emit(this.formControl.value);
240
- this.sdChange.emit(this.formControl.value);
254
+ this.#formControl.setValue(values);
255
+ this.modelChange.emit(this.#formControl.value);
256
+ this.sdChange.emit(this.#formControl.value);
241
257
  }
242
258
  else {
243
- // Nếu rồi thì remove
244
- this.formControl.setValue(values.filter(date => value !== date));
245
- this.modelChange.emit(this.formControl.value);
246
- this.sdChange.emit(this.formControl.value);
259
+ this.#formControl.setValue(values.filter(date => value !== date));
260
+ this.modelChange.emit(this.#formControl.value);
261
+ this.sdChange.emit(this.#formControl.value);
247
262
  }
248
263
  this.calendar.updateTodaysDate();
249
- this.ref.markForCheck();
264
+ this.#ref.markForCheck();
250
265
  }
251
266
  };
252
- onCloseCalendar() {
267
+ #closeCalendar = () => {
253
268
  this.isFocused = false;
254
269
  this.input.nativeElement.blur();
255
- }
256
- dateClass = (cellDate) => {
257
- const dates = this.formControl.value || [];
270
+ };
271
+ #dateClass = (cellDate) => {
272
+ const dates = this.#formControl.value || [];
258
273
  if (Array.isArray(dates)) {
259
274
  const selected = dates.some(date => date === DateUtilities.toFormat(cellDate, 'yyyy/MM/dd'));
260
275
  return selected ? 'sd-chip-calendar-selected-date' : '';
261
276
  }
262
277
  return '';
263
278
  };
264
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdChipCalendar, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
265
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdChipCalendar, isStandalone: true, selector: "sd-chip-calendar", inputs: { _autoId: ["autoId", "_autoId"], _name: ["name", "_name"], appearance: "appearance", size: "size", form: "form", label: "label", placeholder: "placeholder", _removable: ["removable", "_removable"], _hideInlineError: ["hideInlineError", "_hideInlineError"], model: "model", _required: ["required", "_required"], pMin: ["min", "pMin"], pMax: ["max", "pMax"], disabled: "disabled" }, outputs: { modelChange: "modelChange", sdChange: "sdChange" }, queries: [{ propertyName: "sdView", first: true, predicate: SdViewDefDirective, descendants: true }, { propertyName: "sdLabelDef", first: true, predicate: SdLabelDefDirective, descendants: true }], viewQueries: [{ propertyName: "menuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }, { propertyName: "calendar", first: true, predicate: MatCalendar, descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@let labelTemplate = sdLabelDef?.templateRef;\r\n@let viewTemplate = sdView?.templateRef;\r\n\r\n@if (!appearance && labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\r\n}\r\n@if (!appearance && label && !labelTemplate) {\r\n <div class=\"d-block mb-0 T14M\">{{ label }} <span class=\"text-danger mb-2\" *ngIf=\"required\">*</span></div>\r\n}\r\n<div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"viewTemplate\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\"\r\n aria-hidden=\"true\">\r\n @if (viewTemplate && !isFocused) {\r\n <ng-container *ngTemplateOutlet=\"viewTemplate; context: { value: formControl.value }\"></ng-container>\r\n } @else {\r\n <mat-form-field [class.sd-md]=\"size === 'md'\" [class.sd-sm]=\"size === 'sm'\" [class.hide-inline-error]=\"hideInlineError\" [appearance]=\"appearance\">\r\n @if (appearance && label) {\r\n <mat-label>{{ label }}</mat-label>\r\n }\r\n <mat-chip-grid [formControl]=\"formControl\" #chipList>\r\n @for (item of formControl.value; track item) {\r\n @if (item) {\r\n <mat-chip-row\r\n [removable]=\"removable\"\r\n (removed)=\"onRemove(item)\"\r\n [disabled]=\"inputControl.disabled\"\r\n (click)=\"onClickChip($event, item)\"\r\n [value]=\"item\">\r\n <span>{{ item | date: 'dd/MM/yyyy' }}</span>\r\n @if (!inputControl.disabled && item | sdRemovableChip: removable) {\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n }\r\n </mat-chip-row>\r\n }\r\n }\r\n <input\r\n [formControl]=\"inputControl\"\r\n [placeholder]=\"placeholder || label\"\r\n [matChipInputFor]=\"chipList\"\r\n autocomplete=\"off\"\r\n [errorStateMatcher]=\"matcher\"\r\n [matMenuTriggerFor]=\"calendarMenu\"\r\n [required]=\"required\"\r\n matInput\r\n [attr.data-autoId]=\"autoId\"\r\n readonly\r\n #input />\r\n </mat-chip-grid>\r\n <mat-menu #calendarMenu=\"matMenu\" overlapTrigger=\"false\" (closed)=\"onCloseCalendar()\">\r\n <div style=\"width: 280px\" (click)=\"$event.stopPropagation()\" aria-hidden=\"true\">\r\n <mat-calendar (selectedChange)=\"onSelectDate($event)\" [dateClass]=\"dateClass\"> </mat-calendar>\r\n </div>\r\n </mat-menu>\r\n <!-- <mat-datepicker [dateClass]=\"dateClass\" (closed)=\"onPickerClosed()\" #picker></mat-datepicker> -->\r\n @if (formControl.errors?.['required'] && !hideInlineError) {\r\n <mat-error>{{ 'Vui l\u00F2ng nh\u1EADp th\u00F4ng tin' }}</mat-error>\r\n }\r\n @if (formControl.errors?.['minlength'] && !hideInlineError) {\r\n <mat-error>{{ 'Vui l\u00F2ng nh\u1EADp \u00EDt nh\u1EA5t ' + min + ' gi\u00E1 tr\u1ECB' }} </mat-error>\r\n }\r\n @if (formControl.errors?.['maxlength'] && !hideInlineError) {\r\n <mat-error>{{ 'Vui l\u00F2ng nh\u1EADp t\u1ED1i \u0111a ' + max + ' gi\u00E1 tr\u1ECB' }} </mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{padding-top:5px;display:block}:host ::ng-deep .mat-mdc-form-field.no-padding-wrapper .mat-mdc-text-field-wrapper{padding-bottom:0}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip{padding:7px 10px;min-height:26px}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{padding:7px 7px 7px 10px}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}:host{display:block}mat-form-field{width:100%}mat-chip-listbox{display:flex;flex-wrap:wrap;gap:4px}::ng-deep .sd-chip-calendar-selected-date .mat-calendar-body-cell-content{background-color:var(--sd-primary-light)!important;color:var(--sd-primary)!important;border-radius:50%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i5.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i5.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i7.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i7.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "pipe", type: SdRemovableChipPipe, name: "sdRemovableChip" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
279
+ onClickChip = (event, item) => this.#clickChip(event, item);
280
+ onRemove = (item) => this.#remove(item);
281
+ onSelect = (event) => this.#select(event);
282
+ onClick = () => this.#onClick();
283
+ onClear = (evt) => this.#clear(evt);
284
+ onSelectDate = (date) => this.#selectDate(date);
285
+ onCloseCalendar = () => this.#closeCalendar();
286
+ dateClass = (cellDate) => this.#dateClass(cellDate);
287
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdChipCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
288
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: SdChipCalendar, isStandalone: true, selector: "sd-chip-calendar", inputs: { autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, floatLabel: { classPropertyName: "floatLabel", publicName: "floatLabel", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, hideInlineError: { classPropertyName: "hideInlineError", publicName: "hideInlineError", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, viewed: { classPropertyName: "viewed", publicName: "viewed", isSignal: true, isRequired: false, transformFunction: null }, hyperlink: { classPropertyName: "hyperlink", publicName: "hyperlink", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { modelChange: "modelChange", sdChange: "sdChange" }, queries: [{ propertyName: "sdViewDef", first: true, predicate: SdViewDefDirective, descendants: true, isSignal: true }, { propertyName: "sdLabelDef", first: true, predicate: SdLabelDefDirective, descendants: true, isSignal: true }, { propertyName: "sdLabelTemplate", first: true, predicate: ["sdLabel"], descendants: true, isSignal: true }, { propertyName: "sdValueTemplate", first: true, predicate: ["sdValue"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "menuTrigger", first: true, predicate: MatMenuTrigger, descendants: true }, { propertyName: "calendar", first: true, predicate: MatCalendar, descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@let _lbl = label();\r\n@let _app = appearance();\r\n@let _req = required();\r\n@let _viewed = viewed();\r\n@let _hideErr = hideInlineError();\r\n@let _viewDef = sdViewDef();\r\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\r\n@let _valueTemplate = (sdValueTemplate() ?? _viewDef?.templateRef) || undefined;\r\n@let _errMsg = errorTooltipMessage;\r\n\r\n@if (_viewed) {\r\n <sd-view\r\n [label]=\"_lbl\"\r\n [labelTemplate]=\"_labelTemplate\"\r\n [value]=\"formControl.value\"\r\n [display]=\"formControl.value\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"_valueTemplate\">\r\n </sd-view>\r\n} @else {\r\n @if (!_app && _labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\r\n }\r\n @if (!_app && _lbl && !_labelTemplate) {\r\n <sd-label [label]=\"_lbl\" [required]=\"_req\"></sd-label>\r\n }\r\n\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"!!_viewDef?.templateRef\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\"\r\n aria-hidden=\"true\">\r\n @if (_viewDef?.templateRef && !isFocused) {\r\n <ng-container *ngTemplateOutlet=\"_viewDef!.templateRef; context: { value: formControl.value }\"></ng-container>\r\n } @else {\r\n <mat-form-field\r\n [class.sd-md]=\"size() === 'md'\"\r\n [class.sd-sm]=\"size() === 'sm'\"\r\n [class.hide-inline-error]=\"_hideErr\"\r\n [appearance]=\"_app\"\r\n [floatLabel]=\"floatLabel()\">\r\n @if (_app && _lbl) {\r\n <mat-label>{{ _lbl }}</mat-label>\r\n }\r\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"size() === 'md'\" [class.sd-sm]=\"size() === 'sm'\">\r\n @for (item of formControl.value; track item) {\r\n @if (item) {\r\n <mat-chip-row\r\n [class.sd-md]=\"size() === 'md'\"\r\n [class.sd-sm]=\"size() === 'sm'\"\r\n [removable]=\"removable()\"\r\n (removed)=\"onRemove(item)\"\r\n [disabled]=\"inputControl.disabled\"\r\n (click)=\"onClickChip($event, item)\"\r\n [value]=\"item\">\r\n <span>{{ item | date: 'dd/MM/yyyy' }}</span>\r\n @if (!inputControl.disabled && item | sdRemovableChip: removable()) {\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n }\r\n </mat-chip-row>\r\n }\r\n }\r\n\r\n <input\r\n class=\"sd-chip-input\"\r\n [formControl]=\"inputControl\"\r\n [placeholder]=\"placeholder() || _lbl\"\r\n [matChipInputFor]=\"chipList\"\r\n autocomplete=\"off\"\r\n [errorStateMatcher]=\"matcher\"\r\n [matMenuTriggerFor]=\"calendarMenu\"\r\n [required]=\"_req\"\r\n matInput\r\n [attr.data-autoId]=\"autoId()\"\r\n readonly\r\n #input />\r\n </mat-chip-grid>\r\n\r\n <mat-menu #calendarMenu=\"matMenu\" overlapTrigger=\"false\" (closed)=\"onCloseCalendar()\">\r\n <div style=\"width: 280px\" (click)=\"$event.stopPropagation()\" aria-hidden=\"true\">\r\n <mat-calendar (selectedChange)=\"onSelectDate($event)\" [dateClass]=\"dateClass\"> </mat-calendar>\r\n </div>\r\n </mat-menu>\r\n @if (_hideErr && _errMsg && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errMsg\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideErr && _errMsg && formControl.touched) {\r\n <mat-error>{{ _errMsg }}</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n}\r\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{padding-top:5px;display:block}:host ::ng-deep .mat-mdc-form-field.no-padding-wrapper .mat-mdc-text-field-wrapper{padding-bottom:0}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip{padding:7px 10px;min-height:26px}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{padding:7px 7px 7px 10px}:host ::ng-deep .mat-mdc-chip-row.sd-sm{--mdc-chip-label-text-size: 12px;--mdc-chip-container-height: 20px}:host ::ng-deep .mat-mdc-chip-set.sd-md{margin-top:10px}:host ::ng-deep .mat-mdc-chip-set.sd-sm{margin-top:2px}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}:host{display:block}mat-form-field{width:100%}mat-chip-listbox{display:flex;flex-wrap:wrap;gap:4px}::ng-deep .sd-chip-calendar-selected-date .mat-calendar-body-cell-content{background-color:var(--sd-primary-light)!important;color:var(--sd-primary)!important;border-radius:50%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i6.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i6.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i6.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i6.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i7.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "ngmodule", type: MatNativeDateModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: SdLabel, selector: "sd-label", inputs: ["label", "description", "required", "helperText"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate"] }, { kind: "pipe", type: SdRemovableChipPipe, name: "sdRemovableChip" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
266
289
  }
267
290
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SdChipCalendar, decorators: [{
268
291
  type: Component,
@@ -278,63 +301,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
278
301
  MatProgressSpinnerModule,
279
302
  MatChipsModule,
280
303
  MatDatepickerModule,
304
+ MatNativeDateModule,
281
305
  MatMenuModule,
306
+ SdLabel,
307
+ SdView,
282
308
  SdRemovableChipPipe,
283
- ], template: "@let labelTemplate = sdLabelDef?.templateRef;\r\n@let viewTemplate = sdView?.templateRef;\r\n\r\n@if (!appearance && labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"labelTemplate\"></ng-container>\r\n}\r\n@if (!appearance && label && !labelTemplate) {\r\n <div class=\"d-block mb-0 T14M\">{{ label }} <span class=\"text-danger mb-2\" *ngIf=\"required\">*</span></div>\r\n}\r\n<div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"viewTemplate\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\"\r\n aria-hidden=\"true\">\r\n @if (viewTemplate && !isFocused) {\r\n <ng-container *ngTemplateOutlet=\"viewTemplate; context: { value: formControl.value }\"></ng-container>\r\n } @else {\r\n <mat-form-field [class.sd-md]=\"size === 'md'\" [class.sd-sm]=\"size === 'sm'\" [class.hide-inline-error]=\"hideInlineError\" [appearance]=\"appearance\">\r\n @if (appearance && label) {\r\n <mat-label>{{ label }}</mat-label>\r\n }\r\n <mat-chip-grid [formControl]=\"formControl\" #chipList>\r\n @for (item of formControl.value; track item) {\r\n @if (item) {\r\n <mat-chip-row\r\n [removable]=\"removable\"\r\n (removed)=\"onRemove(item)\"\r\n [disabled]=\"inputControl.disabled\"\r\n (click)=\"onClickChip($event, item)\"\r\n [value]=\"item\">\r\n <span>{{ item | date: 'dd/MM/yyyy' }}</span>\r\n @if (!inputControl.disabled && item | sdRemovableChip: removable) {\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n }\r\n </mat-chip-row>\r\n }\r\n }\r\n <input\r\n [formControl]=\"inputControl\"\r\n [placeholder]=\"placeholder || label\"\r\n [matChipInputFor]=\"chipList\"\r\n autocomplete=\"off\"\r\n [errorStateMatcher]=\"matcher\"\r\n [matMenuTriggerFor]=\"calendarMenu\"\r\n [required]=\"required\"\r\n matInput\r\n [attr.data-autoId]=\"autoId\"\r\n readonly\r\n #input />\r\n </mat-chip-grid>\r\n <mat-menu #calendarMenu=\"matMenu\" overlapTrigger=\"false\" (closed)=\"onCloseCalendar()\">\r\n <div style=\"width: 280px\" (click)=\"$event.stopPropagation()\" aria-hidden=\"true\">\r\n <mat-calendar (selectedChange)=\"onSelectDate($event)\" [dateClass]=\"dateClass\"> </mat-calendar>\r\n </div>\r\n </mat-menu>\r\n <!-- <mat-datepicker [dateClass]=\"dateClass\" (closed)=\"onPickerClosed()\" #picker></mat-datepicker> -->\r\n @if (formControl.errors?.['required'] && !hideInlineError) {\r\n <mat-error>{{ 'Vui l\u00F2ng nh\u1EADp th\u00F4ng tin' }}</mat-error>\r\n }\r\n @if (formControl.errors?.['minlength'] && !hideInlineError) {\r\n <mat-error>{{ 'Vui l\u00F2ng nh\u1EADp \u00EDt nh\u1EA5t ' + min + ' gi\u00E1 tr\u1ECB' }} </mat-error>\r\n }\r\n @if (formControl.errors?.['maxlength'] && !hideInlineError) {\r\n <mat-error>{{ 'Vui l\u00F2ng nh\u1EADp t\u1ED1i \u0111a ' + max + ' gi\u00E1 tr\u1ECB' }} </mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n</div>\r\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{padding-top:5px;display:block}:host ::ng-deep .mat-mdc-form-field.no-padding-wrapper .mat-mdc-text-field-wrapper{padding-bottom:0}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip{padding:7px 10px;min-height:26px}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{padding:7px 7px 7px 10px}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}:host{display:block}mat-form-field{width:100%}mat-chip-listbox{display:flex;flex-wrap:wrap;gap:4px}::ng-deep .sd-chip-calendar-selected-date .mat-calendar-body-cell-content{background-color:var(--sd-primary-light)!important;color:var(--sd-primary)!important;border-radius:50%}\n"] }]
284
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { menuTrigger: [{
309
+ ], template: "@let _lbl = label();\r\n@let _app = appearance();\r\n@let _req = required();\r\n@let _viewed = viewed();\r\n@let _hideErr = hideInlineError();\r\n@let _viewDef = sdViewDef();\r\n@let _labelTemplate = (sdLabelTemplate() ?? sdLabelDef()?.templateRef) || undefined;\r\n@let _valueTemplate = (sdValueTemplate() ?? _viewDef?.templateRef) || undefined;\r\n@let _errMsg = errorTooltipMessage;\r\n\r\n@if (_viewed) {\r\n <sd-view\r\n [label]=\"_lbl\"\r\n [labelTemplate]=\"_labelTemplate\"\r\n [value]=\"formControl.value\"\r\n [display]=\"formControl.value\"\r\n [hyperlink]=\"hyperlink()\"\r\n [valueTemplate]=\"_valueTemplate\">\r\n </sd-view>\r\n} @else {\r\n @if (!_app && _labelTemplate) {\r\n <ng-container *ngTemplateOutlet=\"_labelTemplate\"></ng-container>\r\n }\r\n @if (!_app && _lbl && !_labelTemplate) {\r\n <sd-label [label]=\"_lbl\" [required]=\"_req\"></sd-label>\r\n }\r\n\r\n <div\r\n class=\"d-flex align-items-center\"\r\n [class.sd-view]=\"!!_viewDef?.templateRef\"\r\n [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\"\r\n (click)=\"onClick()\"\r\n aria-hidden=\"true\">\r\n @if (_viewDef?.templateRef && !isFocused) {\r\n <ng-container *ngTemplateOutlet=\"_viewDef!.templateRef; context: { value: formControl.value }\"></ng-container>\r\n } @else {\r\n <mat-form-field\r\n [class.sd-md]=\"size() === 'md'\"\r\n [class.sd-sm]=\"size() === 'sm'\"\r\n [class.hide-inline-error]=\"_hideErr\"\r\n [appearance]=\"_app\"\r\n [floatLabel]=\"floatLabel()\">\r\n @if (_app && _lbl) {\r\n <mat-label>{{ _lbl }}</mat-label>\r\n }\r\n <mat-chip-grid [formControl]=\"formControl\" #chipList [class.sd-md]=\"size() === 'md'\" [class.sd-sm]=\"size() === 'sm'\">\r\n @for (item of formControl.value; track item) {\r\n @if (item) {\r\n <mat-chip-row\r\n [class.sd-md]=\"size() === 'md'\"\r\n [class.sd-sm]=\"size() === 'sm'\"\r\n [removable]=\"removable()\"\r\n (removed)=\"onRemove(item)\"\r\n [disabled]=\"inputControl.disabled\"\r\n (click)=\"onClickChip($event, item)\"\r\n [value]=\"item\">\r\n <span>{{ item | date: 'dd/MM/yyyy' }}</span>\r\n @if (!inputControl.disabled && item | sdRemovableChip: removable()) {\r\n <mat-icon matChipRemove>cancel</mat-icon>\r\n }\r\n </mat-chip-row>\r\n }\r\n }\r\n\r\n <input\r\n class=\"sd-chip-input\"\r\n [formControl]=\"inputControl\"\r\n [placeholder]=\"placeholder() || _lbl\"\r\n [matChipInputFor]=\"chipList\"\r\n autocomplete=\"off\"\r\n [errorStateMatcher]=\"matcher\"\r\n [matMenuTriggerFor]=\"calendarMenu\"\r\n [required]=\"_req\"\r\n matInput\r\n [attr.data-autoId]=\"autoId()\"\r\n readonly\r\n #input />\r\n </mat-chip-grid>\r\n\r\n <mat-menu #calendarMenu=\"matMenu\" overlapTrigger=\"false\" (closed)=\"onCloseCalendar()\">\r\n <div style=\"width: 280px\" (click)=\"$event.stopPropagation()\" aria-hidden=\"true\">\r\n <mat-calendar (selectedChange)=\"onSelectDate($event)\" [dateClass]=\"dateClass\"> </mat-calendar>\r\n </div>\r\n </mat-menu>\r\n @if (_hideErr && _errMsg && formControl.touched) {\r\n <mat-icon matSuffix class=\"sd-error-icon\" [matTooltip]=\"_errMsg\" matTooltipPosition=\"above\"> error </mat-icon>\r\n }\r\n\r\n @if (!_hideErr && _errMsg && formControl.touched) {\r\n <mat-error>{{ _errMsg }}</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n </div>\r\n}\r\n", styles: ["@charset \"UTF-8\";.text-primary{color:var(--sd-primary)!important}.bg-primary{background:var(--sd-primary)!important}.border-primary{border-color:var(--sd-primary)!important}.text-primary-light{color:var(--sd-primary-light)!important}.bg-primary-light{background:var(--sd-primary-light)!important}.border-primary-light{border-color:var(--sd-primary-light)!important}.text-primary-dark{color:var(--sd-primary-dark)!important}.bg-primary-dark{background:var(--sd-primary-dark)!important}.border-primary-dark{border-color:var(--sd-primary-dark)!important}.text-info{color:var(--sd-info)!important}.bg-info{background:var(--sd-info)!important}.border-info{border-color:var(--sd-info)!important}.text-info-light{color:var(--sd-info-light)!important}.bg-info-light{background:var(--sd-info-light)!important}.border-info-light{border-color:var(--sd-info-light)!important}.text-info-dark{color:var(--sd-info-dark)!important}.bg-info-dark{background:var(--sd-info-dark)!important}.border-info-dark{border-color:var(--sd-info-dark)!important}.text-success{color:var(--sd-success)!important}.bg-success{background:var(--sd-success)!important}.border-success{border-color:var(--sd-success)!important}.text-success-light{color:var(--sd-success-light)!important}.bg-success-light{background:var(--sd-success-light)!important}.border-success-light{border-color:var(--sd-success-light)!important}.text-success-dark{color:var(--sd-success-dark)!important}.bg-success-dark{background:var(--sd-success-dark)!important}.border-success-dark{border-color:var(--sd-success-dark)!important}.text-warning{color:var(--sd-warning)!important}.bg-warning{background:var(--sd-warning)!important}.border-warning{border-color:var(--sd-warning)!important}.text-warning-light{color:var(--sd-warning-light)!important}.bg-warning-light{background:var(--sd-warning-light)!important}.border-warning-light{border-color:var(--sd-warning-light)!important}.text-warning-dark{color:var(--sd-warning-dark)!important}.bg-warning-dark{background:var(--sd-warning-dark)!important}.border-warning-dark{border-color:var(--sd-warning-dark)!important}.text-error{color:var(--sd-error)!important}.bg-error{background:var(--sd-error)!important}.border-error{border-color:var(--sd-error)!important}.text-error-light{color:var(--sd-error-light)!important}.bg-error-light{background:var(--sd-error-light)!important}.border-error-light{border-color:var(--sd-error-light)!important}.text-error-dark{color:var(--sd-error-dark)!important}.bg-error-dark{background:var(--sd-error-dark)!important}.border-error-dark{border-color:var(--sd-error-dark)!important}.text-secondary{color:var(--sd-secondary)!important}.bg-secondary{background:var(--sd-secondary)!important}.border-secondary{border-color:var(--sd-secondary)!important}.text-secondary-light{color:var(--sd-secondary-light)!important}.bg-secondary-light{background:var(--sd-secondary-light)!important}.border-secondary-light{border-color:var(--sd-secondary-light)!important}.text-secondary-dark{color:var(--sd-secondary-dark)!important}.bg-secondary-dark{background:var(--sd-secondary-dark)!important}.border-secondary-dark{border-color:var(--sd-secondary-dark)!important}.text-light{color:var(--sd-light)!important}.bg-light{background:var(--sd-light)!important}.border-light{border-color:var(--sd-light)!important}.text-dark{color:var(--sd-dark)!important}.bg-dark{background:var(--sd-dark)!important}.border-dark{border-color:var(--sd-dark)!important}.text-black500{color:var(--sd-black500)!important}.bg-black500{background:var(--sd-black500)!important}.border-black500{border-color:var(--sd-black500)!important}.text-black400{color:var(--sd-black400)!important}.bg-black400{background:var(--sd-black400)!important}.border-black400{border-color:var(--sd-black400)!important}.text-black300{color:var(--sd-black300)!important}.bg-black300{background:var(--sd-black300)!important}.border-black300{border-color:var(--sd-black300)!important}.text-black200{color:var(--sd-black200)!important}.bg-black200{background:var(--sd-black200)!important}.border-black200{border-color:var(--sd-black200)!important}.text-black100{color:var(--sd-black100)!important}.bg-black100{background:var(--sd-black100)!important}.border-black100{border-color:var(--sd-black100)!important}.text-white{color:#fff!important}.bg-white{background:#fff!important}.border-white{border-color:#fff!important}.text-black{color:#000!important}.bg-black{background:#000!important}.border-black{border-color:#000!important}:host{padding-top:5px;display:block}:host ::ng-deep .mat-mdc-form-field.no-padding-wrapper .mat-mdc-text-field-wrapper{padding-bottom:0}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip{padding:7px 10px;min-height:26px}:host ::ng-deep mat-form-field.c-md .mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{padding:7px 7px 7px 10px}:host ::ng-deep .mat-mdc-chip-row.sd-sm{--mdc-chip-label-text-size: 12px;--mdc-chip-container-height: 20px}:host ::ng-deep .mat-mdc-chip-set.sd-md{margin-top:10px}:host ::ng-deep .mat-mdc-chip-set.sd-sm{margin-top:2px}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}:host{display:block}mat-form-field{width:100%}mat-chip-listbox{display:flex;flex-wrap:wrap;gap:4px}::ng-deep .sd-chip-calendar-selected-date .mat-calendar-body-cell-content{background-color:var(--sd-primary-light)!important;color:var(--sd-primary)!important;border-radius:50%}\n"] }]
310
+ }], ctorParameters: () => [], propDecorators: { menuTrigger: [{
285
311
  type: ViewChild,
286
312
  args: [MatMenuTrigger]
287
313
  }], calendar: [{
288
314
  type: ViewChild,
289
315
  args: [MatCalendar]
290
- }], _autoId: [{
291
- type: Input,
292
- args: ['autoId']
293
- }], _name: [{
294
- type: Input,
295
- args: ['name']
296
- }], appearance: [{
297
- type: Input
298
- }], size: [{
299
- type: Input
300
- }], form: [{
301
- type: Input
302
- }], label: [{
303
- type: Input
304
- }], placeholder: [{
305
- type: Input
306
- }], _removable: [{
307
- type: Input,
308
- args: ['removable']
309
- }], _hideInlineError: [{
310
- type: Input,
311
- args: ['hideInlineError']
312
- }], model: [{
313
- type: Input
314
- }], _required: [{
315
- type: Input,
316
- args: ['required']
317
- }], pMin: [{
318
- type: Input,
319
- args: ['min']
320
- }], pMax: [{
321
- type: Input,
322
- args: ['max']
323
- }], modelChange: [{
324
- type: Output
325
- }], disabled: [{
326
- type: Input
327
- }], sdChange: [{
328
- type: Output
329
316
  }], input: [{
330
317
  type: ViewChild,
331
318
  args: ['input']
332
- }], sdView: [{
333
- type: ContentChild,
334
- args: [SdViewDefDirective]
335
- }], sdLabelDef: [{
336
- type: ContentChild,
337
- args: [SdLabelDefDirective]
338
319
  }] } });
339
320
 
340
321
  /**