@sdcorejs/angular 21.3.5 → 21.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 +62 -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 +2479 -0
  14. package/fesm2022/sdcorejs-angular-components-calendar.mjs.map +1 -0
  15. package/fesm2022/sdcorejs-angular-components-card.mjs +486 -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 +833 -154
  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 +1312 -220
  30. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  31. package/fesm2022/sdcorejs-angular-components-quick-action.mjs +68 -2
  32. package/fesm2022/sdcorejs-angular-components-quick-action.mjs.map +1 -1
  33. package/fesm2022/sdcorejs-angular-components-scheduler.mjs +1932 -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 +615 -104
  42. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  43. package/fesm2022/sdcorejs-angular-components-timeline.mjs +473 -0
  44. package/fesm2022/sdcorejs-angular-components-timeline.mjs.map +1 -0
  45. package/fesm2022/sdcorejs-angular-components-tree.mjs +597 -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 +109 -22
  52. package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
  53. package/fesm2022/sdcorejs-angular-forms-date.mjs +140 -42
  54. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  55. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +70 -21
  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-BR6jxyYd.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-BfvRoiKg.mjs} +3 -3
  66. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BR6jxyYd.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-BfvRoiKg.mjs.map} +1 -1
  67. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-BsEL-y-M.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-C9jW2AkB.mjs} +2 -2
  68. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-BsEL-y-M.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-C9jW2AkB.mjs.map} +1 -1
  69. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-qTFKh4UG.mjs → sdcorejs-angular-modules-generic-generic-list.page-BwGHv8k-.mjs} +3 -3
  70. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-qTFKh4UG.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-BwGHv8k-.mjs.map} +1 -1
  71. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-Cq0GFfo1.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BhUf_wyg.mjs} +4 -4
  72. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-Cq0GFfo1.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BhUf_wyg.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-5uIBONB3.mjs → sdcorejs-angular-modules-pattern-base-api.service-VnxHofZl.mjs} +2 -2
  77. package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-5uIBONB3.mjs.map → sdcorejs-angular-modules-pattern-base-api.service-VnxHofZl.mjs.map} +1 -1
  78. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-CCHeD5tf.mjs → sdcorejs-angular-modules-pattern-create.component-7VOgxRio.mjs} +11 -7
  79. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-7VOgxRio.mjs.map +1 -0
  80. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-B35CvNrI.mjs → sdcorejs-angular-modules-pattern-create.component-COnQ3U15.mjs} +2 -2
  81. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-B35CvNrI.mjs.map → sdcorejs-angular-modules-pattern-create.component-COnQ3U15.mjs.map} +1 -1
  82. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-Cvxx5s1o.mjs → sdcorejs-angular-modules-pattern-create.component-CggApoVx.mjs} +2 -2
  83. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-Cvxx5s1o.mjs.map → sdcorejs-angular-modules-pattern-create.component-CggApoVx.mjs.map} +1 -1
  84. package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-5hBM9st3.mjs → sdcorejs-angular-modules-pattern-customer.service-5th_X0wz.mjs} +2 -2
  85. package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-5hBM9st3.mjs.map → sdcorejs-angular-modules-pattern-customer.service-5th_X0wz.mjs.map} +1 -1
  86. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-BuvAy1by.mjs → sdcorejs-angular-modules-pattern-detail.component-BBqMMusi.mjs} +2 -2
  87. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-BuvAy1by.mjs.map → sdcorejs-angular-modules-pattern-detail.component-BBqMMusi.mjs.map} +1 -1
  88. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-BcxxJCVt.mjs → sdcorejs-angular-modules-pattern-detail.component-LS8QNECh.mjs} +58 -55
  89. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-LS8QNECh.mjs.map +1 -0
  90. package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-BDixzOA6.mjs → sdcorejs-angular-modules-pattern-flow.component-CQajWHBR.mjs} +3 -3
  91. package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-BDixzOA6.mjs.map → sdcorejs-angular-modules-pattern-flow.component-CQajWHBR.mjs.map} +1 -1
  92. package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-iRIG7WQo.mjs → sdcorejs-angular-modules-pattern-index.component-DHRtqSRm.mjs} +2 -2
  93. package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-iRIG7WQo.mjs.map → sdcorejs-angular-modules-pattern-index.component-DHRtqSRm.mjs.map} +1 -1
  94. package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-BqKJDK9M.mjs → sdcorejs-angular-modules-pattern-lines-table-form.component-DBPMTKqD.mjs} +5 -5
  95. package/fesm2022/{sdcorejs-angular-modules-pattern-lines-table-form.component-BqKJDK9M.mjs.map → sdcorejs-angular-modules-pattern-lines-table-form.component-DBPMTKqD.mjs.map} +1 -1
  96. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CIkZmM47.mjs +501 -0
  97. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CIkZmM47.mjs.map +1 -0
  98. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CgKUBP46.mjs +506 -0
  99. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CgKUBP46.mjs.map +1 -0
  100. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-Cj03DgF1.mjs → sdcorejs-angular-modules-pattern-list.component-Co22ltOo.mjs} +30 -39
  101. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Co22ltOo.mjs.map +1 -0
  102. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DH3CroK1.mjs → sdcorejs-angular-modules-pattern-list.component-D1Q69_3M.mjs} +3 -3
  103. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DH3CroK1.mjs.map → sdcorejs-angular-modules-pattern-list.component-D1Q69_3M.mjs.map} +1 -1
  104. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-BMpOXn7E.mjs → sdcorejs-angular-modules-pattern-list.component-DBnStJM_.mjs} +3 -3
  105. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-BMpOXn7E.mjs.map → sdcorejs-angular-modules-pattern-list.component-DBnStJM_.mjs.map} +1 -1
  106. package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-DnB5_C1D.mjs → sdcorejs-angular-modules-pattern-mock-backend.factory-DexrG-bI.mjs} +2 -2
  107. package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-DnB5_C1D.mjs.map → sdcorejs-angular-modules-pattern-mock-backend.factory-DexrG-bI.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-DZ3fY-yQ.mjs → sdcorejs-angular-modules-pattern-product.service-DG1pe8fb.mjs} +2 -2
  113. package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-DZ3fY-yQ.mjs.map → sdcorejs-angular-modules-pattern-product.service-DG1pe8fb.mjs.map} +1 -1
  114. package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-DVYnHOtn.mjs → sdcorejs-angular-modules-pattern-profile.component-CLvjGnbA.mjs} +24 -14
  115. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-CLvjGnbA.mjs.map +1 -0
  116. package/fesm2022/sdcorejs-angular-modules-pattern-routes-B8ceLXT4.mjs +65 -0
  117. package/fesm2022/sdcorejs-angular-modules-pattern-routes-B8ceLXT4.mjs.map +1 -0
  118. package/fesm2022/sdcorejs-angular-modules-pattern-routes-C1YBKLdb.mjs +56 -0
  119. package/fesm2022/sdcorejs-angular-modules-pattern-routes-C1YBKLdb.mjs.map +1 -0
  120. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BGZzmwY2.mjs → sdcorejs-angular-modules-pattern-routes-CntNjuzb.mjs} +3 -3
  121. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BGZzmwY2.mjs.map → sdcorejs-angular-modules-pattern-routes-CntNjuzb.mjs.map} +1 -1
  122. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CdSiqJCz.mjs → sdcorejs-angular-modules-pattern-routes-CwfyLo_V.mjs} +5 -5
  123. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CdSiqJCz.mjs.map → sdcorejs-angular-modules-pattern-routes-CwfyLo_V.mjs.map} +1 -1
  124. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B8i5MUtz.mjs → sdcorejs-angular-modules-pattern-routes-DAw75sbm.mjs} +8 -8
  125. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B8i5MUtz.mjs.map → sdcorejs-angular-modules-pattern-routes-DAw75sbm.mjs.map} +1 -1
  126. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-C_CLbNSs.mjs → sdcorejs-angular-modules-pattern-routes-DZmBTvxf.mjs} +3 -3
  127. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-C_CLbNSs.mjs.map → sdcorejs-angular-modules-pattern-routes-DZmBTvxf.mjs.map} +1 -1
  128. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-uRsy0zag.mjs → sdcorejs-angular-modules-pattern-routes-Dp3-TMG3.mjs} +4 -4
  129. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-uRsy0zag.mjs.map → sdcorejs-angular-modules-pattern-routes-Dp3-TMG3.mjs.map} +1 -1
  130. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-p7lQcGGX.mjs → sdcorejs-angular-modules-pattern-routes-WyOa9Q3H.mjs} +3 -3
  131. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-p7lQcGGX.mjs.map → sdcorejs-angular-modules-pattern-routes-WyOa9Q3H.mjs.map} +1 -1
  132. package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-els-Wxch.mjs → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CsipDO_7.mjs} +12 -12
  133. package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-els-Wxch.mjs.map → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CsipDO_7.mjs.map} +1 -1
  134. package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-5G4lKoLv.mjs → sdcorejs-angular-modules-pattern-shell.component-Dy1a9seQ.mjs} +4 -4
  135. package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-5G4lKoLv.mjs.map → sdcorejs-angular-modules-pattern-shell.component-Dy1a9seQ.mjs.map} +1 -1
  136. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-CBpuQnHp.mjs +480 -0
  137. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-CBpuQnHp.mjs.map +1 -0
  138. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-CpGbjd_m.mjs → sdcorejs-angular-modules-pattern-update.component-B8N158up.mjs} +2 -2
  139. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-CpGbjd_m.mjs.map → sdcorejs-angular-modules-pattern-update.component-B8N158up.mjs.map} +1 -1
  140. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-Bwsqvl4A.mjs → sdcorejs-angular-modules-pattern-update.component-BBktRBkQ.mjs} +9 -6
  141. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BBktRBkQ.mjs.map +1 -0
  142. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-Bq_5H0xM.mjs → sdcorejs-angular-modules-pattern-update.component-C9Wf6jhW.mjs} +2 -2
  143. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-Bq_5H0xM.mjs.map → sdcorejs-angular-modules-pattern-update.component-C9Wf6jhW.mjs.map} +1 -1
  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 +226 -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-7d4hJjAo.mjs +0 -144
  202. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-7d4hJjAo.mjs.map +0 -1
  203. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CGkdzJ-A.mjs +0 -145
  204. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CGkdzJ-A.mjs.map +0 -1
  205. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CCHeD5tf.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-Bza4JOdZ.mjs +0 -148
  209. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bza4JOdZ.mjs.map +0 -1
  210. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-BcxxJCVt.mjs.map +0 -1
  211. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-B9vCzIT6.mjs +0 -232
  212. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-B9vCzIT6.mjs.map +0 -1
  213. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BnROr-Wg.mjs +0 -87
  214. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BnROr-Wg.mjs.map +0 -1
  215. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-Cbwdhc0Z.mjs +0 -70
  216. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-Cbwdhc0Z.mjs.map +0 -1
  217. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6_x5N3F.mjs +0 -164
  218. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-B6_x5N3F.mjs.map +0 -1
  219. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-Cj03DgF1.mjs.map +0 -1
  220. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-D-pHPHFP.mjs +0 -118
  221. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-D-pHPHFP.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-DVYnHOtn.mjs.map +0 -1
  225. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BPofy0Oq.mjs +0 -99
  226. package/fesm2022/sdcorejs-angular-modules-pattern-routes-BPofy0Oq.mjs.map +0 -1
  227. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CYeHFGl1.mjs +0 -74
  228. package/fesm2022/sdcorejs-angular-modules-pattern-routes-CYeHFGl1.mjs.map +0 -1
  229. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BF0hAVrv.mjs +0 -132
  230. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BF0hAVrv.mjs.map +0 -1
  231. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DJeQxfDA.mjs +0 -143
  232. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DJeQxfDA.mjs.map +0 -1
  233. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Bwsqvl4A.mjs.map +0 -1
  234. package/modules/pattern/features/category/entity.resolver.ts +0 -27
  235. package/types/sdcorejs-angular-components-history.d.ts +0 -23
