@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdcorejs-angular-modules-pattern-routes-CuDWVZ4I.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/customer/entity.resolver.ts","../../../projects/sdcorejs-angular/modules/pattern/features/customer/routes.ts"],"sourcesContent":["import { HttpErrorResponse } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport type { ResolveFn } from '@angular/router';\nimport { map, timeout } from 'rxjs';\nimport { CustomerService } from './services/customer.service';\nimport type { CustomerDto } from './services/customer.model';\n\n/** Tải khách hàng bằng `detail(id)` trước khi mở hồ sơ 360°; lỗi đi tới navigation error handler của host. */\nexport const entityResolver: ResolveFn<CustomerDto> = route => {\n const id = route.paramMap.get('id');\n if (!id?.trim()) throw new HttpErrorResponse({ status: 404 });\n return inject(CustomerService)\n .detail(id)\n .pipe(\n timeout(10_000),\n map(entity => {\n if (!entity || entity.id !== id) throw new HttpErrorResponse({ status: 404 });\n return entity;\n })\n );\n};\n","import type { Routes } from '@angular/router';\nimport { sdPageFormLeaveGuard } from '@sdcorejs/angular/modules/layout';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\nimport { entityResolver } from './entity.resolver';\nimport { CustomerService } from './services/customer.service';\n\n/**\n * Chi tiết, tạo và cập nhật mở trong drawer trên danh sách, không đổi URL. Hồ sơ 360° là trang, route con thay chỗ\n * danh sách; quay lại vẫn giữ bộ lọc, trang và vị trí cuộn. Guard rời trang hỏi trước khi bỏ thay đổi khi màn bị rời\n * lúc drawer còn thay đổi chưa lưu (Back của trình duyệt).\n */\nexport const routes: Routes = [\n {\n path: '',\n providers: [CustomerService],\n canActivateChild: [SdPermissionGuard],\n children: [\n {\n path: '',\n title: 'Khách hàng',\n data: { permission: 'PATTERN_CUSTOMER_R_LIST' },\n canDeactivate: [sdPageFormLeaveGuard],\n loadComponent: () => import('./pages/list/list.component').then(module => module.ListComponent),\n children: [\n {\n path: ':id/360',\n title: 'Hồ sơ khách hàng',\n data: { permission: 'PATTERN_CUSTOMER_R_DETAIL' },\n canDeactivate: [sdPageFormLeaveGuard],\n resolve: { entity: entityResolver },\n runGuardsAndResolvers: 'paramsChange',\n loadComponent: () => import('./pages/profile/profile.component').then(module => module.ProfileComponent),\n },\n ],\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;;;AAOA;AACO,MAAM,cAAc,GAA2B,KAAK,IAAG;IAC5D,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;AACnC,IAAA,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE;QAAE,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAC7D,OAAO,MAAM,CAAC,eAAe;SAC1B,MAAM,CAAC,EAAE;SACT,IAAI,CACH,OAAO,CAAC,MAAM,CAAC,EACf,GAAG,CAAC,MAAM,IAAG;AACX,QAAA,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,EAAE,KAAK,EAAE;YAAE,MAAM,IAAI,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC7E,QAAA,OAAO,MAAM;IACf,CAAC,CAAC,CACH;AACL,CAAC;;ACdD;;;;AAIG;AACI,MAAM,MAAM,GAAW;AAC5B,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,CAAC,eAAe,CAAC;QAC5B,gBAAgB,EAAE,CAAC,iBAAiB,CAAC;AACrC,QAAA,QAAQ,EAAE;AACR,YAAA;AACE,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,KAAK,EAAE,YAAY;AACnB,gBAAA,IAAI,EAAE,EAAE,UAAU,EAAE,yBAAyB,EAAE;gBAC/C,aAAa,EAAE,CAAC,oBAAoB,CAAC;AACrC,gBAAA,aAAa,EAAE,MAAM,OAAO,gEAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,aAAa,CAAC;AAC/F,gBAAA,QAAQ,EAAE;AACR,oBAAA;AACE,wBAAA,IAAI,EAAE,SAAS;AACf,wBAAA,KAAK,EAAE,kBAAkB;AACzB,wBAAA,IAAI,EAAE,EAAE,UAAU,EAAE,2BAA2B,EAAE;wBACjD,aAAa,EAAE,CAAC,oBAAoB,CAAC;AACrC,wBAAA,OAAO,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;AACnC,wBAAA,qBAAqB,EAAE,cAAc;AACrC,wBAAA,aAAa,EAAE,MAAM,OAAO,mEAAmC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,gBAAgB,CAAC;AACzG,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;;;"}
@@ -3,7 +3,7 @@ import { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';
3
3
  import { HttpErrorResponse } from '@angular/common/http';
4
4
  import { inject } from '@angular/core';
5
5
  import { timeout, map } from 'rxjs';
6
- import { P as ProductService } from './sdcorejs-angular-modules-pattern-product.service-DitXmlr1.mjs';
6
+ import { P as ProductService } from './sdcorejs-angular-modules-pattern-product.service-DEAQ4oro.mjs';
7
7
 
8
8
  /** Tải sản phẩm trước khi mở detail/update; lỗi (404, 403, timeout) đi tới navigation error handler của host. */
9
9
  const entityResolver = route => {
@@ -30,14 +30,14 @@ const routes = [
30
30
  path: '',
31
31
  title: 'Sản phẩm',
32
32
  data: { permission: 'PATTERN_PRODUCT_R_LIST' },
33
- loadComponent: () => import('./sdcorejs-angular-modules-pattern-list.component-C_pVqRcC.mjs').then(module => module.ListComponent),
33
+ loadComponent: () => import('./sdcorejs-angular-modules-pattern-list.component-DS9DROp-.mjs').then(module => module.ListComponent),
34
34
  children: [
35
35
  {
36
36
  path: 'create',
37
37
  title: 'Tạo sản phẩm',
38
38
  data: { permission: 'PATTERN_PRODUCT_C_CREATE' },
39
39
  canDeactivate: [sdPageFormLeaveGuard],
40
- loadComponent: () => import('./sdcorejs-angular-modules-pattern-create.component-CxicczH7.mjs').then(module => module.CreateComponent),
40
+ loadComponent: () => import('./sdcorejs-angular-modules-pattern-create.component-BmKRynOI.mjs').then(module => module.CreateComponent),
41
41
  },
42
42
  {
43
43
  path: ':id/detail',
@@ -54,7 +54,7 @@ const routes = [
54
54
  resolve: { entity: entityResolver },
55
55
  runGuardsAndResolvers: 'paramsChange',
56
56
  canDeactivate: [sdPageFormLeaveGuard],
57
- loadComponent: () => import('./sdcorejs-angular-modules-pattern-update.component-CS3jlV-R.mjs').then(module => module.UpdateComponent),
57
+ loadComponent: () => import('./sdcorejs-angular-modules-pattern-update.component-Cb29tp1H.mjs').then(module => module.UpdateComponent),
58
58
  },
59
59
  ],
60
60
  },
@@ -63,4 +63,4 @@ const routes = [
63
63
  ];
64
64
 
65
65
  export { routes };
66
- //# sourceMappingURL=sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs.map
66
+ //# sourceMappingURL=sdcorejs-angular-modules-pattern-routes-D8W_NHEH.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/product/entity.resolver.ts","../../../projects/sdcorejs-angular/modules/pattern/features/product/routes.ts"],"sourcesContent":["import { HttpErrorResponse } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport type { ResolveFn } from '@angular/router';\nimport { map, timeout } from 'rxjs';\nimport { ProductService } from './services/product.service';\nimport type { ProductDto } from './services/product.model';\n\n/** Tải sản phẩm trước khi mở detail/update; lỗi (404, 403, timeout) đi tới navigation error handler của host. */\nexport const entityResolver: ResolveFn<ProductDto> = route => {\n const id = route.paramMap.get('id');\n if (!id?.trim()) throw new HttpErrorResponse({ status: 404 });\n return inject(ProductService)\n .detail(id)\n .pipe(\n timeout(10_000),\n map(entity => {\n if (!entity || entity.id !== id) throw new HttpErrorResponse({ status: 404 });\n return entity;\n })\n );\n};\n","import type { Routes } from '@angular/router';\nimport { sdPageFormLeaveGuard } from '@sdcorejs/angular/modules/layout';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\nimport { entityResolver } from './entity.resolver';\nimport { ProductService } from './services/product.service';\n\n/** Detail, create và update là route con của danh sách: quay lại vẫn giữ bộ lọc, trang và vị trí cuộn. */\nexport const routes: Routes = [\n {\n path: '',\n providers: [ProductService],\n canActivateChild: [SdPermissionGuard],\n children: [\n {\n path: '',\n title: 'Sản phẩm',\n data: { permission: 'PATTERN_PRODUCT_R_LIST' },\n loadComponent: () => import('./pages/list/list.component').then(module => module.ListComponent),\n children: [\n {\n path: 'create',\n title: 'Tạo sản phẩm',\n data: { permission: 'PATTERN_PRODUCT_C_CREATE' },\n canDeactivate: [sdPageFormLeaveGuard],\n loadComponent: () => import('./pages/create/create.component').then(module => module.CreateComponent),\n },\n {\n path: ':id/detail',\n title: 'Chi tiết sản phẩm',\n data: { permission: 'PATTERN_PRODUCT_R_DETAIL' },\n resolve: { entity: entityResolver },\n runGuardsAndResolvers: 'paramsChange',\n loadComponent: () => import('./pages/detail/detail.component').then(module => module.DetailComponent),\n },\n {\n path: ':id/update',\n title: 'Cập nhật sản phẩm',\n data: { permission: 'PATTERN_PRODUCT_U_UPDATE' },\n resolve: { entity: entityResolver },\n runGuardsAndResolvers: 'paramsChange',\n canDeactivate: [sdPageFormLeaveGuard],\n loadComponent: () => import('./pages/update/update.component').then(module => module.UpdateComponent),\n },\n ],\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;;;AAOA;AACO,MAAM,cAAc,GAA0B,KAAK,IAAG;IAC3D,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ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Y;AAClB,wBAAA,KAAK,EAAE,mBAAmB;AAC1B,wBAAA,IAAI,EAAE,EAAE,UAAU,EAAE,0BAA0B,EAAE;AAChD,wBAAA,OAAO,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;AACnC,wBAAA,qBAAqB,EAAE,cAAc;AACrC,wBAAA,aAAa,EAAE,MAAM,OAAO,kEAAiC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,eAAe,CAAC;AACtG,qBAAA;AACD,oBAAA;AACE,wBAAA,IAAI,EAAE,YAAY;AAClB,wBAAA,KAAK,EAAE,mBAAmB;AAC1B,wBAAA,IAAI,EAAE,EAAE,UAAU,EAAE,0BAA0B,EAAE;AAChD,wBAAA,OAAO,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;AACnC,wBAAA,qBAAqB,EAAE,cAAc;wBACrC,aAAa,EAAE,CAAC,oBAAoB,CAAC;AACrC,wBAAA,aAAa,EAAE,MAAM,OAAO,kEAAiC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,eAAe,CAAC;AACtG,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-modules-pattern-routes-D8W_NHEH.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/product/entity.resolver.ts","../../../projects/sdcorejs-angular/modules/pattern/features/product/routes.ts"],"sourcesContent":["import { HttpErrorResponse } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport type { ResolveFn } from '@angular/router';\nimport { map, timeout } from 'rxjs';\nimport { ProductService } from './services/product.service';\nimport type { ProductDto } from './services/product.model';\n\n/** Tải sản phẩm trước khi mở detail/update; lỗi (404, 403, timeout) đi tới navigation error handler của host. */\nexport const entityResolver: ResolveFn<ProductDto> = route => {\n const id = route.paramMap.get('id');\n if (!id?.trim()) throw new HttpErrorResponse({ status: 404 });\n return inject(ProductService)\n .detail(id)\n .pipe(\n timeout(10_000),\n map(entity => {\n if (!entity || entity.id !== id) throw new HttpErrorResponse({ status: 404 });\n return entity;\n })\n );\n};\n","import type { Routes } from '@angular/router';\nimport { sdPageFormLeaveGuard } from '@sdcorejs/angular/modules/layout';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\nimport { entityResolver } from './entity.resolver';\nimport { ProductService } from './services/product.service';\n\n/** Detail, create và update là route con của danh sách: quay lại vẫn giữ bộ lọc, trang và vị trí cuộn. */\nexport const routes: Routes = [\n {\n path: '',\n providers: [ProductService],\n canActivateChild: [SdPermissionGuard],\n children: [\n {\n path: '',\n title: 'Sản phẩm',\n data: { permission: 'PATTERN_PRODUCT_R_LIST' },\n loadComponent: () => import('./pages/list/list.component').then(module => module.ListComponent),\n children: [\n {\n path: 'create',\n title: 'Tạo sản phẩm',\n data: { permission: 'PATTERN_PRODUCT_C_CREATE' },\n canDeactivate: [sdPageFormLeaveGuard],\n loadComponent: () => import('./pages/create/create.component').then(module => module.CreateComponent),\n },\n {\n path: ':id/detail',\n title: 'Chi tiết sản phẩm',\n data: { permission: 'PATTERN_PRODUCT_R_DETAIL' },\n resolve: { entity: entityResolver },\n runGuardsAndResolvers: 'paramsChange',\n loadComponent: () => import('./pages/detail/detail.component').then(module => module.DetailComponent),\n },\n {\n path: ':id/update',\n title: 'Cập nhật sản phẩm',\n data: { permission: 'PATTERN_PRODUCT_U_UPDATE' },\n resolve: { entity: entityResolver },\n runGuardsAndResolvers: 'paramsChange',\n canDeactivate: [sdPageFormLeaveGuard],\n loadComponent: () => import('./pages/update/update.component').then(module => module.UpdateComponent),\n },\n ],\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;;;AAOA;AACO,MAAM,cAAc,GAA0B,KAAK,IAAG;IAC3D,MAAM,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC;AACnC,IAAA,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE;QAAE,MAAM,IAAI,iBAAiB,CAAC,EA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AAE,EAAE,MAAM,EAAE,cAAc,EAAE;AACnC,wBAAA,qBAAqB,EAAE,cAAc;AACrC,wBAAA,aAAa,EAAE,MAAM,OAAO,kEAAiC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,eAAe,CAAC;AACtG,qBAAA;AACD,oBAAA;AACE,wBAAA,IAAI,EAAE,YAAY;AAClB,wBAAA,KAAK,EAAE,mBAAmB;AAC1B,wBAAA,IAAI,EAAE,EAAE,UAAU,EAAE,0BAA0B,EAAE;AAChD,wBAAA,OAAO,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;AACnC,wBAAA,qBAAqB,EAAE,cAAc;wBACrC,aAAa,EAAE,CAAC,oBAAoB,CAAC;AACrC,wBAAA,aAAa,EAAE,MAAM,OAAO,kEAAiC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,eAAe,CAAC;AACtG,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;;;"}
@@ -0,0 +1,66 @@
1
+ import { sdPageFormLeaveGuard } from '@sdcorejs/angular/modules/layout';
2
+ import { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';
3
+ import * as i0 from '@angular/core';
4
+ import { signal, Injectable } from '@angular/core';
5
+ import { tap } from 'rxjs';
6
+ import { B as BaseApiService } from './sdcorejs-angular-modules-pattern-base-api.service-vMdkWmw-.mjs';
7
+
8
+ class CategoryService extends BaseApiService {
9
+ #changes = signal(0, /* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "#changes" }] : /* istanbul ignore next */ []));
11
+ /** Tăng sau mỗi lần tạo, cập nhật hoặc xoá thành công: danh sách chỉ tải lại khi có thay đổi. */
12
+ changes = this.#changes.asReadonly();
13
+ /** Cả cây danh mục, các nút gốc theo thứ tự. */
14
+ tree() {
15
+ return this.http.get(this.apiUrl('categories', 'tree'));
16
+ }
17
+ detail(id) {
18
+ return this.http.get(this.apiUrl('categories', id));
19
+ }
20
+ create(req) {
21
+ return this.http.post(this.apiUrl('categories'), req).pipe(tap(() => this.#changed()));
22
+ }
23
+ update(id, req) {
24
+ return this.http.put(this.apiUrl('categories', id), req).pipe(tap(() => this.#changed()));
25
+ }
26
+ delete(id) {
27
+ return this.http.delete(this.apiUrl('categories', id)).pipe(tap(() => this.#changed()));
28
+ }
29
+ #changed() {
30
+ this.#changes.update(count => count + 1);
31
+ }
32
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CategoryService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
33
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CategoryService });
34
+ }
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: CategoryService, decorators: [{
36
+ type: Injectable
37
+ }] });
38
+
39
+ /**
40
+ * Tạo và cập nhật mở trong drawer trên bảng cây, không đổi URL. Guard rời trang hỏi trước khi bỏ thay đổi khi màn bị
41
+ * rời lúc drawer còn thay đổi chưa lưu (Back của trình duyệt).
42
+ */
43
+ const routes = [
44
+ {
45
+ path: '',
46
+ providers: [CategoryService],
47
+ canActivateChild: [SdPermissionGuard],
48
+ children: [
49
+ {
50
+ path: '',
51
+ title: 'Danh mục',
52
+ data: { permission: 'PATTERN_CATEGORY_R_LIST' },
53
+ canDeactivate: [sdPageFormLeaveGuard],
54
+ loadComponent: () => import('./sdcorejs-angular-modules-pattern-list.component-2AZxTu9a.mjs').then(module => module.ListComponent),
55
+ },
56
+ ],
57
+ },
58
+ ];
59
+
60
+ var routes$1 = /*#__PURE__*/Object.freeze({
61
+ __proto__: null,
62
+ routes: routes
63
+ });
64
+
65
+ export { CategoryService as C, routes$1 as r };
66
+ //# sourceMappingURL=sdcorejs-angular-modules-pattern-routes-Db0ceW1C.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdcorejs-angular-modules-pattern-routes-Db0ceW1C.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/category/services/category.service.ts","../../../projects/sdcorejs-angular/modules/pattern/features/category/routes.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { tap, type Observable } from 'rxjs';\nimport { BaseApiService } from '../../../services/base-api.service';\nimport type { CategoryDto, CategoryNodeDto, CategorySaveReq } from './category.model';\n\n@Injectable()\nexport class CategoryService extends BaseApiService {\n readonly #changes = signal(0);\n /** Tăng sau mỗi lần tạo, cập nhật hoặc xoá thành công: danh sách chỉ tải lại khi có thay đổi. */\n readonly changes = this.#changes.asReadonly();\n\n /** Cả cây danh mục, các nút gốc theo thứ tự. */\n tree(): Observable<CategoryNodeDto[]> {\n return this.http.get<CategoryNodeDto[]>(this.apiUrl('categories', 'tree'));\n }\n\n detail(id: string): Observable<CategoryDto> {\n return this.http.get<CategoryDto>(this.apiUrl('categories', id));\n }\n\n create(req: CategorySaveReq): Observable<CategoryDto> {\n return this.http.post<CategoryDto>(this.apiUrl('categories'), req).pipe(tap(() => this.#changed()));\n }\n\n update(id: string, req: CategorySaveReq): Observable<CategoryDto> {\n return this.http.put<CategoryDto>(this.apiUrl('categories', id), req).pipe(tap(() => this.#changed()));\n }\n\n delete(id: string): Observable<void> {\n return this.http.delete<void>(this.apiUrl('categories', id)).pipe(tap(() => this.#changed()));\n }\n\n #changed(): void {\n this.#changes.update(count => count + 1);\n }\n}\n","import type { Routes } from '@angular/router';\nimport { sdPageFormLeaveGuard } from '@sdcorejs/angular/modules/layout';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\nimport { CategoryService } from './services/category.service';\n\n/**\n * Tạo và cập nhật mở trong drawer trên bảng cây, không đổi URL. Guard rời trang hỏi trước khi bỏ thay đổi khi màn bị\n * rời lúc drawer còn thay đổi chưa lưu (Back của trình duyệt).\n */\nexport const routes: Routes = [\n {\n path: '',\n providers: [CategoryService],\n canActivateChild: [SdPermissionGuard],\n children: [\n {\n path: '',\n title: 'Danh mục',\n data: { permission: 'PATTERN_CATEGORY_R_LIST' },\n canDeactivate: [sdPageFormLeaveGuard],\n loadComponent: () => import('./pages/list/list.component').then(module => module.ListComponent),\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;;;AAMM,MAAO,eAAgB,SAAQ,cAAc,CAAA;IACxC,QAAQ,GAAG,MAAM,CAAC,CAAC;iFAAC;;AAEpB,IAAA,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;;IAG7C,IAAI,GAAA;AACF,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAoB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC5E;AAEA,IAAA,MAAM,CAAC,EAAU,EAAA;AACf,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAClE;AAEA,IAAA,MAAM,CAAC,GAAoB,EAAA;AACzB,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAc,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrG;IAEA,MAAM,CAAC,EAAU,EAAE,GAAoB,EAAA;AACrC,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACxG;AAEA,IAAA,MAAM,CAAC,EAAU,EAAA;AACf,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAO,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/F;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC;IAC1C;uGA5BW,eAAe,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAf,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B;;;ACAD;;;AAGG;AACI,MAAM,MAAM,GAAW;AAC5B,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,CAAC,eAAe,CAAC;QAC5B,gBAAgB,EAAE,CAAC,iBAAiB,CAAC;AACrC,QAAA,QAAQ,EAAE;AACR,YAAA;AACE,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,KAAK,EAAE,UAAU;AACjB,gBAAA,IAAI,EAAE,EAAE,UAAU,EAAE,yBAAyB,EAAE;gBAC/C,aAAa,EAAE,CAAC,oBAAoB,CAAC;AACrC,gBAAA,aAAa,EAAE,MAAM,OAAO,gEAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,aAAa,CAAC;AAChG,aAAA;AACF,SAAA;AACF,KAAA;CACF;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Injectable } from '@angular/core';
4
- import { B as BaseApiService } from './sdcorejs-angular-modules-pattern-base-api.service-C2o5xPVB.mjs';
4
+ import { B as BaseApiService } from './sdcorejs-angular-modules-pattern-base-api.service-vMdkWmw-.mjs';
5
5
 
6
6
  /** Nhập sản phẩm theo lô: API phân loại từng dòng trước, rồi ghi theo cách xử lý dòng trùng. */
7
7
  class ImportService extends BaseApiService {
@@ -28,7 +28,7 @@ const routes = [
28
28
  path: '',
29
29
  title: 'Nhập dữ liệu sản phẩm',
30
30
  data: { permission: 'PATTERN_IMPORT_C_IMPORT' },
31
- loadComponent: () => import('./sdcorejs-angular-modules-pattern-flow.component-G5lHfG81.mjs').then(module => module.FlowComponent),
31
+ loadComponent: () => import('./sdcorejs-angular-modules-pattern-flow.component-BarNCjsh.mjs').then(module => module.FlowComponent),
32
32
  },
33
33
  ],
34
34
  },
@@ -40,4 +40,4 @@ var routes$1 = /*#__PURE__*/Object.freeze({
40
40
  });
41
41
 
42
42
  export { ImportService as I, routes$1 as r };
43
- //# sourceMappingURL=sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs.map
43
+ //# sourceMappingURL=sdcorejs-angular-modules-pattern-routes-DdmOGRpF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/import/services/import.service.ts","../../../projects/sdcorejs-angular/modules/pattern/features/import/routes.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport type { Observable } from 'rxjs';\nimport { BaseApiService } from '../../../services/base-api.service';\nimport type { ImportCommitRes, ImportDuplicatePolicy, ImportPreviewRowDto } from './import.model';\n\ntype ImportRowReq = Readonly<Record<'code' | 'name' | 'unit' | 'price', string>>;\n\n/** Nhập sản phẩm theo lô: API phân loại từng dòng trước, rồi ghi theo cách xử lý dòng trùng. */\n@Injectable()\nexport class ImportService extends BaseApiService {\n preview(rows: readonly ImportRowReq[]): Observable<{ rows: ImportPreviewRowDto[] }> {\n return this.http.post<{ rows: ImportPreviewRowDto[] }>(this.apiUrl('products', 'import', 'preview'), { rows });\n }\n\n commit(rows: readonly ImportRowReq[], duplicates: ImportDuplicatePolicy): Observable<ImportCommitRes> {\n return this.http.post<ImportCommitRes>(this.apiUrl('products', 'import'), { rows, duplicates });\n }\n}\n","import type { Routes } from '@angular/router';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\nimport { ImportService } from './services/import.service';\n\nexport const routes: Routes = [\n {\n path: '',\n providers: [ImportService],\n canActivateChild: [SdPermissionGuard],\n children: [\n {\n path: '',\n title: 'Nhập dữ liệu sản phẩm',\n data: { permission: 'PATTERN_IMPORT_C_IMPORT' },\n loadComponent: () => import('./pages/flow/flow.component').then(module => module.FlowComponent),\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;AAOA;AAEM,MAAO,aAAc,SAAQ,cAAc,CAAA;AAC/C,IAAA,OAAO,CAAC,IAA6B,EAAA;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;IAChH;IAEA,MAAM,CAAC,IAA6B,EAAE,UAAiC,EAAA;QACrE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IACjG;uGAPW,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAb,aAAa,EAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB;;;ACJM,MAAM,MAAM,GAAW;AAC5B,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,CAAC,aAAa,CAAC;QAC1B,gBAAgB,EAAE,CAAC,iBAAiB,CAAC;AACrC,QAAA,QAAQ,EAAE;AACR,YAAA;AACE,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,KAAK,EAAE,uBAAuB;AAC9B,gBAAA,IAAI,EAAE,EAAE,UAAU,EAAE,yBAAyB,EAAE;AAC/C,gBAAA,aAAa,EAAE,MAAM,OAAO,gEAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,aAAa,CAAC;AAChG,aAAA;AACF,SAAA;AACF,KAAA;CACF;;;;;;;"}
1
+ {"version":3,"file":"sdcorejs-angular-modules-pattern-routes-DdmOGRpF.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/features/import/services/import.service.ts","../../../projects/sdcorejs-angular/modules/pattern/features/import/routes.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport type { Observable } from 'rxjs';\nimport { BaseApiService } from '../../../services/base-api.service';\nimport type { ImportCommitRes, ImportDuplicatePolicy, ImportPreviewRowDto } from './import.model';\n\ntype ImportRowReq = Readonly<Record<'code' | 'name' | 'unit' | 'price', string>>;\n\n/** Nhập sản phẩm theo lô: API phân loại từng dòng trước, rồi ghi theo cách xử lý dòng trùng. */\n@Injectable()\nexport class ImportService extends BaseApiService {\n preview(rows: readonly ImportRowReq[]): Observable<{ rows: ImportPreviewRowDto[] }> {\n return this.http.post<{ rows: ImportPreviewRowDto[] }>(this.apiUrl('products', 'import', 'preview'), { rows });\n }\n\n commit(rows: readonly ImportRowReq[], duplicates: ImportDuplicatePolicy): Observable<ImportCommitRes> {\n return this.http.post<ImportCommitRes>(this.apiUrl('products', 'import'), { rows, duplicates });\n }\n}\n","import type { Routes } from '@angular/router';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\nimport { ImportService } from './services/import.service';\n\nexport const routes: Routes = [\n {\n path: '',\n providers: [ImportService],\n canActivateChild: [SdPermissionGuard],\n children: [\n {\n path: '',\n title: 'Nhập dữ liệu sản phẩm',\n data: { permission: 'PATTERN_IMPORT_C_IMPORT' },\n loadComponent: () => import('./pages/flow/flow.component').then(module => module.FlowComponent),\n },\n ],\n },\n];\n"],"names":[],"mappings":";;;;;AAOA;AAEM,MAAO,aAAc,SAAQ,cAAc,CAAA;AAC/C,IAAA,OAAO,CAAC,IAA6B,EAAA;QACnC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;IAChH;IAEA,MAAM,CAAC,IAA6B,EAAE,UAAiC,EAAA;QACrE,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkB,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IACjG;uGAPW,aAAa,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAb,aAAa,EAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBADzB;;;ACJM,MAAM,MAAM,GAAW;AAC5B,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;QACR,SAAS,EAAE,CAAC,aAAa,CAAC;QAC1B,gBAAgB,EAAE,CAAC,iBAAiB,CAAC;AACrC,QAAA,QAAQ,EAAE;AACR,YAAA;AACE,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,KAAK,EAAE,uBAAuB;AAC9B,gBAAA,IAAI,EAAE,EAAE,UAAU,EAAE,yBAAyB,EAAE;AAC/C,gBAAA,aAAa,EAAE,MAAM,OAAO,gEAA6B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,aAAa,CAAC;AAChG,aAAA;AACF,SAAA;AACF,KAAA;CACF;;;;;;;"}
@@ -14,22 +14,22 @@ const SD_PATTERN_ROUTES = [
14
14
  path: '',
15
15
  // Loads the permissions of the sample role before any pattern screen opens.
16
16
  canActivate: [SdPermissionGuard],
17
- loadComponent: () => import('./sdcorejs-angular-modules-pattern-shell.component-BOjJteMd.mjs').then(module => module.PatternShellComponent),
17
+ loadComponent: () => import('./sdcorejs-angular-modules-pattern-shell.component-DMJpUhpn.mjs').then(module => module.PatternShellComponent),
18
18
  children: [
19
19
  {
20
20
  path: '',
21
21
  pathMatch: 'full',
22
22
  title: 'Pattern',
23
- loadComponent: () => import('./sdcorejs-angular-modules-pattern-index.component-CosbQK0W.mjs').then(module => module.PatternIndexComponent),
23
+ loadComponent: () => import('./sdcorejs-angular-modules-pattern-index.component--rIi-QIQ.mjs').then(module => module.PatternIndexComponent),
24
24
  },
25
- { path: 'product', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs').then(module => module.routes) },
26
- { path: 'customer', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-BWZxOMhB.mjs').then(module => module.routes) },
27
- { path: 'order', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-w4VY9P_H.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
28
- { path: 'approval', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-BxXgJVsW.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
29
- { path: 'category', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-CophQH_L.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
30
- { path: 'import', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
31
- { path: 'partner', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-BOiWZHqg.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
32
- { path: 'settings', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-CWixJ2If.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
25
+ { path: 'product', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-D8W_NHEH.mjs').then(module => module.routes) },
26
+ { path: 'customer', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-CuDWVZ4I.mjs').then(module => module.routes) },
27
+ { path: 'order', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-CWCtuZ4z.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
28
+ { path: 'approval', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-Brr61WQo.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
29
+ { path: 'category', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-Db0ceW1C.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
30
+ { path: 'import', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-DdmOGRpF.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
31
+ { path: 'partner', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-CfXmYmCp.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
32
+ { path: 'settings', loadChildren: () => import('./sdcorejs-angular-modules-pattern-routes-CPVcXcfq.mjs').then(function (n) { return n.r; }).then(module => module.routes) },
33
33
  ],
34
34
  },
35
35
  ];
@@ -120,7 +120,7 @@ class PatternMockApiState {
120
120
  }
121
121
  /** The backend, loaded on the first request so the seeds stay out of the host's bundle. */
122
122
  backend() {
123
- this.#backend ??= import('./sdcorejs-angular-modules-pattern-mock-backend.factory-CFljqhjv.mjs').then(module => module.createPatternMockBackend(this.#configuration.storage));
123
+ this.#backend ??= import('./sdcorejs-angular-modules-pattern-mock-backend.factory-BpECki9p.mjs').then(module => module.createPatternMockBackend(this.#configuration.storage));
124
124
  return this.#backend;
125
125
  }
126
126
  /** Throws away created, updated and deleted records. */
@@ -410,4 +410,4 @@ function normalizeBaseUrl(raw) {
410
410
  */
411
411
 
412
412
  export { PatternRoleStore as P, SD_PATTERN_CONFIGURATION as S, PatternMockApiState as a, PATTERN_ROLES as b, PatternMockError as c, PatternSettingsStore as d, SD_PATTERN_ROUTES as e, provideSdPatterns as p, readSessionValue as r, writeSessionValue as w };
413
- //# sourceMappingURL=sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs.map
413
+ //# sourceMappingURL=sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-JWx3RaLo.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/routes.ts","../../../projects/sdcorejs-angular/modules/pattern/configurations/pattern.configuration.ts","../../../projects/sdcorejs-angular/modules/pattern/core/session-state.ts","../../../projects/sdcorejs-angular/modules/pattern/core/mock-api/mock-api.model.ts","../../../projects/sdcorejs-angular/modules/pattern/core/mock-api/mock-api.state.ts","../../../projects/sdcorejs-angular/modules/pattern/core/mock-api/mock-api.interceptor.ts","../../../projects/sdcorejs-angular/modules/pattern/core/permission/pattern-permission.ts","../../../projects/sdcorejs-angular/modules/pattern/core/permission/pattern-role.store.ts","../../../projects/sdcorejs-angular/modules/pattern/core/pattern-shell/settings/pattern-settings.store.ts","../../../projects/sdcorejs-angular/modules/pattern/configurations/provide-sd-patterns.ts","../../../projects/sdcorejs-angular/modules/pattern/sdcorejs-angular-modules-pattern.ts"],"sourcesContent":["import type { Routes } from '@angular/router';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\n\n/**\n * Routes of `/pattern`. Mount them with `provideSdPatterns()` in the providers of the same route:\n * the guard below is the route-level `SdPermissionGuard` of the sample roles, not the host's.\n */\nexport const SD_PATTERN_ROUTES: Routes = [\n {\n path: '',\n // Loads the permissions of the sample role before any pattern screen opens.\n canActivate: [SdPermissionGuard],\n loadComponent: () => import('./core/pattern-shell/shell/shell.component').then(module => module.PatternShellComponent),\n children: [\n {\n path: '',\n pathMatch: 'full',\n title: 'Pattern',\n loadComponent: () => import('./core/pattern-shell/index/index.component').then(module => module.PatternIndexComponent),\n },\n { path: 'product', loadChildren: () => import('./features/product/routes').then(module => module.routes) },\n { path: 'customer', loadChildren: () => import('./features/customer/routes').then(module => module.routes) },\n { path: 'order', loadChildren: () => import('./features/order/routes').then(module => module.routes) },\n { path: 'approval', loadChildren: () => import('./features/approval/routes').then(module => module.routes) },\n { path: 'category', loadChildren: () => import('./features/category/routes').then(module => module.routes) },\n { path: 'import', loadChildren: () => import('./features/import/routes').then(module => module.routes) },\n { path: 'partner', loadChildren: () => import('./features/partner/routes').then(module => module.routes) },\n { path: 'settings', loadChildren: () => import('./features/settings/routes').then(module => module.routes) },\n ],\n },\n];\n","import { InjectionToken } from '@angular/core';\n\n/** What the host configures when it mounts the pattern routes with `provideSdPatterns()`. */\nexport interface SdPatternConfiguration {\n /**\n * Answer `apiBaseUrl` requests from the built-in mock API (seeded data, latency, simulated errors).\n * `false`: the feature services call a real API at `apiBaseUrl`. Default `true`.\n */\n readonly mockApi?: boolean;\n /** Base URL of the pattern API, root-relative or absolute HTTP(S), no query or hash. Default `'/pattern-api'`. */\n readonly apiBaseUrl?: string;\n /** Latency of every mock response in milliseconds; the toolbar can change it. Default `400`. */\n readonly latencyMs?: number;\n /** Where the mock API keeps created, updated and deleted records. Default `'session'` (sessionStorage). */\n readonly storage?: 'session' | 'none';\n /**\n * Host URL to open when a role has no permission for a pattern route (Core `onForbiden`).\n * Unset: the navigation is only blocked. Errors while loading a record (404, timeout) reach the host's\n * navigation error handler instead, like any other route.\n */\n readonly forbiddenUrl?: string;\n}\n\n/** Resolved values; internal to the module, the host uses `provideSdPatterns()`. */\nexport interface SdPatternResolvedConfiguration {\n readonly mockApi: boolean;\n readonly apiBaseUrl: string;\n readonly latencyMs: number;\n readonly storage: 'session' | 'none';\n readonly forbiddenUrl: string | null;\n}\n\nexport const SD_PATTERN_CONFIGURATION = new InjectionToken<SdPatternResolvedConfiguration>('SD_PATTERN_CONFIGURATION');\n","/** Reads a JSON value the pattern shell kept in sessionStorage; any failure (no storage, bad JSON) gives `fallback`. */\nexport function readSessionValue<T>(key: string, fallback: T): T {\n try {\n const raw = globalThis.sessionStorage?.getItem(key);\n return raw ? (JSON.parse(raw) as T) : fallback;\n } catch {\n return fallback;\n }\n}\n\n/** Writes a JSON value to sessionStorage; `undefined` removes it. Storage errors (private mode, quota) are ignored. */\nexport function writeSessionValue(key: string, value: unknown): void {\n try {\n if (value === undefined) globalThis.sessionStorage?.removeItem(key);\n else globalThis.sessionStorage?.setItem(key, JSON.stringify(value));\n } catch {\n // why: the shell state is a convenience; the pattern screens work the same without it.\n }\n}\n","import type { MatchOptions } from '@sdcorejs/utils/models';\n\n/** Error body of the mock API: a message and, for validation errors, one entry per field. */\nexport interface PatternMockErrorBody {\n readonly message: string;\n readonly errors?: readonly { readonly field: string; readonly message: string }[];\n}\n\n/** Thrown by a resource handler; the interceptor turns it into an `HttpErrorResponse`. */\nexport class PatternMockError extends Error {\n constructor(\n readonly status: number,\n readonly body: PatternMockErrorBody\n ) {\n super(body.message);\n }\n}\n\nexport interface PatternMockRecord {\n readonly id: string;\n}\n\n/** Everything a resource handler can read or change. */\nexport interface PatternMockContext {\n /** Records of another resource, for relations (an order reads its customer). */\n readonly collection: <R extends PatternMockRecord>(name: string) => readonly R[];\n /** Replaces the records of a resource and persists them. */\n readonly save: <R extends PatternMockRecord>(name: string, records: readonly R[]) => void;\n /** Next free numeric id of a resource. */\n readonly nextId: (name: string) => string;\n readonly now: () => Date;\n}\n\n/** Answer of a custom endpoint. */\nexport interface PatternMockResult {\n readonly status?: number;\n readonly body: unknown;\n}\n\n/** One collection of the mock API, served under `<apiBaseUrl>/<name>`. */\nexport interface PatternMockResource<T extends PatternMockRecord = PatternMockRecord> {\n /** URL segment, plural as in the blueprint: `products`, `orders`. */\n readonly name: string;\n /** Deterministic seed: the same records every time, so e2e can rely on them. */\n readonly seed: () => T[];\n /** Field types for `FilterUtilities.match`, required for dates stored as ISO strings. */\n readonly fieldTypes?: MatchOptions<T>['fieldTypes'];\n /** Builds a new record from a POST body; throws `PatternMockError` on invalid input. */\n readonly create?: (body: Record<string, unknown>, records: readonly T[], context: PatternMockContext) => T;\n /** Builds the updated record from a PUT body. */\n readonly update?: (current: T, body: Record<string, unknown>, records: readonly T[], context: PatternMockContext) => T;\n /** Refuses a delete with `PatternMockError` (409 when other records still use it). */\n readonly beforeDelete?: (current: T, context: PatternMockContext) => void;\n /** `POST <name>/:id/<action>` and `POST <name>/bulk/<action>`: returns the changed record. */\n readonly actions?: Readonly<Record<string, (current: T, body: Record<string, unknown>, context: PatternMockContext) => T>>;\n /** Other endpoints under `<name>/…` (searches, sub-collections); `undefined` falls through to CRUD. */\n readonly route?: (\n method: string,\n segments: readonly string[],\n query: PatternMockQuery,\n body: Record<string, unknown>,\n context: PatternMockContext\n ) => PatternMockResult | undefined;\n}\n\n/** Query string of a request, as `HttpParams` reads it. */\nexport interface PatternMockQuery {\n get(name: string): string | null;\n}\n\n/** Response of one bulk item: `POST <name>/bulk/<action>` answers every id, success or not. */\nexport interface PatternBulkItemResult {\n readonly id: string;\n readonly ok: boolean;\n readonly message?: string;\n}\n","import { HttpErrorResponse, HttpResponse, type HttpEvent, type HttpRequest } from '@angular/common/http';\nimport { inject, Injectable, signal } from '@angular/core';\nimport { defer, map, NEVER, switchMap, throwError, timer, type Observable } from 'rxjs';\nimport { SD_PATTERN_CONFIGURATION } from '../../configurations/pattern.configuration';\nimport { readSessionValue, writeSessionValue } from '../session-state';\nimport { PatternMockError, type PatternMockErrorBody } from './mock-api.model';\nimport type { PatternMockBackend } from './mock-backend';\n\n/** Error the toolbar makes every mock request return. */\nexport type PatternMockFailure = 'none' | '500' | 'timeout' | '404' | '403';\n\n/** Read state a screen setting forces on the list request of one resource (doc 08 \"Dữ liệu và trạng thái\"). */\nexport interface PatternMockReadOverride {\n /** Serve only the first `limit` records of the collection. */\n readonly limit?: number;\n /** `loading`: never answer; `error`: answer 500. */\n readonly mode?: 'normal' | 'loading' | 'error';\n}\n\n/** How long a simulated timeout waits before the request fails. */\nexport const PATTERN_MOCK_TIMEOUT_MS = 3000;\n\nconst STATE_KEY = 'sd-pattern.mock-api';\n\nconst STATUS_TEXT: Readonly<Record<number, string>> = {\n 0: 'Unknown Error',\n 400: 'Bad Request',\n 403: 'Forbidden',\n 404: 'Not Found',\n 405: 'Method Not Allowed',\n 409: 'Conflict',\n 500: 'Internal Server Error',\n};\n\nconst FAILURES: Readonly<Record<Exclude<PatternMockFailure, 'none' | 'timeout'>, PatternMockError>> = {\n '500': new PatternMockError(500, { message: 'Máy chủ gặp lỗi (mô phỏng 500).' }),\n '404': new PatternMockError(404, { message: 'Không tìm thấy bản ghi (mô phỏng 404).' }),\n '403': new PatternMockError(403, { message: 'Không có quyền thao tác (mô phỏng 403).' }),\n};\n\n/**\n * Toolbar state of the mock API (latency, simulated error, per-resource read overrides) and the lazily\n * created backend. Provided at the `/pattern` route by `provideSdPatterns()` when `mockApi` is on.\n */\n@Injectable()\nexport class PatternMockApiState {\n readonly #configuration = inject(SD_PATTERN_CONFIGURATION);\n readonly #stored = readSessionValue<{ latencyMs?: number; failure?: PatternMockFailure }>(STATE_KEY, {});\n readonly #latencyMs = signal(this.#stored.latencyMs ?? this.#configuration.latencyMs);\n readonly #failure = signal<PatternMockFailure>(this.#stored.failure ?? 'none');\n readonly #reads = signal<Readonly<Record<string, PatternMockReadOverride>>>({});\n #backend?: Promise<PatternMockBackend>;\n\n readonly latencyMs = this.#latencyMs.asReadonly();\n readonly failure = this.#failure.asReadonly();\n\n setLatency(latencyMs: number): void {\n this.#latencyMs.set(Math.max(0, latencyMs));\n this.#persist();\n }\n\n setFailure(failure: PatternMockFailure): void {\n this.#failure.set(failure);\n this.#persist();\n }\n\n /** Forces the list request of `resource`; `undefined` removes the override. */\n setReadOverride(resource: string, override: PatternMockReadOverride | undefined): void {\n this.#reads.update(reads => {\n const { [resource]: _previous, ...others } = reads;\n return override ? { ...others, [resource]: override } : others;\n });\n }\n\n /** The backend, loaded on the first request so the seeds stay out of the host's bundle. */\n backend(): Promise<PatternMockBackend> {\n this.#backend ??= import('./mock-backend.factory').then(module => module.createPatternMockBackend(this.#configuration.storage));\n return this.#backend;\n }\n\n /** Throws away created, updated and deleted records. */\n async resetData(): Promise<void> {\n (await this.backend()).reset();\n }\n\n /** Answers a request whose URL is under `apiBaseUrl`; `segments` is the path after it. */\n respond(request: HttpRequest<unknown>, segments: readonly string[]): Observable<HttpEvent<unknown>> {\n const failure = this.#failure();\n const read = request.method === 'GET' && segments.length === 1 ? this.#reads()[segments[0]] : undefined;\n if (read?.mode === 'loading') return NEVER;\n if (failure === 'timeout') {\n return timer(PATTERN_MOCK_TIMEOUT_MS).pipe(\n switchMap(() => throwError(() => this.#error(request, 0, { message: 'Hết thời gian chờ (mô phỏng).' })))\n );\n }\n return timer(this.#latencyMs()).pipe(\n switchMap(() => defer(() => this.backend())),\n map(backend => {\n const simulated = read?.mode === 'error' ? FAILURES['500'] : failure === 'none' ? undefined : FAILURES[failure];\n try {\n if (simulated) throw simulated;\n const result = backend.handle(request.method, segments, request.params, request.body, read?.limit);\n return new HttpResponse({ status: result.status ?? 200, statusText: 'OK', body: result.body, url: request.urlWithParams });\n } catch (error) {\n if (error instanceof PatternMockError) throw this.#error(request, error.status, error.body);\n throw error;\n }\n })\n );\n }\n\n #error(request: HttpRequest<unknown>, status: number, body: PatternMockErrorBody): HttpErrorResponse {\n return new HttpErrorResponse({ status, statusText: STATUS_TEXT[status] ?? 'Error', error: body, url: request.urlWithParams });\n }\n\n #persist(): void {\n writeSessionValue(STATE_KEY, { latencyMs: this.#latencyMs(), failure: this.#failure() });\n }\n}\n","import type { HttpInterceptorFn } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { SD_PATTERN_CONFIGURATION } from '../../configurations/pattern.configuration';\nimport { PatternMockApiState } from './mock-api.state';\n\n/** Path segments of `url` under `baseUrl`, or `null` when the request is not for the pattern API. */\nexport function patternApiSegments(url: string, baseUrl: string): string[] | null {\n const path = url.split(/[?#]/)[0];\n const base = baseUrl.replace(/\\/+$/, '');\n if (path !== base && !path.startsWith(base + '/')) return null;\n return path\n .slice(base.length)\n .split('/')\n .filter(segment => segment.length > 0)\n .map(segment => decodeURIComponent(segment));\n}\n\n/**\n * Answers requests under `apiBaseUrl` from the mock API and passes every other request on.\n * Registered by `provideSdPatterns()` on the HttpClient of the `/pattern` route only.\n */\nexport const patternMockApiInterceptor: HttpInterceptorFn = (request, next) => {\n const segments = patternApiSegments(request.url, inject(SD_PATTERN_CONFIGURATION).apiBaseUrl);\n return segments ? inject(PatternMockApiState).respond(request, segments) : next(request);\n};\n","/**\n * Permission codes of the pattern screens: `PATTERN_<ENTITY>_<R|C|U|D>_<ACTION>`.\n * R reads, C creates, U changes a record (update and every status action), D deletes.\n * Features write the code itself in `data.permission` and `*sdPermission`; this list only feeds the sample roles.\n */\nexport const PATTERN_PERMISSION_CODES = [\n 'PATTERN_PRODUCT_R_LIST',\n 'PATTERN_PRODUCT_R_DETAIL',\n 'PATTERN_PRODUCT_C_CREATE',\n 'PATTERN_PRODUCT_U_UPDATE',\n 'PATTERN_PRODUCT_C_IMPORT',\n 'PATTERN_PRODUCT_R_EXPORT',\n 'PATTERN_PRODUCT_R_MENU',\n 'PATTERN_CUSTOMER_R_LIST',\n 'PATTERN_CUSTOMER_R_DETAIL',\n 'PATTERN_CUSTOMER_C_CREATE',\n 'PATTERN_CUSTOMER_U_UPDATE',\n 'PATTERN_CUSTOMER_D_DELETE',\n 'PATTERN_ORDER_R_LIST',\n 'PATTERN_ORDER_R_DETAIL',\n 'PATTERN_ORDER_C_CREATE',\n 'PATTERN_ORDER_U_UPDATE',\n 'PATTERN_ORDER_U_SUBMIT',\n 'PATTERN_ORDER_U_APPROVE',\n 'PATTERN_ORDER_U_REJECT',\n 'PATTERN_ORDER_U_CONFIRM',\n 'PATTERN_ORDER_U_CANCEL',\n 'PATTERN_ORDER_R_PRINT',\n 'PATTERN_ORDER_R_EXPORT',\n 'PATTERN_APPROVAL_R_LIST',\n 'PATTERN_APPROVAL_R_DETAIL',\n 'PATTERN_APPROVAL_U_APPROVE',\n 'PATTERN_APPROVAL_U_REJECT',\n 'PATTERN_CATEGORY_R_LIST',\n 'PATTERN_CATEGORY_C_CREATE',\n 'PATTERN_CATEGORY_U_UPDATE',\n 'PATTERN_CATEGORY_D_DELETE',\n 'PATTERN_IMPORT_C_IMPORT',\n 'PATTERN_PARTNER_C_CREATE',\n 'PATTERN_SETTINGS_R_DETAIL',\n 'PATTERN_SETTINGS_U_UPDATE',\n] as const;\n\nexport type PatternPermissionCode = (typeof PATTERN_PERMISSION_CODES)[number];\n\nexport type PatternRole = 'admin' | 'staff' | 'viewer';\n\nexport const PATTERN_ROLES: readonly { readonly value: PatternRole; readonly label: string; readonly description: string }[] = [\n { value: 'admin', label: 'Quản trị', description: 'Toàn quyền' },\n { value: 'staff', label: 'Nhân viên', description: 'Không xoá, không duyệt' },\n { value: 'viewer', label: 'Chỉ xem', description: 'Chỉ xem danh sách và chi tiết' },\n];\n\nconst DECISIONS = /_U_(APPROVE|REJECT)$/;\n\n/** The permission codes a sample role holds. */\nexport function patternPermissionsOf(role: PatternRole): string[] {\n switch (role) {\n case 'admin':\n return [...PATTERN_PERMISSION_CODES];\n case 'staff':\n return PATTERN_PERMISSION_CODES.filter(code => !code.includes('_D_') && !DECISIONS.test(code));\n case 'viewer':\n return PATTERN_PERMISSION_CODES.filter(code => code.includes('_R_'));\n }\n}\n","import { Injectable, signal } from '@angular/core';\nimport { readSessionValue, writeSessionValue } from '../session-state';\nimport { PATTERN_ROLES, type PatternRole } from './pattern-permission';\n\nconst ROLE_KEY = 'sd-pattern.role';\n\nconst readRole = (): PatternRole => {\n const stored = readSessionValue<string>(ROLE_KEY, 'admin');\n return PATTERN_ROLES.some(role => role.value === stored) ? (stored as PatternRole) : 'admin';\n};\n\n/**\n * Sample role of the pattern screens, kept for the browser tab. Provided at the `/pattern` route by\n * `provideSdPatterns()`; the permission configuration of that route reads it, so it depends on nothing.\n */\n@Injectable()\nexport class PatternRoleStore {\n readonly #role = signal<PatternRole>(readRole());\n readonly role = this.#role.asReadonly();\n\n set(role: PatternRole): void {\n this.#role.set(role);\n writeSessionValue(ROLE_KEY, role);\n }\n}\n","import { computed, inject, Injectable, signal } from '@angular/core';\nimport { PatternMockApiState } from '../../mock-api/mock-api.state';\nimport { readSessionValue, writeSessionValue } from '../../session-state';\n\n/** Settings of `/pattern/order` (doc 08 \"Tuỳ chỉnh hiển thị\"): the parts of `sd-page-list` + `sd-table` to show. */\nexport interface PatternOrderSettings {\n /** Status tabs in `sdSubheader`. */\n readonly tabs: boolean;\n /** Score cards above the table. */\n readonly score: boolean;\n /** `filter.quickSearch`. */\n readonly quickSearch: boolean;\n /** \"Kho xuất\" dropdown of the quick search (`quickSearch.filters`). */\n readonly warehouse: boolean;\n /** Filter row under the columns (`hideInlineFilter: false`). */\n readonly inlineFilter: boolean;\n /** `hideInlineFilter: 'auto'`: hide the filter row while there are at most 10 rows. */\n readonly autoHide: boolean;\n /** `filter.externalFilters`. */\n readonly externalFilter: boolean;\n /** External filter collapsed at first (`filter.externalFilterCollapsed`). */\n readonly externalFilterCollapsed: boolean;\n /** `filter.manualFilter`. */\n readonly manualFilter: boolean;\n /** `filter.externalFilterPerRow`. */\n readonly externalFilterPerRow: 6 | 4;\n /** `selector.visible`. */\n readonly selector: boolean;\n /** `reload.visible`, `export`, `config.visible`. */\n readonly footerButtons: boolean;\n /** Records the mock API serves (the first N of the seed). */\n readonly records: 0 | 3 | 20 | 128;\n /** `paginate.pageSize`. */\n readonly pageSize: 10 | 20 | 50;\n /** Read state the mock API forces on the list request. */\n readonly read: 'normal' | 'loading' | 'error';\n /** `sd-page-list` `autoCompact`. */\n readonly autoCompact: boolean;\n /** `sd-page-list` `detail`. */\n readonly detail: 'drawer' | 'page';\n}\n\nexport const PATTERN_ORDER_SETTINGS_DEFAULTS: PatternOrderSettings = {\n tabs: false,\n score: false,\n quickSearch: true,\n warehouse: true,\n inlineFilter: true,\n autoHide: false,\n externalFilter: false,\n externalFilterCollapsed: false,\n manualFilter: false,\n externalFilterPerRow: 6,\n selector: false,\n footerButtons: true,\n records: 128,\n pageSize: 20,\n read: 'normal',\n autoCompact: true,\n detail: 'drawer',\n};\n\nconst STORAGE_KEY = 'sd-pattern.order.settings';\n\n/** `?cfg=<json>` of the page URL, so a link (or an e2e test) opens the screen with given settings. */\nfunction fromUrl(): Partial<PatternOrderSettings> {\n try {\n const raw = new URLSearchParams(globalThis.location?.search ?? '').get('cfg');\n return raw ? (JSON.parse(raw) as Partial<PatternOrderSettings>) : {};\n } catch {\n return {};\n }\n}\n\n/**\n * State of the \"Tuỳ chỉnh hiển thị\" drawer, kept for the browser tab. Only `/pattern` has it: the order list reads it\n * to build its table option, the way a real screen would hard-code one choice.\n */\n@Injectable()\nexport class PatternSettingsStore {\n readonly #mock = inject(PatternMockApiState, { optional: true });\n readonly #settings = signal<PatternOrderSettings>({\n ...PATTERN_ORDER_SETTINGS_DEFAULTS,\n ...readSessionValue<Partial<PatternOrderSettings>>(STORAGE_KEY, {}),\n ...fromUrl(),\n });\n readonly settings = this.#settings.asReadonly();\n /** E6: quick search and external filter on one screen is not recommended; the drawer shows a warning. */\n readonly e6 = computed(() => this.#settings().quickSearch && this.#settings().externalFilter);\n /** The drawer is open (its button looks active). */\n readonly open = signal(false);\n\n constructor() {\n // why: synchronously, before the first list request of the screen reads the mock API.\n this.#applyReadOverride();\n }\n\n set<K extends keyof PatternOrderSettings>(key: K, value: PatternOrderSettings[K]): void {\n this.#settings.update(settings => ({ ...settings, [key]: value }));\n writeSessionValue(STORAGE_KEY, this.#settings());\n this.#applyReadOverride();\n }\n\n /** \"Mặc định\": every setting back to its default. */\n reset(): void {\n this.#settings.set(PATTERN_ORDER_SETTINGS_DEFAULTS);\n writeSessionValue(STORAGE_KEY, undefined);\n this.#applyReadOverride();\n }\n\n /** \"Số bản ghi\" and \"Trạng thái đọc\" act on the mock API, not on the screen. */\n #applyReadOverride(): void {\n const { records, read } = this.#settings();\n this.#mock?.setReadOverride('orders', records === 128 && read === 'normal' ? undefined : { limit: records, mode: read });\n }\n}\n","import { provideHttpClient, withInterceptors, withRequestsMadeViaParent } from '@angular/common/http';\nimport { inject, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n SD_PERMISSION_CONFIGURATION,\n SdPermissionGuard,\n SdPermissionService,\n type ISdPermissionConfiguration,\n} from '@sdcorejs/angular/modules/permission';\nimport { patternMockApiInterceptor } from '../core/mock-api/mock-api.interceptor';\nimport { PatternMockApiState } from '../core/mock-api/mock-api.state';\nimport { patternPermissionsOf } from '../core/permission/pattern-permission';\nimport { PatternRoleStore } from '../core/permission/pattern-role.store';\nimport { PatternSettingsStore } from '../core/pattern-shell/settings/pattern-settings.store';\nimport { SD_PATTERN_CONFIGURATION, type SdPatternConfiguration, type SdPatternResolvedConfiguration } from './pattern.configuration';\n\n/**\n * Registers what the pattern routes need, in the environment injector of the route that mounts them:\n *\n * ```ts\n * {\n * path: 'pattern',\n * loadChildren: () => import('@sdcorejs/angular/modules/pattern').then(m => m.SD_PATTERN_ROUTES),\n * providers: [provideSdPatterns({ mockApi: true })],\n * }\n * ```\n *\n * - The mock API interceptor runs on a child `HttpClient` of that route (`withRequestsMadeViaParent`), so other\n * requests of the host are untouched and requests under `/pattern` still go through the host's interceptors.\n * - `SdPermissionService`, `SdPermissionGuard` and `SD_PERMISSION_CONFIGURATION` are provided again there with the\n * sample roles, so the host's own permissions are neither read nor changed.\n */\nexport function provideSdPatterns(configuration: SdPatternConfiguration = {}): EnvironmentProviders {\n const value: SdPatternResolvedConfiguration = Object.freeze({\n mockApi: configuration.mockApi ?? true,\n apiBaseUrl: normalizeBaseUrl(configuration.apiBaseUrl ?? '/pattern-api'),\n latencyMs: Math.max(0, configuration.latencyMs ?? 400),\n storage: configuration.storage ?? 'session',\n forbiddenUrl: configuration.forbiddenUrl ?? null,\n });\n\n return makeEnvironmentProviders([\n { provide: SD_PATTERN_CONFIGURATION, useValue: value },\n value.mockApi\n ? [PatternMockApiState, provideHttpClient(withInterceptors([patternMockApiInterceptor]), withRequestsMadeViaParent())]\n : [],\n PatternRoleStore,\n PatternSettingsStore,\n SdPermissionService,\n SdPermissionGuard,\n { provide: SD_PERMISSION_CONFIGURATION, useFactory: patternPermissionConfiguration },\n ]);\n}\n\nfunction patternPermissionConfiguration(): ISdPermissionConfiguration {\n const roles = inject(PatternRoleStore);\n const router = inject(Router);\n const { forbiddenUrl } = inject(SD_PATTERN_CONFIGURATION);\n return {\n loadPermissions: () => patternPermissionsOf(roles.role()),\n onForbiden: () => {\n if (forbiddenUrl) void router.navigateByUrl(forbiddenUrl);\n },\n };\n}\n\nfunction normalizeBaseUrl(raw: string): string {\n const trimmed = raw.trim();\n const rootRelative = trimmed.startsWith('/') && !trimmed.startsWith('//');\n if (!rootRelative && !/^https?:\\/\\//i.test(trimmed)) {\n throw new Error('provideSdPatterns: apiBaseUrl must be a root-relative or HTTP(S) URL.');\n }\n if (trimmed.includes('?') || trimmed.includes('#')) {\n throw new Error('provideSdPatterns: apiBaseUrl must not contain a query or a hash.');\n }\n return trimmed.replace(/\\/+$/, '') || '/';\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGA;;;AAGG;AACI,MAAM,iBAAiB,GAAW;AACvC,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;;QAER,WAAW,EAAE,CAAC,iBAAiB,CAAC;AAChC,QAAA,aAAa,EAAE,MAAM,OAAO,iEAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,qBAAqB,CAAC;AACtH,QAAA,QAAQ,EAAE;AACR,YAAA;AACE,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,SAAS,EAAE,MAAM;AACjB,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,aAAa,EAAE,MAAM,OAAO,iEAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,qBAAqB,CAAC;AACvH,aAAA;YACD,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,wDAA2B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE;YAC1G,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,wDAA4B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE;YAC5G,EAAE,IAAI,EAAE,OAAO,EA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AAM,CAAC;IAC7B,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC,wBAAwB,CAAC;IACzD,OAAO;QACL,eAAe,EAAE,MAAM,oBAAoB,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QACzD,UAAU,EAAE,MAAK;AACf,YAAA,IAAI,YAAY;AAAE,gBAAA,KAAK,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC;QAC3D,CAAC;KACF;AACH;AAEA,SAAS,gBAAgB,CAAC,GAAW,EAAA;AACnC,IAAA,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE;AAC1B,IAAA,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;IACzE,IAAI,CAAC,YAAY,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;AACnD,QAAA,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC;IAC1F;AACA,IAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAClD,QAAA,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC;IACtF;IACA,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,GAAG;AAC3C;;AC5EA;;AAEG;;"}
1
+ {"version":3,"file":"sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-JWx3RaLo.mjs","sources":["../../../projects/sdcorejs-angular/modules/pattern/routes.ts","../../../projects/sdcorejs-angular/modules/pattern/configurations/pattern.configuration.ts","../../../projects/sdcorejs-angular/modules/pattern/core/session-state.ts","../../../projects/sdcorejs-angular/modules/pattern/core/mock-api/mock-api.model.ts","../../../projects/sdcorejs-angular/modules/pattern/core/mock-api/mock-api.state.ts","../../../projects/sdcorejs-angular/modules/pattern/core/mock-api/mock-api.interceptor.ts","../../../projects/sdcorejs-angular/modules/pattern/core/permission/pattern-permission.ts","../../../projects/sdcorejs-angular/modules/pattern/core/permission/pattern-role.store.ts","../../../projects/sdcorejs-angular/modules/pattern/core/pattern-shell/settings/pattern-settings.store.ts","../../../projects/sdcorejs-angular/modules/pattern/configurations/provide-sd-patterns.ts","../../../projects/sdcorejs-angular/modules/pattern/sdcorejs-angular-modules-pattern.ts"],"sourcesContent":["import type { Routes } from '@angular/router';\nimport { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';\n\n/**\n * Routes of `/pattern`. Mount them with `provideSdPatterns()` in the providers of the same route:\n * the guard below is the route-level `SdPermissionGuard` of the sample roles, not the host's.\n */\nexport const SD_PATTERN_ROUTES: Routes = [\n {\n path: '',\n // Loads the permissions of the sample role before any pattern screen opens.\n canActivate: [SdPermissionGuard],\n loadComponent: () => import('./core/pattern-shell/shell/shell.component').then(module => module.PatternShellComponent),\n children: [\n {\n path: '',\n pathMatch: 'full',\n title: 'Pattern',\n loadComponent: () => import('./core/pattern-shell/index/index.component').then(module => module.PatternIndexComponent),\n },\n { path: 'product', loadChildren: () => import('./features/product/routes').then(module => module.routes) },\n { path: 'customer', loadChildren: () => import('./features/customer/routes').then(module => module.routes) },\n { path: 'order', loadChildren: () => import('./features/order/routes').then(module => module.routes) },\n { path: 'approval', loadChildren: () => import('./features/approval/routes').then(module => module.routes) },\n { path: 'category', loadChildren: () => import('./features/category/routes').then(module => module.routes) },\n { path: 'import', loadChildren: () => import('./features/import/routes').then(module => module.routes) },\n { path: 'partner', loadChildren: () => import('./features/partner/routes').then(module => module.routes) },\n { path: 'settings', loadChildren: () => import('./features/settings/routes').then(module => module.routes) },\n ],\n },\n];\n","import { InjectionToken } from '@angular/core';\n\n/** What the host configures when it mounts the pattern routes with `provideSdPatterns()`. */\nexport interface SdPatternConfiguration {\n /**\n * Answer `apiBaseUrl` requests from the built-in mock API (seeded data, latency, simulated errors).\n * `false`: the feature services call a real API at `apiBaseUrl`. Default `true`.\n */\n readonly mockApi?: boolean;\n /** Base URL of the pattern API, root-relative or absolute HTTP(S), no query or hash. Default `'/pattern-api'`. */\n readonly apiBaseUrl?: string;\n /** Latency of every mock response in milliseconds; the toolbar can change it. Default `400`. */\n readonly latencyMs?: number;\n /** Where the mock API keeps created, updated and deleted records. Default `'session'` (sessionStorage). */\n readonly storage?: 'session' | 'none';\n /**\n * Host URL to open when a role has no permission for a pattern route (Core `onForbiden`).\n * Unset: the navigation is only blocked. Errors while loading a record (404, timeout) reach the host's\n * navigation error handler instead, like any other route.\n */\n readonly forbiddenUrl?: string;\n}\n\n/** Resolved values; internal to the module, the host uses `provideSdPatterns()`. */\nexport interface SdPatternResolvedConfiguration {\n readonly mockApi: boolean;\n readonly apiBaseUrl: string;\n readonly latencyMs: number;\n readonly storage: 'session' | 'none';\n readonly forbiddenUrl: string | null;\n}\n\nexport const SD_PATTERN_CONFIGURATION = new InjectionToken<SdPatternResolvedConfiguration>('SD_PATTERN_CONFIGURATION');\n","/** Reads a JSON value the pattern shell kept in sessionStorage; any failure (no storage, bad JSON) gives `fallback`. */\nexport function readSessionValue<T>(key: string, fallback: T): T {\n try {\n const raw = globalThis.sessionStorage?.getItem(key);\n return raw ? (JSON.parse(raw) as T) : fallback;\n } catch {\n return fallback;\n }\n}\n\n/** Writes a JSON value to sessionStorage; `undefined` removes it. Storage errors (private mode, quota) are ignored. */\nexport function writeSessionValue(key: string, value: unknown): void {\n try {\n if (value === undefined) globalThis.sessionStorage?.removeItem(key);\n else globalThis.sessionStorage?.setItem(key, JSON.stringify(value));\n } catch {\n // why: the shell state is a convenience; the pattern screens work the same without it.\n }\n}\n","import type { MatchOptions } from '@sdcorejs/utils/models';\n\n/** Error body of the mock API: a message and, for validation errors, one entry per field. */\nexport interface PatternMockErrorBody {\n readonly message: string;\n readonly errors?: readonly { readonly field: string; readonly message: string }[];\n}\n\n/** Thrown by a resource handler; the interceptor turns it into an `HttpErrorResponse`. */\nexport class PatternMockError extends Error {\n constructor(\n readonly status: number,\n readonly body: PatternMockErrorBody\n ) {\n super(body.message);\n }\n}\n\nexport interface PatternMockRecord {\n readonly id: string;\n}\n\n/** Everything a resource handler can read or change. */\nexport interface PatternMockContext {\n /** Records of another resource, for relations (an order reads its customer). */\n readonly collection: <R extends PatternMockRecord>(name: string) => readonly R[];\n /** Replaces the records of a resource and persists them. */\n readonly save: <R extends PatternMockRecord>(name: string, records: readonly R[]) => void;\n /** Next free numeric id of a resource. */\n readonly nextId: (name: string) => string;\n readonly now: () => Date;\n}\n\n/** Answer of a custom endpoint. */\nexport interface PatternMockResult {\n readonly status?: number;\n readonly body: unknown;\n}\n\n/** One collection of the mock API, served under `<apiBaseUrl>/<name>`. */\nexport interface PatternMockResource<T extends PatternMockRecord = PatternMockRecord> {\n /** URL segment, plural as in the blueprint: `products`, `orders`. */\n readonly name: string;\n /** Deterministic seed: the same records every time, so e2e can rely on them. */\n readonly seed: () => T[];\n /** Field types for `FilterUtilities.match`, required for dates stored as ISO strings. */\n readonly fieldTypes?: MatchOptions<T>['fieldTypes'];\n /** Builds a new record from a POST body; throws `PatternMockError` on invalid input. */\n readonly create?: (body: Record<string, unknown>, records: readonly T[], context: PatternMockContext) => T;\n /** Builds the updated record from a PUT body. */\n readonly update?: (current: T, body: Record<string, unknown>, records: readonly T[], context: PatternMockContext) => T;\n /** Refuses a delete with `PatternMockError` (409 when other records still use it). */\n readonly beforeDelete?: (current: T, context: PatternMockContext) => void;\n /** `POST <name>/:id/<action>` and `POST <name>/bulk/<action>`: returns the changed record. */\n readonly actions?: Readonly<Record<string, (current: T, body: Record<string, unknown>, context: PatternMockContext) => T>>;\n /** Other endpoints under `<name>/…` (searches, sub-collections); `undefined` falls through to CRUD. */\n readonly route?: (\n method: string,\n segments: readonly string[],\n query: PatternMockQuery,\n body: Record<string, unknown>,\n context: PatternMockContext\n ) => PatternMockResult | undefined;\n}\n\n/** Query string of a request, as `HttpParams` reads it. */\nexport interface PatternMockQuery {\n get(name: string): string | null;\n}\n\n/** Response of one bulk item: `POST <name>/bulk/<action>` answers every id, success or not. */\nexport interface PatternBulkItemResult {\n readonly id: string;\n readonly ok: boolean;\n readonly message?: string;\n}\n","import { HttpErrorResponse, HttpResponse, type HttpEvent, type HttpRequest } from '@angular/common/http';\nimport { inject, Injectable, signal } from '@angular/core';\nimport { defer, map, NEVER, switchMap, throwError, timer, type Observable } from 'rxjs';\nimport { SD_PATTERN_CONFIGURATION } from '../../configurations/pattern.configuration';\nimport { readSessionValue, writeSessionValue } from '../session-state';\nimport { PatternMockError, type PatternMockErrorBody } from './mock-api.model';\nimport type { PatternMockBackend } from './mock-backend';\n\n/** Error the toolbar makes every mock request return. */\nexport type PatternMockFailure = 'none' | '500' | 'timeout' | '404' | '403';\n\n/** Read state a screen setting forces on the list request of one resource (doc 08 \"Dữ liệu và trạng thái\"). */\nexport interface PatternMockReadOverride {\n /** Serve only the first `limit` records of the collection. */\n readonly limit?: number;\n /** `loading`: never answer; `error`: answer 500. */\n readonly mode?: 'normal' | 'loading' | 'error';\n}\n\n/** How long a simulated timeout waits before the request fails. */\nexport const PATTERN_MOCK_TIMEOUT_MS = 3000;\n\nconst STATE_KEY = 'sd-pattern.mock-api';\n\nconst STATUS_TEXT: Readonly<Record<number, string>> = {\n 0: 'Unknown Error',\n 400: 'Bad Request',\n 403: 'Forbidden',\n 404: 'Not Found',\n 405: 'Method Not Allowed',\n 409: 'Conflict',\n 500: 'Internal Server Error',\n};\n\nconst FAILURES: Readonly<Record<Exclude<PatternMockFailure, 'none' | 'timeout'>, PatternMockError>> = {\n '500': new PatternMockError(500, { message: 'Máy chủ gặp lỗi (mô phỏng 500).' }),\n '404': new PatternMockError(404, { message: 'Không tìm thấy bản ghi (mô phỏng 404).' }),\n '403': new PatternMockError(403, { message: 'Không có quyền thao tác (mô phỏng 403).' }),\n};\n\n/**\n * Toolbar state of the mock API (latency, simulated error, per-resource read overrides) and the lazily\n * created backend. Provided at the `/pattern` route by `provideSdPatterns()` when `mockApi` is on.\n */\n@Injectable()\nexport class PatternMockApiState {\n readonly #configuration = inject(SD_PATTERN_CONFIGURATION);\n readonly #stored = readSessionValue<{ latencyMs?: number; failure?: PatternMockFailure }>(STATE_KEY, {});\n readonly #latencyMs = signal(this.#stored.latencyMs ?? this.#configuration.latencyMs);\n readonly #failure = signal<PatternMockFailure>(this.#stored.failure ?? 'none');\n readonly #reads = signal<Readonly<Record<string, PatternMockReadOverride>>>({});\n #backend?: Promise<PatternMockBackend>;\n\n readonly latencyMs = this.#latencyMs.asReadonly();\n readonly failure = this.#failure.asReadonly();\n\n setLatency(latencyMs: number): void {\n this.#latencyMs.set(Math.max(0, latencyMs));\n this.#persist();\n }\n\n setFailure(failure: PatternMockFailure): void {\n this.#failure.set(failure);\n this.#persist();\n }\n\n /** Forces the list request of `resource`; `undefined` removes the override. */\n setReadOverride(resource: string, override: PatternMockReadOverride | undefined): void {\n this.#reads.update(reads => {\n const { [resource]: _previous, ...others } = reads;\n return override ? { ...others, [resource]: override } : others;\n });\n }\n\n /** The backend, loaded on the first request so the seeds stay out of the host's bundle. */\n backend(): Promise<PatternMockBackend> {\n this.#backend ??= import('./mock-backend.factory').then(module => module.createPatternMockBackend(this.#configuration.storage));\n return this.#backend;\n }\n\n /** Throws away created, updated and deleted records. */\n async resetData(): Promise<void> {\n (await this.backend()).reset();\n }\n\n /** Answers a request whose URL is under `apiBaseUrl`; `segments` is the path after it. */\n respond(request: HttpRequest<unknown>, segments: readonly string[]): Observable<HttpEvent<unknown>> {\n const failure = this.#failure();\n const read = request.method === 'GET' && segments.length === 1 ? this.#reads()[segments[0]] : undefined;\n if (read?.mode === 'loading') return NEVER;\n if (failure === 'timeout') {\n return timer(PATTERN_MOCK_TIMEOUT_MS).pipe(\n switchMap(() => throwError(() => this.#error(request, 0, { message: 'Hết thời gian chờ (mô phỏng).' })))\n );\n }\n return timer(this.#latencyMs()).pipe(\n switchMap(() => defer(() => this.backend())),\n map(backend => {\n const simulated = read?.mode === 'error' ? FAILURES['500'] : failure === 'none' ? undefined : FAILURES[failure];\n try {\n if (simulated) throw simulated;\n const result = backend.handle(request.method, segments, request.params, request.body, read?.limit);\n return new HttpResponse({ status: result.status ?? 200, statusText: 'OK', body: result.body, url: request.urlWithParams });\n } catch (error) {\n if (error instanceof PatternMockError) throw this.#error(request, error.status, error.body);\n throw error;\n }\n })\n );\n }\n\n #error(request: HttpRequest<unknown>, status: number, body: PatternMockErrorBody): HttpErrorResponse {\n return new HttpErrorResponse({ status, statusText: STATUS_TEXT[status] ?? 'Error', error: body, url: request.urlWithParams });\n }\n\n #persist(): void {\n writeSessionValue(STATE_KEY, { latencyMs: this.#latencyMs(), failure: this.#failure() });\n }\n}\n","import type { HttpInterceptorFn } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { SD_PATTERN_CONFIGURATION } from '../../configurations/pattern.configuration';\nimport { PatternMockApiState } from './mock-api.state';\n\n/** Path segments of `url` under `baseUrl`, or `null` when the request is not for the pattern API. */\nexport function patternApiSegments(url: string, baseUrl: string): string[] | null {\n const path = url.split(/[?#]/)[0];\n const base = baseUrl.replace(/\\/+$/, '');\n if (path !== base && !path.startsWith(base + '/')) return null;\n return path\n .slice(base.length)\n .split('/')\n .filter(segment => segment.length > 0)\n .map(segment => decodeURIComponent(segment));\n}\n\n/**\n * Answers requests under `apiBaseUrl` from the mock API and passes every other request on.\n * Registered by `provideSdPatterns()` on the HttpClient of the `/pattern` route only.\n */\nexport const patternMockApiInterceptor: HttpInterceptorFn = (request, next) => {\n const segments = patternApiSegments(request.url, inject(SD_PATTERN_CONFIGURATION).apiBaseUrl);\n return segments ? inject(PatternMockApiState).respond(request, segments) : next(request);\n};\n","/**\n * Permission codes of the pattern screens: `PATTERN_<ENTITY>_<R|C|U|D>_<ACTION>`.\n * R reads, C creates, U changes a record (update and every status action), D deletes.\n * Features write the code itself in `data.permission` and `*sdPermission`; this list only feeds the sample roles.\n */\nexport const PATTERN_PERMISSION_CODES = [\n 'PATTERN_PRODUCT_R_LIST',\n 'PATTERN_PRODUCT_R_DETAIL',\n 'PATTERN_PRODUCT_C_CREATE',\n 'PATTERN_PRODUCT_U_UPDATE',\n 'PATTERN_PRODUCT_C_IMPORT',\n 'PATTERN_PRODUCT_R_EXPORT',\n 'PATTERN_PRODUCT_R_MENU',\n 'PATTERN_CUSTOMER_R_LIST',\n 'PATTERN_CUSTOMER_R_DETAIL',\n 'PATTERN_CUSTOMER_C_CREATE',\n 'PATTERN_CUSTOMER_U_UPDATE',\n 'PATTERN_CUSTOMER_D_DELETE',\n 'PATTERN_ORDER_R_LIST',\n 'PATTERN_ORDER_R_DETAIL',\n 'PATTERN_ORDER_C_CREATE',\n 'PATTERN_ORDER_U_UPDATE',\n 'PATTERN_ORDER_U_SUBMIT',\n 'PATTERN_ORDER_U_APPROVE',\n 'PATTERN_ORDER_U_REJECT',\n 'PATTERN_ORDER_U_CONFIRM',\n 'PATTERN_ORDER_U_CANCEL',\n 'PATTERN_ORDER_R_PRINT',\n 'PATTERN_ORDER_R_EXPORT',\n 'PATTERN_APPROVAL_R_LIST',\n 'PATTERN_APPROVAL_R_DETAIL',\n 'PATTERN_APPROVAL_U_APPROVE',\n 'PATTERN_APPROVAL_U_REJECT',\n 'PATTERN_CATEGORY_R_LIST',\n 'PATTERN_CATEGORY_C_CREATE',\n 'PATTERN_CATEGORY_U_UPDATE',\n 'PATTERN_CATEGORY_D_DELETE',\n 'PATTERN_IMPORT_C_IMPORT',\n 'PATTERN_PARTNER_C_CREATE',\n 'PATTERN_SETTINGS_R_DETAIL',\n 'PATTERN_SETTINGS_U_UPDATE',\n] as const;\n\nexport type PatternPermissionCode = (typeof PATTERN_PERMISSION_CODES)[number];\n\nexport type PatternRole = 'admin' | 'staff' | 'viewer';\n\nexport const PATTERN_ROLES: readonly { readonly value: PatternRole; readonly label: string; readonly description: string }[] = [\n { value: 'admin', label: 'Quản trị', description: 'Toàn quyền' },\n { value: 'staff', label: 'Nhân viên', description: 'Không xoá, không duyệt' },\n { value: 'viewer', label: 'Chỉ xem', description: 'Chỉ xem danh sách và chi tiết' },\n];\n\nconst DECISIONS = /_U_(APPROVE|REJECT)$/;\n\n/** The permission codes a sample role holds. */\nexport function patternPermissionsOf(role: PatternRole): string[] {\n switch (role) {\n case 'admin':\n return [...PATTERN_PERMISSION_CODES];\n case 'staff':\n return PATTERN_PERMISSION_CODES.filter(code => !code.includes('_D_') && !DECISIONS.test(code));\n case 'viewer':\n return PATTERN_PERMISSION_CODES.filter(code => code.includes('_R_'));\n }\n}\n","import { Injectable, signal } from '@angular/core';\nimport { readSessionValue, writeSessionValue } from '../session-state';\nimport { PATTERN_ROLES, type PatternRole } from './pattern-permission';\n\nconst ROLE_KEY = 'sd-pattern.role';\n\nconst readRole = (): PatternRole => {\n const stored = readSessionValue<string>(ROLE_KEY, 'admin');\n return PATTERN_ROLES.some(role => role.value === stored) ? (stored as PatternRole) : 'admin';\n};\n\n/**\n * Sample role of the pattern screens, kept for the browser tab. Provided at the `/pattern` route by\n * `provideSdPatterns()`; the permission configuration of that route reads it, so it depends on nothing.\n */\n@Injectable()\nexport class PatternRoleStore {\n readonly #role = signal<PatternRole>(readRole());\n readonly role = this.#role.asReadonly();\n\n set(role: PatternRole): void {\n this.#role.set(role);\n writeSessionValue(ROLE_KEY, role);\n }\n}\n","import { computed, inject, Injectable, signal } from '@angular/core';\nimport { PatternMockApiState } from '../../mock-api/mock-api.state';\nimport { readSessionValue, writeSessionValue } from '../../session-state';\n\n/** Settings of `/pattern/order` (doc 08 \"Tuỳ chỉnh hiển thị\"): the parts of `sd-page-list` + `sd-table` to show. */\nexport interface PatternOrderSettings {\n /** Status tabs in `sdSubheader`. */\n readonly tabs: boolean;\n /** Score cards above the table. */\n readonly score: boolean;\n /** `filter.quickSearch`. */\n readonly quickSearch: boolean;\n /** \"Kho xuất\" dropdown of the quick search (`quickSearch.filters`). */\n readonly warehouse: boolean;\n /** Filter row under the columns (`hideInlineFilter: false`). */\n readonly inlineFilter: boolean;\n /** `hideInlineFilter: 'auto'`: hide the filter row while there are at most 10 rows. */\n readonly autoHide: boolean;\n /** `filter.externalFilters`. */\n readonly externalFilter: boolean;\n /** External filter collapsed at first (`filter.externalFilterCollapsed`). */\n readonly externalFilterCollapsed: boolean;\n /** `filter.manualFilter`. */\n readonly manualFilter: boolean;\n /** `filter.externalFilterPerRow`. */\n readonly externalFilterPerRow: 6 | 4;\n /** `selector.visible`. */\n readonly selector: boolean;\n /** `reload.visible`, `export`, `config.visible`. */\n readonly footerButtons: boolean;\n /** Records the mock API serves (the first N of the seed). */\n readonly records: 0 | 3 | 20 | 128;\n /** `paginate.pageSize`. */\n readonly pageSize: 10 | 20 | 50;\n /** Read state the mock API forces on the list request. */\n readonly read: 'normal' | 'loading' | 'error';\n /** `sd-page-list` `autoCompact`. */\n readonly autoCompact: boolean;\n /** `sd-page-list` `detail`. */\n readonly detail: 'drawer' | 'page';\n}\n\nexport const PATTERN_ORDER_SETTINGS_DEFAULTS: PatternOrderSettings = {\n tabs: false,\n score: false,\n quickSearch: true,\n warehouse: true,\n inlineFilter: true,\n autoHide: false,\n externalFilter: false,\n externalFilterCollapsed: false,\n manualFilter: false,\n externalFilterPerRow: 6,\n selector: false,\n footerButtons: true,\n records: 128,\n pageSize: 20,\n read: 'normal',\n autoCompact: true,\n detail: 'drawer',\n};\n\nconst STORAGE_KEY = 'sd-pattern.order.settings';\n\n/** `?cfg=<json>` of the page URL, so a link (or an e2e test) opens the screen with given settings. */\nfunction fromUrl(): Partial<PatternOrderSettings> {\n try {\n const raw = new URLSearchParams(globalThis.location?.search ?? '').get('cfg');\n return raw ? (JSON.parse(raw) as Partial<PatternOrderSettings>) : {};\n } catch {\n return {};\n }\n}\n\n/**\n * State of the \"Tuỳ chỉnh hiển thị\" drawer, kept for the browser tab. Only `/pattern` has it: the order list reads it\n * to build its table option, the way a real screen would hard-code one choice.\n */\n@Injectable()\nexport class PatternSettingsStore {\n readonly #mock = inject(PatternMockApiState, { optional: true });\n readonly #settings = signal<PatternOrderSettings>({\n ...PATTERN_ORDER_SETTINGS_DEFAULTS,\n ...readSessionValue<Partial<PatternOrderSettings>>(STORAGE_KEY, {}),\n ...fromUrl(),\n });\n readonly settings = this.#settings.asReadonly();\n /** E6: quick search and external filter on one screen is not recommended; the drawer shows a warning. */\n readonly e6 = computed(() => this.#settings().quickSearch && this.#settings().externalFilter);\n /** The drawer is open (its button looks active). */\n readonly open = signal(false);\n\n constructor() {\n // why: synchronously, before the first list request of the screen reads the mock API.\n this.#applyReadOverride();\n }\n\n set<K extends keyof PatternOrderSettings>(key: K, value: PatternOrderSettings[K]): void {\n this.#settings.update(settings => ({ ...settings, [key]: value }));\n writeSessionValue(STORAGE_KEY, this.#settings());\n this.#applyReadOverride();\n }\n\n /** \"Mặc định\": every setting back to its default. */\n reset(): void {\n this.#settings.set(PATTERN_ORDER_SETTINGS_DEFAULTS);\n writeSessionValue(STORAGE_KEY, undefined);\n this.#applyReadOverride();\n }\n\n /** \"Số bản ghi\" and \"Trạng thái đọc\" act on the mock API, not on the screen. */\n #applyReadOverride(): void {\n const { records, read } = this.#settings();\n this.#mock?.setReadOverride('orders', records === 128 && read === 'normal' ? undefined : { limit: records, mode: read });\n }\n}\n","import { provideHttpClient, withInterceptors, withRequestsMadeViaParent } from '@angular/common/http';\nimport { inject, makeEnvironmentProviders, type EnvironmentProviders } from '@angular/core';\nimport { Router } from '@angular/router';\nimport {\n SD_PERMISSION_CONFIGURATION,\n SdPermissionGuard,\n SdPermissionService,\n type ISdPermissionConfiguration,\n} from '@sdcorejs/angular/modules/permission';\nimport { patternMockApiInterceptor } from '../core/mock-api/mock-api.interceptor';\nimport { PatternMockApiState } from '../core/mock-api/mock-api.state';\nimport { patternPermissionsOf } from '../core/permission/pattern-permission';\nimport { PatternRoleStore } from '../core/permission/pattern-role.store';\nimport { PatternSettingsStore } from '../core/pattern-shell/settings/pattern-settings.store';\nimport { SD_PATTERN_CONFIGURATION, type SdPatternConfiguration, type SdPatternResolvedConfiguration } from './pattern.configuration';\n\n/**\n * Registers what the pattern routes need, in the environment injector of the route that mounts them:\n *\n * ```ts\n * {\n * path: 'pattern',\n * loadChildren: () => import('@sdcorejs/angular/modules/pattern').then(m => m.SD_PATTERN_ROUTES),\n * providers: [provideSdPatterns({ mockApi: true })],\n * }\n * ```\n *\n * - The mock API interceptor runs on a child `HttpClient` of that route (`withRequestsMadeViaParent`), so other\n * requests of the host are untouched and requests under `/pattern` still go through the host's interceptors.\n * - `SdPermissionService`, `SdPermissionGuard` and `SD_PERMISSION_CONFIGURATION` are provided again there with the\n * sample roles, so the host's own permissions are neither read nor changed.\n */\nexport function provideSdPatterns(configuration: SdPatternConfiguration = {}): EnvironmentProviders {\n const value: SdPatternResolvedConfiguration = Object.freeze({\n mockApi: configuration.mockApi ?? true,\n apiBaseUrl: normalizeBaseUrl(configuration.apiBaseUrl ?? '/pattern-api'),\n latencyMs: Math.max(0, configuration.latencyMs ?? 400),\n storage: configuration.storage ?? 'session',\n forbiddenUrl: configuration.forbiddenUrl ?? null,\n });\n\n return makeEnvironmentProviders([\n { provide: SD_PATTERN_CONFIGURATION, useValue: value },\n value.mockApi\n ? [PatternMockApiState, provideHttpClient(withInterceptors([patternMockApiInterceptor]), withRequestsMadeViaParent())]\n : [],\n PatternRoleStore,\n PatternSettingsStore,\n SdPermissionService,\n SdPermissionGuard,\n { provide: SD_PERMISSION_CONFIGURATION, useFactory: patternPermissionConfiguration },\n ]);\n}\n\nfunction patternPermissionConfiguration(): ISdPermissionConfiguration {\n const roles = inject(PatternRoleStore);\n const router = inject(Router);\n const { forbiddenUrl } = inject(SD_PATTERN_CONFIGURATION);\n return {\n loadPermissions: () => patternPermissionsOf(roles.role()),\n onForbiden: () => {\n if (forbiddenUrl) void router.navigateByUrl(forbiddenUrl);\n },\n };\n}\n\nfunction normalizeBaseUrl(raw: string): string {\n const trimmed = raw.trim();\n const rootRelative = trimmed.startsWith('/') && !trimmed.startsWith('//');\n if (!rootRelative && !/^https?:\\/\\//i.test(trimmed)) {\n throw new Error('provideSdPatterns: apiBaseUrl must be a root-relative or HTTP(S) URL.');\n }\n if (trimmed.includes('?') || trimmed.includes('#')) {\n throw new Error('provideSdPatterns: apiBaseUrl must not contain a query or a hash.');\n }\n return trimmed.replace(/\\/+$/, '') || '/';\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGA;;;AAGG;AACI,MAAM,iBAAiB,GAAW;AACvC,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;;QAER,WAAW,EAAE,CAAC,iBAAiB,CAAC;AAChC,QAAA,aAAa,EAAE,MAAM,OAAO,iEAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,qBAAqB,CAAC;AACtH,QAAA,QAAQ,EAAE;AACR,YAAA;AACE,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,SAAS,EAAE,MAAM;AACjB,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,aAAa,EAAE,MAAM,OAAO,iEAA4C,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,qBAAqB,CAAC;AACvH,aAAA;YACD,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,wDAA2B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE;YAC1G,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,wDAA4B,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE;YAC5G,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,wDAAyB,oCAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE;YACtG,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,wDAA4B,oCAAC,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CA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C,aAAa,CAAC,YAAY,CAAC;QAC3D,CAAC;KACF;AACH;AAEA,SAAS,gBAAgB,CAAC,GAAW,EAAA;AACnC,IAAA,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE;AAC1B,IAAA,MAAM,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;IACzE,IAAI,CAAC,YAAY,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;AACnD,QAAA,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC;IAC1F;AACA,IAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAClD,QAAA,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC;IACtF;IACA,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,GAAG;AAC3C;;AC5EA;;AAEG;;"}
@@ -1,13 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { viewChild, signal, computed, ChangeDetectionStrategy, Component, inject, output, forwardRef } from '@angular/core';
3
3
  import { Router, ActivatedRoute, RouterLink, RouterOutlet } from '@angular/router';
4
- import { P as PatternSourceViewer, a as PATTERN_CATALOG } from './sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs';
4
+ import { P as PatternSourceViewer, a as PATTERN_CATALOG } from './sdcorejs-angular-modules-pattern-pattern-source-viewer-DuhyXsGn.mjs';
5
5
  import { SdSideDrawer } from '@sdcorejs/angular/components/side-drawer';
6
6
  import { SdButton } from '@sdcorejs/angular/components/button';
7
7
  import { SdSegmentedComponent } from '@sdcorejs/angular/forms/segmented';
8
8
  import { SdPermissionService } from '@sdcorejs/angular/modules/permission';
9
9
  import { SdNotifyService } from '@sdcorejs/angular/services/notify';
10
- import { P as PatternRoleStore, a as PatternMockApiState, b as PATTERN_ROLES } from './sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs';
10
+ import { P as PatternRoleStore, a as PatternMockApiState, b as PATTERN_ROLES } from './sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-JWx3RaLo.mjs';
11
11
 
12
12
  /**
13
13
  * "Xem source" of the pattern toolbar: the code that runs on the current screen, read from the manifest that
@@ -48,7 +48,7 @@ class PatternSourceDrawerComponent {
48
48
  this.scope.set(scope);
49
49
  this.drawer().open();
50
50
  if (!this.#source()) {
51
- const { PATTERN_SOURCE } = await import('./sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs');
51
+ const { PATTERN_SOURCE } = await import('./sdcorejs-angular-modules-pattern-pattern-source.generated-bfpj85ke.mjs');
52
52
  this.#source.set(PATTERN_SOURCE);
53
53
  }
54
54
  const files = this.files().map(file => file.path);
@@ -322,4 +322,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImpor
322
322
  }], propDecorators: { drawer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => PatternSourceDrawerComponent), { isSignal: true }] }] } });
323
323
 
324
324
  export { PatternShellComponent };
325
- //# sourceMappingURL=sdcorejs-angular-modules-pattern-shell.component-BOjJteMd.mjs.map
325
+ //# sourceMappingURL=sdcorejs-angular-modules-pattern-shell.component-DMJpUhpn.mjs.map