@sdcorejs/angular 22.3.2 → 22.3.4

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 (267) hide show
  1. package/assets/THEME.md +58 -6
  2. package/assets/scss/core/form.scss +291 -3
  3. package/assets/scss/themes/_component-tokens.scss +35 -6
  4. package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
  5. package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
  6. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +3 -3
  7. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  8. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +489 -42
  9. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  10. package/fesm2022/sdcorejs-angular-components-section.mjs +15 -3
  11. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  12. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
  13. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  14. package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
  15. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +398 -78
  16. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  17. package/fesm2022/sdcorejs-angular-components-table.mjs +1715 -127
  18. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  19. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +932 -174
  20. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  21. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +7 -2
  22. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  23. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +5 -2
  24. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  25. package/fesm2022/sdcorejs-angular-forms-chip.mjs +437 -122
  26. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  27. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +4 -0
  28. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  29. package/fesm2022/sdcorejs-angular-forms-date.mjs +4 -0
  30. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +4 -0
  32. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +18 -2
  34. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  35. package/fesm2022/sdcorejs-angular-forms-input.mjs +4 -0
  36. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  37. package/fesm2022/sdcorejs-angular-forms-select.mjs +26 -20
  38. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  39. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +14 -1
  40. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  41. package/fesm2022/sdcorejs-angular-i18n.mjs +350 -5
  42. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  43. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BrJfOTWy.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs} +3 -3
  44. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BrJfOTWy.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs.map} +1 -1
  45. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-DQYXx2nr.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs} +3 -3
  46. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-DQYXx2nr.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs.map} +1 -1
  47. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-Cjg3Dfq1.mjs → sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs} +3 -3
  48. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-Cjg3Dfq1.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs.map} +1 -1
  49. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DpXg2yI7.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs} +4 -4
  50. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DpXg2yI7.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs.map} +1 -1
  51. package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
  52. package/fesm2022/sdcorejs-angular-modules-layout.mjs +371 -11
  53. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  54. package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs +23 -0
  55. package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs.map +1 -0
  56. package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs +16 -0
  57. package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs.map +1 -0
  58. package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-C2o5xPVB.mjs +51 -0
  59. package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-C2o5xPVB.mjs.map +1 -0
  60. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CRc9T7rb.mjs +146 -0
  61. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CRc9T7rb.mjs.map +1 -0
  62. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-Cz-MjRG0.mjs +148 -0
  63. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-Cz-MjRG0.mjs.map +1 -0
  64. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CxicczH7.mjs +114 -0
  65. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CxicczH7.mjs.map +1 -0
  66. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-D3MzNJ3F.mjs +469 -0
  67. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-D3MzNJ3F.mjs.map +1 -0
  68. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-RBvVv88D.mjs +143 -0
  69. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-RBvVv88D.mjs.map +1 -0
  70. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +18 -0
  71. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +1 -0
  72. package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-3hWkJClX.mjs +67 -0
  73. package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-3hWkJClX.mjs.map +1 -0
  74. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-DzDAX3B7.mjs +152 -0
  75. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-DzDAX3B7.mjs.map +1 -0
  76. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CEhbU12j.mjs +175 -0
  77. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CEhbU12j.mjs.map +1 -0
  78. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CcpYULut.mjs +496 -0
  79. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CcpYULut.mjs.map +1 -0
  80. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-yJ5fPyYU.mjs +92 -0
  81. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-yJ5fPyYU.mjs.map +1 -0
  82. package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-G5lHfG81.mjs +533 -0
  83. package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-G5lHfG81.mjs.map +1 -0
  84. package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-Ydotvlyc.mjs +64 -0
  85. package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-Ydotvlyc.mjs.map +1 -0
  86. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BJaYcNzf.mjs +179 -0
  87. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BJaYcNzf.mjs.map +1 -0
  88. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs +92 -0
  89. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs.map +1 -0
  90. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs +242 -0
  91. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs.map +1 -0
  92. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs +72 -0
  93. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs.map +1 -0
  94. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-CosbQK0W.mjs +100 -0
  95. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-CosbQK0W.mjs.map +1 -0
  96. package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-DmmVKrgM.mjs +836 -0
  97. package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-DmmVKrgM.mjs.map +1 -0
  98. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BjehcQEk.mjs +172 -0
  99. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BjehcQEk.mjs.map +1 -0
  100. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CNVqk3JC.mjs +647 -0
  101. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CNVqk3JC.mjs.map +1 -0
  102. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-C_pVqRcC.mjs +73 -0
  103. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-C_pVqRcC.mjs.map +1 -0
  104. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-EaNDEtCn.mjs +118 -0
  105. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-EaNDEtCn.mjs.map +1 -0
  106. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-jB3E20UF.mjs +120 -0
  107. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-jB3E20UF.mjs.map +1 -0
  108. package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-CFljqhjv.mjs +1069 -0
  109. package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-CFljqhjv.mjs.map +1 -0
  110. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs +193 -0
  111. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +1 -0
  112. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs +99 -0
  113. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +1 -0
  114. package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs +12 -0
  115. package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs.map +1 -0
  116. package/fesm2022/sdcorejs-angular-modules-pattern-product.service-DitXmlr1.mjs +49 -0
  117. package/fesm2022/sdcorejs-angular-modules-pattern-product.service-DitXmlr1.mjs.map +1 -0
  118. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-Dxw7Ix9d.mjs +301 -0
  119. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-Dxw7Ix9d.mjs.map +1 -0
  120. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BOiWZHqg.mjs +45 -0
  121. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BOiWZHqg.mjs.map +1 -0
  122. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BWZxOMhB.mjs +74 -0
  123. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BWZxOMhB.mjs.map +1 -0
  124. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BxXgJVsW.mjs +74 -0
  125. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BxXgJVsW.mjs.map +1 -0
  126. package/fesm2022/sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs +43 -0
  127. package/fesm2022/sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs.map +1 -0
  128. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs +66 -0
  129. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs.map +1 -0
  130. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CWixJ2If.mjs +50 -0
  131. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CWixJ2If.mjs.map +1 -0
  132. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CophQH_L.mjs +100 -0
  133. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CophQH_L.mjs.map +1 -0
  134. package/fesm2022/sdcorejs-angular-modules-pattern-routes-w4VY9P_H.mjs +166 -0
  135. package/fesm2022/sdcorejs-angular-modules-pattern-routes-w4VY9P_H.mjs.map +1 -0
  136. package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs +413 -0
  137. package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs.map +1 -0
  138. package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BOjJteMd.mjs +325 -0
  139. package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-BOjJteMd.mjs.map +1 -0
  140. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BT2PzXTG.mjs +135 -0
  141. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BT2PzXTG.mjs.map +1 -0
  142. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-qmGn2tCI.mjs +146 -0
  143. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-qmGn2tCI.mjs.map +1 -0
  144. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CS3jlV-R.mjs +101 -0
  145. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CS3jlV-R.mjs.map +1 -0
  146. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CUgQPcR4.mjs +139 -0
  147. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CUgQPcR4.mjs.map +1 -0
  148. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-lGwicZKW.mjs +362 -0
  149. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-lGwicZKW.mjs.map +1 -0
  150. package/fesm2022/sdcorejs-angular-modules-pattern.mjs +2 -0
  151. package/fesm2022/sdcorejs-angular-modules-pattern.mjs.map +1 -0
  152. package/fesm2022/sdcorejs-angular-services-api.mjs +11 -11
  153. package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
  154. package/fesm2022/sdcorejs-angular-services-cache.mjs +7 -5
  155. package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
  156. package/fesm2022/sdcorejs-angular-services-storage.mjs +6 -4
  157. package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
  158. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +104 -4
  159. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
  160. package/modules/pattern/README.md +76 -0
  161. package/modules/pattern/docs/detail.md +237 -0
  162. package/modules/pattern/docs/drawer.md +484 -0
  163. package/modules/pattern/docs/flow.md +631 -0
  164. package/modules/pattern/docs/form.md +815 -0
  165. package/modules/pattern/docs/header-actions.md +344 -0
  166. package/modules/pattern/docs/list.md +247 -0
  167. package/modules/pattern/docs/relation.md +180 -0
  168. package/modules/pattern/docs/select.md +214 -0
  169. package/modules/pattern/docs/split.md +350 -0
  170. package/modules/pattern/docs/states.md +168 -0
  171. package/modules/pattern/features/approval/entity.resolver.ts +21 -0
  172. package/modules/pattern/features/approval/pages/detail/detail.component.ts +139 -0
  173. package/modules/pattern/features/approval/pages/list/approval-inbox.ts +7 -0
  174. package/modules/pattern/features/approval/pages/list/list.component.html +20 -0
  175. package/modules/pattern/features/approval/pages/list/list.component.ts +149 -0
  176. package/modules/pattern/features/approval/routes.ts +30 -0
  177. package/modules/pattern/features/approval/services/approval.model.ts +38 -0
  178. package/modules/pattern/features/approval/services/approval.service.ts +23 -0
  179. package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +130 -0
  180. package/modules/pattern/features/category/components/general-information-form/general-information-form.component.ts +61 -0
  181. package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +134 -0
  182. package/modules/pattern/features/category/entity.resolver.ts +27 -0
  183. package/modules/pattern/features/category/pages/list/list.component.html +20 -0
  184. package/modules/pattern/features/category/pages/list/list.component.ts +105 -0
  185. package/modules/pattern/features/category/routes.ts +42 -0
  186. package/modules/pattern/features/category/services/category.model.ts +39 -0
  187. package/modules/pattern/features/category/services/category.service.ts +36 -0
  188. package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +138 -0
  189. package/modules/pattern/features/customer/components/customer-select/customer-select.component.ts +72 -0
  190. package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.ts +30 -0
  191. package/modules/pattern/features/customer/components/debts-view/debts-view.component.ts +28 -0
  192. package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +106 -0
  193. package/modules/pattern/features/customer/components/documents-view/documents-view.component.ts +50 -0
  194. package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.ts +140 -0
  195. package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.ts +39 -0
  196. package/modules/pattern/features/customer/components/orders-view/orders-view.component.ts +35 -0
  197. package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +101 -0
  198. package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +127 -0
  199. package/modules/pattern/features/customer/entity.resolver.ts +21 -0
  200. package/modules/pattern/features/customer/pages/list/list.component.html +22 -0
  201. package/modules/pattern/features/customer/pages/list/list.component.ts +113 -0
  202. package/modules/pattern/features/customer/pages/profile/profile.component.ts +120 -0
  203. package/modules/pattern/features/customer/pipes/customer-detail.pipe.ts +18 -0
  204. package/modules/pattern/features/customer/routes.ts +59 -0
  205. package/modules/pattern/features/customer/services/customer.model.ts +87 -0
  206. package/modules/pattern/features/customer/services/customer.service.ts +79 -0
  207. package/modules/pattern/features/import/components/mapping-form/mapping-form.component.ts +41 -0
  208. package/modules/pattern/features/import/components/preview-view/preview-view.component.ts +44 -0
  209. package/modules/pattern/features/import/pages/flow/flow.component.ts +269 -0
  210. package/modules/pattern/features/import/routes.ts +19 -0
  211. package/modules/pattern/features/import/services/import.model.ts +82 -0
  212. package/modules/pattern/features/import/services/import.service.ts +18 -0
  213. package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +74 -0
  214. package/modules/pattern/features/order/components/bulk-result/bulk-result.component.ts +46 -0
  215. package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +96 -0
  216. package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +182 -0
  217. package/modules/pattern/features/order/components/lines-form/order-lines.ts +101 -0
  218. package/modules/pattern/features/order/components/lines-table-form/lines-table-form.component.ts +196 -0
  219. package/modules/pattern/features/order/components/lines-view/lines-view.component.ts +42 -0
  220. package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +128 -0
  221. package/modules/pattern/features/order/entity.resolver.ts +37 -0
  222. package/modules/pattern/features/order/pages/create/create.component.ts +113 -0
  223. package/modules/pattern/features/order/pages/detail/detail.component.ts +224 -0
  224. package/modules/pattern/features/order/pages/list/list.component.html +38 -0
  225. package/modules/pattern/features/order/pages/list/list.component.ts +291 -0
  226. package/modules/pattern/features/order/pages/update/update.component.ts +126 -0
  227. package/modules/pattern/features/order/routes.ts +54 -0
  228. package/modules/pattern/features/order/services/order.model.ts +109 -0
  229. package/modules/pattern/features/order/services/order.service.ts +63 -0
  230. package/modules/pattern/features/partner/pages/create/create.component.ts +324 -0
  231. package/modules/pattern/features/partner/routes.ts +20 -0
  232. package/modules/pattern/features/partner/services/partner.model.ts +30 -0
  233. package/modules/pattern/features/partner/services/partner.service.ts +17 -0
  234. package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +88 -0
  235. package/modules/pattern/features/product/components/product-select/product-select.component.ts +73 -0
  236. package/modules/pattern/features/product/components/product-status-select/product-status-select.component.ts +30 -0
  237. package/modules/pattern/features/product/entity.resolver.ts +21 -0
  238. package/modules/pattern/features/product/pages/create/create.component.ts +92 -0
  239. package/modules/pattern/features/product/pages/detail/detail.component.ts +53 -0
  240. package/modules/pattern/features/product/pages/list/list.component.html +30 -0
  241. package/modules/pattern/features/product/pages/list/list.component.ts +71 -0
  242. package/modules/pattern/features/product/pages/update/update.component.ts +86 -0
  243. package/modules/pattern/features/product/pipes/product-detail.pipe.ts +18 -0
  244. package/modules/pattern/features/product/routes.ts +48 -0
  245. package/modules/pattern/features/product/services/product.model.ts +38 -0
  246. package/modules/pattern/features/product/services/product.service.ts +48 -0
  247. package/modules/pattern/features/settings/pages/update/update.component.ts +228 -0
  248. package/modules/pattern/features/settings/routes.ts +24 -0
  249. package/modules/pattern/features/settings/services/settings.model.ts +18 -0
  250. package/modules/pattern/features/settings/services/settings.service.ts +15 -0
  251. package/modules/pattern/features/settings/settings.resolver.ts +8 -0
  252. package/package.json +5 -1
  253. package/types/sdcorejs-angular-components-badge.d.ts +19 -1
  254. package/types/sdcorejs-angular-components-query-bar.d.ts +126 -11
  255. package/types/sdcorejs-angular-components-section.d.ts +13 -1
  256. package/types/sdcorejs-angular-components-splitter.d.ts +1 -1
  257. package/types/sdcorejs-angular-components-tab-router.d.ts +47 -5
  258. package/types/sdcorejs-angular-components-table.d.ts +300 -25
  259. package/types/sdcorejs-angular-components-upload-file.d.ts +181 -21
  260. package/types/sdcorejs-angular-forms-chip.d.ts +136 -26
  261. package/types/sdcorejs-angular-i18n.d.ts +70 -1
  262. package/types/sdcorejs-angular-modules-layout.d.ts +89 -6
  263. package/types/sdcorejs-angular-modules-pattern.d.ts +50 -0
  264. package/types/sdcorejs-angular-services-api.d.ts +5 -5
  265. package/types/sdcorejs-angular-services-cache.d.ts +4 -2
  266. package/types/sdcorejs-angular-services-storage.d.ts +3 -1
  267. package/types/sdcorejs-angular-services-unsaved-changes.d.ts +11 -0