@@ -1,16 +1,18 @@
1
- import { CommonModule } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
2
  import { inject, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
4
- import { FormsModule } from '@angular/forms';
5
- import * as i1 from '@angular/material/dialog';
3
+ import { MatBottomSheetRef, MAT_BOTTOM_SHEET_DATA, MatBottomSheet } from '@angular/material/bottom-sheet';
4
+ import * as i2 from '@angular/material/dialog';
6
5
  import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog';
6
+ import * as i1 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import { FormsModule } from '@angular/forms';
7
9
  import { SdButton } from '@sdcorejs/angular/components/button';
8
10
  import { SdDate } from '@sdcorejs/angular/forms/date';
9
11
  import { SdDatetime } from '@sdcorejs/angular/forms/datetime';
10
12
  import { SdRadio } from '@sdcorejs/angular/forms/radio';
11
13
  import { SdSelect } from '@sdcorejs/angular/forms/select';
12
14
  import { SdTextarea } from '@sdcorejs/angular/forms/textarea';
13
- import { Utilities } from '@sdcorejs/utils/fns';
15
+ import { Utilities, BrowserUtilities } from '@sdcorejs/utils/fns';
14
16
  import { SD_ICON_CONFIGURATION, SdIcon } from '@sdcorejs/angular/modules/icon';
15
17
  import { I18nService } from '@sdcorejs/angular/i18n';
16
18
 
@@ -18,8 +20,15 @@ class DialogConfirmComponent {
18
20
  value;
19
21
  required = false;
20
22
  id = `I${Utilities.generateUuid()}`;
21
- dialogRef = inject((MatDialogRef));
22
- data = inject(MAT_DIALOG_DATA);
23
+ // why: cùng một component chạy trong MatDialog hoặc MatBottomSheet nên cả hai ref đều là tùy chọn. SdConfirmService
24
+ // quyết định kiểu hiển thị; component chỉ dùng ref đang có.
25
+ dialogRef = inject((MatDialogRef), { optional: true });
26
+ #bottomSheetRef = inject((MatBottomSheetRef), { optional: true });
27
+ /** `true` when opened in a bottom sheet; selects the stacked mobile action layout. */
28
+ isBottomSheet = !!this.#bottomSheetRef;
29
+ data = (this.isBottomSheet
30
+ ? inject(MAT_BOTTOM_SHEET_DATA, { optional: true })
31
+ : inject(MAT_DIALOG_DATA, { optional: true })) ?? {};
23
32
  iconTone = this.data.yesButtonColor || 'primary';
24
33
  iconShape = this.data.iconShape ?? inject(SD_ICON_CONFIGURATION).defaultShape;
25
34
  resolvedIcon = this.data.icon?.trim() ||
@@ -57,28 +66,50 @@ class DialogConfirmComponent {
57
66
  this.required = this.data?.select?.required || false;
58
67
  }
59
68
  }
69
+ /** Accept stays disabled while a required field is empty (a whitespace-only input counts as empty). */
70
+ get acceptDisabled() {
71
+ const value = this.value;
72
+ return (this.required &&
73
+ (value === undefined ||
74
+ value === null ||
75
+ value === '' ||
76
+ (!!this.data.input && !value.trim()) ||
77
+ (value.length !== undefined && value.length === 0)));
78
+ }
79
+ #close(result) {
80
+ if (this.#bottomSheetRef) {
81
+ this.#bottomSheetRef.dismiss(result);
82
+ }
83
+ else {
84
+ this.dialogRef?.close(result);
85
+ }
86
+ }
60
87
  onCancel = () => {
61
- this.dialogRef.close({ action: 'CANCEL', value: null });
88
+ this.#close({ action: 'CANCEL', value: null });
62
89
  };
