@sdcorejs/angular 22.3.5 → 22.3.6

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 (235) hide show
  1. package/assets/STYLE-GUIDE.md +78 -1
  2. package/assets/THEME.md +45 -3
  3. package/assets/scss/core/_popover-panel.scss +90 -0
  4. package/assets/scss/core/form.scss +5 -2
  5. package/assets/scss/core/utilities/_grid.scss +15 -0
  6. package/assets/scss/core/utilities/_sizing.scss +4 -0
  7. package/assets/scss/themes/_component-tokens.scss +9 -4
  8. package/assets/scss/themes/_semantic.scss +6 -5
  9. package/fesm2022/sdcorejs-angular-components-anchor.mjs +64 -3
  10. package/fesm2022/sdcorejs-angular-components-anchor.mjs.map +1 -1
  11. package/fesm2022/sdcorejs-angular-components-button.mjs +14 -6
  12. package/fesm2022/sdcorejs-angular-components-button.mjs.map +1 -1
  13. package/fesm2022/sdcorejs-angular-components-calendar.mjs +2565 -0
  14. package/fesm2022/sdcorejs-angular-components-calendar.mjs.map +1 -0
  15. package/fesm2022/sdcorejs-angular-components-card.mjs +521 -23
  16. package/fesm2022/sdcorejs-angular-components-card.mjs.map +1 -1
  17. package/fesm2022/sdcorejs-angular-components-editor-engine.mjs +1 -1
  18. package/fesm2022/sdcorejs-angular-components-editor-engine.mjs.map +1 -1
  19. package/fesm2022/sdcorejs-angular-components-file-explorer.mjs +4 -18
  20. package/fesm2022/sdcorejs-angular-components-file-explorer.mjs.map +1 -1
  21. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +7 -7
  22. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  23. package/fesm2022/sdcorejs-angular-components-import-excel.mjs +1 -1
  24. package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
  25. package/fesm2022/sdcorejs-angular-components-kanban.mjs +849 -157
  26. package/fesm2022/sdcorejs-angular-components-kanban.mjs.map +1 -1
  27. package/fesm2022/sdcorejs-angular-components-modal.mjs +23 -7
  28. package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
  29. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +1362 -229
  30. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-components-quick-action.mjs +78 -2
  32. package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-components-scheduler.mjs +2006 -0
  34. package/fesm2022/sdcorejs-angular-components-scheduler.mjs.map +1 -0
  35. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
  36. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  37. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +126 -26
  38. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  39. package/fesm2022/sdcorejs-angular-components-tab.mjs +31 -2
  40. package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
  41. package/fesm2022/sdcorejs-angular-components-table.mjs +619 -108
  42. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  43. package/fesm2022/sdcorejs-angular-components-timeline.mjs +501 -0
  44. package/fesm2022/sdcorejs-angular-components-timeline.mjs.map +1 -0
  45. package/fesm2022/sdcorejs-angular-components-tree.mjs +613 -36
  46. package/fesm2022/sdcorejs-angular-components-tree.mjs.map +1 -1
  47. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +2 -4
  48. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  49. package/fesm2022/sdcorejs-angular-components.mjs +3 -1
  50. package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
  51. package/fesm2022/sdcorejs-angular-directives.mjs +110 -22
  52. package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
  53. package/fesm2022/sdcorejs-angular-forms-date.mjs +142 -43
  54. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  55. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +71 -22
  56. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  57. package/fesm2022/sdcorejs-angular-forms-directives.mjs +4 -3
  58. package/fesm2022/sdcorejs-angular-forms-directives.mjs.map +1 -1
  59. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +1 -1
  60. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
  61. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
  62. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
  63. package/fesm2022/sdcorejs-angular-i18n.mjs +622 -52
  64. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  65. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-j_thIw4L.mjs} +3 -3
  66. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-SJIWI1dX.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-j_thIw4L.mjs.map} +1 -1
  67. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-DLsJ_8NR.mjs} +2 -2
  68. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-BPhMLVbv.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-DLsJ_8NR.mjs.map} +1 -1
  69. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs → sdcorejs-angular-modules-generic-generic-list.page-CkYR7Y-b.mjs} +3 -3
  70. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-aGhowe9Y.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-CkYR7Y-b.mjs.map} +1 -1
  71. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-Ddytu3Gb.mjs} +4 -4
  72. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-N8_oGpqD.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-Ddytu3Gb.mjs.map} +1 -1
  73. package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
  74. package/fesm2022/sdcorejs-angular-modules-layout.mjs +7 -2
  75. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  76. package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-C2o5xPVB.mjs → sdcorejs-angular-modules-pattern-base-api.service-vMdkWmw-.mjs} +2 -2
  77. package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-C2o5xPVB.mjs.map → sdcorejs-angular-modules-pattern-base-api.service-vMdkWmw-.mjs.map} +1 -1
  78. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-RBvVv88D.mjs → sdcorejs-angular-modules-pattern-create.component--cdb_2ub.mjs} +11 -7
  79. package/fesm2022/sdcorejs-angular-modules-pattern-create.component--cdb_2ub.mjs.map +1 -0
  80. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-CxicczH7.mjs → sdcorejs-angular-modules-pattern-create.component-BmKRynOI.mjs} +2 -2
  81. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-CxicczH7.mjs.map → sdcorejs-angular-modules-pattern-create.component-BmKRynOI.mjs.map} +1 -1
  82. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-D3MzNJ3F.mjs → sdcorejs-angular-modules-pattern-create.component-DoilYt0j.mjs} +2 -2
  83. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-D3MzNJ3F.mjs.map → sdcorejs-angular-modules-pattern-create.component-DoilYt0j.mjs.map} +1 -1
  84. package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-3hWkJClX.mjs → sdcorejs-angular-modules-pattern-customer.service-DpPC-tV2.mjs} +2 -2
  85. package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-3hWkJClX.mjs.map → sdcorejs-angular-modules-pattern-customer.service-DpPC-tV2.mjs.map} +1 -1
  86. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CcpYULut.mjs → sdcorejs-angular-modules-pattern-detail.component-Bh_rvQnq.mjs} +61 -55
  87. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Bh_rvQnq.mjs.map +1 -0
  88. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CEhbU12j.mjs → sdcorejs-angular-modules-pattern-detail.component-Dk1bomUT.mjs} +2 -2
  89. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CEhbU12j.mjs.map → sdcorejs-angular-modules-pattern-detail.component-Dk1bomUT.mjs.map} +1 -1
  90. package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-G5lHfG81.mjs → sdcorejs-angular-modules-pattern-flow.component-BarNCjsh.mjs} +3 -3
  91. package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-G5lHfG81.mjs.map → sdcorejs-angular-modules-pattern-flow.component-BarNCjsh.mjs.map} +1 -1
  92. package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-CosbQK0W.mjs → sdcorejs-angular-modules-pattern-index.component--rIi-QIQ.mjs} +2 -2
  93. package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-CosbQK0W.mjs.map → sdcorejs-angular-modules-pattern-index.component--rIi-QIQ.mjs.map} +1 -1
  94. package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-DmmVKrgM.mjs → sdcorejs-angular-modules-pattern-lines-table-form.component-G9Li--QF.mjs} +5 -5
  95. package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-DmmVKrgM.mjs.map → sdcorejs-angular-modules-pattern-lines-table-form.component-G9Li--QF.mjs.map} +1 -1
  96. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-2AZxTu9a.mjs +522 -0
  97. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-2AZxTu9a.mjs.map +1 -0
  98. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CDM4V05g.mjs +520 -0
  99. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CDM4V05g.mjs.map +1 -0
  100. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-C_pVqRcC.mjs → sdcorejs-angular-modules-pattern-list.component-DS9DROp-.mjs} +3 -3
  101. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-C_pVqRcC.mjs.map → sdcorejs-angular-modules-pattern-list.component-DS9DROp-.mjs.map} +1 -1
  102. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-CNVqk3JC.mjs → sdcorejs-angular-modules-pattern-list.component-DbF9z3da.mjs} +30 -39
  103. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DbF9z3da.mjs.map +1 -0
  104. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-EaNDEtCn.mjs → sdcorejs-angular-modules-pattern-list.component-DlF3i6ai.mjs} +3 -3
  105. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-EaNDEtCn.mjs.map → sdcorejs-angular-modules-pattern-list.component-DlF3i6ai.mjs.map} +1 -1
  106. package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-CFljqhjv.mjs → sdcorejs-angular-modules-pattern-mock-backend.factory-BpECki9p.mjs} +2 -2
  107. package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-CFljqhjv.mjs.map → sdcorejs-angular-modules-pattern-mock-backend.factory-BpECki9p.mjs.map} +1 -1
  108. package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs → sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs} +4 -22
  109. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs.map +1 -0
  110. package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs → sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs} +26 -27
  111. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs.map +1 -0
  112. package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-DitXmlr1.mjs → sdcorejs-angular-modules-pattern-product.service-DEAQ4oro.mjs} +2 -2
  113. package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-DitXmlr1.mjs.map → sdcorejs-angular-modules-pattern-product.service-DEAQ4oro.mjs.map} +1 -1
  114. package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-Dxw7Ix9d.mjs → sdcorejs-angular-modules-pattern-profile.component-D-dJk5vb.mjs} +27 -14
  115. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-D-dJk5vb.mjs.map +1 -0
  116. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BxXgJVsW.mjs → sdcorejs-angular-modules-pattern-routes-Brr61WQo.mjs} +4 -4
  117. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BxXgJVsW.mjs.map → sdcorejs-angular-modules-pattern-routes-Brr61WQo.mjs.map} +1 -1
  118. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CWixJ2If.mjs → sdcorejs-angular-modules-pattern-routes-CPVcXcfq.mjs} +3 -3
  119. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CWixJ2If.mjs.map → sdcorejs-angular-modules-pattern-routes-CPVcXcfq.mjs.map} +1 -1
  120. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-w4VY9P_H.mjs → sdcorejs-angular-modules-pattern-routes-CWCtuZ4z.mjs} +8 -8
  121. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-w4VY9P_H.mjs.map → sdcorejs-angular-modules-pattern-routes-CWCtuZ4z.mjs.map} +1 -1
  122. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BOiWZHqg.mjs → sdcorejs-angular-modules-pattern-routes-CfXmYmCp.mjs} +3 -3
  123. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BOiWZHqg.mjs.map → sdcorejs-angular-modules-pattern-routes-CfXmYmCp.mjs.map} +1 -1
  124. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CuDWVZ4I.mjs +56 -0
  125. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CuDWVZ4I.mjs.map +1 -0
  126. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs → sdcorejs-angular-modules-pattern-routes-D8W_NHEH.mjs} +5 -5
  127. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs.map → sdcorejs-angular-modules-pattern-routes-D8W_NHEH.mjs.map} +1 -1
  128. package/fesm2022/sdcorejs-angular-modules-pattern-routes-Db0ceW1C.mjs +66 -0
  129. package/fesm2022/sdcorejs-angular-modules-pattern-routes-Db0ceW1C.mjs.map +1 -0
  130. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs → sdcorejs-angular-modules-pattern-routes-DdmOGRpF.mjs} +3 -3
  131. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs.map → sdcorejs-angular-modules-pattern-routes-DdmOGRpF.mjs.map} +1 -1
  132. package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-JWx3RaLo.mjs} +12 -12
  133. package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs.map → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-JWx3RaLo.mjs.map} +1 -1
  134. package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-BOjJteMd.mjs → sdcorejs-angular-modules-pattern-shell.component-DMJpUhpn.mjs} +4 -4
  135. package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-BOjJteMd.mjs.map → sdcorejs-angular-modules-pattern-shell.component-DMJpUhpn.mjs.map} +1 -1
  136. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BHDd7D8y.mjs +498 -0
  137. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BHDd7D8y.mjs.map +1 -0
  138. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-lGwicZKW.mjs → sdcorejs-angular-modules-pattern-update.component-Bx2zgc86.mjs} +2 -2
  139. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-lGwicZKW.mjs.map → sdcorejs-angular-modules-pattern-update.component-Bx2zgc86.mjs.map} +1 -1
  140. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-CS3jlV-R.mjs → sdcorejs-angular-modules-pattern-update.component-Cb29tp1H.mjs} +2 -2
  141. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-CS3jlV-R.mjs.map → sdcorejs-angular-modules-pattern-update.component-Cb29tp1H.mjs.map} +1 -1
  142. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-CUgQPcR4.mjs → sdcorejs-angular-modules-pattern-update.component-e5BaHrDk.mjs} +9 -6
  143. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-e5BaHrDk.mjs.map +1 -0
  144. package/fesm2022/sdcorejs-angular-modules-pattern.mjs +1 -1
  145. package/fesm2022/sdcorejs-angular-services-confirm.mjs +171 -158
  146. package/fesm2022/sdcorejs-angular-services-confirm.mjs.map +1 -1
  147. package/fesm2022/sdcorejs-angular-services-query-params.mjs +227 -0
  148. package/fesm2022/sdcorejs-angular-services-query-params.mjs.map +1 -0
  149. package/fesm2022/sdcorejs-angular-utilities-extensions.mjs +24 -1
  150. package/fesm2022/sdcorejs-angular-utilities-extensions.mjs.map +1 -1
  151. package/modules/pattern/README.md +5 -4
  152. package/modules/pattern/docs/detail.md +18 -9
  153. package/modules/pattern/docs/drawer.md +185 -83
  154. package/modules/pattern/docs/header-actions.md +1 -1
  155. package/modules/pattern/docs/list.md +3 -3
  156. package/modules/pattern/docs/states.md +1 -1
  157. package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +12 -16
  158. package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +58 -29
  159. package/modules/pattern/features/category/pages/list/list.component.html +11 -3
  160. package/modules/pattern/features/category/pages/list/list.component.ts +36 -10
  161. package/modules/pattern/features/category/routes.ts +5 -22
  162. package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +7 -11
  163. package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +70 -27
  164. package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +9 -53
  165. package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +53 -19
  166. package/modules/pattern/features/customer/entity.resolver.ts +1 -1
  167. package/modules/pattern/features/customer/pages/list/list.component.html +18 -3
  168. package/modules/pattern/features/customer/pages/list/list.component.ts +43 -16
  169. package/modules/pattern/features/customer/pages/profile/profile.component.ts +17 -8
  170. package/modules/pattern/features/customer/routes.ts +6 -27
  171. package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +37 -56
  172. package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +14 -76
  173. package/modules/pattern/features/order/pages/create/create.component.ts +7 -3
  174. package/modules/pattern/features/order/pages/detail/detail.component.ts +1 -1
  175. package/modules/pattern/features/order/pages/update/update.component.ts +5 -2
  176. package/package.json +17 -5
  177. package/types/sdcorejs-angular-components-anchor.d.ts +6 -1
  178. package/types/sdcorejs-angular-components-button.d.ts +7 -1
  179. package/types/sdcorejs-angular-components-calendar.d.ts +1092 -0
  180. package/types/sdcorejs-angular-components-card.d.ts +247 -9
  181. package/types/sdcorejs-angular-components-kanban.d.ts +191 -74
  182. package/types/sdcorejs-angular-components-modal.d.ts +10 -1
  183. package/types/sdcorejs-angular-components-query-bar.d.ts +176 -36
  184. package/types/sdcorejs-angular-components-quick-action.d.ts +65 -1
  185. package/types/sdcorejs-angular-components-scheduler.d.ts +544 -0
  186. package/types/sdcorejs-angular-components-tab.d.ts +6 -1
  187. package/types/sdcorejs-angular-components-table.d.ts +56 -7
  188. package/types/sdcorejs-angular-components-timeline.d.ts +216 -0
  189. package/types/sdcorejs-angular-components-tree.d.ts +119 -6
  190. package/types/sdcorejs-angular-components.d.ts +3 -1
  191. package/types/sdcorejs-angular-directives.d.ts +4 -2
  192. package/types/sdcorejs-angular-forms-date.d.ts +2 -0
  193. package/types/sdcorejs-angular-forms-directives.d.ts +1 -1
  194. package/types/sdcorejs-angular-i18n.d.ts +121 -9
  195. package/types/sdcorejs-angular-modules-layout.d.ts +2 -1
  196. package/types/sdcorejs-angular-services-confirm.d.ts +22 -81
  197. package/types/sdcorejs-angular-services-query-params.d.ts +67 -0
  198. package/types/sdcorejs-angular-utilities-extensions.d.ts +10 -1
  199. package/fesm2022/sdcorejs-angular-components-history.mjs +0 -54
  200. package/fesm2022/sdcorejs-angular-components-history.mjs.map +0 -1
  201. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CRc9T7rb.mjs +0 -146
  202. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CRc9T7rb.mjs.map +0 -1
  203. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-Cz-MjRG0.mjs +0 -148
  204. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-Cz-MjRG0.mjs.map +0 -1
  205. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-RBvVv88D.mjs.map +0 -1
  206. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +0 -18
  207. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +0 -1
  208. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-DzDAX3B7.mjs +0 -152
  209. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-DzDAX3B7.mjs.map +0 -1
  210. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CcpYULut.mjs.map +0 -1
  211. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs +0 -92
  212. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs.map +0 -1
  213. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs +0 -242
  214. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs.map +0 -1
  215. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs +0 -72
  216. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs.map +0 -1
  217. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BjehcQEk.mjs +0 -172
  218. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BjehcQEk.mjs.map +0 -1
  219. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CNVqk3JC.mjs.map +0 -1
  220. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-jB3E20UF.mjs +0 -120
  221. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-jB3E20UF.mjs.map +0 -1
  222. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +0 -1
  223. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +0 -1
  224. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-Dxw7Ix9d.mjs.map +0 -1
  225. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BWZxOMhB.mjs +0 -74
  226. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BWZxOMhB.mjs.map +0 -1
  227. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CophQH_L.mjs +0 -100
  228. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CophQH_L.mjs.map +0 -1
  229. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BT2PzXTG.mjs +0 -135
  230. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BT2PzXTG.mjs.map +0 -1
  231. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-qmGn2tCI.mjs +0 -146
  232. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-qmGn2tCI.mjs.map +0 -1
  233. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CUgQPcR4.mjs.map +0 -1
  234. package/modules/pattern/features/category/entity.resolver.ts +0 -27
  235. package/types/sdcorejs-angular-components-history.d.ts +0 -23
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdcorejs-angular-modules-pattern-detail.component-CcpYULut.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/customer/pipes/customer-detail.pipe.ts","../../../projects/sdcorejs-angular/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts","../../../projects/sdcorejs-angular/modules/pattern/features/product/pipes/product-detail.pipe.ts","../../../projects/sdcorejs-angular/modules/pattern/features/order/components/lines-view/lines-view.component.ts","../../../projects/sdcorejs-angular/modules/pattern/features/order/pages/detail/detail.component.ts"],"sourcesContent":["import { inject, Pipe, type PipeTransform } from '@angular/core';\nimport { of, type Observable } from 'rxjs';\nimport { CustomerService } from '../services/customer.service';\nimport type { CustomerDto } from '../services/customer.model';\n\n/**\n * Relation khách hàng theo ID: `@let customer = order.customerId | customerDetail | async;`.\n * CustomerService cache và chia sẻ request theo ID; nơi dùng pipe phải có CustomerService trong injector.\n */\n@Pipe({ name: 'customerDetail', standalone: true })\nexport class CustomerDetailPipe implements PipeTransform {\n readonly #customerService = inject(CustomerService);\n\n transform(id: CustomerDto['id'] | null | undefined): Observable<CustomerDto | null> {\n if (id === null || id === undefined || id === '') return of(null);\n return this.#customerService.cachedDetail(id);\n }\n}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { SdSection } from '@sdcorejs/angular/components/section';\nimport { SdFormatDatetimePipe } from '@sdcorejs/angular/pipes';\nimport type { OrderApprovalStepDto } from '../../services/order.model';\n\nconst ACTION_NAME: Readonly<Record<OrderApprovalStepDto['action'], string>> = {\n submit: 'Gửi duyệt',\n approve: 'Duyệt',\n reject: 'Từ chối',\n};\n\n/** Quy trình duyệt của đơn, mới nhất ở cuối; dùng ở cột phụ của trang chi tiết. */\n@Component({\n selector: 'approval-steps',\n standalone: true,\n imports: [SdSection, SdFormatDatetimePipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <sd-section title=\"Quy trình duyệt\">\n <ol class=\"approval-steps\">\n <li class=\"approval-steps__item approval-steps__item--done\">\n <span class=\"T14M\">Tạo đơn</span>\n </li>\n @for (step of steps(); track $index) {\n <li class=\"approval-steps__item\" [class.approval-steps__item--rejected]=\"step.action === 'reject'\">\n <span class=\"T14M\">{{ actionName[step.action] }}</span>\n <span class=\"T12R text-secondary\">{{ step.by }} · {{ step.at | sdFormatDatetime }}</span>\n @if (step.reason) {\n <span class=\"T12R\">Lý do: {{ step.reason }}</span>\n }\n </li>\n } @empty {\n <li class=\"approval-steps__item approval-steps__item--pending\">\n <span class=\"T12R text-secondary\">Chưa gửi duyệt</span>\n </li>\n }\n </ol>\n </sd-section>\n `,\n styles: `\n .approval-steps {\n margin: 0;\n padding: 16px 16px 16px 32px;\n list-style: none;\n }\n .approval-steps__item {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding-bottom: 16px;\n }\n .approval-steps__item::before {\n content: '';\n position: absolute;\n top: 4px;\n left: -18px;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background: var(--sd-primary);\n }\n .approval-steps__item--rejected::before {\n background: var(--sd-error, currentColor);\n }\n .approval-steps__item--pending::before {\n background: var(--sd-border-strong);\n }\n `,\n})\nexport class ApprovalStepsComponent {\n readonly steps = input.required<readonly OrderApprovalStepDto[]>();\n protected readonly actionName = ACTION_NAME;\n}\n","import { inject, Pipe, type PipeTransform } from '@angular/core';\nimport { of, type Observable } from 'rxjs';\nimport { ProductService } from '../services/product.service';\nimport type { ProductDto } from '../services/product.model';\n\n/**\n * Relation sản phẩm theo ID: `@let product = line.productId | productDetail | async;`.\n * ProductService cache và chia sẻ request theo ID; nơi dùng pipe phải có ProductService trong injector.\n */\n@Pipe({ name: 'productDetail', standalone: true })\nexport class ProductDetailPipe implements PipeTransform {\n readonly #productService = inject(ProductService);\n\n transform(id: ProductDto['id'] | null | undefined): Observable<ProductDto | null> {\n if (id === null || id === undefined || id === '') return of(null);\n return this.#productService.cachedDetail(id);\n }\n}\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { SdSection } from '@sdcorejs/angular/components/section';\nimport { SdTable, SdTableCellDefDirective, type SdTableOption } from '@sdcorejs/angular/components/table';\nimport { ProductDetailPipe } from '../../../product/pipes/product-detail.pipe';\nimport type { OrderLineDto } from '../../services/order.model';\n\n/** Dòng hàng chỉ đọc; tên sản phẩm lấy qua relation `productDetail`, không hiện ID thô. */\n@Component({\n selector: 'lines-view',\n standalone: true,\n imports: [AsyncPipe, SdSection, SdTable, SdTableCellDefDirective, ProductDetailPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <sd-section title=\"Dòng hàng\">\n <sd-table autoId=\"order-lines\" [option]=\"option()\">\n <ng-template sdTableCellDef=\"productId\" let-line=\"item\">\n @let product = line.productId | productDetail | async;\n {{ product?.name ?? '…' }}\n </ng-template>\n </sd-table>\n </sd-section>\n `,\n})\nexport class LinesViewComponent {\n readonly lines = input.required<readonly OrderLineDto[]>();\n protected readonly option = computed<SdTableOption<OrderLineDto & { amount: number }>>(() => {\n const items = this.lines().map(line => ({ ...line, amount: line.quantity * line.unitPrice }));\n return {\n type: 'local',\n items: () => items,\n paginate: { pageSize: 50 },\n filter: { hideInlineFilter: 'auto' },\n columns: [\n { field: 'productId', title: 'Sản phẩm', type: 'string', minWidth: '200px' },\n { field: 'quantity', title: 'Số lượng', type: 'number', width: '110px', align: 'right' },\n { field: 'unitPrice', title: 'Đơn giá (₫)', type: 'number', width: '140px', align: 'right' },\n { field: 'amount', title: 'Thành tiền (₫)', type: 'number', width: '150px', align: 'right' },\n ],\n };\n });\n}\n","import { AsyncPipe, NgTemplateOutlet } from '@angular/common';\nimport { afterNextRender, ChangeDetectionStrategy, Component, computed, inject, linkedSignal, signal, viewChild } from '@angular/core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { ActivatedRoute, Router, RouterLink } from '@angular/router';\nimport { firstValueFrom, map } from 'rxjs';\nimport { SdBadge } from '@sdcorejs/angular/components/badge';\nimport { SdButton } from '@sdcorejs/angular/components/button';\nimport { SdSection, SdSectionItem } from '@sdcorejs/angular/components/section';\nimport { SdSideDrawer } from '@sdcorejs/angular/components/side-drawer';\nimport { SdView } from '@sdcorejs/angular/components/view';\nimport { SD_PAGE_LIST, SdPageComponent } from '@sdcorejs/angular/modules/layout';\nimport { SdPermissionDirective } from '@sdcorejs/angular/modules/permission';\nimport { SdEmptyPipe, SdFormatDatePipe, SdFormatDatetimePipe, SdFormatNumberPipe } from '@sdcorejs/angular/pipes';\nimport { SdConfirmService } from '@sdcorejs/angular/services/confirm';\nimport { SdNotifyService } from '@sdcorejs/angular/services/notify';\nimport { apiErrorMessage } from '../../../../utils/api-error';\nimport { CustomerDetailPipe } from '../../../customer/pipes/customer-detail.pipe';\nimport { ApprovalStepsComponent } from '../../components/approval-steps/approval-steps.component';\nimport { LinesViewComponent } from '../../components/lines-view/lines-view.component';\nimport { OrderService } from '../../services/order.service';\nimport { canUpdateOrder, orderApprovalBadge, orderStatusBadge, type OrderAction, type OrderDto } from '../../services/order.model';\n\n/**\n * Chi tiết đơn (`:id/detail`, route con của danh sách). Mở trong drawer 600px hoặc trang `sd-page-detail` theo\n * `detail` của `sd-page-list`. Gửi duyệt, Duyệt và Từ chối đều hỏi xác nhận; Từ chối bắt buộc lý do (E13).\n */\n@Component({\n selector: 'detail',\n standalone: true,\n imports: [\n AsyncPipe,\n NgTemplateOutlet,\n RouterLink,\n SdPageComponent,\n SdSideDrawer,\n SdBadge,\n SdButton,\n SdSection,\n SdSectionItem,\n SdView,\n SdPermissionDirective,\n SdEmptyPipe,\n SdFormatDatePipe,\n SdFormatDatetimePipe,\n SdFormatNumberPipe,\n CustomerDetailPipe,\n ApprovalStepsComponent,\n LinesViewComponent,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @let order = entity();\n @let customer = order.customerId | customerDetail | async;\n <ng-template #actions>\n @if (order.approval === 'submitted') {\n <sd-button\n *sdPermission=\"'PATTERN_ORDER_U_REJECT'\"\n title=\"Từ chối\"\n prefixIcon=\"close\"\n type=\"light\"\n color=\"warning\"\n autoId=\"order-reject\"\n [disabled]=\"pending()\"\n (click)=\"act('reject')\" />\n <sd-button\n *sdPermission=\"'PATTERN_ORDER_U_APPROVE'\"\n title=\"Duyệt\"\n prefixIcon=\"check\"\n type=\"fill\"\n color=\"success\"\n autoId=\"order-approve\"\n [disabled]=\"pending()\"\n (click)=\"act('approve')\" />\n }\n @if (editable()) {\n <sd-button\n *sdPermission=\"'PATTERN_ORDER_U_SUBMIT'\"\n title=\"Gửi duyệt\"\n prefixIcon=\"send\"\n type=\"outline\"\n autoId=\"order-submit\"\n [disabled]=\"pending()\"\n (click)=\"act('submit')\" />\n <sd-button\n *sdPermission=\"'PATTERN_ORDER_U_UPDATE'\"\n title=\"Cập nhật đơn hàng\"\n prefixIcon=\"edit\"\n type=\"fill\"\n color=\"primary\"\n autoId=\"order-update\"\n [disabled]=\"pending()\"\n [routerLink]=\"['../update']\" />\n }\n </ng-template>\n\n @if (mode() === 'drawer') {\n <sd-side-drawer width=\"600px\" autoId=\"order-detail\" (sdClosed)=\"closed()\">\n <div sdHeaderLeft class=\"d-flex align-items-center gap-8\">\n <span class=\"T16M\">Đơn hàng {{ order.code }}</span>\n <sd-badge size=\"md\" type=\"round\" [title]=\"statusBadge().title\" [color]=\"statusBadge().color\" />\n </div>\n <sd-section title=\"Thông tin chung\">\n <sd-section-item label=\"Khách hàng\">{{ order.customer }}</sd-section-item>\n <sd-section-item label=\"Kênh bán\">{{ order.channel }}</sd-section-item>\n <sd-section-item label=\"Kho xuất\">{{ order.warehouse }}</sd-section-item>\n <sd-section-item label=\"Thanh toán\">{{ order.payment }}</sd-section-item>\n <sd-section-item label=\"Ngày tạo\">{{ order.createdAt | sdFormatDatetime }}</sd-section-item>\n <sd-section-item label=\"Tổng tiền (₫)\">{{ order.total | sdFormatNumber: 0 }}</sd-section-item>\n <sd-section-item label=\"Trạng thái\">\n <div class=\"d-flex align-items-center gap-8 flex-wrap\">\n @for (badge of badges(); track $index) {\n <sd-badge [type]=\"badge.type\" [title]=\"badge.title\" [color]=\"badge.color\" />\n }\n </div>\n </sd-section-item>\n </sd-section>\n <div sdFooterRight class=\"d-flex align-items-center gap-8 flex-wrap\">\n <ng-container [ngTemplateOutlet]=\"actions\" />\n </div>\n </sd-side-drawer>\n } @else {\n <sd-page-detail\n [title]=\"'Chi tiết đơn hàng #' + order.code\"\n [description]=\"order.customer + ' · ' + order.channel\"\n [badges]=\"badges()\"\n [backLink]=\"['../..']\">\n <div headerRight class=\"d-flex align-items-center gap-8 flex-wrap\">\n <ng-container [ngTemplateOutlet]=\"actions\" />\n </div>\n <div class=\"d-flex flex-column gap-16 py-16\">\n <sd-section title=\"Thông tin chung\">\n <div class=\"row p-8\">\n <div class=\"col-12 col-md-6 p-8\"><sd-view label=\"Khách hàng\" [display]=\"order.customer\" /></div>\n <div class=\"col-12 col-md-6 p-8\"><sd-view label=\"Điện thoại\" [display]=\"customer?.phone\" /></div>\n <div class=\"col-12 col-md-6 p-8\"><sd-view label=\"Kênh bán\" [display]=\"order.channel\" /></div>\n <div class=\"col-12 col-md-6 p-8\"><sd-view label=\"Kho xuất\" [display]=\"order.warehouse\" /></div>\n <div class=\"col-12 col-md-6 p-8\"><sd-view label=\"Thanh toán\" [display]=\"order.payment\" /></div>\n <div class=\"col-12 col-md-6 p-8\"><sd-view label=\"Ngày tạo\" [display]=\"order.createdAt | sdFormatDatetime\" /></div>\n <div class=\"col-12 col-md-6 p-8\"><sd-view label=\"Ngày giao\" [display]=\"order.deliveredAt | sdFormatDate\" /></div>\n <div class=\"col-12 col-md-6 p-8\"><sd-view label=\"Mã vận đơn\" [display]=\"order.tracking\" /></div>\n </div>\n </sd-section>\n <lines-view [lines]=\"order.lines\" />\n <sd-section title=\"Thông tin phê duyệt\">\n <sd-section-item label=\"Trạng thái duyệt\">\n <sd-badge [type]=\"approvalBadge().type\" [title]=\"approvalBadge().title\" [color]=\"approvalBadge().color\" />\n </sd-section-item>\n <sd-section-item label=\"Người gửi duyệt\">{{ submitted()?.by | sdEmpty }}</sd-section-item>\n <sd-section-item label=\"Người duyệt\">{{ decided()?.by | sdEmpty }}</sd-section-item>\n <sd-section-item label=\"Lý do từ chối\">{{ decided()?.reason | sdEmpty }}</sd-section-item>\n <sd-section-item label=\"Ghi chú\">{{ order.note | sdEmpty }}</sd-section-item>\n </sd-section>\n </div>\n <approval-steps sdAside [steps]=\"order.approvalHistory\" />\n </sd-page-detail>\n }\n `,\n})\nexport class DetailComponent {\n readonly #orderService = inject(OrderService);\n readonly #confirm = inject(SdConfirmService);\n readonly #notify = inject(SdNotifyService);\n readonly #router = inject(Router);\n readonly #route = inject(ActivatedRoute);\n private readonly drawer = viewChild(SdSideDrawer);\n protected readonly mode = inject(SD_PAGE_LIST).detail;\n readonly #resolved = toSignal(this.#route.data.pipe(map(data => data['entity'] as OrderDto)), { requireSync: true });\n /** Đơn do resolver tải; sau mỗi tác vụ thay bằng đơn API trả về. */\n protected readonly entity = linkedSignal(() => this.#resolved());\n protected readonly pending = signal(false);\n protected readonly statusBadge = computed(() => orderStatusBadge(this.entity().status));\n protected readonly approvalBadge = computed(() => orderApprovalBadge(this.entity().approval));\n /** Trạng thái đơn và trạng thái duyệt: title của trang, dòng \"Trạng thái\" của drawer. */\n protected readonly badges = computed(() => [this.statusBadge(), this.approvalBadge()]);\n protected readonly editable = computed(() => canUpdateOrder(this.entity()));\n protected readonly submitted = computed(() => [...this.entity().approvalHistory].reverse().find(step => step.action === 'submit'));\n protected readonly decided = computed(() =>\n this.entity().approval === 'approved' || this.entity().approval === 'rejected' ? this.entity().approvalHistory.at(-1) : undefined\n );\n\n constructor() {\n afterNextRender(() => this.drawer()?.open());\n }\n\n protected closed(): void {\n void this.#router.navigate(['../..'], { relativeTo: this.#route });\n }\n\n /** Hỏi xác nhận (Từ chối kèm lý do), gọi API, rồi hiển thị đơn mới; lỗi giữ nguyên màn để thử lại. */\n protected async act(action: Extract<OrderAction, 'submit' | 'approve' | 'reject'>): Promise<void> {\n const order = this.entity();\n let reason: string | undefined;\n try {\n if (action === 'reject') {\n reason = await this.#confirm.withInput(`Từ chối đơn ${order.code}. Lý do được gửi cho người lập đơn.`, {\n title: 'Từ chối đơn hàng',\n label: 'Lý do từ chối',\n required: true,\n maxlength: 200,\n yesTitle: 'Từ chối',\n noTitle: 'Không',\n yesButtonColor: 'warning',\n });\n } else {\n await this.#confirm.confirm(action === 'approve' ? `Duyệt đơn ${order.code}?` : `Gửi đơn ${order.code} cho người duyệt?`, {\n title: action === 'approve' ? 'Duyệt đơn hàng' : 'Gửi duyệt',\n yesTitle: action === 'approve' ? 'Duyệt' : 'Gửi duyệt',\n noTitle: 'Không',\n });\n }\n } catch {\n return;\n }\n this.pending.set(true);\n try {\n this.entity.set(await firstValueFrom(this.#orderService.act(action, { id: order.id, reason })));\n this.#notify.success(action === 'approve' ? 'Đã duyệt đơn.' : action === 'reject' ? 'Đã từ chối đơn.' : 'Đã gửi duyệt.');\n } catch (error) {\n this.#notify.error(apiErrorMessage(error));\n } finally {\n this.pending.set(false);\n }\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKA;;;AAGG;MAEU,kBAAkB,CAAA;AACpB,IAAA,gBAAgB,GAAG,MAAM,CAAC,eAAe,CAAC;AAEnD,IAAA,SAAS,CAAC,EAAwC,EAAA;QAChD,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE;AAAE,YAAA,OAAO,EAAE,CAAC,IAAI,CAAC;QACj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AA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAChB,oBAAoB,EAAA,IAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EACpB,kBAAkB,kDAClB,kBAAkB,EAAA,IAAA,EAAA,gBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAiHT,eAAe,EAAA,UAAA,EAAA,CAAA;kBApI3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,QAAQ;AAClB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,SAAS;wBACT,gBAAgB;wBAChB,UAAU;wBACV,eAAe;wBACf,YAAY;wBACZ,OAAO;wBACP,QAAQ;wBACR,SAAS;wBACT,aAAa;wBACb,MAAM;wBACN,qBAAqB;wBACrB,WAAW;wBACX,gBAAgB;wBAChB,oBAAoB;wBACpB,kBAAkB;wBAClB,kBAAkB;wBAClB,sBAAsB;wBACtB,kBAAkB;AACnB,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GT,EAAA,CAAA;AACF,iBAAA;kHAOqC,YAAY,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
@@ -1,92 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { SdSection } from '@sdcorejs/angular/components/section';
4
- import { SdView } from '@sdcorejs/angular/components/view';
5
- import { SdInput } from '@sdcorejs/angular/forms/input';
6
- import { SdSwitch } from '@sdcorejs/angular/forms/switch';
7
-
8
- /** Giá trị form → request lưu; danh mục cha do drawer quyết định, không sửa trong form. */
9
- function categorySaveReq(form, parentId, code) {
10
- const value = form.getRawValue();
11
- return { code: code ?? value.code ?? '', name: value.name ?? '', parentId, status: value.active === false ? 'inactive' : 'active' };
12
- }
13
- /** Form danh mục một nhóm, dùng chung cho drawer tạo và cập nhật. */
14
- class GeneralInformationFormComponent {
15
- form = input.required(/* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
17
- seed = input.required(/* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "seed" }] : /* istanbul ignore next */ []));
19
- parentName = input(null, /* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "parentName" }] : /* istanbul ignore next */ []));
21
- editing = input(false, /* @ts-ignore */
22
- ...(ngDevMode ? [{ debugName: "editing" }] : /* istanbul ignore next */ []));
23
- errors = input({}, /* @ts-ignore */
24
- ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
25
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GeneralInformationFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
26
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: GeneralInformationFormComponent, isStandalone: true, selector: "general-information-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, seed: { classPropertyName: "seed", publicName: "seed", isSignal: true, isRequired: true, transformFunction: null }, parentName: { classPropertyName: "parentName", publicName: "parentName", isSignal: true, isRequired: false, transformFunction: null }, editing: { classPropertyName: "editing", publicName: "editing", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
27
- <sd-section title="Thông tin chung">
28
- <div class="d-flex flex-column gap-8 p-16">
29
- <sd-view label="Danh mục cha" [display]="parentName()" />
30
- <sd-input
31
- label="Mã danh mục"
32
- name="code"
33
- autoId="category-code"
34
- [form]="form()"
35
- [model]="seed().code"
36
- [disabled]="editing()"
37
- [inlineError]="errors()['code']"
38
- maxlength="30"
39
- required />
40
- <sd-input
41
- label="Tên danh mục"
42
- name="name"
43
- autoId="category-name"
44
- [form]="form()"
45
- [model]="seed().name"
46
- [inlineError]="errors()['name']"
47
- maxlength="100"
48
- required />
49
- <sd-switch label="Đang dùng" name="active" [form]="form()" [model]="seed().status !== 'inactive'" />
50
- </div>
51
- </sd-section>
52
- `, isInline: true, dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdView, selector: "sd-view", inputs: ["label", "value", "display", "hyperlink", "labelTemplate", "valueTemplate", "selectedItems"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdSwitch, selector: "sd-switch", inputs: ["autoId", "name", "form", "label", "size", "color", "disabled", "viewed", "hideInlineError", "required", "model"], outputs: ["modelChange", "sdChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
53
- }
54
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GeneralInformationFormComponent, decorators: [{
55
- type: Component,
56
- args: [{
57
- selector: 'general-information-form',
58
- standalone: true,
59
- imports: [SdSection, SdView, SdInput, SdSwitch],
60
- changeDetection: ChangeDetectionStrategy.OnPush,
61
- template: `
62
- <sd-section title="Thông tin chung">
63
- <div class="d-flex flex-column gap-8 p-16">
64
- <sd-view label="Danh mục cha" [display]="parentName()" />
65
- <sd-input
66
- label="Mã danh mục"
67
- name="code"
68
- autoId="category-code"
69
- [form]="form()"
70
- [model]="seed().code"
71
- [disabled]="editing()"
72
- [inlineError]="errors()['code']"
73
- maxlength="30"
74
- required />
75
- <sd-input
76
- label="Tên danh mục"
77
- name="name"
78
- autoId="category-name"
79
- [form]="form()"
80
- [model]="seed().name"
81
- [inlineError]="errors()['name']"
82
- maxlength="100"
83
- required />
84
- <sd-switch label="Đang dùng" name="active" [form]="form()" [model]="seed().status !== 'inactive'" />
85
- </div>
86
- </sd-section>
87
- `,
88
- }]
89
- }], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }], seed: [{ type: i0.Input, args: [{ isSignal: true, alias: "seed", required: true }] }], parentName: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentName", required: false }] }], editing: [{ type: i0.Input, args: [{ isSignal: true, alias: "editing", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }] } });
90
-
91
- export { GeneralInformationFormComponent as G, categorySaveReq as c };
92
- //# sourceMappingURL=sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdcorejs-angular-modules-pattern-general-information-form.component-D8-WXUAE.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/category/components/general-information-form/general-information-form.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport type { FormControl, FormGroup } from '@angular/forms';\nimport { SdSection } from '@sdcorejs/angular/components/section';\nimport { SdView } from '@sdcorejs/angular/components/view';\nimport { SdInput } from '@sdcorejs/angular/forms/input';\nimport { SdSwitch } from '@sdcorejs/angular/forms/switch';\nimport type { CategorySaveReq } from '../../services/category.model';\n\nexport type CategoryForm = FormGroup<{\n code?: FormControl<string>;\n name?: FormControl<string>;\n active?: FormControl<boolean>;\n}>;\n\n/** Giá trị form → request lưu; danh mục cha do drawer quyết định, không sửa trong form. */\nexport function categorySaveReq(form: CategoryForm, parentId: string | null, code?: string): CategorySaveReq {\n const value = form.getRawValue();\n return { code: code ?? value.code ?? '', name: value.name ?? '', parentId, status: value.active === false ? 'inactive' : 'active' };\n}\n\n/** Form danh mục một nhóm, dùng chung cho drawer tạo và cập nhật. */\n@Component({\n selector: 'general-information-form',\n standalone: true,\n imports: [SdSection, SdView, SdInput, SdSwitch],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <sd-section title=\"Thông tin chung\">\n <div class=\"d-flex flex-column gap-8 p-16\">\n <sd-view label=\"Danh mục cha\" [display]=\"parentName()\" />\n <sd-input\n label=\"Mã danh mục\"\n name=\"code\"\n autoId=\"category-code\"\n [form]=\"form()\"\n [model]=\"seed().code\"\n [disabled]=\"editing()\"\n [inlineError]=\"errors()['code']\"\n maxlength=\"30\"\n required />\n <sd-input\n label=\"Tên danh mục\"\n name=\"name\"\n autoId=\"category-name\"\n [form]=\"form()\"\n [model]=\"seed().name\"\n [inlineError]=\"errors()['name']\"\n maxlength=\"100\"\n required />\n <sd-switch label=\"Đang dùng\" name=\"active\" [form]=\"form()\" [model]=\"seed().status !== 'inactive'\" />\n </div>\n </sd-section>\n `,\n})\nexport class GeneralInformationFormComponent {\n readonly form = input.required<CategoryForm>();\n readonly seed = input.required<CategorySaveReq>();\n readonly parentName = input<string | null>(null);\n readonly editing = input(false);\n readonly errors = input<Readonly<Record<string, string>>>({});\n}\n"],"names":[],"mappings":";;;;;;;AAcA;SACgB,eAAe,CAAC,IAAkB,EAAE,QAAuB,EAAE,IAAa,EAAA;AACxF,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE;AAChC,IAAA,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,IA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;AACpC,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;oBAC/C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BT,EAAA,CAAA;AACF,iBAAA;;;"}
@@ -1,242 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, model, ChangeDetectionStrategy, Component, linkedSignal } from '@angular/core';
3
- import { SdInform } from '@sdcorejs/angular/components/inform';
4
- import { SdSection } from '@sdcorejs/angular/components/section';
5
- import { SdInput } from '@sdcorejs/angular/forms/input';
6
- import { SdSwitch } from '@sdcorejs/angular/forms/switch';
7
- import { SdTextarea } from '@sdcorejs/angular/forms/textarea';
8
- import { SdSelect } from '@sdcorejs/angular/forms/select';
9
- import { C as CUSTOMER_TYPE_OPTIONS } from './sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs';
10
-
11
- /** Dropdown loại khách hàng. */
12
- class CustomerTypeSelectComponent {
13
- form = input(/* @ts-ignore */
14
- ...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
15
- name = input('type', /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
17
- label = input('Loại khách hàng', /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
19
- required = input(true, /* @ts-ignore */
20
- ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
21
- model = model(/* @ts-ignore */
22
- ...(ngDevMode ? [undefined, { debugName: "model" }] : /* istanbul ignore next */ []));
23
- options = CUSTOMER_TYPE_OPTIONS;
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CustomerTypeSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.5", type: CustomerTypeSelectComponent, isStandalone: true, selector: "customer-type-select", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange" }, ngImport: i0, template: `<sd-select
26
- [label]="label()"
27
- [name]="name()"
28
- [form]="form()"
29
- [(model)]="model"
30
- [items]="options"
31
- valueField="id"
32
- displayField="name"
33
- [required]="required()"
34
- [clearable]="false" />`, isInline: true, dependencies: [{ kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CustomerTypeSelectComponent, decorators: [{
37
- type: Component,
38
- args: [{
39
- selector: 'customer-type-select',
40
- standalone: true,
41
- imports: [SdSelect],
42
- changeDetection: ChangeDetectionStrategy.OnPush,
43
- template: `<sd-select
44
- [label]="label()"
45
- [name]="name()"
46
- [form]="form()"
47
- [(model)]="model"
48
- [items]="options"
49
- valueField="id"
50
- displayField="name"
51
- [required]="required()"
52
- [clearable]="false" />`,
53
- }]
54
- }], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }, { type: i0.Output, args: ["modelChange"] }] } });
55
-
56
- const GROUP_FIELDS = {
57
- general: ['name', 'type', 'taxCode', 'vip'],
58
- contact: ['email', 'phone', 'address'],
59
- other: ['active', 'note'],
60
- };
61
- /** Nhóm có field không hợp lệ: field còn lỗi validate hoặc lỗi do API trả về. */
62
- function invalidCustomerGroups(form, apiErrors) {
63
- return Object.keys(GROUP_FIELDS).filter(group => GROUP_FIELDS[group].some(field => form.get(field)?.invalid || !!apiErrors[field]));
64
- }
65
- /** Giá trị form → request lưu. */
66
- function customerSaveReq(form) {
67
- const value = form.getRawValue();
68
- const type = value.type ?? 'individual';
69
- const tier = value.vip ? 'vip' : 'standard';
70
- const status = value.active === false ? 'inactive' : 'active';
71
- return {
72
- name: value.name ?? '',
73
- type,
74
- tier,
75
- email: value.email ?? '',
76
- phone: value.phone ?? '',
77
- address: value.address ?? '',
78
- taxCode: type === 'business' ? (value.taxCode ?? null) : null,
79
- status,
80
- note: value.note || null,
81
- };
82
- }
83
- /** Form khách hàng ba nhóm, dùng chung cho drawer tạo mới và cập nhật. */
84
- class GeneralInformationFormComponent {
85
- form = input.required(/* @ts-ignore */
86
- ...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
87
- seed = input.required(/* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "seed" }] : /* istanbul ignore next */ []));
89
- /** Lỗi theo field do API trả về. */
90
- errors = input({}, /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
92
- invalidGroups = input([], /* @ts-ignore */
93
- ...(ngDevMode ? [{ debugName: "invalidGroups" }] : /* istanbul ignore next */ []));
94
- /** Loại khách đang chọn: doanh nghiệp mới có mã số thuế. */
95
- type = linkedSignal(() => this.seed().type, /* @ts-ignore */
96
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
97
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GeneralInformationFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
98
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: GeneralInformationFormComponent, isStandalone: true, selector: "general-information-form", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, seed: { classPropertyName: "seed", publicName: "seed", isSignal: true, isRequired: true, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, invalidGroups: { classPropertyName: "invalidGroups", publicName: "invalidGroups", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
99
- @let invalid = invalidGroups();
100
- <div class="d-flex flex-column gap-16">
101
- <sd-section title="Thông tin chung">
102
- <div class="d-flex flex-column gap-8 p-16">
103
- @if (invalid.includes('general')) {
104
- <sd-inform warning description="Kiểm tra tên và loại khách hàng." autoId="customer-general-warning" />
105
- }
106
- <sd-input
107
- label="Tên khách hàng"
108
- name="name"
109
- autoId="customer-name"
110
- [form]="form()"
111
- [model]="seed().name"
112
- [inlineError]="errors()['name']"
113
- maxlength="120"
114
- required />
115
- <customer-type-select [form]="form()" [model]="seed().type" (modelChange)="type.set($event ?? 'individual')" />
116
- @if (type() === 'business') {
117
- <sd-input
118
- label="Mã số thuế"
119
- name="taxCode"
120
- autoId="customer-tax-code"
121
- [form]="form()"
122
- [model]="seed().taxCode"
123
- [inlineError]="errors()['taxCode']"
124
- maxlength="14"
125
- required />
126
- }
127
- <sd-switch label="Khách VIP" name="vip" [form]="form()" [model]="seed().tier === 'vip'" />
128
- </div>
129
- </sd-section>
130
- <sd-section title="Liên hệ">
131
- <div class="d-flex flex-column gap-8 p-16">
132
- @if (invalid.includes('contact')) {
133
- <sd-inform warning description="Kiểm tra email và số điện thoại." autoId="customer-contact-warning" />
134
- }
135
- <sd-input
136
- label="Email"
137
- name="email"
138
- autoId="customer-email"
139
- [form]="form()"
140
- [model]="seed().email"
141
- [inlineError]="errors()['email']"
142
- pattern="EMAIL"
143
- required />
144
- <sd-input
145
- label="Điện thoại"
146
- name="phone"
147
- autoId="customer-phone"
148
- [form]="form()"
149
- [model]="seed().phone"
150
- [inlineError]="errors()['phone']"
151
- maxlength="15"
152
- required />
153
- <sd-input label="Địa chỉ" name="address" autoId="customer-address" [form]="form()" [model]="seed().address" maxlength="200" />
154
- </div>
155
- </sd-section>
156
- <sd-section title="Khác">
157
- <div class="d-flex flex-column gap-8 p-16">
158
- <sd-switch label="Đang hoạt động" name="active" [form]="form()" [model]="seed().status !== 'inactive'" />
159
- <sd-textarea label="Ghi chú" name="note" [form]="form()" [model]="seed().note" maxlength="500" />
160
- </div>
161
- </sd-section>
162
- </div>
163
- `, isInline: true, dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdTextarea, selector: "sd-textarea", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "rows", "hideInlineError", "required", "disabled", "viewed", "autoHeight", "maxlength", "minlength", "pattern", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdSwitch, selector: "sd-switch", inputs: ["autoId", "name", "form", "label", "size", "color", "disabled", "viewed", "hideInlineError", "required", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdInform, selector: "sd-inform", inputs: ["type", "color", "primary", "secondary", "info", "success", "warning", "error", "title", "description", "icon", "hideIcon", "iconShape", "fontSet", "closable", "actionLabel", "lineClamp", "autoId"], outputs: ["sdClosed", "sdAction"] }, { kind: "component", type: CustomerTypeSelectComponent, selector: "customer-type-select", inputs: ["form", "name", "label", "required", "model"], outputs: ["modelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
164
- }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GeneralInformationFormComponent, decorators: [{
166
- type: Component,
167
- args: [{
168
- selector: 'general-information-form',
169
- standalone: true,
170
- imports: [SdSection, SdInput, SdTextarea, SdSwitch, SdInform, CustomerTypeSelectComponent],
171
- changeDetection: ChangeDetectionStrategy.OnPush,
172
- template: `
173
- @let invalid = invalidGroups();
174
- <div class="d-flex flex-column gap-16">
175
- <sd-section title="Thông tin chung">
176
- <div class="d-flex flex-column gap-8 p-16">
177
- @if (invalid.includes('general')) {
178
- <sd-inform warning description="Kiểm tra tên và loại khách hàng." autoId="customer-general-warning" />
179
- }
180
- <sd-input
181
- label="Tên khách hàng"
182
- name="name"
183
- autoId="customer-name"
184
- [form]="form()"
185
- [model]="seed().name"
186
- [inlineError]="errors()['name']"
187
- maxlength="120"
188
- required />
189
- <customer-type-select [form]="form()" [model]="seed().type" (modelChange)="type.set($event ?? 'individual')" />
190
- @if (type() === 'business') {
191
- <sd-input
192
- label="Mã số thuế"
193
- name="taxCode"
194
- autoId="customer-tax-code"
195
- [form]="form()"
196
- [model]="seed().taxCode"
197
- [inlineError]="errors()['taxCode']"
198
- maxlength="14"
199
- required />
200
- }
201
- <sd-switch label="Khách VIP" name="vip" [form]="form()" [model]="seed().tier === 'vip'" />
202
- </div>
203
- </sd-section>
204
- <sd-section title="Liên hệ">
205
- <div class="d-flex flex-column gap-8 p-16">
206
- @if (invalid.includes('contact')) {
207
- <sd-inform warning description="Kiểm tra email và số điện thoại." autoId="customer-contact-warning" />
208
- }
209
- <sd-input
210
- label="Email"
211
- name="email"
212
- autoId="customer-email"
213
- [form]="form()"
214
- [model]="seed().email"
215
- [inlineError]="errors()['email']"
216
- pattern="EMAIL"
217
- required />
218
- <sd-input
219
- label="Điện thoại"
220
- name="phone"
221
- autoId="customer-phone"
222
- [form]="form()"
223
- [model]="seed().phone"
224
- [inlineError]="errors()['phone']"
225
- maxlength="15"
226
- required />
227
- <sd-input label="Địa chỉ" name="address" autoId="customer-address" [form]="form()" [model]="seed().address" maxlength="200" />
228
- </div>
229
- </sd-section>
230
- <sd-section title="Khác">
231
- <div class="d-flex flex-column gap-8 p-16">
232
- <sd-switch label="Đang hoạt động" name="active" [form]="form()" [model]="seed().status !== 'inactive'" />
233
- <sd-textarea label="Ghi chú" name="note" [form]="form()" [model]="seed().note" maxlength="500" />
234
- </div>
235
- </sd-section>
236
- </div>
237
- `,
238
- }]
239
- }], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: true }] }], seed: [{ type: i0.Input, args: [{ isSignal: true, alias: "seed", required: true }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], invalidGroups: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidGroups", required: false }] }] } });
240
-
241
- export { GeneralInformationFormComponent as G, customerSaveReq as c, invalidCustomerGroups as i };
242
- //# sourceMappingURL=sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdcorejs-angular-modules-pattern-general-information-form.component-DHTxzjRN.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.ts","../../../projects/sdcorejs-angular/modules/pattern/features/customer/components/general-information-form/general-information-form.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, model } from '@angular/core';\nimport type { FormGroup } from '@angular/forms';\nimport { SdSelect } from '@sdcorejs/angular/forms/select';\nimport { CUSTOMER_TYPE_OPTIONS, type CustomerType } from '../../services/customer.model';\n\n/** Dropdown loại khách hàng. */\n@Component({\n selector: 'customer-type-select',\n standalone: true,\n imports: [SdSelect],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<sd-select\n [label]=\"label()\"\n [name]=\"name()\"\n [form]=\"form()\"\n [(model)]=\"model\"\n [items]=\"options\"\n valueField=\"id\"\n displayField=\"name\"\n [required]=\"required()\"\n [clearable]=\"false\" />`,\n})\nexport class CustomerTypeSelectComponent {\n readonly form = input<FormGroup>();\n readonly name = input('type');\n readonly label = input('Loại khách hàng');\n readonly required = input(true);\n readonly model = model<CustomerType | null | undefined>();\n protected readonly options = CUSTOMER_TYPE_OPTIONS;\n}\n","import { ChangeDetectionStrategy, Component, input, linkedSignal } from '@angular/core';\nimport type { FormControl, FormGroup } from '@angular/forms';\nimport { SdInform } from '@sdcorejs/angular/components/inform';\nimport { SdSection } from '@sdcorejs/angular/components/section';\nimport { SdInput } from '@sdcorejs/angular/forms/input';\nimport { SdSwitch } from '@sdcorejs/angular/forms/switch';\nimport { SdTextarea } from '@sdcorejs/angular/forms/textarea';\nimport type { CustomerSaveReq, CustomerStatus, CustomerTier, CustomerType } from '../../services/customer.model';\nimport { CustomerTypeSelectComponent } from '../customer-type-select/customer-type-select.component';\n\n/** Các field Core tự đăng ký control qua `[form]` + `name`. */\nexport type CustomerForm = FormGroup<{\n name?: FormControl<string>;\n type?: FormControl<CustomerType>;\n taxCode?: FormControl<string | null>;\n vip?: FormControl<boolean>;\n email?: FormControl<string>;\n phone?: FormControl<string>;\n address?: FormControl<string>;\n active?: FormControl<boolean>;\n note?: FormControl<string | null>;\n}>;\n\n/** Ba nhóm của form; nhóm còn lỗi sau khi bấm Lưu hiện `sd-inform` cảnh báo ngay trong nhóm. */\nexport type CustomerFormGroup = 'general' | 'contact' | 'other';\n\nconst GROUP_FIELDS: Readonly<Record<CustomerFormGroup, readonly string[]>> = {\n general: ['name', 'type', 'taxCode', 'vip'],\n contact: ['email', 'phone', 'address'],\n other: ['active', 'note'],\n};\n\n/** Nhóm có field không hợp lệ: field còn lỗi validate hoặc lỗi do API trả về. */\nexport function invalidCustomerGroups(form: CustomerForm, apiErrors: Readonly<Record<string, string>>): CustomerFormGroup[] {\n return (Object.keys(GROUP_FIELDS) as CustomerFormGroup[]).filter(group =>\n GROUP_FIELDS[group].some(field => form.get(field)?.invalid || !!apiErrors[field])\n );\n}\n\n/** Giá trị form → request lưu. */\nexport function customerSaveReq(form: CustomerForm): CustomerSaveReq {\n const value = form.getRawValue();\n const type: CustomerType = value.type ?? 'individual';\n const tier: CustomerTier = value.vip ? 'vip' : 'standard';\n const status: CustomerStatus = value.active === false ? 'inactive' : 'active';\n return {\n name: value.name ?? '',\n type,\n tier,\n email: value.email ?? '',\n phone: value.phone ?? '',\n address: value.address ?? '',\n taxCode: type === 'business' ? (value.taxCode ?? null) : null,\n status,\n note: value.note || null,\n };\n}\n\n/** Form khách hàng ba nhóm, dùng chung cho drawer tạo mới và cập nhật. */\n@Component({\n selector: 'general-information-form',\n standalone: true,\n imports: [SdSection, SdInput, SdTextarea, SdSwitch, SdInform, CustomerTypeSelectComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @let invalid = invalidGroups();\n <div class=\"d-flex flex-column gap-16\">\n <sd-section title=\"Thông tin chung\">\n <div class=\"d-flex flex-column gap-8 p-16\">\n @if (invalid.includes('general')) {\n <sd-inform warning description=\"Kiểm tra tên và loại khách hàng.\" autoId=\"customer-general-warning\" />\n }\n <sd-input\n label=\"Tên khách hàng\"\n name=\"name\"\n autoId=\"customer-name\"\n [form]=\"form()\"\n [model]=\"seed().name\"\n [inlineError]=\"errors()['name']\"\n maxlength=\"120\"\n required />\n <customer-type-select [form]=\"form()\" [model]=\"seed().type\" (modelChange)=\"type.set($event ?? 'individual')\" />\n @if (type() === 'business') {\n <sd-input\n label=\"Mã số thuế\"\n name=\"taxCode\"\n autoId=\"customer-tax-code\"\n [form]=\"form()\"\n [model]=\"seed().taxCode\"\n [inlineError]=\"errors()['taxCode']\"\n maxlength=\"14\"\n required />\n }\n <sd-switch label=\"Khách VIP\" name=\"vip\" [form]=\"form()\" [model]=\"seed().tier === 'vip'\" />\n </div>\n </sd-section>\n <sd-section title=\"Liên hệ\">\n <div class=\"d-flex flex-column gap-8 p-16\">\n @if (invalid.includes('contact')) {\n <sd-inform warning description=\"Kiểm tra email và số điện thoại.\" autoId=\"customer-contact-warning\" />\n }\n <sd-input\n label=\"Email\"\n name=\"email\"\n autoId=\"customer-email\"\n [form]=\"form()\"\n [model]=\"seed().email\"\n [inlineError]=\"errors()['email']\"\n pattern=\"EMAIL\"\n required />\n <sd-input\n label=\"Điện thoại\"\n name=\"phone\"\n autoId=\"customer-phone\"\n [form]=\"form()\"\n [model]=\"seed().phone\"\n [inlineError]=\"errors()['phone']\"\n maxlength=\"15\"\n required />\n <sd-input label=\"Địa chỉ\" name=\"address\" autoId=\"customer-address\" [form]=\"form()\" [model]=\"seed().address\" maxlength=\"200\" />\n </div>\n </sd-section>\n <sd-section title=\"Khác\">\n <div class=\"d-flex flex-column gap-8 p-16\">\n <sd-switch label=\"Đang hoạt động\" name=\"active\" [form]=\"form()\" [model]=\"seed().status !== 'inactive'\" />\n <sd-textarea label=\"Ghi chú\" name=\"note\" [form]=\"form()\" [model]=\"seed().note\" maxlength=\"500\" />\n </div>\n </sd-section>\n </div>\n `,\n})\nexport class GeneralInformationFormComponent {\n readonly form = input.required<CustomerForm>();\n readonly seed = input.required<CustomerSaveReq>();\n /** Lỗi theo field do API trả về. */\n readonly errors = input<Readonly<Record<string, string>>>({});\n readonly invalidGroups = input<readonly CustomerFormGroup[]>([]);\n /** Loại khách đang chọn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A;;;"}
@@ -1,72 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { SdSection, SdSectionItem } from '@sdcorejs/angular/components/section';
4
- import { SdEmptyPipe, SdFormatDatePipe, SdFormatNumberPipe } from '@sdcorejs/angular/pipes';
5
- import { b as customerTypeName } from './sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs';
6
-
7
- /** Thông tin khách hàng dạng hàng `sd-section-item`: nhãn bên trái, giá trị bên phải. */
8
- class GeneralInformationViewComponent {
9
- customer = input.required(/* @ts-ignore */
10
- ...(ngDevMode ? [{ debugName: "customer" }] : /* istanbul ignore next */ []));
11
- typeName = computed(() => customerTypeName(this.customer().type), /* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "typeName" }] : /* istanbul ignore next */ []));
13
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GeneralInformationViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", type: GeneralInformationViewComponent, isStandalone: true, selector: "general-information-view", inputs: { customer: { classPropertyName: "customer", publicName: "customer", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
15
- @let item = customer();
16
- <div class="d-flex flex-column gap-16">
17
- <sd-section title="Thông tin chung">
18
- <sd-section-item label="Mã khách hàng">{{ item.code }}</sd-section-item>
19
- <sd-section-item label="Tên khách hàng">{{ item.name }}</sd-section-item>
20
- <sd-section-item label="Loại khách hàng">{{ typeName() }}{{ item.tier === 'vip' ? ' · VIP' : '' }}</sd-section-item>
21
- @if (item.type === 'business') {
22
- <sd-section-item label="Mã số thuế">{{ item.taxCode | sdEmpty }}</sd-section-item>
23
- }
24
- <sd-section-item label="Ngày tạo">{{ item.createdAt | sdFormatDate }}</sd-section-item>
25
- </sd-section>
26
- <sd-section title="Liên hệ">
27
- <sd-section-item label="Email">{{ item.email }}</sd-section-item>
28
- <sd-section-item label="Điện thoại">{{ item.phone }}</sd-section-item>
29
- <sd-section-item label="Địa chỉ">{{ item.address | sdEmpty }}</sd-section-item>
30
- </sd-section>
31
- <sd-section title="Khác">
32
- <sd-section-item label="Công nợ (₫)">{{ item.debt | sdFormatNumber: 0 }}</sd-section-item>
33
- <sd-section-item label="Ghi chú">{{ item.note | sdEmpty }}</sd-section-item>
34
- </sd-section>
35
- </div>
36
- `, isInline: true, dependencies: [{ kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdSectionItem, selector: "sd-section-item", inputs: ["label", "labelWidth"] }, { kind: "pipe", type: SdEmptyPipe, name: "sdEmpty" }, { kind: "pipe", type: SdFormatDatePipe, name: "sdFormatDate" }, { kind: "pipe", type: SdFormatNumberPipe, name: "sdFormatNumber" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: GeneralInformationViewComponent, decorators: [{
39
- type: Component,
40
- args: [{
41
- selector: 'general-information-view',
42
- standalone: true,
43
- imports: [SdSection, SdSectionItem, SdEmptyPipe, SdFormatDatePipe, SdFormatNumberPipe],
44
- changeDetection: ChangeDetectionStrategy.OnPush,
45
- template: `
46
- @let item = customer();
47
- <div class="d-flex flex-column gap-16">
48
- <sd-section title="Thông tin chung">
49
- <sd-section-item label="Mã khách hàng">{{ item.code }}</sd-section-item>
50
- <sd-section-item label="Tên khách hàng">{{ item.name }}</sd-section-item>
51
- <sd-section-item label="Loại khách hàng">{{ typeName() }}{{ item.tier === 'vip' ? ' · VIP' : '' }}</sd-section-item>
52
- @if (item.type === 'business') {
53
- <sd-section-item label="Mã số thuế">{{ item.taxCode | sdEmpty }}</sd-section-item>
54
- }
55
- <sd-section-item label="Ngày tạo">{{ item.createdAt | sdFormatDate }}</sd-section-item>
56
- </sd-section>
57
- <sd-section title="Liên hệ">
58
- <sd-section-item label="Email">{{ item.email }}</sd-section-item>
59
- <sd-section-item label="Điện thoại">{{ item.phone }}</sd-section-item>
60
- <sd-section-item label="Địa chỉ">{{ item.address | sdEmpty }}</sd-section-item>
61
- </sd-section>
62
- <sd-section title="Khác">
63
- <sd-section-item label="Công nợ (₫)">{{ item.debt | sdFormatNumber: 0 }}</sd-section-item>
64
- <sd-section-item label="Ghi chú">{{ item.note | sdEmpty }}</sd-section-item>
65
- </sd-section>
66
- </div>
67
- `,
68
- }]
69
- }], propDecorators: { customer: [{ type: i0.Input, args: [{ isSignal: true, alias: "customer", required: true }] }] } });
70
-
71
- export { GeneralInformationViewComponent as G };
72
- //# sourceMappingURL=sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdcorejs-angular-modules-pattern-general-information-view.component-CTgHdGeQ.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/customer/components/general-information-view/general-information-view.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { SdSection, SdSectionItem } from '@sdcorejs/angular/components/section';\nimport { SdEmptyPipe, SdFormatDatePipe, SdFormatNumberPipe } from '@sdcorejs/angular/pipes';\nimport { customerTypeName, type CustomerDto } from '../../services/customer.model';\n\n/** Thông tin khách hàng dạng hàng `sd-section-item`: nhãn bên trái, giá trị bên phải. */\n@Component({\n selector: 'general-information-view',\n standalone: true,\n imports: [SdSection, SdSectionItem, SdEmptyPipe, SdFormatDatePipe, SdFormatNumberPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @let item = customer();\n <div class=\"d-flex flex-column gap-16\">\n <sd-section title=\"Thông tin chung\">\n <sd-section-item label=\"Mã khách hàng\">{{ item.code }}</sd-section-item>\n <sd-section-item label=\"Tên khách hàng\">{{ item.name }}</sd-section-item>\n <sd-section-item label=\"Loại khách hàng\">{{ typeName() }}{{ item.tier === 'vip' ? ' · VIP' : '' }}</sd-section-item>\n @if (item.type === 'business') {\n <sd-section-item label=\"Mã số thuế\">{{ item.taxCode | sdEmpty }}</sd-section-item>\n }\n <sd-section-item label=\"Ngày tạo\">{{ item.createdAt | sdFormatDate }}</sd-section-item>\n </sd-section>\n <sd-section title=\"Liên hệ\">\n <sd-section-item label=\"Email\">{{ item.email }}</sd-section-item>\n <sd-section-item label=\"Điện thoại\">{{ item.phone }}</sd-section-item>\n <sd-section-item label=\"Địa chỉ\">{{ item.address | sdEmpty }}</sd-section-item>\n </sd-section>\n <sd-section title=\"Khác\">\n <sd-section-item label=\"Công nợ (₫)\">{{ item.debt | sdFormatNumber: 0 }}</sd-section-item>\n <sd-section-item label=\"Ghi chú\">{{ item.note | sdEmpty }}</sd-section-item>\n </sd-section>\n </div>\n `,\n})\nexport class GeneralInformationViewComponent {\n readonly customer = input.required<CustomerDto>();\n protected readonly typeName = computed(() => customerTypeName(this.customer().type));\n}\n"],"names":[],"mappings":";;;;;;AAKA;MA8Ba,+BAA+B,CAAA;IACjC,QAAQ,GAAG,KAAK,CAAC,QAAQ;iFAAe;AAC9B,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC;iFAAC;uGAFzE,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA/B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA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