@sdcorejs/angular 20.3.2 → 20.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/assets/THEME.md +58 -6
  2. package/assets/scss/core/form.scss +291 -3
  3. package/assets/scss/themes/_component-tokens.scss +35 -6
  4. package/components/badge/index.d.ts +19 -1
  5. package/components/query-bar/index.d.ts +126 -11
  6. package/components/section/index.d.ts +13 -1
  7. package/components/splitter/index.d.ts +1 -1
  8. package/components/tab-router/index.d.ts +47 -5
  9. package/components/table/index.d.ts +300 -25
  10. package/components/upload-file/index.d.ts +181 -21
  11. package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
  12. package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
  13. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +3 -3
  14. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  15. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +460 -42
  16. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  17. package/fesm2022/sdcorejs-angular-components-section.mjs +15 -3
  18. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  19. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
  20. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  21. package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
  22. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +393 -78
  23. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  24. package/fesm2022/sdcorejs-angular-components-table.mjs +1669 -126
  25. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  26. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +887 -174
  27. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  28. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +7 -2
  29. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  30. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +5 -2
  31. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  32. package/fesm2022/sdcorejs-angular-forms-chip.mjs +422 -122
  33. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  34. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +4 -0
  35. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  36. package/fesm2022/sdcorejs-angular-forms-date.mjs +4 -0
  37. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  38. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +4 -0
  39. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  40. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +17 -2
  41. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  42. package/fesm2022/sdcorejs-angular-forms-input.mjs +4 -0
  43. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  44. package/fesm2022/sdcorejs-angular-forms-select.mjs +26 -20
  45. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  46. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +14 -1
  47. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  48. package/fesm2022/sdcorejs-angular-i18n.mjs +350 -5
  49. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  50. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-DnbDCdcz.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-D_1BxDC9.mjs} +3 -3
  51. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-DnbDCdcz.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-D_1BxDC9.mjs.map} +1 -1
  52. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-EBHM4kx2.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-CgH8Qi25.mjs} +3 -3
  53. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-EBHM4kx2.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-CgH8Qi25.mjs.map} +1 -1
  54. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-BtHe8YIW.mjs → sdcorejs-angular-modules-generic-generic-list.page-CyCGqW9W.mjs} +3 -3
  55. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-BtHe8YIW.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-CyCGqW9W.mjs.map} +1 -1
  56. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-eFshU7ew.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DTmU8Te4.mjs} +4 -4
  57. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-eFshU7ew.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DTmU8Te4.mjs.map} +1 -1
  58. package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
  59. package/fesm2022/sdcorejs-angular-modules-layout.mjs +348 -11
  60. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  61. package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs +23 -0
  62. package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs.map +1 -0
  63. package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs +16 -0
  64. package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs.map +1 -0
  65. package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-okZVmcd5.mjs +51 -0
  66. package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-okZVmcd5.mjs.map +1 -0
  67. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CB4F9cBe.mjs +144 -0
  68. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CB4F9cBe.mjs.map +1 -0
  69. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CowdEzyv.mjs +145 -0
  70. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CowdEzyv.mjs.map +1 -0
  71. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-2-dyjvCH.mjs +113 -0
  72. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-2-dyjvCH.mjs.map +1 -0
  73. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BCoG3bVV.mjs +142 -0
  74. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BCoG3bVV.mjs.map +1 -0
  75. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-LPUj7MqG.mjs +460 -0
  76. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-LPUj7MqG.mjs.map +1 -0
  77. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +18 -0
  78. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +1 -0
  79. package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-Caua6Xto.mjs +66 -0
  80. package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-Caua6Xto.mjs.map +1 -0
  81. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bu6E63bN.mjs +148 -0
  82. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bu6E63bN.mjs.map +1 -0
  83. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-B2Y0PbbC.mjs +484 -0
  84. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-B2Y0PbbC.mjs.map +1 -0
  85. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-_c_4slgf.mjs +172 -0
  86. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-_c_4slgf.mjs.map +1 -0
  87. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-awjgX7ph.mjs +90 -0
  88. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-awjgX7ph.mjs.map +1 -0
  89. package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-C_HziBQN.mjs +514 -0
  90. package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-C_HziBQN.mjs.map +1 -0
  91. package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-FwmYVkag.mjs +61 -0
  92. package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-FwmYVkag.mjs.map +1 -0
  93. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BRsdOwWy.mjs +87 -0
  94. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BRsdOwWy.mjs.map +1 -0
  95. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BttbZ_yr.mjs +170 -0
  96. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BttbZ_yr.mjs.map +1 -0
  97. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DalxHa8D.mjs +232 -0
  98. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-DalxHa8D.mjs.map +1 -0
  99. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-kdEZ9s7K.mjs +70 -0
  100. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-kdEZ9s7K.mjs.map +1 -0
  101. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-B2dNqckm.mjs +100 -0
  102. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-B2dNqckm.mjs.map +1 -0
  103. package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-Dq8Q8Vfm.mjs +812 -0
  104. package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-Dq8Q8Vfm.mjs.map +1 -0
  105. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B3-th1z4.mjs +164 -0
  106. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B3-th1z4.mjs.map +1 -0
  107. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Bs9hhMr7.mjs +115 -0
  108. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Bs9hhMr7.mjs.map +1 -0
  109. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CRttQEXa.mjs +118 -0
  110. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CRttQEXa.mjs.map +1 -0
  111. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CeX57FPi.mjs +629 -0
  112. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CeX57FPi.mjs.map +1 -0
  113. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DS8A17mM.mjs +71 -0
  114. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DS8A17mM.mjs.map +1 -0
  115. package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-Dfil91qL.mjs +1069 -0
  116. package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-Dfil91qL.mjs.map +1 -0
  117. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs +193 -0
  118. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +1 -0
  119. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs +99 -0
  120. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +1 -0
  121. package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs +12 -0
  122. package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs.map +1 -0
  123. package/fesm2022/sdcorejs-angular-modules-pattern-product.service-PaIGZ1ve.mjs +48 -0
  124. package/fesm2022/sdcorejs-angular-modules-pattern-product.service-PaIGZ1ve.mjs.map +1 -0
  125. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-B8j8cieu.mjs +297 -0
  126. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-B8j8cieu.mjs.map +1 -0
  127. package/fesm2022/sdcorejs-angular-modules-pattern-routes-0Vh73aXL.mjs +45 -0
  128. package/fesm2022/sdcorejs-angular-modules-pattern-routes-0Vh73aXL.mjs.map +1 -0
  129. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BoB2usST.mjs +43 -0
  130. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BoB2usST.mjs.map +1 -0
  131. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CFLETqYK.mjs +66 -0
  132. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CFLETqYK.mjs.map +1 -0
  133. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CFT9DyKj.mjs +165 -0
  134. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CFT9DyKj.mjs.map +1 -0
  135. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CZusLcS3.mjs +74 -0
  136. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CZusLcS3.mjs.map +1 -0
  137. package/fesm2022/sdcorejs-angular-modules-pattern-routes-Cq4BqjE9.mjs +99 -0
  138. package/fesm2022/sdcorejs-angular-modules-pattern-routes-Cq4BqjE9.mjs.map +1 -0
  139. package/fesm2022/sdcorejs-angular-modules-pattern-routes-Cw9uJySU.mjs +50 -0
  140. package/fesm2022/sdcorejs-angular-modules-pattern-routes-Cw9uJySU.mjs.map +1 -0
  141. package/fesm2022/sdcorejs-angular-modules-pattern-routes-nrxSHE-O.mjs +74 -0
  142. package/fesm2022/sdcorejs-angular-modules-pattern-routes-nrxSHE-O.mjs.map +1 -0
  143. package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CJ6hUHjk.mjs +406 -0
  144. package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CJ6hUHjk.mjs.map +1 -0
  145. package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-C_AFK_9X.mjs +317 -0
  146. package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-C_AFK_9X.mjs.map +1 -0
  147. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-C74EEboR.mjs +143 -0
  148. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-C74EEboR.mjs.map +1 -0
  149. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-Dj9lvkCP.mjs +132 -0
  150. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-Dj9lvkCP.mjs.map +1 -0
  151. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-B7H9pp-R.mjs +100 -0
  152. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-B7H9pp-R.mjs.map +1 -0
  153. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Dhfba-qx.mjs +138 -0
  154. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Dhfba-qx.mjs.map +1 -0
  155. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-hRTu79uE.mjs +359 -0
  156. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-hRTu79uE.mjs.map +1 -0
  157. package/fesm2022/sdcorejs-angular-modules-pattern.mjs +2 -0
  158. package/fesm2022/sdcorejs-angular-modules-pattern.mjs.map +1 -0
  159. package/fesm2022/sdcorejs-angular-services-api.mjs +11 -11
  160. package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
  161. package/fesm2022/sdcorejs-angular-services-cache.mjs +7 -5
  162. package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
  163. package/fesm2022/sdcorejs-angular-services-storage.mjs +6 -4
  164. package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
  165. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +104 -4
  166. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
  167. package/forms/chip/index.d.ts +136 -26
  168. package/i18n/index.d.ts +70 -1
  169. package/modules/layout/index.d.ts +89 -6
  170. package/modules/pattern/README.md +76 -0
  171. package/modules/pattern/docs/detail.md +237 -0
  172. package/modules/pattern/docs/drawer.md +484 -0
  173. package/modules/pattern/docs/flow.md +631 -0
  174. package/modules/pattern/docs/form.md +815 -0
  175. package/modules/pattern/docs/header-actions.md +344 -0
  176. package/modules/pattern/docs/list.md +247 -0
  177. package/modules/pattern/docs/relation.md +180 -0
  178. package/modules/pattern/docs/select.md +214 -0
  179. package/modules/pattern/docs/split.md +350 -0
  180. package/modules/pattern/docs/states.md +168 -0
  181. package/modules/pattern/features/approval/entity.resolver.ts +21 -0
  182. package/modules/pattern/features/approval/pages/detail/detail.component.ts +139 -0
  183. package/modules/pattern/features/approval/pages/list/approval-inbox.ts +7 -0
  184. package/modules/pattern/features/approval/pages/list/list.component.html +20 -0
  185. package/modules/pattern/features/approval/pages/list/list.component.ts +149 -0
  186. package/modules/pattern/features/approval/routes.ts +30 -0
  187. package/modules/pattern/features/approval/services/approval.model.ts +38 -0
  188. package/modules/pattern/features/approval/services/approval.service.ts +23 -0
  189. package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +130 -0
  190. package/modules/pattern/features/category/components/general-information-form/general-information-form.component.ts +61 -0
  191. package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +134 -0
  192. package/modules/pattern/features/category/entity.resolver.ts +27 -0
  193. package/modules/pattern/features/category/pages/list/list.component.html +20 -0
  194. package/modules/pattern/features/category/pages/list/list.component.ts +105 -0
  195. package/modules/pattern/features/category/routes.ts +42 -0
  196. package/modules/pattern/features/category/services/category.model.ts +39 -0
  197. package/modules/pattern/features/category/services/category.service.ts +36 -0
  198. package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +138 -0
  199. package/modules/pattern/features/customer/components/customer-select/customer-select.component.ts +72 -0
  200. package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.ts +30 -0
  201. package/modules/pattern/features/customer/components/debts-view/debts-view.component.ts +28 -0
  202. package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +106 -0
  203. package/modules/pattern/features/customer/components/documents-view/documents-view.component.ts +50 -0
  204. package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.ts +140 -0
  205. package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.ts +39 -0
  206. package/modules/pattern/features/customer/components/orders-view/orders-view.component.ts +35 -0
  207. package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +101 -0
  208. package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +127 -0
  209. package/modules/pattern/features/customer/entity.resolver.ts +21 -0
  210. package/modules/pattern/features/customer/pages/list/list.component.html +22 -0
  211. package/modules/pattern/features/customer/pages/list/list.component.ts +113 -0
  212. package/modules/pattern/features/customer/pages/profile/profile.component.ts +120 -0
  213. package/modules/pattern/features/customer/pipes/customer-detail.pipe.ts +18 -0
  214. package/modules/pattern/features/customer/routes.ts +59 -0
  215. package/modules/pattern/features/customer/services/customer.model.ts +87 -0
  216. package/modules/pattern/features/customer/services/customer.service.ts +79 -0
  217. package/modules/pattern/features/import/components/mapping-form/mapping-form.component.ts +41 -0
  218. package/modules/pattern/features/import/components/preview-view/preview-view.component.ts +44 -0
  219. package/modules/pattern/features/import/pages/flow/flow.component.ts +269 -0
  220. package/modules/pattern/features/import/routes.ts +19 -0
  221. package/modules/pattern/features/import/services/import.model.ts +82 -0
  222. package/modules/pattern/features/import/services/import.service.ts +18 -0
  223. package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +74 -0
  224. package/modules/pattern/features/order/components/bulk-result/bulk-result.component.ts +46 -0
  225. package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +96 -0
  226. package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +182 -0
  227. package/modules/pattern/features/order/components/lines-form/order-lines.ts +101 -0
  228. package/modules/pattern/features/order/components/lines-table-form/lines-table-form.component.ts +196 -0
  229. package/modules/pattern/features/order/components/lines-view/lines-view.component.ts +42 -0
  230. package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +128 -0
  231. package/modules/pattern/features/order/entity.resolver.ts +37 -0
  232. package/modules/pattern/features/order/pages/create/create.component.ts +113 -0
  233. package/modules/pattern/features/order/pages/detail/detail.component.ts +224 -0
  234. package/modules/pattern/features/order/pages/list/list.component.html +38 -0
  235. package/modules/pattern/features/order/pages/list/list.component.ts +291 -0
  236. package/modules/pattern/features/order/pages/update/update.component.ts +126 -0
  237. package/modules/pattern/features/order/routes.ts +54 -0
  238. package/modules/pattern/features/order/services/order.model.ts +109 -0
  239. package/modules/pattern/features/order/services/order.service.ts +63 -0
  240. package/modules/pattern/features/partner/pages/create/create.component.ts +324 -0
  241. package/modules/pattern/features/partner/routes.ts +20 -0
  242. package/modules/pattern/features/partner/services/partner.model.ts +30 -0
  243. package/modules/pattern/features/partner/services/partner.service.ts +17 -0
  244. package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +88 -0
  245. package/modules/pattern/features/product/components/product-select/product-select.component.ts +73 -0
  246. package/modules/pattern/features/product/components/product-status-select/product-status-select.component.ts +30 -0
  247. package/modules/pattern/features/product/entity.resolver.ts +21 -0
  248. package/modules/pattern/features/product/pages/create/create.component.ts +92 -0
  249. package/modules/pattern/features/product/pages/detail/detail.component.ts +53 -0
  250. package/modules/pattern/features/product/pages/list/list.component.html +30 -0
  251. package/modules/pattern/features/product/pages/list/list.component.ts +71 -0
  252. package/modules/pattern/features/product/pages/update/update.component.ts +86 -0
  253. package/modules/pattern/features/product/pipes/product-detail.pipe.ts +18 -0
  254. package/modules/pattern/features/product/routes.ts +48 -0
  255. package/modules/pattern/features/product/services/product.model.ts +38 -0
  256. package/modules/pattern/features/product/services/product.service.ts +48 -0
  257. package/modules/pattern/features/settings/pages/update/update.component.ts +228 -0
  258. package/modules/pattern/features/settings/routes.ts +24 -0
  259. package/modules/pattern/features/settings/services/settings.model.ts +18 -0
  260. package/modules/pattern/features/settings/services/settings.service.ts +15 -0
  261. package/modules/pattern/features/settings/settings.resolver.ts +8 -0
  262. package/modules/pattern/index.d.ts +50 -0
  263. package/package.json +5 -1
  264. package/services/api/index.d.ts +5 -5
  265. package/services/cache/index.d.ts +4 -2
  266. package/services/storage/index.d.ts +3 -1
  267. package/services/unsaved-changes/index.d.ts +11 -0