63
90
  onAccept = () => {
64
91
  // Always return an object with action and value for consistency
65
92
  if (this.data?.radio || this.data?.input || this.data?.date || this.data?.datetime || this.data?.select) {
66
- this.dialogRef.close({ action: 'ACCEPT', value: this.value });
93
+ this.#close({ action: 'ACCEPT', value: this.value });
67
94
  }
68
95
  else {
69
- this.dialogRef.close({ action: 'ACCEPT', value: null });
96
+ this.#close({ action: 'ACCEPT', value: null });
70
97
  }
71
98
  };
72
99
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DialogConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DialogConfirmComponent, isStandalone: true, selector: "sd-dialog-confirm", ngImport: i0, template: "<div mat-dialog-content class=\"sd-dialog-confirm__content\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <div class=\"sd-dialog-confirm__header\">\n <span class=\"sd-dialog-confirm__icon\" aria-hidden=\"true\" [attr.data-icon]=\"resolvedIcon\" [attr.data-tone]=\"iconTone\" [attr.data-icon-shape]=\"iconShape\">\n <sd-icon [name]=\"resolvedIcon\" size=\"22px\"></sd-icon>\n </span>\n <div class=\"sd-dialog-confirm__copy\">\n <h2 mat-dialog-title class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n @if (data.message) {\n <div class=\"sd-dialog-confirm__message\" [innerHtml]=\"data.message\"></div>\n }\n </div>\n </div>\n @if (hasFields) {\n <div class=\"sd-dialog-confirm__fields\">\n @if (data.input) {\n <sd-textarea\n [label]=\"data.input.label\"\n [placeholder]=\"data.input.placeholder\"\n [(model)]=\"value\"\n [rows]=\"3\"\n [required]=\"data.input.required\"\n [maxlength]=\"data.input.maxlength!\" />\n }\n @if (data.select) {\n <sd-select\n [placeholder]=\"data.select.placeholder\"\n [items]=\"data.select.items\"\n [valueField]=\"data.select.valueField\"\n [displayField]=\"data.select.displayField\"\n [multiple]=\"data.select.multiple\"\n [(model)]=\"value\"\n [required]=\"data.select.required\">\n </sd-select>\n }\n @if (data.date) {\n <sd-date\n [placeholder]=\"data.date.placeholder\"\n [(model)]=\"value\"\n type=\"date\"\n [min]=\"data.date.min!\"\n [max]=\"data.date.max!\"\n [required]=\"data.date.required\">\n </sd-date>\n }\n @if (data.datetime) {\n <sd-datetime\n [placeholder]=\"data.datetime.placeholder\"\n [(model)]=\"value\"\n [min]=\"data.datetime.min!\"\n [max]=\"data.datetime.max!\"\n [showSeconds]=\"data.datetime.showSeconds\"\n [required]=\"data.datetime.required\">\n </sd-datetime>\n }\n @if (data.radio) {\n <sd-radio\n [items]=\"data.radio.items\"\n [valueField]=\"data.radio.valueField\"\n [displayField]=\"data.radio.displayField\"\n [display]=\"data.radio.display || 'column'\"\n [(model)]=\"value\"\n [required]=\"data.radio.required\">\n </sd-radio>\n }\n </div>\n }\n</div>\n<div mat-dialog-actions align=\"end\" class=\"sd-dialog-confirm__actions\">\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n size=\"sm\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n size=\"sm\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"\n required &&\n (value === undefined ||\n value === null ||\n value === '' ||\n (data.input && !value.trim()) ||\n (value.length !== undefined && value.length === 0))\n \"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;min-height:0;max-height:calc(100dvh - 32px);padding:20px;overflow:hidden}.sd-dialog-confirm__content{min-height:0;max-height:none;margin:0;padding:0;color:var(--sd-text)}.sd-dialog-confirm__header{display:flex;align-items:flex-start;gap:12px}.sd-dialog-confirm__icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon[data-icon-shape=circle]{border-radius:50%}.sd-dialog-confirm__icon[data-icon-shape=none]{background:transparent}.sd-dialog-confirm__icon sd-icon{width:22px;height:22px;font-size:var(--sd-font-size-22, 22px);line-height:var(--sd-line-height-22, 22px)}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:var(--sd-font-size-18, 18px);font-weight:var(--sd-font-weight-semibold, 600);line-height:25px;letter-spacing:normal;color:var(--sd-text);overflow-wrap:anywhere}.sd-dialog-confirm__title:before{display:none}.sd-dialog-confirm__message{font-size:var(--sd-font-size-14, 14px);line-height:21px;letter-spacing:normal;color:var(--sd-text-secondary);overflow-wrap:anywhere}.sd-dialog-confirm__fields{margin-top:20px}.sd-dialog-confirm__fields sd-radio{height:auto}.sd-dialog-confirm__fields ::ng-deep .mdc-radio{display:inline-flex;align-items:center;justify-content:center}.sd-dialog-confirm__fields ::ng-deep .mat-mdc-radio-button{display:inline-flex;align-items:center;min-height:48px}.sd-dialog-confirm__fields ::ng-deep .c-radio-group-row{flex-wrap:wrap;row-gap:4px}.sd-dialog-confirm__actions{flex-shrink:0;gap:8px;min-height:0;margin:24px 0 0;padding:0}::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{border-radius:var(--sd-radius-8, 8px);box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:last-child{margin-bottom:0}@media(prefers-reduced-motion:reduce){::ng-deep .sd-confirm-panel .mat-mdc-dialog-container,::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{transition:none!important}}@media(max-width:600px){::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button{flex:1}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button button{width:100%;min-height:44px}}@media(max-width:600px){:host{padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdRadio, selector: "sd-radio", inputs: ["autoId", "name", "form", "label", "placeholder", "display", "items", "valueField", "displayField", "required", "inlineError", "disabled", "viewed", "color", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdTextarea, selector: "sd-textarea", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "rows", "hideInlineError", "required", "disabled", "viewed", "autoHeight", "maxlength", "minlength", "pattern", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "model"], outputs: ["modelChange", "sdChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
100
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.17", type: DialogConfirmComponent, isStandalone: true, selector: "sd-dialog-confirm", host: { properties: { "class.sd-dialog-confirm--sheet": "isBottomSheet" } }, ngImport: i0, template: "<ng-template #body>\n <div class=\"sd-dialog-confirm__header\">\n <span class=\"sd-dialog-confirm__icon\" aria-hidden=\"true\" [attr.data-icon]=\"resolvedIcon\" [attr.data-tone]=\"iconTone\" [attr.data-icon-shape]=\"iconShape\">\n <sd-icon [name]=\"resolvedIcon\" size=\"22px\"></sd-icon>\n </span>\n <div class=\"sd-dialog-confirm__copy\">\n @if (isBottomSheet) {\n <h2 class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n } @else {\n <h2 mat-dialog-title class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n }\n @if (data.message) {\n <div class=\"sd-dialog-confirm__message\" [innerHtml]=\"data.message\"></div>\n }\n </div>\n </div>\n @if (hasFields) {\n <div class=\"sd-dialog-confirm__fields\">\n @if (data.input) {\n <sd-textarea\n [label]=\"data.input.label\"\n [placeholder]=\"data.input.placeholder\"\n [(model)]=\"value\"\n [rows]=\"3\"\n [required]=\"data.input.required\"\n [maxlength]=\"data.input.maxlength!\" />\n }\n @if (data.select) {\n <sd-select\n [placeholder]=\"data.select.placeholder\"\n [items]=\"data.select.items\"\n [valueField]=\"data.select.valueField\"\n [displayField]=\"data.select.displayField\"\n [multiple]=\"data.select.multiple\"\n [(model)]=\"value\"\n [required]=\"data.select.required\">\n </sd-select>\n }\n @if (data.date) {\n <sd-date\n [placeholder]=\"data.date.placeholder\"\n [(model)]=\"value\"\n type=\"date\"\n [min]=\"data.date.min!\"\n [max]=\"data.date.max!\"\n [required]=\"data.date.required\">\n </sd-date>\n }\n @if (data.datetime) {\n <sd-datetime\n [placeholder]=\"data.datetime.placeholder\"\n [(model)]=\"value\"\n [min]=\"data.datetime.min!\"\n [max]=\"data.datetime.max!\"\n [showSeconds]=\"data.datetime.showSeconds\"\n [required]=\"data.datetime.required\">\n </sd-datetime>\n }\n @if (data.radio) {\n <sd-radio\n [items]=\"data.radio.items\"\n [valueField]=\"data.radio.valueField\"\n [displayField]=\"data.radio.displayField\"\n [display]=\"data.radio.display || 'column'\"\n [(model)]=\"value\"\n [required]=\"data.radio.required\">\n </sd-radio>\n }\n </div>\n }\n</ng-template>\n\n@if (isBottomSheet) {\n <!-- why: bottom sheet kh\u00F4ng c\u00F3 MatDialogRef n\u00EAn kh\u00F4ng d\u00F9ng directive mat-dialog-*; n\u00FAt ch\u00EDnh \u0111\u1EE9ng tr\u00EAn, full-width, cao 48px. -->\n <div class=\"sd-dialog-confirm__content sd-dialog-confirm__content--sheet\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <ng-container [ngTemplateOutlet]=\"body\" />\n </div>\n <div class=\"sd-dialog-confirm__actions sd-dialog-confirm__actions--sheet\">\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n block\n size=\"lg\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"acceptDisabled\"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n block\n size=\"lg\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n </div>\n} @else {\n <div mat-dialog-content class=\"sd-dialog-confirm__content\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <ng-container [ngTemplateOutlet]=\"body\" />\n </div>\n <div mat-dialog-actions align=\"end\" class=\"sd-dialog-confirm__actions\">\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n size=\"sm\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n size=\"sm\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"acceptDisabled\"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;min-height:0;max-height:calc(100dvh - 32px);padding:20px;overflow:hidden}.sd-dialog-confirm__content{min-height:0;max-height:none;margin:0;padding:0;color:var(--sd-text)}.sd-dialog-confirm__header{display:flex;align-items:flex-start;gap:12px}.sd-dialog-confirm__icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon[data-icon-shape=circle]{border-radius:50%}.sd-dialog-confirm__icon[data-icon-shape=none]{background:transparent}.sd-dialog-confirm__icon sd-icon{width:22px;height:22px;font-size:var(--sd-font-size-22, 22px);line-height:var(--sd-line-height-22, 22px)}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:var(--sd-font-size-18, 18px);font-weight:var(--sd-font-weight-semibold, 600);line-height:25px;letter-spacing:normal;color:var(--sd-text);overflow-wrap:anywhere}.sd-dialog-confirm__title:before{display:none}.sd-dialog-confirm__message{font-size:var(--sd-font-size-14, 14px);line-height:21px;letter-spacing:normal;color:var(--sd-text-secondary);overflow-wrap:anywhere}.sd-dialog-confirm__fields{margin-top:20px}.sd-dialog-confirm__fields sd-radio{height:auto}.sd-dialog-confirm__fields ::ng-deep .mdc-radio{display:inline-flex;align-items:center;justify-content:center}.sd-dialog-confirm__fields ::ng-deep .mat-mdc-radio-button{display:inline-flex;align-items:center;min-height:48px}.sd-dialog-confirm__fields ::ng-deep .c-radio-group-row{flex-wrap:wrap;row-gap:4px}.sd-dialog-confirm__actions{flex-shrink:0;gap:8px;min-height:0;margin:24px 0 0;padding:0}::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{border-radius:var(--sd-radius-8, 8px);box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:last-child{margin-bottom:0}@media(prefers-reduced-motion:reduce){::ng-deep .sd-confirm-panel .mat-mdc-dialog-container,::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{transition:none!important}}@media(max-width:600px){::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button{flex:1}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button button{width:100%;min-height:44px}}@media(max-width:600px){:host{padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}}::ng-deep .sd-confirm-bottom-sheet.mat-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet.mat-mdc-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet .mat-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet .mat-mdc-bottom-sheet-container{display:flex;flex-direction:column;box-sizing:border-box;max-height:min(80vh,100vh - 16px);max-height:min(80vh,100dvh - 16px);padding:0 max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));overflow:hidden}:host(.sd-dialog-confirm--sheet){max-height:inherit;padding:20px 0 max(16px,env(safe-area-inset-bottom,0px))}.sd-dialog-confirm__content--sheet{flex:1 1 auto;overflow-y:auto}.sd-dialog-confirm__actions--sheet{display:flex;flex-direction:column;margin-top:16px}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__message>:last-child{margin-bottom:0}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: SdButton, selector: "sd-button", inputs: ["autoId", "type", "color", "size", "fontSet", "title", "width", "tooltip", "prefixIcon", "suffixIcon", "disabled", "openOnHover", "loading", "block", "htmlType", "indicator", "indicatorColor", "indicatorMax", "indicatorLabel"], outputs: ["click"] }, { kind: "component", type: SdDate, selector: "sd-date", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdDatetime, selector: "sd-datetime", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "hideInlineError", "required", "disabled", "viewed", "showSeconds", "clearable", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "min", "minDate", "max", "maxDate", "transform", "model"], outputs: ["modelChange", "sdChange", "sdFocus"] }, { kind: "component", type: SdRadio, selector: "sd-radio", inputs: ["autoId", "name", "form", "label", "placeholder", "display", "items", "valueField", "displayField", "required", "inlineError", "disabled", "viewed", "color", "hyperlink", "model"], outputs: ["modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdSelect, selector: "sd-select", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "valueField", "displayField", "disabledField", "cacheChecksum", "limit", "virtualScroll", "itemSize", "hyperlink", "minWidthPanel", "hideInlineError", "hideReadError", "required", "disabled", "viewed", "multiple", "showSelectAll", "clearable", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "items", "model"], outputs: ["operatorChange", "sdReadStateChange", "modelChange", "sdChange", "sdSelection"] }, { kind: "component", type: SdTextarea, selector: "sd-textarea", inputs: ["autoId", "name", "size", "form", "label", "helperText", "placeholder", "rows", "hideInlineError", "required", "disabled", "viewed", "autoHeight", "maxlength", "minlength", "pattern", "validator", "inlineError", "appearance", "floatLabel", "labelPlacement", "model"], outputs: ["modelChange", "sdChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
74
101
  }