@@ -1,10 +1,10 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { InjectionToken, ElementRef } from '@angular/core';
2
+ import { InjectionToken, TemplateRef, ElementRef } from '@angular/core';
3
3
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
4
4
  import { FormGroup } from '@angular/forms';
5
5
  import { SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
6
6
  import { SdFormControl } from '@sdcorejs/angular/forms/models';
7
- import { SdModal } from '@sdcorejs/angular/components/modal';
7
+ import { SafeResourceUrl } from '@angular/platform-browser';
8
8
 
9
9
  /**
10
10
  * Contract cấu hình cho cơ chế upload file của sd-angular.
@@ -52,10 +52,13 @@ interface SdUploadFileDetail {
52
52
  name?: string;
53
53
  /** Đuôi file: png, jpg, pdf... */
54
54
  extension?: string;
55
- /** Dung lượng file tính theo MB (nếu backend có trả về). */
55
+ /** Dung lượng file tính theo byte (nếu backend có trả về), như `File.size`. */
56
56
  size?: number;
57
57
  }
58
58
 
59
+ /** Nhóm màu của đuôi file trong filmstrip của popup: PDF đỏ, Word xanh dương, Excel xanh lá, còn lại màu chữ phụ. */
60
+ type SdFileTypeGroup = 'pdf' | 'word' | 'excel' | 'image' | 'archive' | 'slides' | 'video' | 'audio' | 'other';
61
+
59
62
  interface PreviewFile {
60
63
  idOrKey?: string | number;
61
64
  file?: File | null;
@@ -68,35 +71,132 @@ interface PreviewFile {
68
71
  isImgError?: boolean;
69
72
  }
70
73
 
74
+ type SdViewerKind = 'image' | 'pdf' | 'other';
75
+ type SdViewerStatus = 'loading' | 'loaded' | 'error';
76
+ /**
77
+ * Popup xem tệp của `sd-upload-file` (đợt 3 · 4b, design handoff `upload-file.md` mục H2, phương án A): viewer nền tối,
78
+ * top bar theo file, toolbar theo loại file, filmstrip ở đáy, PDF xem inline, có trạng thái đang tải và lỗi.
79
+ *
80
+ * why: CDK `Dialog` chứ không `sd-modal` — sd-modal đổi sang bottom-sheet trên mobile, ép `max-width`, đệm body 80vh, Esc
81
+ * không đóng và focus vào phần tử tab được đầu tiên thay vì stage. Nội bộ, không export.
82
+ */
71
83
  declare class PreviewComponent {
72
84
  #private;
73
- private cd;
74
- modal: SdModal;
75
85
  readonly download: _angular_core.OutputEmitterRef<PreviewFile>;
76
86
  readonly close: _angular_core.OutputEmitterRef<void>;
77
- title: string;
78
- thumbnailPosition: 'right' | 'left' | 'bottom' | 'top';
79
- activeIndex: number;
80
- previewFiles: PreviewFile[];
81
- /** Inserted by Angular inject() migration for backwards compatibility */
82
- constructor(...args: unknown[]);
87
+ readonly viewer: _angular_core.Signal<TemplateRef<unknown>>;
88
+ readonly stage: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
89
+ readonly strip: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
90
+ readonly nameId: string;
91
+ readonly locale: _angular_core.Signal<string>;
92
+ readonly files: _angular_core.WritableSignal<PreviewFile[]>;
93
+ readonly index: _angular_core.WritableSignal<number>;
94
+ readonly current: _angular_core.Signal<PreviewFile | undefined>;
95
+ readonly extension: _angular_core.Signal<string | undefined>;
96
+ readonly name: _angular_core.Signal<string>;
97
+ readonly meta: _angular_core.Signal<string>;
98
+ readonly kind: _angular_core.Signal<SdViewerKind>;
99
+ /** Ảnh đang xem: dữ liệu đã đọc của file local (FileReader), hay URL. */
100
+ readonly imageSrc: _angular_core.Signal<string | null>;
101
+ /** URL mở được của file: `src` an toàn, hoặc object URL của file local. */
102
+ readonly url: _angular_core.Signal<string | null>;
103
+ readonly pdfUrl: _angular_core.Signal<SafeResourceUrl | null>;
104
+ readonly status: _angular_core.WritableSignal<SdViewerStatus>;
105
+ readonly showLoading: _angular_core.WritableSignal<boolean>;
106
+ /** Tăng mỗi lần "Thử lại": dựng lại `<img>` để trình duyệt tải lại `src`. */
107
+ readonly attempt: _angular_core.WritableSignal<number>;
108
+ readonly zoom: _angular_core.WritableSignal<number | "fit">;
109
+ readonly rotation: _angular_core.WritableSignal<number>;
110
+ readonly pan: _angular_core.WritableSignal<{
111
+ x: number;
112
+ y: number;
113
+ }>;
114
+ readonly panning: _angular_core.WritableSignal<boolean>;
115
+ /** Tỉ lệ "vừa khung" (như `object-fit: contain`). */
116
+ readonly fitScale: _angular_core.Signal<number>;
117
+ readonly scale: _angular_core.Signal<number>;
118
+ readonly percent: _angular_core.Signal<number>;
119
+ /** Kích thước khung `<img>` (chưa xoay). */
120
+ readonly imageBox: _angular_core.Signal<{
121
+ width: number;
122
+ height: number;
123
+ } | null>;
124
+ readonly imageTransform: _angular_core.Signal<string>;
125
+ /** Ảnh (đã xoay) lớn hơn stage: kéo để xem phần bị khuất. */
126
+ readonly pannable: _angular_core.Signal<boolean>;
127
+ readonly canZoomIn: _angular_core.Signal<boolean>;
128
+ readonly canZoomOut: _angular_core.Signal<boolean>;
129
+ constructor();
130
+ /** Danh sách đang xem (tên cũ, chỉ đọc). */
131
+ get previewFiles(): PreviewFile[];
132
+ /** Vị trí đang xem (tên cũ, chỉ đọc). */
133
+ get activeIndex(): number;
134
+ /** Mở popup tại `index` (mặc định 0). Mảng rỗng thì không làm gì. */
83
135
  open: (previewFiles: PreviewFile[] | undefined | null, index?: number) => Promise<void>;
136
+ /** Đóng popup. */
137
+ closeViewer: () => void;
138
+ /** Chuyển sang file `index`; không quay vòng ở hai đầu. */
139
+ select: (index: number, force?: boolean) => void;
140
+ /** Tên cũ: bấm một ô trong dải ảnh. */
84
141
  onClickThumbnailImage: (index: number) => void;
142
+ /** Tên cũ: file trước (-1) / sau (1). Từ đợt 3 · 4b không quay vòng ở hai đầu. */
85
143
  updateCurrentImage: (direction: 1 | -1) => void;
144
+ onDownload: (previewFile?: PreviewFile | undefined) => void;
86
145
  onClose: () => void;
87
- onDownload: (previewFile: PreviewFile) => void;
146
+ openInNewTab: () => void;
147
+ zoomIn: () => void;
148
+ zoomOut: () => void;
149
+ fit: () => void;
150
+ rotate: () => void;
151
+ onImageLoad: (event: Event) => void;
152
+ onImageError: () => void;
153
+ onFrameLoad: () => void;
154
+ retry: () => void;
155
+ onThumbError: (index: number) => void;
156
+ thumbFailed: (index: number) => boolean;
157
+ thumbSrc: (file: PreviewFile) => string | null;
158
+ thumbExtension: (file: PreviewFile) => string;
159
+ readonly symbol: (extension: string | null | undefined) => string;
160
+ readonly group: (extension: string | null | undefined) => SdFileTypeGroup;
161
+ onKeydown: (event: KeyboardEvent) => void;
162
+ /** Bấm vào vùng tối quanh khung viewer: đóng. */
163
+ onShellClick: (event: MouseEvent) => void;
164
+ onPointerDown: (event: PointerEvent) => void;
165
+ onPointerMove: (event: PointerEvent) => void;
166
+ onPointerUp: (event: PointerEvent) => void;
88
167
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PreviewComponent, never>;
89
168
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<PreviewComponent, "preview", never, {}, { "download": "download"; "close": "close"; }, never, never, true, never>;
90
169
  }
91
170
 
171
+ /** File bị từ chối khi chọn hoặc thả (đợt 3 · 4c): giữ `File` và lý do, không nằm trong giá trị. */
172
+ interface SdUploadFileFailure {
173
+ id: number;
174
+ file: File;
175
+ fileName: string;
176
+ reason: string;
177
+ }
92
178
  declare class SdUploadFile<TArgs = unknown> {
93
179
  #private;
180
+ /** Locale hiện tại cho dung lượng file (`2,4 MB` ở vi). */
181
+ readonly locale: _angular_core.Signal<string>;
94
182
  readonly id: string;
95
183
  readonly formControl: SdFormControl;
96
184
  /** Hiển thị message "vui lòng upload": không disabled + đã touched + còn lỗi required. */
97
185
  readonly showRequiredError: _angular_core.Signal<boolean>;
98
186
  readonly previewFiles: _angular_core.WritableSignal<PreviewFile[]>;
187
+ /** @deprecated Đợt 3 · 4c: chạm ô ảnh trên màn cảm ứng mở popup, không còn chọn ô. Không còn đọc ở đâu. */
99
188
  readonly selectedFile: _angular_core.WritableSignal<PreviewFile | null | undefined>;
189
+ /** Đang kéo tệp từ máy vào component: ô tải lên / vùng thả đổi trạng thái. */
190
+ readonly dragging: _angular_core.WritableSignal<boolean>;
191
+ /**
192
+ * File bị từ chối khi chọn hoặc thả (sai định dạng, quá dung lượng, không phải ảnh…): giữ trong danh sách cùng lý do tới
193
+ * khi người dùng xoá. Không nằm trong `model` hay giá trị form.
194
+ */
195
+ readonly failures: _angular_core.WritableSignal<SdUploadFileFailure[]>;
196
+ /** Khoá trong `model` của các file local đang được `upload()` gửi lên. */
197
+ readonly uploadingKeys: _angular_core.WritableSignal<ReadonlySet<string | number>>;
198
+ /** Khoá của các file local mà lần `upload()` gần nhất thất bại (vẫn trong `model`, thử lại được). */
199
+ readonly uploadFailedKeys: _angular_core.WritableSignal<ReadonlySet<string | number>>;
100
200
  readonly previewFileComponent: _angular_core.Signal<PreviewComponent | undefined>;
101
201
  readonly dropElements: _angular_core.Signal<readonly ElementRef<any>[]>;
102
202
  readonly sdLabelDef: _angular_core.Signal<SdLabelDefDirective | undefined>;
@@ -112,7 +212,12 @@ declare class SdUploadFile<TArgs = unknown> {
112
212
  readonly description: _angular_core.InputSignal<string | undefined>;
113
213
  readonly previewWidth: _angular_core.InputSignal<string>;
114
214
  readonly previewHeight: _angular_core.InputSignal<string>;
115
- readonly align: _angular_core.InputSignal<"left" | "center">;
215
+ readonly align: _angular_core.InputSignal<"center" | "left">;
216
+ /**
217
+ * `default`: nhãn, lưới ảnh / vùng thả và danh sách tài liệu. `inline` (đợt 3 · 4d): một dòng cao 32px cho ô của
218
+ * `sd-table` và danh sách dày — ô tải lên, ảnh, chip tài liệu, "+N"; không nhãn, mô tả hay bộ đếm.
219
+ */
220
+ readonly variant: _angular_core.InputSignal<"default" | "inline">;
116
221
  readonly uploadInput: _angular_core.InputSignal<SdUploadFileFuncUpload<any> | undefined>;
117
222
  readonly details: _angular_core.InputSignal<SdUploadFileFuncDetails<any> | undefined>;
118
223
  readonly downloadInput: _angular_core.InputSignal<SdUploadFileFuncDownload<any> | undefined>;
@@ -124,21 +229,50 @@ declare class SdUploadFile<TArgs = unknown> {
124
229
  form: _angular_core.InputSignalWithTransform<FormGroup<any> | undefined, any>;
125
230
  readonly nameInput: _angular_core.InputSignalWithTransform<string, string | undefined>;
126
231
  readonly required: _angular_core.InputSignalWithTransform<boolean, boolean | "" | null | undefined>;
127
- readonly type: _angular_core.InputSignalWithTransform<"image" | "document" | "file", "image" | "document" | "file" | null | undefined>;
232
+ readonly type: _angular_core.InputSignalWithTransform<"file" | "image" | "document", "file" | "image" | "document" | null | undefined>;
128
233
  readonly helperText: _angular_core.InputSignal<string | undefined>;
129
234
  readonly max: _angular_core.InputSignalWithTransform<number, number | null | undefined>;
130
235
  readonly maxOfImage: _angular_core.InputSignalWithTransform<number, number | null | undefined>;
131
236
  readonly extensions: _angular_core.InputSignalWithTransform<string[], string[] | null | undefined>;
132
237
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, boolean | "" | null | undefined>;
133
238
  readonly generatedDescription: _angular_core.Signal<string | undefined>;
239
+ /** Số file trong giá trị (`model`), không tính file bị từ chối. */
240
+ readonly count: _angular_core.Signal<number>;
241
+ /** Bộ đếm `{n} / {max}` cạnh nhãn: chỉ khi có nhãn, được chọn nhiều file và field không disabled. */
242
+ readonly showCounter: _angular_core.Signal<boolean>;
243
+ /** Còn thêm được file: chưa đủ `max` và không disabled. */
244
+ readonly canAdd: _angular_core.Signal<boolean>;
245
+ /** Variant inline: ảnh rồi tài liệu, `maxOfImage` mục đầu hiện ra, phần còn lại gộp vào "+N". */
246
+ readonly inlineItems: _angular_core.Signal<{
247
+ visible: PreviewFile[];
248
+ hidden: PreviewFile[];
249
+ }>;
134
250
  readonly loaded: _angular_core.OutputEmitterRef<PreviewFile[]>;
135
251
  readonly filesChanged: _angular_core.OutputEmitterRef<(string | File)[]>;
136
252
  readonly model: _angular_core.ModelSignal<(string | number)[]>;
137
253
  constructor();
254
+ onDragEnter: (event: DragEvent) => void;
255
+ onDragOver: (event: DragEvent) => void;
256
+ onDragLeave: () => void;
257
+ onDropFiles: (event: DragEvent) => Promise<void>;
138
258
  onUpload: () => void;
139
259
  onRemove: (file: PreviewFile) => void;
140
- onDrop: (event: CdkDragDrop<string[]>) => void;
260
+ /** Huỷ một file đang tải lên: bỏ khỏi `model` ngay (không hỏi xác nhận); lô đang chạy không ghi lại nó. */
261
+ onCancel: (file: PreviewFile) => void;
262
+ /** Bỏ một file bị từ chối khỏi danh sách (file đó chưa từng vào giá trị). */
263
+ removeFailure: (failure: SdUploadFileFailure) => void;
264
+ /** Thử lại lần `upload()` thất bại với các File đã giữ. Lỗi lần này vẫn hiện trên ô / hàng, không toast. */
265
+ retryUpload: () => void;
266
+ isUploading: (file: PreviewFile) => boolean;
267
+ hasUploadFailed: (file: PreviewFile) => boolean;
268
+ /**
269
+ * Kéo đổi thứ tự trong lưới ảnh (`group: 'image'`, mặc định) hoặc trong danh sách tài liệu (`'document'`).
270
+ * why: `model` là một mảng chung theo thứ tự thêm. Kéo trong một nhóm chỉ hoán vị các vị trí thuộc nhóm đó, vị trí của
271
+ * nhóm kia giữ nguyên. Bản cũ lấy index trong nhóm ảnh áp thẳng vào mảng trộn.
272
+ */
273
+ onDrop: (event: Pick<CdkDragDrop<unknown>, "previousIndex" | "currentIndex">, group?: "image" | "document") => void;
141
274
  onImgError: (previewFile: PreviewFile) => void;
275
+ /** @deprecated Đợt 3 · 4c: chạm ô ảnh mở popup. Giữ để không đổi API của class. */
142
276
  onSelect: (file: PreviewFile) => void;
143
277
  readonly isTouchDevice: boolean;
144
278
  onUploadKeydown: (event: Event) => void;
@@ -148,14 +282,40 @@ declare class SdUploadFile<TArgs = unknown> {
148
282
  */
149
283
  getFiles: () => Promise<File[]>;
150
284
  /**
151
- * Thực hiện upload các file và gán giá trị, output trả ra mảng idOrKeys.
152
- * HÀM NÀY BẮT BUỘC PHẢI GỌI TRƯỚC KHI GỌI VỀ SERVER.
285
+ * Upload the local files referenced by the model, then replace their temporary
286
+ * keys with server IDs. Call and await this method before submitting the model.
287
+ *
288
+ * Files are read from the model and local snapshots/cache, so pending or failed metadata
289
+ * requests do not omit files. Each distinct local key is uploaded once per
290
+ * batch; duplicate occurrences retain their positions and share the returned ID.
291
+ * Server IDs and URLs are preserved even when they have no preview metadata.
292
+ *
293
+ * Concurrent calls share the active batch. Changes made while it is pending
294
+ * are preserved: removed keys stay removed, reordering is retained, and newly
295
+ * added local keys remain pending for a subsequent call. After destruction, no
296
+ * new upload starts and an in-flight upload cannot update the model.
297
+ *
298
+ * @returns A promise resolving to void after the batch finishes. The preview
299
+ * metadata refresh may still be pending. With no local files this is a no-op.
300
+ * A missing upload handler displays the configuration error and resolves
301
+ * without changing the model or cache.
302
+ * @throws The upload handler's error, without changing the model or cache.
303
+ * @throws Error if the handler does not return exactly one non-empty string ID
304
+ * per distinct local key; the model and cache are retained in that case.
305
+ *
306
+ * @example
307
+ * import { SdUploadFile } from '@sdcorejs/angular/components/upload-file';
308
+ *
309
+ * async function submit(control: SdUploadFile) {
310
+ * await control.upload();
311
+ * return control.model(); // Server IDs/URLs for the uploaded batch.
312
+ * }
153
313
  */
154
314
  upload: () => Promise<void>;
155
315
  /**
156
- * Mở popup preview ảnh.
316
+ * Mở popup xem tệp, tại `file` khi có (mặc định file đầu).
157
317
  */
158
- preview: () => Promise<void>;
318
+ preview: (file?: PreviewFile) => Promise<void>;
159
319
  /**
160
320
  * Tải xuống một tệp tin dựa trên đối tượng PreviewFile.
161
321
  *
@@ -171,8 +331,8 @@ declare class SdUploadFile<TArgs = unknown> {
171
331
  onDownload: (previewFile: PreviewFile) => void;
172
332
  isLastVisibleOverlay(fileIndex: number): boolean;
173
333
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdUploadFile<any>, never>;
174
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdUploadFile<any>, "sd-upload-file", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "args": { "alias": "args"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "previewWidth": { "alias": "previewWidth"; "required": false; "isSignal": true; }; "previewHeight": { "alias": "previewHeight"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "uploadInput": { "alias": "upload"; "required": false; "isSignal": true; }; "details": { "alias": "details"; "required": false; "isSignal": true; }; "downloadInput": { "alias": "download"; "required": false; "isSignal": true; }; "imageValidator": { "alias": "imageValidator"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "scaleToPixel": { "alias": "scaleToPixel"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "nameInput": { "alias": "name"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "maxOfImage": { "alias": "maxOfImage"; "required": false; "isSignal": true; }; "extensions": { "alias": "extensions"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "loaded": "loaded"; "filesChanged": "filesChanged"; "model": "modelChange"; }, ["sdLabelDef"], never, true, never>;
334
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdUploadFile<any>, "sd-upload-file", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "args": { "alias": "args"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "key": { "alias": "key"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "previewWidth": { "alias": "previewWidth"; "required": false; "isSignal": true; }; "previewHeight": { "alias": "previewHeight"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "uploadInput": { "alias": "upload"; "required": false; "isSignal": true; }; "details": { "alias": "details"; "required": false; "isSignal": true; }; "downloadInput": { "alias": "download"; "required": false; "isSignal": true; }; "imageValidator": { "alias": "imageValidator"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "scaleToPixel": { "alias": "scaleToPixel"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "nameInput": { "alias": "name"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "helperText": { "alias": "helperText"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "maxOfImage": { "alias": "maxOfImage"; "required": false; "isSignal": true; }; "extensions": { "alias": "extensions"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "loaded": "loaded"; "filesChanged": "filesChanged"; "model": "modelChange"; }, ["sdLabelDef"], never, true, never>;
175
335
  }
176
336
 
177
337
  export { SD_UPLOAD_FILE_CONFIGURATION, SdUploadFile };
178
- export type { ISdUploadFileConfiguration, SdUploadFileDetail, SdUploadFileFuncDetails, SdUploadFileFuncDownload, SdUploadFileFuncUpload };
338
+ export type { ISdUploadFileConfiguration, SdUploadFileDetail, SdUploadFileFailure, SdUploadFileFuncDetails, SdUploadFileFuncDownload, SdUploadFileFuncUpload };
@@ -1,28 +1,17 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { PipeTransform, AfterViewInit, OnDestroy, ElementRef, TemplateRef } from '@angular/core';
3
- import { FormGroup, FormControl, FormGroupDirective, NgForm } from '@angular/forms';
4
- import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
5
- import { MatChipInputEvent } from '@angular/material/chips';
2
+ import { ElementRef, TemplateRef } from '@angular/core';
3
+ import { FormGroup, FormControl } from '@angular/forms';
4
+ import { MatChipGrid, MatChipInputEvent } from '@angular/material/chips';
6
5
  import { ErrorStateMatcher } from '@angular/material/core';
7
6
  import { MatFormFieldAppearance, FloatLabelType } from '@angular/material/form-field';
8
7
  import { SdViewDefDirective, SdLabelDefDirective } from '@sdcorejs/angular/forms/directives';
9
8
  import { SdLabelPlacement, SdViewed, SdViewedInput, SdFormControl } from '@sdcorejs/angular/forms/models';
10
9
  import { Size } from '@sdcorejs/utils/models';
11
10
 
12
- declare class SdRemovableChipPipe implements PipeTransform {
13
- constructor();
14
- transform(item: any, removable: boolean | ((item: any) => boolean)): boolean;
15
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdRemovableChipPipe, never>;
16
- static ɵpipe: _angular_core.ɵɵPipeDeclaration<SdRemovableChipPipe, "sdRemovableChip", true>;
17
- }
18
-
19
- declare class SdChipErrorStateMatcher implements ErrorStateMatcher {
20
- private formControl;
21
- constructor(formControl: FormControl);
22
- isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean;
23
- }
24
- declare class SdChip implements AfterViewInit, OnDestroy {
11
+ declare class SdChip {
25
12
  #private;
13
+ /** why: id ổn định của lỗi (`<mat-error>` hoặc chữ ẩn của `hideInlineError`) để ô nhập trỏ `aria-describedby` sang (A8). */
14
+ readonly errorId: string;
26
15
  autoIdInput: _angular_core.InputSignalWithTransform<string | undefined, string | null | undefined>;
27
16
  autoId: _angular_core.Signal<string | undefined>;
28
17
  readonly dataDisabled: _angular_core.Signal<"true" | "false">;
@@ -52,9 +41,31 @@ declare class SdChip implements AfterViewInit, OnDestroy {
52
41
  removable: _angular_core.InputSignalWithTransform<boolean | ((item: any) => boolean), boolean | ((item: any) => boolean) | null | undefined>;
53
42
  hideInlineError: _angular_core.InputSignalWithTransform<boolean, unknown>;
54
43
  required: _angular_core.InputSignalWithTransform<boolean, unknown>;
44
+ /** Fewest chips; > 0 adds `Validators.minLength`. Replaces `min`. */
45
+ minCount: _angular_core.InputSignalWithTransform<number | undefined, number | null | undefined>;
46
+ /** Most chips; > 0 adds `Validators.maxLength` (for a model set from outside) and stops adding once reached. Replaces `max`. */
47
+ maxCount: _angular_core.InputSignalWithTransform<number | undefined, number | null | undefined>;
48
+ /** @deprecated Use `minCount`; `minCount` wins when both are set. */
55
49
  min: _angular_core.InputSignalWithTransform<number, number | null | undefined>;
50
+ /** @deprecated Use `maxCount`; `maxCount` wins when both are set. */
56
51
  max: _angular_core.InputSignalWithTransform<number, number | null | undefined>;
52
+ /** `false` keeps the field read-only for typing: the input stays (mat-chip-grid needs it) but is read-only and out of the Tab order. */
57
53
  addable: _angular_core.InputSignalWithTransform<boolean, unknown>;
54
+ /** Leaving the field turns the typed text into a chip. `false` drops the text instead, as before. */
55
+ addOnBlur: _angular_core.InputSignalWithTransform<boolean, unknown>;
56
+ /** Keys that commit the typed text (`KeyboardEvent.key`). A paste also splits on these characters, new lines and tabs. */
57
+ separators: _angular_core.InputSignalWithTransform<readonly string[], readonly string[] | null | undefined>;
58
+ /** Normalises typed or pasted text before it is compared and stored; `null` or `''` drops it. Default: trim. */
59
+ chipTransform: _angular_core.InputSignalWithTransform<(raw: string) => string | number | null, ((raw: string) => string | number | null) | null | undefined>;
60
+ /**
61
+ * Checks a normalised value: an i18n key (or the message itself) when it is refused, else `null`. A refused value does
62
+ * not become a chip; its text stays in the input and the message shows under the field.
63
+ */
64
+ chipValidator: _angular_core.InputSignal<((value: string | number) => string | null) | null | undefined>;
65
+ /** Shows a button that removes every chip `removable` allows. Off by default, like `clearable` of `<sd-date>`. */
66
+ clearable: _angular_core.InputSignalWithTransform<boolean, unknown>;
67
+ /** Chips shown while the field is not focused; the rest fold into “+N”. `null` shows them all. `2` suits `<sd-table>` cells. */
68
+ maxVisible: _angular_core.InputSignal<number | null | undefined>;
58
69
  disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
59
70
  /** Display mode: `false` edit · `true` static view · `'inline'` interactive (disabled `'inline'` → static). */
60
71
  viewed: _angular_core.InputSignalWithTransform<SdViewed, SdViewedInput>;
@@ -64,31 +75,130 @@ declare class SdChip implements AfterViewInit, OnDestroy {
64
75
  model: _angular_core.ModelSignal<(string | number)[] | undefined>;
65
76
  sdChange: _angular_core.OutputEmitterRef<any[]>;
66
77
  input: _angular_core.Signal<ElementRef<HTMLInputElement> | undefined>;
78
+ readonly chipGrid: _angular_core.Signal<MatChipGrid | undefined>;
79
+ private readonly chipTextElements;
67
80
  sdViewDef: _angular_core.Signal<SdViewDefDirective<any, any> | undefined>;
68
81
  sdLabelDef: _angular_core.Signal<SdLabelDefDirective | undefined>;
69
82
  sdLabelTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
70
83
  sdValueTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
71
- isFocused: boolean;
72
- readonly separatorKeysCodes: number[];
73
- readonly selectable = true;
84
+ /** The field is being edited: the `sdViewDef` face gives way to the field. A signal, so OnPush redraws without `detectChanges()` (D1). */
85
+ readonly isFocused: _angular_core.WritableSignal<boolean>;
86
+ /**
87
+ * Control of `mat-chip-grid` only. why: the grid is a ControlValueAccessor that writes the text of the rendered chips
88
+ * into its control on blur, after a timeout (numbers became strings, a form reset was undone). It still needs an
89
+ * ngControl to work out its error state on every check, so it gets this one; nothing reads its value.
90
+ */
91
+ readonly gridControl: FormControl<unknown>;
92
+ /** `minCount`, else the deprecated `min`. */
93
+ readonly effectiveMinCount: _angular_core.Signal<number>;
94
+ /** `maxCount`, else the deprecated `max`. */
95
+ readonly effectiveMaxCount: _angular_core.Signal<number>;
96
+ /** why: phím tách do `separators` + onInputKeydown xử lý, nên Material không nhận phím nào. */
97
+ readonly noSeparatorKeys: number[];
98
+ /**
99
+ * Items rendered as chips: every value except `null`, `undefined` and `''`, so `0` shows (A2). Display only: the
100
+ * model is never rewritten. why: exact duplicates are dropped too, because the chips are tracked by value.
101
+ */
102
+ readonly chips: _angular_core.Signal<(string | number)[]>;
103
+ /** Message of a typed or pasted value that `chipValidator` refused; it shows under the field until the text changes (B4). */
104
+ readonly inputError: _angular_core.WritableSignal<string | null>;
105
+ /** Last polite announcement; a new id re-renders the text so a repeated message is read again. */
106
+ readonly liveMessage: _angular_core.WritableSignal<{
107
+ id: number;
108
+ text: string;
109
+ } | null>;
110
+ /** Chip that the typed value duplicates, highlighted for 1.4s (B3). */
111
+ readonly duplicateChip: _angular_core.WritableSignal<string | number | null>;
112
+ /** Text of the chips that the 240px limit cuts; only they get a tooltip (B7). */
113
+ readonly truncatedChips: _angular_core.WritableSignal<ReadonlySet<string>>;
114
+ /** `maxCount` reached: typing and pasting add nothing more (B3). */
115
+ readonly full: _angular_core.Signal<boolean>;
116
+ /** Chips on screen: all while the field has focus, else at most `maxVisible` (B7). */
117
+ readonly visibleChips: _angular_core.Signal<(string | number)[]>;
118
+ /** Chips folded into “+N”. */
119
+ readonly hiddenCount: _angular_core.Signal<number>;
120
+ /** At least one chip may be removed, so the clear button has something to do (B6). */
121
+ readonly hasRemovable: _angular_core.Signal<boolean>;
122
+ /**
123
+ * Placeholder: “Đã đủ …” once full, else the input, else “Nhập rồi nhấn Enter” — never the label (B5). None when not
124
+ * addable, or while chips are folded into “+N”: nobody types then, and the input only fills the rest of the line (C1).
125
+ */
126
+ readonly effectivePlaceholder: _angular_core.Signal<string | null>;
127
+ readonly clearLabel: _angular_core.Signal<string>;
128
+ /** Tooltip of the lock on a chip that `removable` keeps (C3). */
129
+ readonly lockedLabel: _angular_core.Signal<string>;
130
+ /** Sizes of the chip ✕ / lock and of the clear-button icon for the current `size` (C1). */
131
+ readonly iconSizes: _angular_core.Signal<{
132
+ readonly chip: "12px";
133
+ readonly clear: "16px";
134
+ } | {
135
+ readonly chip: "14px";
136
+ readonly clear: "18px";
137
+ } | {
138
+ readonly chip: "16px";
139
+ readonly clear: "20px";
140
+ }>;
141
+ readonly moreLabel: _angular_core.Signal<string>;
74
142
  constructor();
75
143
  get formControl(): SdFormControl;
76
144
  get inputControl(): FormControl<any>;
77
145
  readonly errorMessage: _angular_core.Signal<string | undefined>;
78
- get matcher(): SdChipErrorStateMatcher;
79
- ngAfterViewInit(): void;
80
- ngOnDestroy(): void;
146
+ get matcher(): ErrorStateMatcher;
147
+ /**
148
+ * The one place that decides whether the error shows (A5): the `ErrorStateMatcher` of the chip grid and the input,
149
+ * `<mat-error>`, the `hideInlineError` icon and `aria-invalid` all read it. Invalid and touched, or the parent form
150
+ * was submitted; a field that is only dirty shows nothing.
151
+ */
152
+ isErrorShown(): boolean;
153
+ /** Text under the field: the `chipValidator` message of the typed value first, else the form error. */
154
+ readonly errorText: _angular_core.Signal<string | undefined>;
155
+ /** Whether `item` may be removed, per `removable`; applied on every removal path (A1). */
156
+ isRemovable(item: string | number): boolean;
157
+ /** Accessible name of the ✕ button of a chip (A6). */
158
+ removeLabel(item: string | number): string;
159
+ /** Accessible name of a chip that `removable` keeps: its text plus “, Không xoá được” (C3). A removable chip keeps its text. */
160
+ chipLabel(item: string | number): string | null;
161
+ /** Text of a chip, also its key for `truncatedChips`. */
162
+ chipText(item: string | number): string;
163
+ /** A separator key (`separators`) commits the typed text; the key itself is not typed (B2 / separators). */
164
+ onInputKeydown(event: KeyboardEvent): void;
165
+ /** The refused-value message goes as soon as the text changes (B4). */
166
+ onInputText(): void;
167
+ /**
168
+ * A paste that holds a separator, a new line or a tab becomes several chips in one change (B2). Duplicates are
169
+ * skipped, refused values and values past `maxCount` stay in the input, and the result is announced. A paste with
170
+ * no separator is left to the browser.
171
+ */
172
+ onPaste(event: ClipboardEvent): void;
173
+ /** Backspace / Delete on a chip that `removable` keeps says why nothing happened (A1, B3). */
174
+ onChipKeydown(event: KeyboardEvent, item: string | number): void;
175
+ /** “+N” moves focus to the input, where every chip shows (B7). */
176
+ onMoreClick(event: Event): void;
177
+ /** Focus entering the input or a chip unfolds “+N”; focus on the “+N” button itself does not (B7). */
178
+ onFocusIn(event: FocusEvent): void;
179
+ /**
180
+ * Marks the field touched once focus leaves it; moving between the input and the chips does not count.
181
+ * why: `mat-chip-grid` is no longer bound to the control. As a ControlValueAccessor it wrote the text of the rendered
182
+ * chips back into the control on blur (numbers became strings, a form reset was undone), so the component marks
183
+ * touched itself, like the grid did.
184
+ */
185
+ onFocusOut(event: FocusEvent): void;
81
186
  onAdd: (event: MatChipInputEvent) => void;
82
187
  onClickChip: (event: Event, item: any) => void;
83
188
  onRemove: (item: any) => void;
84
- onSelect: (event: MatAutocompleteSelectedEvent) => void;
85
189
  onFocus: () => void;
86
190
  onBlur: () => void;
87
191
  onClick: () => void;
192
+ /**
193
+ * why: khi `sdViewDef` đang hiển thị thì bên trong không còn phần tử nào focus được, nên phần tử view là lối vào
194
+ * duy nhất để chuyển sang chế độ sửa. Bàn phím phải mở được y hệt chuột → Enter/Space chạy chung handler;
195
+ * preventDefault chặn Space cuộn trang (A7).
196
+ */
197
+ onViewKeydown: (event: Event) => void;
88
198
  focus: () => void;
89
199
  onClear: ($event?: any) => void;
90
200
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdChip, never>;
91
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdChip, "sd-chip", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "addable": { "alias": "addable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "sdChange": "sdChange"; }, ["sdViewDef", "sdLabelDef", "sdLabelTemplate", "sdValueTemplate"], never, true, never>;
201
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdChip, "sd-chip", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "floatLabel": { "alias": "floatLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "hideInlineError": { "alias": "hideInlineError"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "minCount": { "alias": "minCount"; "required": false; "isSignal": true; }; "maxCount": { "alias": "maxCount"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "addable": { "alias": "addable"; "required": false; "isSignal": true; }; "addOnBlur": { "alias": "addOnBlur"; "required": false; "isSignal": true; }; "separators": { "alias": "separators"; "required": false; "isSignal": true; }; "chipTransform": { "alias": "chipTransform"; "required": false; "isSignal": true; }; "chipValidator": { "alias": "chipValidator"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "maxVisible": { "alias": "maxVisible"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "viewed": { "alias": "viewed"; "required": false; "isSignal": true; }; "hyperlink": { "alias": "hyperlink"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "sdChange": "sdChange"; }, ["sdViewDef", "sdLabelDef", "sdLabelTemplate", "sdValueTemplate"], never, true, never>;
92
202
  }
93
203
 
94
- export { SdChip, SdRemovableChipPipe };
204
+ export { SdChip };