@@ -0,0 +1,228 @@
1
+ import {
2
+ afterNextRender,
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ DestroyRef,
6
+ ElementRef,
7
+ inject,
8
+ Injector,
9
+ linkedSignal,
10
+ signal,
11
+ } from '@angular/core';
12
+ import { toSignal } from '@angular/core/rxjs-interop';
13
+ import { FormGroup } from '@angular/forms';
14
+ import { ActivatedRoute } from '@angular/router';
15
+ import { firstValueFrom, map } from 'rxjs';
16
+ import { SdButton } from '@sdcorejs/angular/components/button';
17
+ import { SdSection } from '@sdcorejs/angular/components/section';
18
+ import { SdInput } from '@sdcorejs/angular/forms/input';
19
+ import { SdInputNumber } from '@sdcorejs/angular/forms/input-number';
20
+ import { SdSelect } from '@sdcorejs/angular/forms/select';
21
+ import { SdSwitch } from '@sdcorejs/angular/forms/switch';
22
+ import { SdPageComponent } from '@sdcorejs/angular/modules/layout';
23
+ import { SdPermissionDirective, SdPermissionService } from '@sdcorejs/angular/modules/permission';
24
+ import { SdFormatDatetimePipe } from '@sdcorejs/angular/pipes';
25
+ import { SdNotifyService } from '@sdcorejs/angular/services/notify';
26
+ import { registerSdUnsavedChangesForm, SdUnsavedChangesService } from '@sdcorejs/angular/services/unsaved-changes';
27
+ import { apiErrorMessage } from '../../../../utils/api-error';
28
+ import { focusFirstInvalid } from '../../../../utils/focus-first-invalid';
29
+ import { formApiErrors } from '../../../../utils/form-api-errors';
30
+ import { SettingsService } from '../../services/settings.service';
31
+ import type { SettingsDto, SettingsSaveReq } from '../../services/settings.model';
32
+
33
+ const CURRENCIES = [
34
+ { value: 'VND', label: 'Việt Nam đồng (VND)' },
35
+ { value: 'USD', label: 'Đô la Mỹ (USD)' },
36
+ ];
37
+
38
+ /**
39
+ * Cài đặt một bản ghi: `sd-page-form` có mục lục, nhiều nhóm. Lưu xong vẫn ở trang; footer báo trạng thái lưu, rời
40
+ * trang khi còn thay đổi thì hỏi. Vai trò chỉ có quyền xem thấy form ở chế độ xem.
41
+ */
42
+ @Component({
43
+ selector: 'update',
44
+ standalone: true,
45
+ imports: [SdPageComponent, SdButton, SdSection, SdInput, SdInputNumber, SdSelect, SdSwitch, SdPermissionDirective, SdFormatDatetimePipe],
46
+ changeDetection: ChangeDetectionStrategy.OnPush,
47
+ template: `
48
+ @let value = entity();
49
+ @let errors = apiErrors.errors();
50
+ <sd-page-form title="Cài đặt cửa hàng" description="Áp dụng cho mọi chi nhánh." toc>
51
+ <sd-button
52
+ headerRight
53
+ *sdPermission="'PATTERN_SETTINGS_U_UPDATE'"
54
+ title="Lưu"
55
+ prefixIcon="save"
56
+ type="fill"
57
+ color="primary"
58
+ autoId="settings-save"
59
+ [loading]="saving()"
60
+ (click)="save()" />
61
+ <div class="d-flex flex-column gap-16 py-16">
62
+ <sd-section title="Thông tin cửa hàng">
63
+ <div class="row px-16 pt-16 pb-8">
64
+ <div class="col-12 col-md-6">
65
+ <sd-input
66
+ label="Tên cửa hàng"
67
+ name="storeName"
68
+ autoId="settings-store-name"
69
+ [form]="form"
70
+ [model]="value.storeName"
71
+ [viewed]="!canEdit"
72
+ [inlineError]="errors['storeName']"
73
+ required />
74
+ </div>
75
+ <div class="col-12 col-md-6">
76
+ <sd-input label="Hotline" name="hotline" [form]="form" [model]="value.hotline" [viewed]="!canEdit" />
77
+ </div>
78
+ <div class="col-12">
79
+ <sd-input label="Địa chỉ" name="address" [form]="form" [model]="value.address" [viewed]="!canEdit" />
80
+ </div>
81
+ </div>
82
+ </sd-section>
83
+ <sd-section title="Bán hàng">
84
+ <div class="row px-16 pt-16 pb-8">
85
+ <div class="col-12 col-md-6">
86
+ <sd-select
87
+ label="Tiền tệ"
88
+ name="currency"
89
+ [form]="form"
90
+ [model]="value.currency"
91
+ [items]="currencies"
92
+ valueField="value"
93
+ displayField="label"
94
+ [viewed]="!canEdit"
95
+ [clearable]="false" />
96
+ </div>
97
+ <div class="col-12 col-md-6">
98
+ <sd-input
99
+ label="Tiền tố mã đơn"
100
+ name="orderPrefix"
101
+ autoId="settings-order-prefix"
102
+ [form]="form"
103
+ [model]="value.orderPrefix"
104
+ [viewed]="!canEdit"
105
+ [inlineError]="errors['orderPrefix']"
106
+ maxlength="5"
107
+ required />
108
+ </div>
109
+ <div class="col-12 col-md-6">
110
+ <sd-input-number
111
+ label="Ngưỡng cảnh báo tồn kho"
112
+ name="lowStockThreshold"
113
+ type="positive"
114
+ [precision]="0"
115
+ [form]="form"
116
+ [model]="value.lowStockThreshold"
117
+ [viewed]="!canEdit" />
118
+ </div>
119
+ <div class="col-12 col-md-6 d-flex align-items-center">
120
+ <sd-switch
121
+ label="Tự xác nhận đơn online"
122
+ name="autoConfirm"
123
+ [form]="form"
124
+ [model]="value.autoConfirm"
125
+ [disabled]="!canEdit" />
126
+ </div>
127
+ </div>
128
+ </sd-section>
129
+ <sd-section title="Thông báo">
130
+ <div class="row px-16 pt-16 pb-8">
131
+ <div class="col-12 col-md-6 d-flex align-items-center">
132
+ <sd-switch
133
+ label="Gửi email"
134
+ name="emailNotify"
135
+ [form]="form"
136
+ [model]="value.emailNotify"
137
+ [disabled]="!canEdit"
138
+ (modelChange)="emailNotify.set(!!$event)" />
139
+ </div>
140
+ <div class="col-12 col-md-6 d-flex align-items-center">
141
+ <sd-switch label="Gửi SMS" name="smsNotify" [form]="form" [model]="value.smsNotify" [disabled]="!canEdit" />
142
+ </div>
143
+ <div class="col-12">
144
+ <sd-input
145
+ label="Email nhận thông báo"
146
+ name="notifyEmail"
147
+ [form]="form"
148
+ [model]="value.notifyEmail"
149
+ pattern="EMAIL"
150
+ [viewed]="!canEdit"
151
+ [required]="emailNotify()" />
152
+ </div>
153
+ </div>
154
+ </sd-section>
155
+ <sd-section title="Bảo mật">
156
+ <div class="row px-16 pt-16 pb-8">
157
+ <div class="col-12 col-md-6">
158
+ <sd-input-number
159
+ label="Hết phiên sau (phút)"
160
+ name="sessionMinutes"
161
+ autoId="settings-session"
162
+ type="positive"
163
+ [precision]="0"
164
+ [form]="form"
165
+ [model]="value.sessionMinutes"
166
+ [viewed]="!canEdit"
167
+ [inlineError]="errors['sessionMinutes']"
168
+ required />
169
+ </div>
170
+ <div class="col-12 col-md-6 d-flex align-items-center">
171
+ <sd-switch label="Xác thực hai bước" name="twoFactor" [form]="form" [model]="value.twoFactor" [disabled]="!canEdit" />
172
+ </div>
173
+ </div>
174
+ </sd-section>
175
+ </div>
176
+ <span sdFooterLeft class="T14R text-secondary" role="status" data-autoid="settings-save-state">
177
+ {{ unsaved.dirty() ? 'Có thay đổi chưa lưu' : 'Đã lưu lúc ' + (value.updatedAt | sdFormatDatetime) }}
178
+ </span>
179
+ </sd-page-form>
180
+ `,
181
+ })
182
+ export class UpdateComponent {
183
+ readonly #settingsService = inject(SettingsService);
184
+ readonly #notify = inject(SdNotifyService);
185
+ readonly #route = inject(ActivatedRoute);
186
+ readonly #host: HTMLElement = inject(ElementRef).nativeElement;
187
+ readonly #injector = inject(Injector);
188
+ protected readonly canEdit = inject(SdPermissionService).hasPermission('PATTERN_SETTINGS_U_UPDATE');
189
+ protected readonly currencies = CURRENCIES;
190
+ readonly #resolved = toSignal(this.#route.data.pipe(map(data => data['entity'] as SettingsDto)), { requireSync: true });
191
+ /** Bản ghi đã lưu gần nhất: sau khi lưu thay bằng bản API trả về. */
192
+ protected readonly entity = linkedSignal(() => this.#resolved());
193
+ protected readonly emailNotify = linkedSignal(() => this.entity().emailNotify);
194
+ protected readonly form = new FormGroup({});
195
+ protected readonly saving = signal(false);
196
+ protected readonly apiErrors = formApiErrors(this.form);
197
+ protected readonly unsaved = registerSdUnsavedChangesForm(inject(SdUnsavedChangesService), this.form, { id: 'settings', dirty: 'value' });
198
+
199
+ constructor() {
200
+ inject(DestroyRef).onDestroy(() => this.unsaved.destroy());
201
+ }
202
+
203
+ protected async save(): Promise<void> {
204
+ if (this.saving()) return;
205
+ this.form.markAllAsTouched();
206
+ if (this.form.invalid) {
207
+ this.#focusFirstInvalid();
208
+ return;
209
+ }
210
+ this.saving.set(true);
211
+ try {
212
+ const saved = await firstValueFrom(this.#settingsService.update({ ...this.entity(), ...this.form.getRawValue() } as SettingsSaveReq));
213
+ this.entity.set(saved);
214
+ // Ở lại trang: giá trị vừa lưu là mốc so sánh mới (`markPristine()` ở chế độ value), sửa tiếp vẫn được bảo vệ khi rời trang.
215
+ this.unsaved.markPristine();
216
+ this.#notify.success('Đã lưu cài đặt.');
217
+ } catch (error) {
218
+ if (this.apiErrors.set(error)) this.#focusFirstInvalid();
219
+ else this.#notify.error(apiErrorMessage(error, 'Không thể lưu. Thay đổi vẫn được giữ.'));
220
+ } finally {
221
+ this.saving.set(false);
222
+ }
223
+ }
224
+
225
+ #focusFirstInvalid(): void {
226
+ afterNextRender(() => focusFirstInvalid(this.#host), { injector: this.#injector });
227
+ }
228
+ }
@@ -0,0 +1,24 @@
1
+ import type { Routes } from '@angular/router';
2
+ import { sdPageFormLeaveGuard } from '@sdcorejs/angular/modules/layout';
3
+ import { SdPermissionGuard } from '@sdcorejs/angular/modules/permission';
4
+ import { SettingsService } from './services/settings.service';
5
+ import { settingsResolver } from './settings.resolver';
6
+
7
+ /** Một bản ghi: vào thẳng trang cập nhật; người chỉ có quyền xem thấy form ở chế độ xem. */
8
+ export const routes: Routes = [
9
+ {
10
+ path: '',
11
+ providers: [SettingsService],
12
+ canActivateChild: [SdPermissionGuard],
13
+ children: [
14
+ {
15
+ path: '',
16
+ title: 'Cài đặt',
17
+ data: { permission: 'PATTERN_SETTINGS_R_DETAIL' },
18
+ resolve: { entity: settingsResolver },
19
+ canDeactivate: [sdPageFormLeaveGuard],
20
+ loadComponent: () => import('./pages/update/update.component').then(module => module.UpdateComponent),
21
+ },
22
+ ],
23
+ },
24
+ ];
@@ -0,0 +1,18 @@
1
+ /** Cài đặt cửa hàng: một bản ghi, không có danh sách. */
2
+ export interface SettingsDto {
3
+ readonly storeName: string;
4
+ readonly hotline: string;
5
+ readonly address: string;
6
+ readonly currency: string;
7
+ readonly orderPrefix: string;
8
+ readonly autoConfirm: boolean;
9
+ readonly lowStockThreshold: number;
10
+ readonly emailNotify: boolean;
11
+ readonly smsNotify: boolean;
12
+ readonly notifyEmail: string;
13
+ readonly sessionMinutes: number;
14
+ readonly twoFactor: boolean;
15
+ readonly updatedAt: string;
16
+ }
17
+
18
+ export type SettingsSaveReq = Omit<SettingsDto, 'updatedAt'>;
@@ -0,0 +1,15 @@
1
+ import { Injectable } from '@angular/core';
2
+ import type { Observable } from 'rxjs';
3
+ import { BaseApiService } from '../../../services/base-api.service';
4
+ import type { SettingsDto, SettingsSaveReq } from './settings.model';
5
+
6
+ @Injectable()
7
+ export class SettingsService extends BaseApiService {
8
+ detail(): Observable<SettingsDto> {
9
+ return this.http.get<SettingsDto>(this.apiUrl('settings'));
10
+ }
11
+
12
+ update(req: SettingsSaveReq): Observable<SettingsDto> {
13
+ return this.http.put<SettingsDto>(this.apiUrl('settings'), req);
14
+ }
15
+ }
@@ -0,0 +1,8 @@
1
+ import { inject } from '@angular/core';
2
+ import type { ResolveFn } from '@angular/router';
3
+ import { timeout } from 'rxjs';
4
+ import { SettingsService } from './services/settings.service';
5
+ import type { SettingsDto } from './services/settings.model';
6
+
7
+ /** Tải cài đặt trước khi mở trang; lỗi đi tới navigation error handler của host. */
8
+ export const settingsResolver: ResolveFn<SettingsDto> = () => inject(SettingsService).detail().pipe(timeout(10_000));
@@ -0,0 +1,50 @@
1
+ import { Routes } from '@angular/router';
2
+ import { EnvironmentProviders } from '@angular/core';
3
+
4
+ /**
5
+ * Routes of `/pattern`. Mount them with `provideSdPatterns()` in the providers of the same route:
6
+ * the guard below is the route-level `SdPermissionGuard` of the sample roles, not the host's.
7
+ */
8
+ declare const SD_PATTERN_ROUTES: Routes;
9
+
10
+ /** What the host configures when it mounts the pattern routes with `provideSdPatterns()`. */
11
+ interface SdPatternConfiguration {
12
+ /**
13
+ * Answer `apiBaseUrl` requests from the built-in mock API (seeded data, latency, simulated errors).
14
+ * `false`: the feature services call a real API at `apiBaseUrl`. Default `true`.
15
+ */
16
+ readonly mockApi?: boolean;
17
+ /** Base URL of the pattern API, root-relative or absolute HTTP(S), no query or hash. Default `'/pattern-api'`. */
18
+ readonly apiBaseUrl?: string;
19
+ /** Latency of every mock response in milliseconds; the toolbar can change it. Default `400`. */
20
+ readonly latencyMs?: number;
21
+ /** Where the mock API keeps created, updated and deleted records. Default `'session'` (sessionStorage). */
22
+ readonly storage?: 'session' | 'none';
23
+ /**
24
+ * Host URL to open when a role has no permission for a pattern route (Core `onForbiden`).
25
+ * Unset: the navigation is only blocked. Errors while loading a record (404, timeout) reach the host's
26
+ * navigation error handler instead, like any other route.
27
+ */
28
+ readonly forbiddenUrl?: string;
29
+ }
30
+
31
+ /**
32
+ * Registers what the pattern routes need, in the environment injector of the route that mounts them:
33
+ *
34
+ * ```ts
35
+ * {
36
+ * path: 'pattern',
37
+ * loadChildren: () => import('@sdcorejs/angular/modules/pattern').then(m => m.SD_PATTERN_ROUTES),
38
+ * providers: [provideSdPatterns({ mockApi: true })],
39
+ * }
40
+ * ```
41
+ *
42
+ * - The mock API interceptor runs on a child `HttpClient` of that route (`withRequestsMadeViaParent`), so other
43
+ * requests of the host are untouched and requests under `/pattern` still go through the host's interceptors.
44
+ * - `SdPermissionService`, `SdPermissionGuard` and `SD_PERMISSION_CONFIGURATION` are provided again there with the
45
+ * sample roles, so the host's own permissions are neither read nor changed.
46
+ */
47
+ declare function provideSdPatterns(configuration?: SdPatternConfiguration): EnvironmentProviders;
48
+
49
+ export { SD_PATTERN_ROUTES, provideSdPatterns };
50
+ export type { SdPatternConfiguration };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdcorejs/angular",
3
- "version": "20.3.2",
3
+ "version": "20.3.4",
4
4
  "description": "Angular component library: data table, query bar/builder, 20+ signal-based form controls, layout, auth and workflow services. Standalone, OnPush, signals-first. Published in parallel lines for Angular 19, 20, 21 and 22.",
5
5
  "keywords": [
6
6
  "angular",
@@ -399,6 +399,10 @@
399
399
  "types": "./modules/layout/index.d.ts",
400
400
  "default": "./fesm2022/sdcorejs-angular-modules-layout.mjs"
401
401
  },
402
+ "./modules/pattern": {
403
+ "types": "./modules/pattern/index.d.ts",
404
+ "default": "./fesm2022/sdcorejs-angular-modules-pattern.mjs"
405
+ },
402
406
  "./modules/permission": {
403
407
  "types": "./modules/permission/index.d.ts",
404
408
  "default": "./fesm2022/sdcorejs-angular-modules-permission.mjs"
@@ -72,9 +72,9 @@ interface SdApiHandler {
72
72
  interface ISdApiConfiguration {
73
73
  handlers?: SdApiHandler[];
74
74
  }
75
- declare const SD_API_CONFIG: InjectionToken<ISdApiConfiguration>;
76
- /** @deprecated Use `SD_API_CONFIG`. This is the same injection token. */
77
75
  declare const SD_API_CONFIGURATION: InjectionToken<ISdApiConfiguration>;
76
+ /** @deprecated Use `SD_API_CONFIGURATION`. This is the same injection token. */
77
+ declare const SD_API_CONFIG: InjectionToken<ISdApiConfiguration>;
78
78
  /**
79
79
  * Lỗi nghiệp vụ: HTTP 200 nhưng body envelope báo thất bại (`{ ok: false, ... }`).
80
80
  *
@@ -94,13 +94,13 @@ declare class SdApiError<TBody = unknown> extends Error {
94
94
  * Handler API đăng ký lúc runtime, sống ở root injector.
95
95
  *
96
96
  * why: `SdHttpInterceptor` được đăng ký qua `HTTP_INTERCEPTORS` ở ROOT, nên
97
- * `inject(SD_API_CONFIG)` của nó chỉ thấy provider ở root. Library nào khai
98
- * `{ provide: SD_API_CONFIG, multi: true }` trong NgModule mà shell nạp bằng
97
+ * `inject(SD_API_CONFIGURATION)` của nó chỉ thấy provider ở root. Library nào khai
98
+ * `{ provide: SD_API_CONFIGURATION, multi: true }` trong NgModule mà shell nạp bằng
99
99
  * `loadChildren` thì provider nằm ở child injector của lazy route — interceptor không
100
100
  * bao giờ thấy, nên mất `intercept` / `beforeRemote` / `afterRemote` trong im lặng.
101
101
  * Registry này là điểm hẹn ở root mà mọi scope (root, eager, lazy) đều ghi vào được.
102
102
  *
103
- * Registry tự nhặt `SD_API_CONFIG` khai trong injector của lazy route (`Route.providers`,
103
+ * Registry tự nhặt `SD_API_CONFIGURATION` khai trong injector của lazy route (`Route.providers`,
104
104
  * NgModule của `loadChildren`) trong chính navigation Router tạo injector đó — trước guard,
105
105
  * resolver và component — và gỡ khi injector bị huỷ;
106
106
  * library giữ nguyên cách khai multi provider, không cần biết shell mount nó eager hay lazy.
@@ -45,7 +45,7 @@ type SdCacheGetCallback = (key: string, option?: SdCacheOption<unknown>) => Prom
45
45
  type SdCacheRemoveCallback = (key: string, option?: SdCacheOption<unknown>) => Promise<void> | void;
46
46
  /**
47
47
  * Số entry `type: 'memory'` tối đa được giữ trước khi LRU đẩy entry cũ nhất ra.
48
- * Ghi đè bằng `maxMemoryEntries` trên `SD_CACHE_CONFIG`.
48
+ * Ghi đè bằng `maxMemoryEntries` trên `SD_CACHE_CONFIGURATION`.
49
49
  */
50
50
  declare const SD_CACHE_DEFAULT_MAX_MEMORY_ENTRIES = 500;
51
51
  interface ISdCacheConfiguration {
@@ -63,6 +63,8 @@ interface ISdCacheConfiguration {
63
63
  get?: SdCacheGetCallback;
64
64
  remove?: SdCacheRemoveCallback;
65
65
  }
66
+ declare const SD_CACHE_CONFIGURATION: InjectionToken<ISdCacheConfiguration>;
67
+ /** @deprecated Use `SD_CACHE_CONFIGURATION`. This is the same injection token. */
66
68
  declare const SD_CACHE_CONFIG: InjectionToken<ISdCacheConfiguration>;
67
69
  interface SdLegacyCacheCallbacks<T> {
68
70
  matches: (key: string, option?: SdCacheOption<unknown>) => boolean;
@@ -85,5 +87,5 @@ declare class SdCacheService {
85
87
  static ɵprov: i0.ɵɵInjectableDeclaration<SdCacheService>;
86
88
  }
87
89
 
88
- export { SD_CACHE_CONFIG, SD_CACHE_DEFAULT_MAX_MEMORY_ENTRIES, SdCacheService, adaptLegacySdCacheCallbacks };
90
+ export { SD_CACHE_CONFIG, SD_CACHE_CONFIGURATION, SD_CACHE_DEFAULT_MAX_MEMORY_ENTRIES, SdCacheService, adaptLegacySdCacheCallbacks };
89
91
  export type { ISdCacheConfiguration, SdCache, SdCacheGetCallback, SdCacheOption, SdCacheRemoveCallback, SdCacheSetCallback, SdCacheSnapshot, SdCacheStoredValue, SdCacheWithDefault, SdLegacyCacheCallbacks };
@@ -41,6 +41,8 @@ interface ISdStorageConfiguration {
41
41
  serializer?: SdPersistenceSerializer;
42
42
  identityCanonicalizer?: SdPersistenceIdentityCanonicalizer;
43
43
  }
44
+ declare const SD_STORAGE_CONFIGURATION: InjectionToken<ISdStorageConfiguration>;
45
+ /** @deprecated Use `SD_STORAGE_CONFIGURATION`. This is the same injection token. */
44
46
  declare const SD_STORAGE_CONFIG: InjectionToken<ISdStorageConfiguration>;
45
47
 
46
48
  declare class SdStorageService {
@@ -54,5 +56,5 @@ declare class SdStorageService {
54
56
  static ɵprov: i0.ɵɵInjectableDeclaration<SdStorageService>;
55
57
  }
56
58
 
57
- export { SD_STORAGE_CONFIG, SdStorageService };
59
+ export { SD_STORAGE_CONFIG, SD_STORAGE_CONFIGURATION, SdStorageService };
58
60
  export type { ISdStorageConfiguration, SdStorage, SdStorageOption, SdStorageWithDefault };
@@ -42,6 +42,8 @@ interface SdUnsavedChangesRegistration {
42
42
  interface SdUnsavedChangesConfirmOptions {
43
43
  readonly scope?: unknown;
44
44
  readonly reason?: SdUnsavedChangesReason;
45
+ /** Asks with this adapter for this call only, instead of `SD_UNSAVED_CHANGES_CONFIRMATION_ADAPTER`. */
46
+ readonly adapter?: SdUnsavedChangesConfirmationAdapter;
45
47
  }
46
48
 
47
49
  interface SdUnsavedChangesWindow {
@@ -74,6 +76,15 @@ interface SdUnsavedChangesFormOptions<TValue> {
74
76
  readonly save?: (value: TValue) => SdUnsavedChangesMaybeAsync<void | boolean>;
75
77
  readonly reset?: (form: FormGroup) => SdUnsavedChangesMaybeAsync<void | boolean>;
76
78
  readonly discard?: (form: FormGroup) => SdUnsavedChangesMaybeAsync<void | boolean>;
79
+ /**
80
+ * `'control'` (default): the form's own `dirty` flag. `'value'`: dirty only while the value differs from the
81
+ * saved one, so a value typed back to what it was is no change, whether or not the field marks its control dirty.
82
+ * In `'value'` mode each control's saved value is the one it holds once it has joined the form (an `<sd-*>`
83
+ * field registers and writes its model after this call), and it is taken again when the form or the control is
84
+ * marked pristine, on `save()`, `reset()`, `discard()` and on `markPristine()` of the registration. A page that
85
+ * loads another record into the same form calls `markPristine()` once the record is in.
86
+ */
87
+ readonly dirty?: 'control' | 'value';
77
88
  }
78
89
  declare function registerSdUnsavedChangesForm<TValue extends Record<string, unknown>>(service: SdUnsavedChangesService, form: FormGroup, options: SdUnsavedChangesFormOptions<TValue>): SdUnsavedChangesRegistration;
79
90
  declare function createSdUnsavedChangesCloseGuard(service: SdUnsavedChangesService, options?: Omit<SdUnsavedChangesConfirmOptions, 'reason'>): () => Promise<boolean>;