75
102
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: DialogConfirmComponent, decorators: [{
76
103
  type: Component,
77
- args: [{ selector: 'sd-dialog-confirm', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon, CommonModule, FormsModule, MatDialogModule, SdButton, SdDate, SdDatetime, SdRadio, SdSelect, SdTextarea], template: "<div mat-dialog-content class=\"sd-dialog-confirm__content\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <div class=\"sd-dialog-confirm__header\">\n <span class=\"sd-dialog-confirm__icon\" aria-hidden=\"true\" [attr.data-icon]=\"resolvedIcon\" [attr.data-tone]=\"iconTone\" [attr.data-icon-shape]=\"iconShape\">\n <sd-icon [name]=\"resolvedIcon\" size=\"22px\"></sd-icon>\n </span>\n <div class=\"sd-dialog-confirm__copy\">\n <h2 mat-dialog-title class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n @if (data.message) {\n <div class=\"sd-dialog-confirm__message\" [innerHtml]=\"data.message\"></div>\n }\n </div>\n </div>\n @if (hasFields) {\n <div class=\"sd-dialog-confirm__fields\">\n @if (data.input) {\n <sd-textarea\n [label]=\"data.input.label\"\n [placeholder]=\"data.input.placeholder\"\n [(model)]=\"value\"\n [rows]=\"3\"\n [required]=\"data.input.required\"\n [maxlength]=\"data.input.maxlength!\" />\n }\n @if (data.select) {\n <sd-select\n [placeholder]=\"data.select.placeholder\"\n [items]=\"data.select.items\"\n [valueField]=\"data.select.valueField\"\n [displayField]=\"data.select.displayField\"\n [multiple]=\"data.select.multiple\"\n [(model)]=\"value\"\n [required]=\"data.select.required\">\n </sd-select>\n }\n @if (data.date) {\n <sd-date\n [placeholder]=\"data.date.placeholder\"\n [(model)]=\"value\"\n type=\"date\"\n [min]=\"data.date.min!\"\n [max]=\"data.date.max!\"\n [required]=\"data.date.required\">\n </sd-date>\n }\n @if (data.datetime) {\n <sd-datetime\n [placeholder]=\"data.datetime.placeholder\"\n [(model)]=\"value\"\n [min]=\"data.datetime.min!\"\n [max]=\"data.datetime.max!\"\n [showSeconds]=\"data.datetime.showSeconds\"\n [required]=\"data.datetime.required\">\n </sd-datetime>\n }\n @if (data.radio) {\n <sd-radio\n [items]=\"data.radio.items\"\n [valueField]=\"data.radio.valueField\"\n [displayField]=\"data.radio.displayField\"\n [display]=\"data.radio.display || 'column'\"\n [(model)]=\"value\"\n [required]=\"data.radio.required\">\n </sd-radio>\n }\n </div>\n }\n</div>\n<div mat-dialog-actions align=\"end\" class=\"sd-dialog-confirm__actions\">\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n size=\"sm\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n size=\"sm\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"\n required &&\n (value === undefined ||\n value === null ||\n value === '' ||\n (data.input && !value.trim()) ||\n (value.length !== undefined && value.length === 0))\n \"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;min-height:0;max-height:calc(100dvh - 32px);padding:20px;overflow:hidden}.sd-dialog-confirm__content{min-height:0;max-height:none;margin:0;padding:0;color:var(--sd-text)}.sd-dialog-confirm__header{display:flex;align-items:flex-start;gap:12px}.sd-dialog-confirm__icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon[data-icon-shape=circle]{border-radius:50%}.sd-dialog-confirm__icon[data-icon-shape=none]{background:transparent}.sd-dialog-confirm__icon sd-icon{width:22px;height:22px;font-size:var(--sd-font-size-22, 22px);line-height:var(--sd-line-height-22, 22px)}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:var(--sd-font-size-18, 18px);font-weight:var(--sd-font-weight-semibold, 600);line-height:25px;letter-spacing:normal;color:var(--sd-text);overflow-wrap:anywhere}.sd-dialog-confirm__title:before{display:none}.sd-dialog-confirm__message{font-size:var(--sd-font-size-14, 14px);line-height:21px;letter-spacing:normal;color:var(--sd-text-secondary);overflow-wrap:anywhere}.sd-dialog-confirm__fields{margin-top:20px}.sd-dialog-confirm__fields sd-radio{height:auto}.sd-dialog-confirm__fields ::ng-deep .mdc-radio{display:inline-flex;align-items:center;justify-content:center}.sd-dialog-confirm__fields ::ng-deep .mat-mdc-radio-button{display:inline-flex;align-items:center;min-height:48px}.sd-dialog-confirm__fields ::ng-deep .c-radio-group-row{flex-wrap:wrap;row-gap:4px}.sd-dialog-confirm__actions{flex-shrink:0;gap:8px;min-height:0;margin:24px 0 0;padding:0}::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{border-radius:var(--sd-radius-8, 8px);box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:last-child{margin-bottom:0}@media(prefers-reduced-motion:reduce){::ng-deep .sd-confirm-panel .mat-mdc-dialog-container,::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{transition:none!important}}@media(max-width:600px){::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button{flex:1}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button button{width:100%;min-height:44px}}@media(max-width:600px){:host{padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}}\n"] }]
104
+ args: [{ selector: 'sd-dialog-confirm', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SdIcon, CommonModule, FormsModule, MatDialogModule, SdButton, SdDate, SdDatetime, SdRadio, SdSelect, SdTextarea], host: { '[class.sd-dialog-confirm--sheet]': 'isBottomSheet' }, template: "<ng-template #body>\n <div class=\"sd-dialog-confirm__header\">\n <span class=\"sd-dialog-confirm__icon\" aria-hidden=\"true\" [attr.data-icon]=\"resolvedIcon\" [attr.data-tone]=\"iconTone\" [attr.data-icon-shape]=\"iconShape\">\n <sd-icon [name]=\"resolvedIcon\" size=\"22px\"></sd-icon>\n </span>\n <div class=\"sd-dialog-confirm__copy\">\n @if (isBottomSheet) {\n <h2 class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n } @else {\n <h2 mat-dialog-title class=\"sd-dialog-confirm__title\" [innerHtml]=\"data.title || 'Confirm'\"></h2>\n }\n @if (data.message) {\n <div class=\"sd-dialog-confirm__message\" [innerHtml]=\"data.message\"></div>\n }\n </div>\n </div>\n @if (hasFields) {\n <div class=\"sd-dialog-confirm__fields\">\n @if (data.input) {\n <sd-textarea\n [label]=\"data.input.label\"\n [placeholder]=\"data.input.placeholder\"\n [(model)]=\"value\"\n [rows]=\"3\"\n [required]=\"data.input.required\"\n [maxlength]=\"data.input.maxlength!\" />\n }\n @if (data.select) {\n <sd-select\n [placeholder]=\"data.select.placeholder\"\n [items]=\"data.select.items\"\n [valueField]=\"data.select.valueField\"\n [displayField]=\"data.select.displayField\"\n [multiple]=\"data.select.multiple\"\n [(model)]=\"value\"\n [required]=\"data.select.required\">\n </sd-select>\n }\n @if (data.date) {\n <sd-date\n [placeholder]=\"data.date.placeholder\"\n [(model)]=\"value\"\n type=\"date\"\n [min]=\"data.date.min!\"\n [max]=\"data.date.max!\"\n [required]=\"data.date.required\">\n </sd-date>\n }\n @if (data.datetime) {\n <sd-datetime\n [placeholder]=\"data.datetime.placeholder\"\n [(model)]=\"value\"\n [min]=\"data.datetime.min!\"\n [max]=\"data.datetime.max!\"\n [showSeconds]=\"data.datetime.showSeconds\"\n [required]=\"data.datetime.required\">\n </sd-datetime>\n }\n @if (data.radio) {\n <sd-radio\n [items]=\"data.radio.items\"\n [valueField]=\"data.radio.valueField\"\n [displayField]=\"data.radio.displayField\"\n [display]=\"data.radio.display || 'column'\"\n [(model)]=\"value\"\n [required]=\"data.radio.required\">\n </sd-radio>\n }\n </div>\n }\n</ng-template>\n\n@if (isBottomSheet) {\n <!-- why: bottom sheet kh\u00F4ng c\u00F3 MatDialogRef n\u00EAn kh\u00F4ng d\u00F9ng directive mat-dialog-*; n\u00FAt ch\u00EDnh \u0111\u1EE9ng tr\u00EAn, full-width, cao 48px. -->\n <div class=\"sd-dialog-confirm__content sd-dialog-confirm__content--sheet\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <ng-container [ngTemplateOutlet]=\"body\" />\n </div>\n <div class=\"sd-dialog-confirm__actions sd-dialog-confirm__actions--sheet\">\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n block\n size=\"lg\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"acceptDisabled\"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n block\n size=\"lg\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n </div>\n} @else {\n <div mat-dialog-content class=\"sd-dialog-confirm__content\" [class.sd-dialog-confirm__content--radio]=\"data.radio\">\n <ng-container [ngTemplateOutlet]=\"body\" />\n </div>\n <div mat-dialog-actions align=\"end\" class=\"sd-dialog-confirm__actions\">\n @if (data.noTitle) {\n <sd-button\n data-confirm-cancel\n size=\"sm\"\n type=\"light\"\n htmlType=\"button\"\n [color]=\"data.noButtonColor || 'secondary'\"\n [title]=\"data.noTitle\"\n (click)=\"onCancel()\"></sd-button>\n }\n @if (data.yesTitle) {\n <sd-button\n data-confirm-accept\n size=\"sm\"\n type=\"fill\"\n htmlType=\"button\"\n [color]=\"data.yesButtonColor || 'primary'\"\n [disabled]=\"acceptDisabled\"\n [title]=\"data.yesTitle\"\n (click)=\"onAccept()\"></sd-button>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;box-sizing:border-box;min-height:0;max-height:calc(100dvh - 32px);padding:20px;overflow:hidden}.sd-dialog-confirm__content{min-height:0;max-height:none;margin:0;padding:0;color:var(--sd-text)}.sd-dialog-confirm__header{display:flex;align-items:flex-start;gap:12px}.sd-dialog-confirm__icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:var(--sd-icon-shape-radius, var(--sd-radius-8, 8px));color:var(--sd-primary-dark);background:var(--sd-primary-light)}.sd-dialog-confirm__icon[data-tone=success]{color:var(--sd-success-dark);background:var(--sd-success-light)}.sd-dialog-confirm__icon[data-tone=info]{color:var(--sd-info-dark);background:var(--sd-info-light)}.sd-dialog-confirm__icon[data-tone=warning]{color:var(--sd-warning-dark);background:var(--sd-warning-light)}.sd-dialog-confirm__icon[data-tone=error]{color:var(--sd-error-dark);background:var(--sd-error-light)}.sd-dialog-confirm__icon[data-icon-shape=circle]{border-radius:50%}.sd-dialog-confirm__icon[data-icon-shape=none]{background:transparent}.sd-dialog-confirm__icon sd-icon{width:22px;height:22px;font-size:var(--sd-font-size-22, 22px);line-height:var(--sd-line-height-22, 22px)}.sd-dialog-confirm__copy{min-width:0}.sd-dialog-confirm__title{margin:0 0 6px;padding:0;font:inherit;font-size:var(--sd-font-size-18, 18px);font-weight:var(--sd-font-weight-semibold, 600);line-height:25px;letter-spacing:normal;color:var(--sd-text);overflow-wrap:anywhere}.sd-dialog-confirm__title:before{display:none}.sd-dialog-confirm__message{font-size:var(--sd-font-size-14, 14px);line-height:21px;letter-spacing:normal;color:var(--sd-text-secondary);overflow-wrap:anywhere}.sd-dialog-confirm__fields{margin-top:20px}.sd-dialog-confirm__fields sd-radio{height:auto}.sd-dialog-confirm__fields ::ng-deep .mdc-radio{display:inline-flex;align-items:center;justify-content:center}.sd-dialog-confirm__fields ::ng-deep .mat-mdc-radio-button{display:inline-flex;align-items:center;min-height:48px}.sd-dialog-confirm__fields ::ng-deep .c-radio-group-row{flex-wrap:wrap;row-gap:4px}.sd-dialog-confirm__actions{flex-shrink:0;gap:8px;min-height:0;margin:24px 0 0;padding:0}::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{border-radius:var(--sd-radius-8, 8px);box-shadow:0 16px 48px #00000029,0 2px 8px #0000000f}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-panel .sd-dialog-confirm__message>:last-child{margin-bottom:0}@media(prefers-reduced-motion:reduce){::ng-deep .sd-confirm-panel .mat-mdc-dialog-container,::ng-deep .sd-confirm-panel .mat-mdc-dialog-surface{transition:none!important}}@media(max-width:600px){::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button{flex:1}::ng-deep .sd-confirm-panel .sd-dialog-confirm__actions sd-button button{width:100%;min-height:44px}}@media(max-width:600px){:host{padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}}::ng-deep .sd-confirm-bottom-sheet.mat-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet.mat-mdc-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet .mat-bottom-sheet-container,::ng-deep .sd-confirm-bottom-sheet .mat-mdc-bottom-sheet-container{display:flex;flex-direction:column;box-sizing:border-box;max-height:min(80vh,100vh - 16px);max-height:min(80vh,100dvh - 16px);padding:0 max(16px,env(safe-area-inset-right,0px)) 0 max(16px,env(safe-area-inset-left,0px));overflow:hidden}:host(.sd-dialog-confirm--sheet){max-height:inherit;padding:20px 0 max(16px,env(safe-area-inset-bottom,0px))}.sd-dialog-confirm__content--sheet{flex:1 1 auto;overflow-y:auto}.sd-dialog-confirm__actions--sheet{display:flex;flex-direction:column;margin-top:16px}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__actions button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:3px}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__message>:first-child{margin-top:0}::ng-deep .sd-confirm-bottom-sheet .sd-dialog-confirm__message>:last-child{margin-bottom:0}\n"] }]
78
105
  }], ctorParameters: () => [] });
79
106
 
107
+ const BOTTOM_SHEET_PANEL_CLASS = 'sd-confirm-bottom-sheet';
80
108
  class SdConfirmService {
81
109
  dialog = inject(MatDialog);
110
+ #bottomSheet = inject(MatBottomSheet);
111
+ // why: đọc một lần, cùng nguồn nhận diện mobile với sd-modal để hai nơi chọn kiểu hiển thị giống nhau.
112
+ #isMobile = BrowserUtilities.isMobile();
82
113
  #i18n = inject(I18nService);
83
114
  constructor() { }
84
115
  /**
@@ -99,170 +130,151 @@ class SdConfirmService {
99
130
  reject(result?.action ?? 'CANCEL');
100
131
  });
101
132
  });
102
- confirm = (message, option = {}) => {
103
- const dialogRef = this.dialog.open(DialogConfirmComponent, {
104
- width: option?.width || '440px',
133
+ /**
134
+ * Đường mở duy nhất của cả 6 API: chọn dialog hay bottom sheet, tính quyền đóng bằng nền/Esc rồi trả về stream đóng
135
+ * để `#settleOnClose` biến thành Promise.
136
+ *
137
+ * why: mỗi API trước đây tự gọi `dialog.open` với cùng một khối cấu hình. Gom lại để kiểu hiển thị và quy tắc cờ
138
+ * (`enableBackdropClose` thắng `disableBackdropClose`) không thể lệch nhau giữa các API.
139
+ */
140
+ #open(option, width, autoFocus, data) {
141
+ const closeAllowed = option?.enableBackdropClose ?? option?.disableBackdropClose === false;
142
+ const disableClose = !closeAllowed;
143
+ const view = option?.view ?? (this.#isMobile ? 'bottom-sheet' : 'dialog');
144
+ if (view === 'bottom-sheet') {
145
+ return this.#bottomSheet
146
+ .open(DialogConfirmComponent, {
147
+ panelClass: BOTTOM_SHEET_PANEL_CLASS,
148
+ // why: tiêu đề cho phép HTML (innerHtml) nhưng tên cho trình đọc màn hình phải là text thuần.
149
+ ariaLabel: (data.title ?? '').replace(/<[^>]*>/g, '').trim(),
150
+ autoFocus,
151
+ disableClose,
152
+ data,
153
+ })
154
+ .afterDismissed();
155
+ }
156
+ return this.dialog
157
+ .open(DialogConfirmComponent, {
158
+ width,
105
159
  panelClass: 'sd-confirm-panel',
106
160
  maxWidth: 'calc(100vw - 32px)',
107
161
  maxHeight: 'calc(100dvh - 32px)',
108
- autoFocus: '[data-confirm-cancel] button',
109
- disableClose: option?.disableBackdropClose ?? true,
110
- data: {
111
- icon: option?.icon,
112
- iconShape: option?.iconShape,
113
- title: option?.title || this.#i18n.t('core.confirm.title'),
114
- message,
115
- yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes'),
116
- noTitle: option?.noTitle || this.#i18n.t('core.confirm.no'),
117
- noButtonColor: option?.noButtonColor || 'secondary',
118
- yesButtonColor: option?.yesButtonColor || 'primary',
119
- },
120
- });
121
- return this.#settleOnClose(dialogRef.afterClosed());
162
+ autoFocus,
163
+ disableClose,
164
+ data,
165
+ })
166
+ .afterClosed();
167
+ }
168
+ confirm = (message, option = {}) => {
169
+ return this.#settleOnClose(this.#open(option, option?.width || '440px', '[data-confirm-cancel] button', {
170
+ icon: option?.icon,
171
+ iconShape: option?.iconShape,
172
+ title: option?.title || this.#i18n.t('core.confirm.title'),
173
+ message,
174
+ yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes'),
175
+ noTitle: option?.noTitle || this.#i18n.t('core.confirm.no'),
176
+ noButtonColor: option?.noButtonColor || 'secondary',
177
+ yesButtonColor: option?.yesButtonColor || 'primary',
178
+ }));
122
179
  };
123
180
  withInput = (message, option) => {
124
- const dialogRef = this.dialog.open(DialogConfirmComponent, {
125
- width: '440px',
126
- panelClass: 'sd-confirm-panel',
127
- maxWidth: 'calc(100vw - 32px)',
128
- maxHeight: 'calc(100dvh - 32px)',
129
- autoFocus: 'textarea',
130
- disableClose: option?.disableBackdropClose ?? true,
131
- data: {
132
- icon: option?.icon,
133
- iconShape: option?.iconShape,
134
- title: option?.title || this.#i18n.t('core.confirm.title'),
135
- message,
136
- yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
137
- noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
138
- noButtonColor: option?.noButtonColor || 'secondary',
139
- yesButtonColor: option?.yesButtonColor || 'primary',
140
- input: {
141
- label: option?.label,
142
- placeholder: option?.placeholder,
143
- maxlength: option?.maxlength || 255,
144
- required: option?.required,
145
- defaultValue: option?.defaultValue || '',
146
- },
181
+ return this.#settleOnClose(this.#open(option, '440px', 'textarea', {
182
+ icon: option?.icon,
183
+ iconShape: option?.iconShape,
184
+ title: option?.title || this.#i18n.t('core.confirm.title'),
185
+ message,
186
+ yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
187
+ noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
188
+ noButtonColor: option?.noButtonColor || 'secondary',
189
+ yesButtonColor: option?.yesButtonColor || 'primary',
190
+ input: {
191
+ label: option?.label,
192
+ placeholder: option?.placeholder,
193
+ maxlength: option?.maxlength || 255,
194
+ required: option?.required,
195
+ defaultValue: option?.defaultValue || '',
147
196
  },
148
- });
149
- return this.#settleOnClose(dialogRef.afterClosed());
197
+ }));
150
198
  };
151
199
  withRadio = (message, option) => {
152
- const dialogRef = this.dialog.open(DialogConfirmComponent, {
153
- width: '440px',
154
- panelClass: 'sd-confirm-panel',
155
- maxWidth: 'calc(100vw - 32px)',
156
- maxHeight: 'calc(100dvh - 32px)',
157
- autoFocus: 'first-tabbable',
158
- disableClose: option?.disableBackdropClose ?? true,
159
- data: {
160
- icon: option?.icon,
161
- iconShape: option?.iconShape,
162
- title: option?.title || this.#i18n.t('core.confirm.title'),
163
- message,
164
- yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
165
- noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
166
- noButtonColor: option?.noButtonColor || 'secondary',
167
- yesButtonColor: option?.yesButtonColor || 'primary',
168
- radio: {
169
- items: option?.items || [],
170
- valueField: option?.valueField || 'value',
171
- displayField: option?.displayField || 'label',
172
- display: option?.display || 'row',
173
- required: option?.required,
174
- defaultValue: option?.defaultValue,
175
- },
200
+ return this.#settleOnClose(this.#open(option, '440px', 'first-tabbable', {
201
+ icon: option?.icon,
202
+ iconShape: option?.iconShape,
203
+ title: option?.title || this.#i18n.t('core.confirm.title'),
204
+ message,
205
+ yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
206
+ noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
207
+ noButtonColor: option?.noButtonColor || 'secondary',
208
+ yesButtonColor: option?.yesButtonColor || 'primary',
209
+ radio: {
210
+ items: option?.items || [],
211
+ valueField: option?.valueField || 'value',
212
+ displayField: option?.displayField || 'label',
213
+ display: option?.display || 'row',
214
+ required: option?.required,
215
+ defaultValue: option?.defaultValue,
176
216
  },
177
- });
178
- return this.#settleOnClose(dialogRef.afterClosed());
217
+ }));
179
218
  };
180
219
  withSelect = (message, option) => {
181
- const dialogRef = this.dialog.open(DialogConfirmComponent, {
182
- width: '440px',
183
- panelClass: 'sd-confirm-panel',
184
- maxWidth: 'calc(100vw - 32px)',
185
- maxHeight: 'calc(100dvh - 32px)',
186
- autoFocus: 'first-tabbable',
187
- disableClose: option?.disableBackdropClose ?? true,
188
- data: {
189
- icon: option?.icon,
190
- iconShape: option?.iconShape,
191
- title: option?.title || this.#i18n.t('core.confirm.title'),
192
- message,
193
- yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
194
- noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
195
- noButtonColor: option?.noButtonColor || 'secondary',
196
- yesButtonColor: option?.yesButtonColor || 'primary',
197
- select: {
198
- items: option?.items || [],
199
- valueField: option?.valueField || 'value',
200
- displayField: option?.displayField || 'label',
201
- placeholder: option?.placeholder,
202
- multiple: option?.multiple,
203
- required: option?.required,
204
- defaultValue: option?.defaultValue,
205
- },
220
+ return this.#settleOnClose(this.#open(option, '440px', 'first-tabbable', {
221
+ icon: option?.icon,
222
+ iconShape: option?.iconShape,
223
+ title: option?.title || this.#i18n.t('core.confirm.title'),
224
+ message,
225
+ yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
226
+ noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
227
+ noButtonColor: option?.noButtonColor || 'secondary',
228
+ yesButtonColor: option?.yesButtonColor || 'primary',
229
+ select: {
230
+ items: option?.items || [],
231
+ valueField: option?.valueField || 'value',
232
+ displayField: option?.displayField || 'label',
233
+ placeholder: option?.placeholder,
234
+ multiple: option?.multiple,
235
+ required: option?.required,
236
+ defaultValue: option?.defaultValue,
206
237
  },
207
- });
208
- return this.#settleOnClose(dialogRef.afterClosed());
238
+ }));
209
239
  };
210
240
  withDate = (message, option) => {
211
- const dialogRef = this.dialog.open(DialogConfirmComponent, {
212
- width: '440px',
213
- panelClass: 'sd-confirm-panel',
214
- maxWidth: 'calc(100vw - 32px)',
215
- maxHeight: 'calc(100dvh - 32px)',
216
- autoFocus: 'first-tabbable',
217
- disableClose: option?.disableBackdropClose ?? true,
218
- data: {
219
- icon: option?.icon,
220
- iconShape: option?.iconShape,
221
- title: option?.title || this.#i18n.t('core.confirm.title'),
222
- message,
223
- yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
224
- noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
225
- noButtonColor: option?.noButtonColor || 'secondary',
226
- yesButtonColor: option?.yesButtonColor || 'primary',
227
- date: {
228
- placeholder: option?.placeholder,
229
- required: option?.required,
230
- defaultValue: option?.defaultValue || '',
231
- min: option?.min,
232
- max: option?.max,
233
- },
241
+ return this.#settleOnClose(this.#open(option, '440px', 'first-tabbable', {
242
+ icon: option?.icon,
243
+ iconShape: option?.iconShape,
244
+ title: option?.title || this.#i18n.t('core.confirm.title'),
245
+ message,
246
+ yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
247
+ noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
248
+ noButtonColor: option?.noButtonColor || 'secondary',
249
+ yesButtonColor: option?.yesButtonColor || 'primary',
250
+ date: {
251
+ placeholder: option?.placeholder,
252
+ required: option?.required,
253
+ defaultValue: option?.defaultValue || '',
254
+ min: option?.min,
255
+ max: option?.max,
234
256
  },
235
- });
236
- return this.#settleOnClose(dialogRef.afterClosed());
257
+ }));
237
258
  };
238
259
  withDatetime = (message, option) => {
239
- const dialogRef = this.dialog.open(DialogConfirmComponent, {
240
- width: '440px',
241
- panelClass: 'sd-confirm-panel',
242
- maxWidth: 'calc(100vw - 32px)',
243
- maxHeight: 'calc(100dvh - 32px)',
244
- autoFocus: 'first-tabbable',
245
- disableClose: option?.disableBackdropClose ?? true,
246
- data: {
247
- icon: option?.icon,
248
- iconShape: option?.iconShape,
249
- title: option?.title || this.#i18n.t('core.confirm.title'),
250
- message,
251
- yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
252
- noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
253
- noButtonColor: option?.noButtonColor || 'secondary',
254
- yesButtonColor: option?.yesButtonColor || 'primary',
255
- datetime: {
256
- placeholder: option?.placeholder,
257
- required: option?.required,
258
- defaultValue: option?.defaultValue || '',
259
- min: option?.min,
260
- max: option?.max,
261
- showSeconds: option?.showSeconds,
262
- },
260
+ return this.#settleOnClose(this.#open(option, '440px', 'first-tabbable', {
261
+ icon: option?.icon,
262
+ iconShape: option?.iconShape,
263
+ title: option?.title || this.#i18n.t('core.confirm.title'),
264
+ message,
265
+ yesTitle: option?.yesTitle || this.#i18n.t('core.confirm.yes-short'),
266
+ noTitle: option?.noTitle || this.#i18n.t('core.confirm.no-short'),
267
+ noButtonColor: option?.noButtonColor || 'secondary',
268
+ yesButtonColor: option?.yesButtonColor || 'primary',
269
+ datetime: {
270
+ placeholder: option?.placeholder,
271
+ required: option?.required,
272
+ defaultValue: option?.defaultValue || '',
273
+ min: option?.min,
274
+ max: option?.max,
275
+ showSeconds: option?.showSeconds,
263
276
  },
264
- });
265
- return this.#settleOnClose(dialogRef.afterClosed());
277
+ }));
266
278
  };
267
279
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdConfirmService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
268
280
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SdConfirmService, providedIn: 'root' });
@@ -277,10 +289,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
277
289
  /*
278
290
  * Public API Surface of superdev-angular-core
279
291
  */
292
+ // why: DialogConfirmComponent và DialogData là chi tiết nội bộ của SdConfirmService; consumer chỉ dùng service.
280
293
 
281
294
  /**
282
295
  * Generated bundle index. Do not edit.
283
296
  */
284
297
 
285
- export { DialogConfirmComponent, SdConfirmService };
298
+ export { SdConfirmService };
286
299
  //# sourceMappingURL=sdcorejs-angular-services-confirm.mjs.map