@sdcorejs/angular 19.3.2 → 19.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 (429) 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 +1 -0
  5. package/components/badge/src/badge.model.d.ts +19 -0
  6. package/components/query-bar/src/components/actions-bar/actions-bar.component.d.ts +6 -1
  7. package/components/query-bar/src/components/field-picker/field-picker.component.d.ts +21 -0
  8. package/components/query-bar/src/components/inline-chip/inline-chip.component.d.ts +7 -1
  9. package/components/query-bar/src/components/inline-value-chip/inline-value-chip.component.d.ts +7 -1
  10. package/components/query-bar/src/components/popover-chip/popover-chip.component.d.ts +16 -2
  11. package/components/query-bar/src/query-bar.component.d.ts +66 -8
  12. package/components/query-bar/src/query-bar.model.d.ts +44 -1
  13. package/components/section/index.d.ts +1 -0
  14. package/components/section/src/section-registry.d.ts +11 -0
  15. package/components/splitter/index.d.ts +1 -1
  16. package/components/tab-router/src/actions/tab-router.action.d.ts +1 -1
  17. package/components/tab-router/src/components/tab-router-item/tab-router-item.component.d.ts +4 -2
  18. package/components/tab-router/src/components/tab-router-nav/tab-router-nav.component.d.ts +31 -3
  19. package/components/tab-router/src/components/tab-router-outlet/tab-router-outlet.component.d.ts +6 -1
  20. package/components/tab-router/src/models/tab-router.model.d.ts +5 -0
  21. package/components/tab-router/src/pipes/tab-info.pipe.d.ts +7 -0
  22. package/components/tab-router/src/services/tab-router.service.d.ts +5 -0
  23. package/components/table/index.d.ts +2 -0
  24. package/components/table/src/components/config/config-width.util.d.ts +9 -0
  25. package/components/table/src/components/config/config.component.d.ts +58 -11
  26. package/components/table/src/components/filter/column-filter/column-filter.component.d.ts +5 -0
  27. package/components/table/src/components/filter/external-filter/external-filter.component.d.ts +5 -1
  28. package/components/table/src/components/mobile-cards/mobile-cards.component.d.ts +4 -0
  29. package/components/table/src/configurations/index.d.ts +1 -0
  30. package/components/table/src/configurations/table-layout.d.ts +16 -0
  31. package/components/table/src/configurations/table.configuration.d.ts +7 -1
  32. package/components/table/src/models/index.d.ts +1 -0
  33. package/components/table/src/models/table-column.model.d.ts +3 -10
  34. package/components/table/src/models/table-item.model.d.ts +4 -1
  35. package/components/table/src/models/table-option-loading.model.d.ts +42 -0
  36. package/components/table/src/models/table-option.model.d.ts +6 -0
  37. package/components/table/src/services/column-leaf.util.d.ts +6 -0
  38. package/components/table/src/services/config-custom.util.d.ts +14 -0
  39. package/components/table/src/services/table-filter/table-filter.model.d.ts +30 -0
  40. package/components/table/src/services/table-filter/table-query-bar.util.d.ts +110 -0
  41. package/components/table/src/services/table-loading/table-loading.util.d.ts +91 -0
  42. package/components/table/src/services/tree/tree.util.d.ts +2 -0
  43. package/components/table/src/table.component.d.ts +60 -1
  44. package/components/upload-file/src/components/file-type-icon/file-type-icon.component.d.ts +15 -0
  45. package/components/upload-file/src/components/preview/preview.component.d.ts +88 -10
  46. package/components/upload-file/src/configurations/upload-file.configuration.d.ts +1 -1
  47. package/components/upload-file/src/helpers/file-type.d.ts +25 -0
  48. package/components/upload-file/src/pipes/file-meta.pipe.d.ts +9 -0
  49. package/components/upload-file/src/pipes/file-reason.pipe.d.ts +11 -0
  50. package/components/upload-file/src/pipes/index.d.ts +2 -0
  51. package/components/upload-file/src/upload-file.component.d.ts +89 -8
  52. package/fesm2022/sdcorejs-angular-components-badge.mjs +2 -2
  53. package/fesm2022/sdcorejs-angular-components-badge.mjs.map +1 -1
  54. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +3 -3
  55. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  56. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +455 -37
  57. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  58. package/fesm2022/sdcorejs-angular-components-section.mjs +15 -3
  59. package/fesm2022/sdcorejs-angular-components-section.mjs.map +1 -1
  60. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
  61. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  62. package/fesm2022/sdcorejs-angular-components-splitter.mjs.map +1 -1
  63. package/fesm2022/sdcorejs-angular-components-tab-router.mjs +390 -75
  64. package/fesm2022/sdcorejs-angular-components-tab-router.mjs.map +1 -1
  65. package/fesm2022/sdcorejs-angular-components-table.mjs +1667 -124
  66. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  67. package/fesm2022/sdcorejs-angular-components-upload-file.mjs +886 -173
  68. package/fesm2022/sdcorejs-angular-components-upload-file.mjs.map +1 -1
  69. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs +7 -2
  70. package/fesm2022/sdcorejs-angular-forms-autocomplete.mjs.map +1 -1
  71. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs +5 -2
  72. package/fesm2022/sdcorejs-angular-forms-chip-calendar.mjs.map +1 -1
  73. package/fesm2022/sdcorejs-angular-forms-chip.mjs +421 -121
  74. package/fesm2022/sdcorejs-angular-forms-chip.mjs.map +1 -1
  75. package/fesm2022/sdcorejs-angular-forms-date-range.mjs +4 -0
  76. package/fesm2022/sdcorejs-angular-forms-date-range.mjs.map +1 -1
  77. package/fesm2022/sdcorejs-angular-forms-date.mjs +4 -0
  78. package/fesm2022/sdcorejs-angular-forms-date.mjs.map +1 -1
  79. package/fesm2022/sdcorejs-angular-forms-datetime.mjs +4 -0
  80. package/fesm2022/sdcorejs-angular-forms-datetime.mjs.map +1 -1
  81. package/fesm2022/sdcorejs-angular-forms-input-number.mjs +17 -2
  82. package/fesm2022/sdcorejs-angular-forms-input-number.mjs.map +1 -1
  83. package/fesm2022/sdcorejs-angular-forms-input.mjs +4 -0
  84. package/fesm2022/sdcorejs-angular-forms-input.mjs.map +1 -1
  85. package/fesm2022/sdcorejs-angular-forms-select.mjs +26 -20
  86. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  87. package/fesm2022/sdcorejs-angular-forms-textarea.mjs +14 -1
  88. package/fesm2022/sdcorejs-angular-forms-textarea.mjs.map +1 -1
  89. package/fesm2022/sdcorejs-angular-i18n.mjs +350 -5
  90. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  91. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BFxO3eHX.mjs → sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs} +3 -3
  92. package/fesm2022/{sdcorejs-angular-modules-generic-generic-configuration.page-BFxO3eHX.mjs.map → sdcorejs-angular-modules-generic-generic-configuration.page-Bk3PrEf3.mjs.map} +1 -1
  93. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-Csy2fShj.mjs → sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs} +3 -3
  94. package/fesm2022/{sdcorejs-angular-modules-generic-generic-form-host.page-Csy2fShj.mjs.map → sdcorejs-angular-modules-generic-generic-form-host.page-CwUegGgG.mjs.map} +1 -1
  95. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-BIIxNR6k.mjs → sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs} +3 -3
  96. package/fesm2022/{sdcorejs-angular-modules-generic-generic-list.page-BIIxNR6k.mjs.map → sdcorejs-angular-modules-generic-generic-list.page-lF2trhfp.mjs.map} +1 -1
  97. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DjDsau9C.mjs → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs} +4 -4
  98. package/fesm2022/{sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-DjDsau9C.mjs.map → sdcorejs-angular-modules-generic-sdcorejs-angular-modules-generic-BbmeOduc.mjs.map} +1 -1
  99. package/fesm2022/sdcorejs-angular-modules-generic.mjs +1 -1
  100. package/fesm2022/sdcorejs-angular-modules-layout.mjs +347 -10
  101. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  102. package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs +23 -0
  103. package/fesm2022/sdcorejs-angular-modules-pattern-api-error-BBWwQ6h2.mjs.map +1 -0
  104. package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs +16 -0
  105. package/fesm2022/sdcorejs-angular-modules-pattern-approval-inbox-BMwD6_FC.mjs.map +1 -0
  106. package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-DK33LxHm.mjs +51 -0
  107. package/fesm2022/sdcorejs-angular-modules-pattern-base-api.service-DK33LxHm.mjs.map +1 -0
  108. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B1BUBiag.mjs +145 -0
  109. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B1BUBiag.mjs.map +1 -0
  110. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B27ZX8Co.mjs +144 -0
  111. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-B27ZX8Co.mjs.map +1 -0
  112. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-Bi2tMFHf.mjs +460 -0
  113. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-Bi2tMFHf.mjs.map +1 -0
  114. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CPwGkrNk.mjs +142 -0
  115. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CPwGkrNk.mjs.map +1 -0
  116. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-VCbA_FkZ.mjs +113 -0
  117. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-VCbA_FkZ.mjs.map +1 -0
  118. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs +18 -0
  119. package/fesm2022/sdcorejs-angular-modules-pattern-customer.model-C3fr4yNw.mjs.map +1 -0
  120. package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-CehsdBRP.mjs +66 -0
  121. package/fesm2022/sdcorejs-angular-modules-pattern-customer.service-CehsdBRP.mjs.map +1 -0
  122. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-CPhLTiyx.mjs +148 -0
  123. package/fesm2022/sdcorejs-angular-modules-pattern-detail-side-drawer.component-CPhLTiyx.mjs.map +1 -0
  124. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-5kI7wGdX.mjs +484 -0
  125. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-5kI7wGdX.mjs.map +1 -0
  126. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CjAy-B9K.mjs +172 -0
  127. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CjAy-B9K.mjs.map +1 -0
  128. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CnL2FzCx.mjs +90 -0
  129. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CnL2FzCx.mjs.map +1 -0
  130. package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-DObN_wCR.mjs +514 -0
  131. package/fesm2022/sdcorejs-angular-modules-pattern-flow.component-DObN_wCR.mjs.map +1 -0
  132. package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-DpnYSG2j.mjs +61 -0
  133. package/fesm2022/sdcorejs-angular-modules-pattern-form-api-errors-DpnYSG2j.mjs.map +1 -0
  134. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-C_ST-ld5.mjs +170 -0
  135. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-C_ST-ld5.mjs.map +1 -0
  136. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs +87 -0
  137. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-D6eKR2cq.mjs.map +1 -0
  138. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs +232 -0
  139. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-FcJS3Nbd.mjs.map +1 -0
  140. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs +70 -0
  141. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-view.component-BA-3FR1J.mjs.map +1 -0
  142. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-TTrWCXIT.mjs +100 -0
  143. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-TTrWCXIT.mjs.map +1 -0
  144. package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-B1qePLfk.mjs +812 -0
  145. package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-B1qePLfk.mjs.map +1 -0
  146. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BY5gjtNS.mjs +71 -0
  147. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-BY5gjtNS.mjs.map +1 -0
  148. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CJ38CJXg.mjs +629 -0
  149. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CJ38CJXg.mjs.map +1 -0
  150. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CdgPtSjJ.mjs +164 -0
  151. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-CdgPtSjJ.mjs.map +1 -0
  152. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DKIwrluh.mjs +118 -0
  153. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-DKIwrluh.mjs.map +1 -0
  154. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-W9vY7HrT.mjs +115 -0
  155. package/fesm2022/sdcorejs-angular-modules-pattern-list.component-W9vY7HrT.mjs.map +1 -0
  156. package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-CI0H_5a4.mjs +1069 -0
  157. package/fesm2022/sdcorejs-angular-modules-pattern-mock-backend.factory-CI0H_5a4.mjs.map +1 -0
  158. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs +193 -0
  159. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +1 -0
  160. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs +99 -0
  161. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +1 -0
  162. package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs +12 -0
  163. package/fesm2022/sdcorejs-angular-modules-pattern-product.model-BoHLJ8vf.mjs.map +1 -0
  164. package/fesm2022/sdcorejs-angular-modules-pattern-product.service-D829aEk5.mjs +48 -0
  165. package/fesm2022/sdcorejs-angular-modules-pattern-product.service-D829aEk5.mjs.map +1 -0
  166. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-BEFVmSSj.mjs +295 -0
  167. package/fesm2022/sdcorejs-angular-modules-pattern-profile.component-BEFVmSSj.mjs.map +1 -0
  168. package/fesm2022/sdcorejs-angular-modules-pattern-routes-1kDb9T7_.mjs +74 -0
  169. package/fesm2022/sdcorejs-angular-modules-pattern-routes-1kDb9T7_.mjs.map +1 -0
  170. package/fesm2022/sdcorejs-angular-modules-pattern-routes-B-TJUSV_.mjs +66 -0
  171. package/fesm2022/sdcorejs-angular-modules-pattern-routes-B-TJUSV_.mjs.map +1 -0
  172. package/fesm2022/sdcorejs-angular-modules-pattern-routes-B6z7KO0P.mjs +45 -0
  173. package/fesm2022/sdcorejs-angular-modules-pattern-routes-B6z7KO0P.mjs.map +1 -0
  174. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DS39vgzU.mjs +50 -0
  175. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DS39vgzU.mjs.map +1 -0
  176. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DVlcUUzh.mjs +43 -0
  177. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DVlcUUzh.mjs.map +1 -0
  178. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DxWDWUdo.mjs +165 -0
  179. package/fesm2022/sdcorejs-angular-modules-pattern-routes-DxWDWUdo.mjs.map +1 -0
  180. package/fesm2022/sdcorejs-angular-modules-pattern-routes-r9CTj-8C.mjs +74 -0
  181. package/fesm2022/sdcorejs-angular-modules-pattern-routes-r9CTj-8C.mjs.map +1 -0
  182. package/fesm2022/sdcorejs-angular-modules-pattern-routes-xI1XYRo6.mjs +99 -0
  183. package/fesm2022/sdcorejs-angular-modules-pattern-routes-xI1XYRo6.mjs.map +1 -0
  184. package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-nV5dVFx2.mjs +406 -0
  185. package/fesm2022/sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-nV5dVFx2.mjs.map +1 -0
  186. package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-0rRaWsuo.mjs +317 -0
  187. package/fesm2022/sdcorejs-angular-modules-pattern-shell.component-0rRaWsuo.mjs.map +1 -0
  188. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-6uH7sDEg.mjs +143 -0
  189. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-6uH7sDEg.mjs.map +1 -0
  190. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DglN2sS_.mjs +132 -0
  191. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DglN2sS_.mjs.map +1 -0
  192. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BmsOgENL.mjs +359 -0
  193. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-BmsOgENL.mjs.map +1 -0
  194. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DPZ_ucNB.mjs +138 -0
  195. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DPZ_ucNB.mjs.map +1 -0
  196. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DkAcDmsZ.mjs +100 -0
  197. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DkAcDmsZ.mjs.map +1 -0
  198. package/fesm2022/sdcorejs-angular-modules-pattern.mjs +2 -0
  199. package/fesm2022/sdcorejs-angular-modules-pattern.mjs.map +1 -0
  200. package/fesm2022/sdcorejs-angular-services-api.mjs +11 -11
  201. package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
  202. package/fesm2022/sdcorejs-angular-services-cache.mjs +7 -5
  203. package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
  204. package/fesm2022/sdcorejs-angular-services-storage.mjs +6 -4
  205. package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
  206. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs +104 -4
  207. package/fesm2022/sdcorejs-angular-services-unsaved-changes.mjs.map +1 -1
  208. package/forms/chip/src/chip.component.d.ts +135 -19
  209. package/forms/chip/src/index.d.ts +0 -1
  210. package/i18n/src/en.d.ts +70 -1
  211. package/modules/layout/components/index.d.ts +2 -0
  212. package/modules/layout/components/page/page-form-leave.guard.d.ts +9 -0
  213. package/modules/layout/components/page/page.component.d.ts +38 -2
  214. package/modules/layout/components/page-list/page-list.component.d.ts +42 -0
  215. package/modules/layout/components/shared/context-switcher/context-switcher.component.d.ts +1 -1
  216. package/modules/pattern/README.md +76 -0
  217. package/modules/pattern/configurations/pattern.configuration.d.ts +30 -0
  218. package/modules/pattern/configurations/provide-sd-patterns.d.ts +19 -0
  219. package/modules/pattern/core/mock-api/mock-api.interceptor.d.ts +8 -0
  220. package/modules/pattern/core/mock-api/mock-api.model.d.ts +62 -0
  221. package/modules/pattern/core/mock-api/mock-api.state.d.ts +36 -0
  222. package/modules/pattern/core/mock-api/mock-backend.d.ts +18 -0
  223. package/modules/pattern/core/mock-api/mock-backend.factory.d.ts +3 -0
  224. package/modules/pattern/core/mock-api/prng.d.ts +4 -0
  225. package/modules/pattern/core/mock-api/resources/approval.resource.d.ts +14 -0
  226. package/modules/pattern/core/mock-api/resources/category.resource.d.ts +9 -0
  227. package/modules/pattern/core/mock-api/resources/customer.resource.d.ts +22 -0
  228. package/modules/pattern/core/mock-api/resources/index.d.ts +3 -0
  229. package/modules/pattern/core/mock-api/resources/names.d.ts +5 -0
  230. package/modules/pattern/core/mock-api/resources/order.resource.d.ts +44 -0
  231. package/modules/pattern/core/mock-api/resources/partner.resource.d.ts +16 -0
  232. package/modules/pattern/core/mock-api/resources/product.resource.d.ts +13 -0
  233. package/modules/pattern/core/mock-api/resources/settings.resource.d.ts +18 -0
  234. package/modules/pattern/core/pattern-shell/catalog/pattern-catalog.d.ts +24 -0
  235. package/modules/pattern/core/pattern-shell/index/index.component.d.ts +9 -0
  236. package/modules/pattern/core/pattern-shell/settings/pattern-settings.store.d.ts +57 -0
  237. package/modules/pattern/core/pattern-shell/settings/settings-button.component.d.ts +44 -0
  238. package/modules/pattern/core/pattern-shell/shell/pattern-source-viewer.d.ts +8 -0
  239. package/modules/pattern/core/pattern-shell/shell/shell.component.d.ts +13 -0
  240. package/modules/pattern/core/pattern-shell/source/pattern-source.generated.d.ts +1 -0
  241. package/modules/pattern/core/pattern-shell/source/source-drawer.component.d.ts +27 -0
  242. package/modules/pattern/core/pattern-shell/toolbar/toolbar.component.d.ts +24 -0
  243. package/modules/pattern/core/permission/pattern-permission.d.ts +15 -0
  244. package/modules/pattern/core/permission/pattern-role.store.d.ts +13 -0
  245. package/modules/pattern/core/session-state.d.ts +4 -0
  246. package/modules/pattern/docs/detail.md +237 -0
  247. package/modules/pattern/docs/drawer.md +484 -0
  248. package/modules/pattern/docs/flow.md +631 -0
  249. package/modules/pattern/docs/form.md +815 -0
  250. package/modules/pattern/docs/header-actions.md +344 -0
  251. package/modules/pattern/docs/list.md +247 -0
  252. package/modules/pattern/docs/relation.md +180 -0
  253. package/modules/pattern/docs/select.md +214 -0
  254. package/modules/pattern/docs/split.md +350 -0
  255. package/modules/pattern/docs/states.md +168 -0
  256. package/modules/pattern/features/approval/entity.resolver.d.ts +4 -0
  257. package/modules/pattern/features/approval/entity.resolver.ts +21 -0
  258. package/modules/pattern/features/approval/pages/detail/detail.component.d.ts +13 -0
  259. package/modules/pattern/features/approval/pages/detail/detail.component.ts +139 -0
  260. package/modules/pattern/features/approval/pages/list/approval-inbox.d.ts +7 -0
  261. package/modules/pattern/features/approval/pages/list/approval-inbox.ts +7 -0
  262. package/modules/pattern/features/approval/pages/list/list.component.d.ts +26 -0
  263. package/modules/pattern/features/approval/pages/list/list.component.html +20 -0
  264. package/modules/pattern/features/approval/pages/list/list.component.ts +149 -0
  265. package/modules/pattern/features/approval/routes.d.ts +3 -0
  266. package/modules/pattern/features/approval/routes.ts +30 -0
  267. package/modules/pattern/features/approval/services/approval.model.d.ts +37 -0
  268. package/modules/pattern/features/approval/services/approval.model.ts +38 -0
  269. package/modules/pattern/features/approval/services/approval.service.d.ts +12 -0
  270. package/modules/pattern/features/approval/services/approval.service.ts +23 -0
  271. package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.d.ts +23 -0
  272. package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +130 -0
  273. package/modules/pattern/features/category/components/general-information-form/general-information-form.component.d.ts +20 -0
  274. package/modules/pattern/features/category/components/general-information-form/general-information-form.component.ts +61 -0
  275. package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.d.ts +23 -0
  276. package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +134 -0
  277. package/modules/pattern/features/category/entity.resolver.d.ts +6 -0
  278. package/modules/pattern/features/category/entity.resolver.ts +27 -0
  279. package/modules/pattern/features/category/pages/list/list.component.d.ts +17 -0
  280. package/modules/pattern/features/category/pages/list/list.component.html +20 -0
  281. package/modules/pattern/features/category/pages/list/list.component.ts +105 -0
  282. package/modules/pattern/features/category/routes.d.ts +3 -0
  283. package/modules/pattern/features/category/routes.ts +42 -0
  284. package/modules/pattern/features/category/services/category.model.d.ts +34 -0
  285. package/modules/pattern/features/category/services/category.model.ts +39 -0
  286. package/modules/pattern/features/category/services/category.service.d.ts +17 -0
  287. package/modules/pattern/features/category/services/category.service.ts +36 -0
  288. package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.d.ts +24 -0
  289. package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +138 -0
  290. package/modules/pattern/features/customer/components/customer-select/customer-select.component.d.ts +20 -0
  291. package/modules/pattern/features/customer/components/customer-select/customer-select.component.ts +72 -0
  292. package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.d.ts +20 -0
  293. package/modules/pattern/features/customer/components/customer-type-select/customer-type-select.component.ts +30 -0
  294. package/modules/pattern/features/customer/components/debts-view/debts-view.component.d.ts +11 -0
  295. package/modules/pattern/features/customer/components/debts-view/debts-view.component.ts +28 -0
  296. package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.d.ts +20 -0
  297. package/modules/pattern/features/customer/components/detail-side-drawer/detail-side-drawer.component.ts +106 -0
  298. package/modules/pattern/features/customer/components/documents-view/documents-view.component.d.ts +14 -0
  299. package/modules/pattern/features/customer/components/documents-view/documents-view.component.ts +50 -0
  300. package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.d.ts +33 -0
  301. package/modules/pattern/features/customer/components/general-information-form/general-information-form.component.ts +140 -0
  302. package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.d.ts +9 -0
  303. package/modules/pattern/features/customer/components/general-information-view/general-information-view.component.ts +39 -0
  304. package/modules/pattern/features/customer/components/orders-view/orders-view.component.d.ts +11 -0
  305. package/modules/pattern/features/customer/components/orders-view/orders-view.component.ts +35 -0
  306. package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.d.ts +22 -0
  307. package/modules/pattern/features/customer/components/summary-cards/summary-cards.component.ts +101 -0
  308. package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.d.ts +24 -0
  309. package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +127 -0
  310. package/modules/pattern/features/customer/entity.resolver.d.ts +4 -0
  311. package/modules/pattern/features/customer/entity.resolver.ts +21 -0
  312. package/modules/pattern/features/customer/pages/list/list.component.d.ts +19 -0
  313. package/modules/pattern/features/customer/pages/list/list.component.html +22 -0
  314. package/modules/pattern/features/customer/pages/list/list.component.ts +113 -0
  315. package/modules/pattern/features/customer/pages/profile/profile.component.d.ts +31 -0
  316. package/modules/pattern/features/customer/pages/profile/profile.component.ts +120 -0
  317. package/modules/pattern/features/customer/pipes/customer-detail.pipe.d.ts +14 -0
  318. package/modules/pattern/features/customer/pipes/customer-detail.pipe.ts +18 -0
  319. package/modules/pattern/features/customer/routes.d.ts +6 -0
  320. package/modules/pattern/features/customer/routes.ts +59 -0
  321. package/modules/pattern/features/customer/services/customer.model.d.ts +77 -0
  322. package/modules/pattern/features/customer/services/customer.model.ts +87 -0
  323. package/modules/pattern/features/customer/services/customer.service.d.ts +24 -0
  324. package/modules/pattern/features/customer/services/customer.service.ts +79 -0
  325. package/modules/pattern/features/import/components/mapping-form/mapping-form.component.d.ts +21 -0
  326. package/modules/pattern/features/import/components/mapping-form/mapping-form.component.ts +41 -0
  327. package/modules/pattern/features/import/components/preview-view/preview-view.component.d.ts +10 -0
  328. package/modules/pattern/features/import/components/preview-view/preview-view.component.ts +44 -0
  329. package/modules/pattern/features/import/pages/flow/flow.component.d.ts +43 -0
  330. package/modules/pattern/features/import/pages/flow/flow.component.ts +269 -0
  331. package/modules/pattern/features/import/routes.d.ts +2 -0
  332. package/modules/pattern/features/import/routes.ts +19 -0
  333. package/modules/pattern/features/import/services/import.model.d.ts +38 -0
  334. package/modules/pattern/features/import/services/import.model.ts +82 -0
  335. package/modules/pattern/features/import/services/import.service.d.ts +15 -0
  336. package/modules/pattern/features/import/services/import.service.ts +18 -0
  337. package/modules/pattern/features/order/components/approval-steps/approval-steps.component.d.ts +9 -0
  338. package/modules/pattern/features/order/components/approval-steps/approval-steps.component.ts +74 -0
  339. package/modules/pattern/features/order/components/bulk-result/bulk-result.component.d.ts +22 -0
  340. package/modules/pattern/features/order/components/bulk-result/bulk-result.component.ts +46 -0
  341. package/modules/pattern/features/order/components/general-information-form/general-information-form.component.d.ts +30 -0
  342. package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +96 -0
  343. package/modules/pattern/features/order/components/lines-form/lines-form.component.d.ts +19 -0
  344. package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +182 -0
  345. package/modules/pattern/features/order/components/lines-form/order-lines.d.ts +35 -0
  346. package/modules/pattern/features/order/components/lines-form/order-lines.ts +101 -0
  347. package/modules/pattern/features/order/components/lines-table-form/lines-table-form.component.d.ts +34 -0
  348. package/modules/pattern/features/order/components/lines-table-form/lines-table-form.component.ts +196 -0
  349. package/modules/pattern/features/order/components/lines-view/lines-view.component.d.ts +12 -0
  350. package/modules/pattern/features/order/components/lines-view/lines-view.component.ts +42 -0
  351. package/modules/pattern/features/order/components/summary-cards/summary-cards.component.d.ts +25 -0
  352. package/modules/pattern/features/order/components/summary-cards/summary-cards.component.ts +128 -0
  353. package/modules/pattern/features/order/entity.resolver.d.ts +9 -0
  354. package/modules/pattern/features/order/entity.resolver.ts +37 -0
  355. package/modules/pattern/features/order/pages/create/create.component.d.ts +18 -0
  356. package/modules/pattern/features/order/pages/create/create.component.ts +113 -0
  357. package/modules/pattern/features/order/pages/detail/detail.component.d.ts +27 -0
  358. package/modules/pattern/features/order/pages/detail/detail.component.ts +224 -0
  359. package/modules/pattern/features/order/pages/list/list.component.d.ts +29 -0
  360. package/modules/pattern/features/order/pages/list/list.component.html +38 -0
  361. package/modules/pattern/features/order/pages/list/list.component.ts +291 -0
  362. package/modules/pattern/features/order/pages/update/update.component.d.ts +22 -0
  363. package/modules/pattern/features/order/pages/update/update.component.ts +126 -0
  364. package/modules/pattern/features/order/routes.d.ts +7 -0
  365. package/modules/pattern/features/order/routes.ts +54 -0
  366. package/modules/pattern/features/order/services/order.model.d.ts +106 -0
  367. package/modules/pattern/features/order/services/order.model.ts +109 -0
  368. package/modules/pattern/features/order/services/order.service.d.ts +25 -0
  369. package/modules/pattern/features/order/services/order.service.ts +63 -0
  370. package/modules/pattern/features/partner/pages/create/create.component.d.ts +41 -0
  371. package/modules/pattern/features/partner/pages/create/create.component.ts +324 -0
  372. package/modules/pattern/features/partner/routes.d.ts +2 -0
  373. package/modules/pattern/features/partner/routes.ts +20 -0
  374. package/modules/pattern/features/partner/services/partner.model.d.ts +30 -0
  375. package/modules/pattern/features/partner/services/partner.model.ts +30 -0
  376. package/modules/pattern/features/partner/services/partner.service.d.ts +13 -0
  377. package/modules/pattern/features/partner/services/partner.service.ts +17 -0
  378. package/modules/pattern/features/product/components/general-information-form/general-information-form.component.d.ts +23 -0
  379. package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +88 -0
  380. package/modules/pattern/features/product/components/product-select/product-select.component.d.ts +26 -0
  381. package/modules/pattern/features/product/components/product-select/product-select.component.ts +73 -0
  382. package/modules/pattern/features/product/components/product-status-select/product-status-select.component.d.ts +22 -0
  383. package/modules/pattern/features/product/components/product-status-select/product-status-select.component.ts +30 -0
  384. package/modules/pattern/features/product/entity.resolver.d.ts +4 -0
  385. package/modules/pattern/features/product/entity.resolver.ts +21 -0
  386. package/modules/pattern/features/product/pages/create/create.component.d.ts +15 -0
  387. package/modules/pattern/features/product/pages/create/create.component.ts +92 -0
  388. package/modules/pattern/features/product/pages/detail/detail.component.d.ts +10 -0
  389. package/modules/pattern/features/product/pages/detail/detail.component.ts +53 -0
  390. package/modules/pattern/features/product/pages/list/list.component.d.ts +15 -0
  391. package/modules/pattern/features/product/pages/list/list.component.html +30 -0
  392. package/modules/pattern/features/product/pages/list/list.component.ts +71 -0
  393. package/modules/pattern/features/product/pages/update/update.component.d.ts +16 -0
  394. package/modules/pattern/features/product/pages/update/update.component.ts +86 -0
  395. package/modules/pattern/features/product/pipes/product-detail.pipe.d.ts +14 -0
  396. package/modules/pattern/features/product/pipes/product-detail.pipe.ts +18 -0
  397. package/modules/pattern/features/product/routes.d.ts +3 -0
  398. package/modules/pattern/features/product/routes.ts +48 -0
  399. package/modules/pattern/features/product/services/product.model.d.ts +34 -0
  400. package/modules/pattern/features/product/services/product.model.ts +38 -0
  401. package/modules/pattern/features/product/services/product.service.d.ts +17 -0
  402. package/modules/pattern/features/product/services/product.service.ts +48 -0
  403. package/modules/pattern/features/settings/pages/update/update.component.d.ts +26 -0
  404. package/modules/pattern/features/settings/pages/update/update.component.ts +228 -0
  405. package/modules/pattern/features/settings/routes.d.ts +3 -0
  406. package/modules/pattern/features/settings/routes.ts +24 -0
  407. package/modules/pattern/features/settings/services/settings.model.d.ts +17 -0
  408. package/modules/pattern/features/settings/services/settings.model.ts +18 -0
  409. package/modules/pattern/features/settings/services/settings.service.d.ts +10 -0
  410. package/modules/pattern/features/settings/services/settings.service.ts +15 -0
  411. package/modules/pattern/features/settings/settings.resolver.d.ts +4 -0
  412. package/modules/pattern/features/settings/settings.resolver.ts +8 -0
  413. package/modules/pattern/index.d.ts +3 -0
  414. package/modules/pattern/routes.d.ts +6 -0
  415. package/modules/pattern/services/base-api.service.d.ts +16 -0
  416. package/modules/pattern/utils/api-error.d.ts +4 -0
  417. package/modules/pattern/utils/focus-first-invalid.d.ts +5 -0
  418. package/modules/pattern/utils/form-api-errors.d.ts +16 -0
  419. package/modules/pattern/utils/resource-url.d.ts +2 -0
  420. package/package.json +13 -9
  421. package/services/api/src/api-handler-registry.d.ts +3 -3
  422. package/services/api/src/api-route-configurations.d.ts +2 -2
  423. package/services/api/src/api.model.d.ts +2 -2
  424. package/services/cache/src/cache.model.d.ts +3 -1
  425. package/services/storage/src/storage.model.d.ts +2 -0
  426. package/services/unsaved-changes/src/unsaved-changes.adapters.d.ts +9 -0
  427. package/services/unsaved-changes/src/unsaved-changes.model.d.ts +2 -0
  428. package/forms/chip/src/pipes/index.d.ts +0 -1
  429. package/forms/chip/src/pipes/removable-chip.pipe.d.ts +0 -8
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, inject, TemplateRef, Directive, booleanAttribute, Pipe, isSignal, output, signal, computed, effect, untracked, ChangeDetectionStrategy, Component, viewChild, ElementRef, afterRenderEffect, isDevMode, Input, contentChildren, DestroyRef, ChangeDetectorRef, afterNextRender, model, InjectionToken, Injectable, ViewChild, Renderer2, NgZone, Injector, contentChild } from '@angular/core';
2
+ import { input, inject, TemplateRef, Directive, booleanAttribute, Pipe, isSignal, output, signal, computed, effect, untracked, ChangeDetectionStrategy, Component, viewChild, ElementRef, afterRenderEffect, isDevMode, Input, contentChildren, DestroyRef, ChangeDetectorRef, afterNextRender, model, InjectionToken, Injectable, viewChildren, Injector, ViewChild, Renderer2, NgZone, contentChild } from '@angular/core';
3
3
  import { trigger, state, style, transition, animate } from '@angular/animations';
4
4
  import * as i3$3 from '@angular/material/paginator';
5
5
  import { MatPaginatorIntl, MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
@@ -15,10 +15,11 @@ import { AsyncPipe, NgTemplateOutlet, DOCUMENT, NgStyle, CommonModule, DatePipe,
15
15
  import * as i1 from '@angular/material/tooltip';
16
16
  import { MatTooltipModule } from '@angular/material/tooltip';
17
17
  import { SdViewportService } from '@sdcorejs/angular/services/viewport';
18
- import { ɵSdSearchField as _SdSearchField, ɵSdSearchFieldInputDirective as _SdSearchFieldInputDirective } from '@sdcorejs/angular/forms/directives';
18
+ import { ɵSdSearchField as _SdSearchField, ɵSdSearchFieldInputDirective as _SdSearchFieldInputDirective, SdSuffixDefDirective } from '@sdcorejs/angular/forms/directives';
19
19
  import { SdSelect } from '@sdcorejs/angular/forms/select';
20
20
  import { SdTranslatePipe, I18nService } from '@sdcorejs/angular/i18n';
21
21
  import { Utilities, FilterUtilities, StringUtilities, DateUtilities, NumberUtilities, BrowserUtilities, ArrayUtilities } from '@sdcorejs/utils/fns';
22
+ import { SdQueryBar } from '@sdcorejs/angular/components/query-bar';
22
23
  import * as i2 from '@angular/material/button';
23
24
  import { MatButtonModule } from '@angular/material/button';
24
25
  import { SdQuickAction } from '@sdcorejs/angular/components/quick-action';
@@ -37,11 +38,9 @@ import * as i2$1 from '@angular/material/form-field';
37
38
  import { MatFormFieldModule } from '@angular/material/form-field';
38
39
  import * as i3$1 from '@angular/material/select';
39
40
  import { MatSelectModule } from '@angular/material/select';
40
- import { CdkTableModule, CdkColumnDef } from '@angular/cdk/table';
41
+ import { CdkColumnDef } from '@angular/cdk/table';
41
42
  import * as i2$3 from '@angular/forms';
42
43
  import { FormGroup, FormsModule } from '@angular/forms';
43
- import * as i6 from '@angular/material/progress-spinner';
44
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
45
44
  import { SdDataStateTemplateDirective, SdDataState } from '@sdcorejs/angular/components/data-state';
46
45
  import { SdReadChannel, cloneReadRequest } from '@sdcorejs/angular/utilities/read-state';
47
46
  import { SdTooltipDirective, SdScrollDirective, SdHoverCopyDirective } from '@sdcorejs/angular/directives';
@@ -60,6 +59,7 @@ import { SdSection } from '@sdcorejs/angular/components/section';
60
59
  import { SdCheckbox } from '@sdcorejs/angular/forms/checkbox';
61
60
  import { SdDatetime } from '@sdcorejs/angular/forms/datetime';
62
61
  import { SdConfirmService } from '@sdcorejs/angular/services/confirm';
62
+ import { sdNormalizeSearchText } from '@sdcorejs/angular/utilities/extensions';
63
63
  import * as i3$2 from '@angular/material/chips';
64
64
  import { MatChipsModule } from '@angular/material/chips';
65
65
 
@@ -416,6 +416,11 @@ const collectFormattedTreeRows = (roots) => {
416
416
  walk(roots);
417
417
  return result;
418
418
  };
419
+ /** Rows a tree table shows: the roots plus the formatted children of every expanded row, at every level. */
420
+ const countVisibleTreeRows = (roots) => roots.reduce((count, row) => {
421
+ const children = row.meta.tree?.isExpanded ? row.meta.tree.childItems : undefined;
422
+ return count + 1 + (children?.length ? countVisibleTreeRows(children) : 0);
423
+ }, 0);
419
424
  /** Flatten ALL nodes regardless of expand state — used for export */
420
425
  const flattenTreeAll = (roots, option, visited = new Set()) => {
421
426
  if (!option)
@@ -689,6 +694,517 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
689
694
  ], template: "@let _option = option();\n@let _value = value();\n@let _valid = valid();\n@let _autoId = autoId();\n@let _inputId = inputId();\n@let _term = term();\n@let _enterHint = 'core.component.table.quick-search.enter' | sdTranslate;\n<div class=\"sd-quick-search-row\">\n <div class=\"sd-quick-search-controls\" role=\"search\" [attr.aria-label]=\"'core.component.table.search' | sdTranslate\">\n @for (control of controls(); track control.item.field) {\n @let item = control.item;\n @let items = item.type === 'values' ? (item.option.items | filterValues | async) : item.option.items;\n <sd-select\n class=\"sd-quick-search-dropdown\"\n [autoId]=\"_autoId ? _autoId + '-quick-search-' + item.field : undefined\"\n [label]=\"item.title\"\n [items]=\"items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [model]=\"_value.filters[item.field]\"\n [multiple]=\"item.option.selection === 'MULTIPLE' || item.option.selection === 'MULTIPLEAUTOCOMPLETE'\"\n [required]=\"!!item.required\"\n [disabled]=\"control.disabled\"\n (sdChange)=\"onFilterChange(item, $event)\"\n appearance=\"outline\"\n [size]=\"isMobile() ? 'md' : 'sm'\"\n hideInlineError />\n }\n <div class=\"sd-quick-search-keyword\">\n <sd-search-field\n class=\"sd-quick-search-field\"\n size=\"sm\"\n clearable\n [clearLabel]=\"'core.component.table.quick-search.clear' | sdTranslate\"\n [autoId]=\"_autoId ? _autoId + '-quick-search' : undefined\"\n (cleared)=\"clear(searchInput)\">\n <input\n #searchInput\n sdSearchFieldInput\n [id]=\"_inputId\"\n type=\"text\"\n enterkeyhint=\"search\"\n autocomplete=\"off\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-quick-search-term' : null\"\n [attr.aria-label]=\"'core.component.table.search' | sdTranslate\"\n [attr.aria-describedby]=\"_inputId + (_valid ? '-hint' : '-required')\"\n [placeholder]=\"_option.placeholder || ('core.component.table.quick-search.placeholder' | sdTranslate)\"\n [disabled]=\"!_valid\"\n [value]=\"_term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\" />\n <span sdSearchFieldEnd class=\"sd-quick-search-enter\" [matTooltip]=\"_enterHint\" aria-hidden=\"true\">\u21B5</span>\n </sd-search-field>\n </div>\n </div>\n @if (rightTemplate(); as template) {\n <div class=\"sd-quick-search-right\"><ng-container [ngTemplateOutlet]=\"template\" /></div>\n }\n</div>\n<span [id]=\"_inputId + '-hint'\" hidden>{{ _enterHint }}</span>\n@if (!_valid) {\n <p class=\"sd-quick-search-hint\" [id]=\"_inputId + '-required'\">\n {{ 'core.component.table.quick-search.required' | sdTranslate }}\n </p>\n}\n", styles: [":host{display:block;flex:0 0 auto;container-type:inline-size;box-sizing:border-box;padding:12px 16px;background:var(--sd-table-bg, #ffffff);--sd-control-label-bg: var(--sd-table-bg, #ffffff)}.sd-quick-search-row{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 20px}.sd-quick-search-controls{display:flex;flex:1 1 460px;flex-wrap:wrap;align-items:flex-end;gap:12px;min-width:0}.sd-quick-search-dropdown{display:block;flex:0 1 180px;min-width:140px;max-width:100%}.sd-quick-search-keyword{flex:0 1 360px;min-width:220px;max-width:100%}.sd-quick-search-field:not(.sd-disabled){background:var(--sd-table-bg, #ffffff)}.sd-quick-search-enter{font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);padding:0 4px;border:1px solid var(--sd-border, #e0e3e8);border-radius:var(--sd-radius-4, 4px)}.sd-quick-search-right{margin-left:auto;max-width:100%;min-width:0}.sd-quick-search-hint{margin:6px 0 0;font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #626872)}@container (max-width: 550px){.sd-quick-search-controls{flex-basis:100%}.sd-quick-search-dropdown,.sd-quick-search-keyword{flex:1 1 100%;min-width:0}.sd-quick-search-right{margin-left:0;flex-basis:100%}.sd-quick-search-field{min-height:var(--sd-control-height-coarse, 44px);font-size:var(--sd-font-size-16, 16px);--sd-search-field-clear-size: 40px}}\n"] }]
690
695
  }], ctorParameters: () => [] });
691
696
 
697
+ /**
698
+ * Leaf columns: each grouped header (`type: 'children'`) is replaced by its children. Filtering, sorting and the
699
+ * filter defaults work on leaves — a grouped header has no value of its own.
700
+ */
701
+ const leafColumns = (columns) => (columns ?? []).flatMap(column => (column.type === 'children' ? column.children : [column]));
702
+
703
+ /** Kiểu cột mà column-filter render control mặc định (nhận chip operator — thiết kế đợt 2 · G). */
704
+ const CONTROL_FILTER_TYPES = new Set([
705
+ 'string',
706
+ 'number',
707
+ 'boolean',
708
+ 'values',
709
+ 'lazy-values',
710
+ 'date',
711
+ 'datetime',
712
+ 'time',
713
+ ]);
714
+ /**
715
+ * Cột lọc bằng control mặc định: không có template `filterDef`, không phải `split-number` / `split-date` (hai ô).
716
+ * Chỉ ở đây operator nằm trong control và control khoá ô khi chọn `NULL` / `NOT_NULL`.
717
+ */
718
+ const isDefaultControlFilter = (column) => {
719
+ const filter = column.filter;
720
+ return CONTROL_FILTER_TYPES.has(column.type) && !filter?.filterDef && filter?.type !== 'split-number' && filter?.type !== 'split-date';
721
+ };
722
+ /**
723
+ * `NULL` / `NOT_NULL` trên control mặc định: ô bị khoá và để trống, nên filter có hiệu lực mà không cần giá trị.
724
+ * Template custom và filter split giữ cách cũ (chỉ lọc khi có giá trị).
725
+ */
726
+ const isNoDataColumnOperator = (column, operator) => (operator === 'NULL' || operator === 'NOT_NULL') && isDefaultControlFilter(column);
727
+
728
+ const NO_DATA = ['NULL', 'NOT_NULL'];
729
+ /** Column operators the raw record cannot hold for one value. */
730
+ const NOT_SCALAR = ['BETWEEN', 'IN', 'NOT_IN'];
731
+ const SINGLE_VALUE = ['EQUAL', 'NOT_EQUAL', 'NULL', 'NOT_NULL'];
732
+ const hasValue$1 = (value) => value !== undefined && value !== null && value !== '';
733
+ const isNoData = (operator) => !!operator && NO_DATA.includes(operator);
734
+ const read = (value) => (isSignal(value) ? value() : value);
735
+ /** `selection: 'MULTIPLE' | 'MULTIPLEAUTOCOMPLETE'` — the controls that store an array. */
736
+ const isMultiple = (selection) => !!selection && selection.includes('MULTIPLE');
737
+ const toArray = (value) => (Array.isArray(value) ? [...value] : hasValue$1(value) ? [value] : []);
738
+ const toRange = (value) => {
739
+ if (value && typeof value === 'object' && !Array.isArray(value) && !(value instanceof Date)) {
740
+ const range = value;
741
+ return { from: hasValue$1(range.from) ? range.from : null, to: hasValue$1(range.to) ? range.to : null };
742
+ }
743
+ // why: một ngày đơn trên cột khoảng ngày — converter lọc cả ngày đó, đúng như khoảng [v, v].
744
+ return hasValue$1(value) ? { from: value, to: value } : { from: null, to: null };
745
+ };
746
+ /** Same truthiness as `SdConvertToPagingReq` for boolean filters. */
747
+ const toBoolean = (value) => {
748
+ if (value === true || value === 1 || value === 'true' || value === '1')
749
+ return true;
750
+ if (value === false || value === 0 || value === 'false' || value === '0')
751
+ return false;
752
+ return null;
753
+ };
754
+ const stringify = (value) => {
755
+ try {
756
+ return Utilities.canonicalStringify(value);
757
+ }
758
+ catch {
759
+ return String(value);
760
+ }
761
+ };
762
+ /** The value in the comparable form of its shape: equivalent raw values compare equal. */
763
+ const normalize = (shape, value) => {
764
+ switch (shape) {
765
+ case 'multi':
766
+ return toArray(value);
767
+ case 'range':
768
+ return toRange(value);
769
+ case 'boolean':
770
+ case 'flag':
771
+ return toBoolean(value);
772
+ default:
773
+ return hasValue$1(value) ? value : null;
774
+ }
775
+ };
776
+ const sameRaw = (shape, left, right) => stringify(normalize(shape, left)) === stringify(normalize(shape, right));
777
+ const titleOf = (column) => (typeof column.title === 'string' ? column.title : column.title?.title) || column.field;
778
+ /** `values` / `lazy-values` field options; lazy `items` (an `SdSearch`) becomes the bar's `option.search`. */
779
+ const valuesField = (type, option, items = option.items) => type === 'lazy-values'
780
+ ? {
781
+ type,
782
+ option: {
783
+ search: option.items,
784
+ valueField: option.valueField,
785
+ displayField: option.displayField,
786
+ ...(option.views ? { views: option.views } : {}),
787
+ },
788
+ }
789
+ : { type, option: { items, valueField: option.valueField, displayField: option.displayField } };
790
+ /**
791
+ * Fields of the query bar for a table (handoff section 3): keys, groups, pinned chips, operators, and the filters
792
+ * left out. Order: `quickSearch.filters`, `externalFilters`, then the leaf columns given (children flattened).
793
+ */
794
+ const sdTableQueryFields = (args) => {
795
+ const { labels } = args;
796
+ const exclude = new Set(args.queryBar?.exclude ?? []);
797
+ const filterDefs = new Set(args.filterDefs ?? []);
798
+ const pinnedList = args.queryBar?.pinned ? new Set(args.queryBar.pinned) : undefined;
799
+ const result = {
800
+ fields: [],
801
+ sources: new Map(),
802
+ excluded: [],
803
+ covered: [],
804
+ columnKeys: new Map(),
805
+ search: !!args.quickSearch,
806
+ quickSearch: !!args.quickSearch,
807
+ };
808
+ const add = (source, field) => {
809
+ result.sources.set(source.key, source);
810
+ result.fields.push({ ...field, key: source.key, defaultOperator: source.operator });
811
+ };
812
+ const skip = (key, reason) => {
813
+ result.excluded.push({ field: key, reason });
814
+ };
815
+ const pin = (field, byDefault, required) => required || (pinnedList ? pinnedList.has(field) : byDefault);
816
+ for (const item of args.quickSearch?.filters ?? []) {
817
+ const key = `quick:${item.field}`;
818
+ if (read(item.hidden)) {
819
+ skip(key, 'hidden quick filter (its value and required check still apply)');
820
+ continue;
821
+ }
822
+ if (exclude.has(item.field)) {
823
+ skip(key, 'listed in filter.queryBar.exclude');
824
+ continue;
825
+ }
826
+ const multi = isMultiple(item.option.selection);
827
+ const operator = multi ? 'IN' : item.defaultOperator || 'EQUAL';
828
+ add({ key, source: 'quick', field: item.field, quick: item, shape: multi ? 'multi' : 'scalar', operator, operatorMode: 'none' }, {
829
+ ...valuesField(item.type, item.option),
830
+ label: item.title,
831
+ operators: [operator],
832
+ group: labels.filters,
833
+ pinned: pin(item.field, true, !!item.required),
834
+ required: !!item.required,
835
+ disabled: !!read(item.disabled),
836
+ });
837
+ }
838
+ const externalKeys = new Set();
839
+ for (const item of args.externalFilters ?? []) {
840
+ const key = `external:${item.field}`;
841
+ if (item.type === 'custom') {
842
+ skip(key, 'custom external filter');
843
+ continue;
844
+ }
845
+ if (filterDefs.has(item.field)) {
846
+ skip(key, 'sdTableFilterDef template');
847
+ continue;
848
+ }
849
+ if (exclude.has(item.field)) {
850
+ skip(key, 'listed in filter.queryBar.exclude');
851
+ continue;
852
+ }
853
+ if ((item.type === 'date' || item.type === 'datetime') &&
854
+ item.defaultOperator !== 'GREATER_OR_EQUAL' &&
855
+ item.defaultOperator !== 'LESS_OR_EQUAL') {
856
+ skip(key, 'date external filter without defaultOperator GREATER_OR_EQUAL or LESS_OR_EQUAL (sends no condition)');
857
+ continue;
858
+ }
859
+ const base = {
860
+ label: item.title,
861
+ group: labels.filters,
862
+ pinned: pin(item.field, !!args.inlineExternal[item.field], !!item.required),
863
+ required: !!item.required,
864
+ };
865
+ const source = { key, source: 'external', field: item.field, external: item, operatorMode: 'none' };
866
+ switch (item.type) {
867
+ case 'string': {
868
+ const operator = item.defaultOperator || 'CONTAIN';
869
+ add({ ...source, shape: 'scalar', operator }, { ...base, type: 'string', operators: [operator] });
870
+ break;
871
+ }
872
+ case 'number': {
873
+ const operator = item.defaultOperator || 'EQUAL';
874
+ add({ ...source, shape: 'scalar', operator }, { ...base, type: 'number', operators: [operator] });
875
+ break;
876
+ }
877
+ case 'boolean':
878
+ add({ ...source, shape: 'boolean', operator: 'EQUAL' }, { ...base, type: 'boolean', operators: ['EQUAL'], trueLabel: item.option?.displayOnTrue, falseLabel: item.option?.displayOnFalse });
879
+ break;
880
+ case 'date':
881
+ case 'datetime':
882
+ add({ ...source, shape: 'scalar', operator: item.defaultOperator }, { ...base, type: item.type, operators: [item.defaultOperator], min: item.minDate, max: item.maxDate });
883
+ break;
884
+ case 'daterange':
885
+ // why: control cũ (sd-date-range) chỉ chọn ngày và converter cắt về đầu/cuối ngày, kể cả với `enableTime`.
886
+ add({ ...source, shape: 'range', operator: 'BETWEEN' }, { ...base, type: 'date', operators: ['BETWEEN'], min: item.minDate, max: item.maxDate });
887
+ break;
888
+ case 'values':
889
+ case 'lazy-values': {
890
+ const multi = isMultiple(item.option.selection);
891
+ const operator = multi ? 'IN' : item.defaultOperator || 'EQUAL';
892
+ add({ ...source, shape: multi ? 'multi' : 'scalar', operator }, { ...base, ...valuesField(item.type, item.option), operators: [operator] });
893
+ break;
894
+ }
895
+ }
896
+ if (result.sources.has(key))
897
+ externalKeys.add(item.field);
898
+ }
899
+ if (args.hideColumns)
900
+ return result;
901
+ for (const column of leafColumns(args.columns)) {
902
+ const key = `column:${column.field}`;
903
+ if (externalKeys.has(column.field)) {
904
+ result.covered.push(column.field);
905
+ result.columnKeys.set(column.field, `external:${column.field}`);
906
+ continue;
907
+ }
908
+ const filter = column.filter;
909
+ const reason = column.hidden
910
+ ? 'hidden column'
911
+ : column.type === 'time'
912
+ ? 'time column'
913
+ : filter?.disabled
914
+ ? 'filter.disabled'
915
+ : filter?.filterDef || filterDefs.has(column.field)
916
+ ? 'filterDef template'
917
+ : exclude.has(column.field)
918
+ ? 'listed in filter.queryBar.exclude'
919
+ : undefined;
920
+ if (reason) {
921
+ skip(key, reason);
922
+ continue;
923
+ }
924
+ const operator = filter?.operator;
925
+ const enabled = !!operator?.enable;
926
+ const list = enabled ? (operator?.list ?? []) : [];
927
+ // why: NULL / NOT_NULL chỉ có nghĩa trên control mặc định (converter: isNoDataColumnOperator).
928
+ const noData = enabled && isDefaultControlFilter(column) ? list.filter(op => NO_DATA.includes(op)) : [];
929
+ const base = { label: titleOf(column), group: labels.columns, pinned: pin(column.field, false, false) };
930
+ const source = { key, source: 'column', field: column.field, column };
931
+ switch (column.type) {
932
+ case 'string':
933
+ case 'number': {
934
+ if (column.type === 'number' && column.filter?.type === 'split-number') {
935
+ add({ ...source, shape: 'range', operator: 'BETWEEN', operatorMode: 'none' }, { ...base, type: 'number', operators: ['BETWEEN'] });
936
+ break;
937
+ }
938
+ const fallback = operator?.default ?? (column.type === 'string' ? 'CONTAIN' : 'EQUAL');
939
+ const choices = list.filter(op => !NOT_SCALAR.includes(op));
940
+ add({ ...source, shape: 'scalar', operator: fallback, operatorMode: enabled ? 'chip' : 'none' }, { ...base, type: column.type, operators: choices.length ? choices : [fallback] });
941
+ break;
942
+ }
943
+ case 'boolean':
944
+ add({ ...source, shape: 'flag', operator: 'EQUAL', operatorMode: enabled ? 'no-data' : 'none' }, {
945
+ ...base,
946
+ type: 'boolean',
947
+ operators: ['EQUAL', ...noData],
948
+ trueLabel: column.option?.displayOnTrue,
949
+ falseLabel: column.option?.displayOnFalse,
950
+ });
951
+ break;
952
+ case 'values':
953
+ case 'lazy-values': {
954
+ const option = column.option;
955
+ const items = column.type === 'values' && typeof option.items === 'function' && !isSignal(option.items)
956
+ ? (args.cacheValues?.[column.field] ?? option.items)
957
+ : option.items;
958
+ const field = valuesField(column.type, option, items);
959
+ if (isMultiple(option.selection)) {
960
+ add({ ...source, shape: 'multi', operator: 'IN', operatorMode: enabled ? 'no-data' : 'none' }, { ...base, ...field, operators: ['IN', ...noData] });
961
+ break;
962
+ }
963
+ const fallback = operator?.default ?? 'EQUAL';
964
+ const choices = list.filter(op => SINGLE_VALUE.includes(op));
965
+ add({ ...source, shape: 'scalar', operator: fallback, operatorMode: enabled ? 'chip' : 'none' }, { ...base, ...field, operators: choices.length ? choices : [fallback] });
966
+ break;
967
+ }
968
+ case 'date':
969
+ case 'datetime':
970
+ // why: control cũ chỉ chọn ngày (sd-date / sd-date-range) và converter lọc theo cả ngày, nên field là `date`.
971
+ if (column.filter?.type === 'date') {
972
+ add({ ...source, shape: 'scalar', operator: 'EQUAL', operatorMode: enabled ? 'no-data' : 'none' }, { ...base, type: 'date', operators: ['EQUAL', ...noData] });
973
+ }
974
+ else {
975
+ add({ ...source, shape: 'range', operator: 'BETWEEN', operatorMode: enabled ? 'no-data' : 'none' }, { ...base, type: 'date', operators: ['BETWEEN', ...noData] });
976
+ }
977
+ break;
978
+ }
979
+ if (result.sources.has(key))
980
+ result.columnKeys.set(column.field, key);
981
+ }
982
+ return result;
983
+ };
984
+ const readRaw = (source, value) => {
985
+ if (source.source === 'quick')
986
+ return value.quickSearch?.filters?.[source.field];
987
+ if (source.source === 'external')
988
+ return value.externalFilter?.[source.field];
989
+ return value.columnFilter?.[source.field];
990
+ };
991
+ /** Chip of a source for a raw record: operator, data and whether it filters anything. */
992
+ const chipOf = (source, value) => {
993
+ const columnOperator = source.source === 'column' ? value.columnOperator?.[source.field] : undefined;
994
+ if (source.operatorMode !== 'none' && isNoData(columnOperator) && isNoDataColumnOperator(source.column, columnOperator)) {
995
+ return { operator: columnOperator, data: null, active: true };
996
+ }
997
+ const raw = readRaw(source, value);
998
+ const operator = source.operatorMode === 'chip' ? (columnOperator ?? source.operator) : source.operator;
999
+ switch (source.shape) {
1000
+ case 'multi': {
1001
+ const data = toArray(raw);
1002
+ return { operator, data, active: data.length > 0 };
1003
+ }
1004
+ case 'range': {
1005
+ const data = toRange(raw);
1006
+ return { operator, data, active: hasValue$1(data.from) || hasValue$1(data.to) };
1007
+ }
1008
+ case 'boolean':
1009
+ case 'flag': {
1010
+ const data = toBoolean(raw);
1011
+ return { operator, data, active: data !== null };
1012
+ }
1013
+ default: {
1014
+ const data = hasValue$1(raw) ? raw : null;
1015
+ return { operator, data, active: data !== null };
1016
+ }
1017
+ }
1018
+ };
1019
+ /** Raw value a chip stores; no chip stores the empty value of the shape. */
1020
+ const rawOf = (source, chip) => {
1021
+ if (!chip)
1022
+ return source.shape === 'range' ? { from: null, to: null } : null;
1023
+ if (isNoData(chip.operator))
1024
+ return null;
1025
+ const data = chip.data;
1026
+ switch (source.shape) {
1027
+ case 'multi':
1028
+ return toArray(data);
1029
+ case 'range':
1030
+ // why: popover BETWEEN chỉ điền một đầu thì data thiếu hẳn khoá kia (`{ from }`); converter của daterange cần đủ
1031
+ // cả `from` lẫn `to`.
1032
+ return toRange(data);
1033
+ case 'boolean':
1034
+ return toBoolean(data);
1035
+ case 'flag': {
1036
+ const flag = toBoolean(data);
1037
+ return flag === null ? null : flag ? '1' : '0';
1038
+ }
1039
+ default:
1040
+ return hasValue$1(data) ? data : null;
1041
+ }
1042
+ };
1043
+ /** Column operator after the edit; `undefined` removes the key. */
1044
+ const operatorOf = (source, chip, current, ctx) => {
1045
+ const operator = chip?.operator;
1046
+ if (isNoData(operator))
1047
+ return operator;
1048
+ if (chip && source.operatorMode === 'chip')
1049
+ return operator;
1050
+ // why: không còn chip, hoặc toán tử của chip suy từ dạng giá trị (IN / BETWEEN): chỉ rời khỏi NULL / NOT_NULL mới
1051
+ // đổi columnOperator, về toán tử mặc định của cột.
1052
+ return isNoData(current) ? (ctx.defaultColumnOperator?.[source.field] ?? source.column?.filter?.operator?.default) : current;
1053
+ };
1054
+ /**
1055
+ * Raw record → bar query (handoff section 5). Chips: every pinned field, then unpinned fields that filter something,
1056
+ * in the order of `prev` and then declaration order. A chip whose operator and data equal the one in `prev` is that
1057
+ * same object — sd-query-bar tracks chips by identity.
1058
+ */
1059
+ const tableFilterToQuery = (value, ctx, prev = []) => {
1060
+ const previous = new Map();
1061
+ const order = new Map();
1062
+ prev.forEach((filter, index) => {
1063
+ const key = filter.field;
1064
+ if (key === undefined || previous.has(key))
1065
+ return;
1066
+ previous.set(key, filter);
1067
+ order.set(key, index);
1068
+ });
1069
+ const pinned = [];
1070
+ const rest = [];
1071
+ for (const field of ctx.fields) {
1072
+ const key = field.key;
1073
+ const source = ctx.sources.get(key);
1074
+ if (!source)
1075
+ continue;
1076
+ const chip = chipOf(source, value);
1077
+ if (!field.pinned && !chip.active)
1078
+ continue;
1079
+ const before = previous.get(key);
1080
+ const next =
1081
+ // why: so theo dạng chuẩn — popover gửi khoảng một đầu là `{ from }`, raw dựng lại là `{ from, to: null }`; coi là một
1082
+ // chip để không dựng lại DOM (và mất focus) ngay sau khi menu trả focus về chip.
1083
+ before && before.operator === chip.operator && sameRaw(source.shape, before.data, chip.data)
1084
+ ? before
1085
+ : { field: key, operator: chip.operator, data: chip.data };
1086
+ (field.pinned ? pinned : rest).push(next);
1087
+ }
1088
+ const rank = (filter) => order.get(filter.field) ?? Number.MAX_SAFE_INTEGER;
1089
+ // why: chip thêm giữ thứ tự người dùng thêm trong phiên (thứ tự trên thanh); chip mới đến từ raw xếp sau.
1090
+ const ordered = rest
1091
+ .map((filter, index) => ({ filter, index }))
1092
+ .sort((a, b) => rank(a.filter) - rank(b.filter) || a.index - b.index)
1093
+ .map(entry => entry.filter);
1094
+ return {
1095
+ filters: [...pinned, ...ordered],
1096
+ logic: 'AND',
1097
+ ...(ctx.search ? { search: value.quickSearch?.term ?? '' } : {}),
1098
+ };
1099
+ };
1100
+ /** Keys of the bar fields whose applied value filters something — header icons show them as filtering. */
1101
+ const sdTableActiveQueryKeys = (value, ctx) => {
1102
+ const keys = new Set();
1103
+ for (const [key, source] of ctx.sources)
1104
+ if (chipOf(source, value).active)
1105
+ keys.add(key);
1106
+ return keys;
1107
+ };
1108
+ /**
1109
+ * Folds a change of the applied state into a bar that holds unapplied edits (manualFilter, or a chip edited while the
1110
+ * state changed). A key whose applied chip did not change between `before` and `after` keeps its draft — edited,
1111
+ * added or removed by the user. A key that changed takes the applied chip: the outside change wins for that field.
1112
+ * New applied chips go after the draft ones.
1113
+ */
1114
+ const mergeQueryDraft = (draft, before, after) => {
1115
+ const keyOf = (filter) => filter.field;
1116
+ const was = new Map(before.map(filter => [keyOf(filter), filter]));
1117
+ const now = new Map(after.map(filter => [keyOf(filter), filter]));
1118
+ const unchanged = (key) => {
1119
+ const left = was.get(key);
1120
+ const right = now.get(key);
1121
+ if (!left || !right)
1122
+ return !left && !right;
1123
+ return (left.operator === right.operator && stringify(left.data) === stringify(right.data));
1124
+ };
1125
+ const result = [];
1126
+ const seen = new Set();
1127
+ for (const filter of draft) {
1128
+ const key = keyOf(filter);
1129
+ seen.add(key);
1130
+ if (unchanged(key))
1131
+ result.push(filter);
1132
+ else if (now.has(key))
1133
+ result.push(now.get(key));
1134
+ }
1135
+ for (const filter of after)
1136
+ if (!seen.has(keyOf(filter)) && !unchanged(keyOf(filter)))
1137
+ result.push(filter);
1138
+ return result;
1139
+ };
1140
+ /**
1141
+ * Bar query → raw record (handoff section 5). Every field of the bar is written: its chip, or the empty value when
1142
+ * it has none. Covered columns are cleared; excluded fields are left alone. A value equivalent to the stored one
1143
+ * (`[]` and `null`, `'1'` and `true`, …) keeps the stored representation, so a round trip changes nothing.
1144
+ */
1145
+ const queryToTableFilter = (query, ctx, current) => {
1146
+ const chips = new Map();
1147
+ for (const filter of query.filters) {
1148
+ const key = filter.field;
1149
+ if (key !== undefined && !chips.has(key))
1150
+ chips.set(key, filter);
1151
+ }
1152
+ const quickFilters = { ...current.quickSearch?.filters };
1153
+ const externalFilter = { ...current.externalFilter };
1154
+ const columnFilter = { ...current.columnFilter };
1155
+ const columnOperator = { ...current.columnOperator };
1156
+ const changed = [];
1157
+ for (const [key, source] of ctx.sources) {
1158
+ const chip = chips.get(key);
1159
+ const store = source.source === 'quick' ? quickFilters : source.source === 'external' ? externalFilter : columnFilter;
1160
+ const before = store[source.field];
1161
+ const next = rawOf(source, chip);
1162
+ const valueChanged = !sameRaw(source.shape, before, next);
1163
+ if (valueChanged)
1164
+ store[source.field] = next;
1165
+ let operator;
1166
+ let operatorChanged = false;
1167
+ if (source.source === 'column' && source.operatorMode !== 'none') {
1168
+ const stored = current.columnOperator?.[source.field];
1169
+ operator = operatorOf(source, chip, stored, ctx);
1170
+ if (operator !== stored) {
1171
+ operatorChanged = true;
1172
+ if (operator === undefined)
1173
+ delete columnOperator[source.field];
1174
+ else
1175
+ columnOperator[source.field] = operator;
1176
+ }
1177
+ }
1178
+ if (valueChanged || operatorChanged) {
1179
+ changed.push({ key, value: valueChanged ? next : before, valueChanged, ...(operatorChanged && operator ? { operator } : {}) });
1180
+ }
1181
+ }
1182
+ // why: cột bị external cùng field che không có control nào trên thanh; xoá để không còn điều kiện ẩn từ cache cũ.
1183
+ for (const field of ctx.covered) {
1184
+ columnFilter[field] = null;
1185
+ // why: NULL / NOT_NULL lọc cả khi không có giá trị — trả operator về mặc định, nếu không điều kiện vẫn gửi đi.
1186
+ if (isNoData(columnOperator[field])) {
1187
+ const fallback = ctx.defaultColumnOperator?.[field];
1188
+ if (fallback && !isNoData(fallback))
1189
+ columnOperator[field] = fallback;
1190
+ else
1191
+ delete columnOperator[field];
1192
+ }
1193
+ }
1194
+ const term = ctx.search ? (query.search ?? '').trim() : (current.quickSearch?.term ?? '');
1195
+ return {
1196
+ patch: {
1197
+ ...(ctx.quickSearch
1198
+ ? { quickSearch: { term, filters: quickFilters } }
1199
+ : {}),
1200
+ externalFilter,
1201
+ columnFilter,
1202
+ columnOperator,
1203
+ },
1204
+ changed,
1205
+ };
1206
+ };
1207
+
692
1208
  class SdTableMobileActionsComponent {
693
1209
  actions = input.required();
694
1210
  title = input.required();
@@ -1005,6 +1521,174 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
1005
1521
  args: [{ name: 'command', standalone: true }]
1006
1522
  }] });
1007
1523
 
1524
+ const TABLE_SKELETON_ROWS = 5;
1525
+ const TABLE_SKELETON_MAX_ROWS = 20;
1526
+ const firstFlag = (...values) => values.find((value) => typeof value === 'boolean');
1527
+ const firstNonNegative = (...values) => values.find((value) => typeof value === 'number' && Number.isFinite(value) && value >= 0);
1528
+ /** Field by field: `option.loading`, then `SD_TABLE_CONFIGURATION.loading`, then the defaults. Invalid values count as not set. */
1529
+ function resolveTableLoading(option, configuration) {
1530
+ const rows = firstNonNegative(option?.skeletonRows, configuration?.skeletonRows);
1531
+ return {
1532
+ skeleton: firstFlag(option?.skeleton, configuration?.skeleton) ?? true,
1533
+ skeletonRows: rows === undefined ? undefined : Math.min(TABLE_SKELETON_MAX_ROWS, Math.max(1, Math.floor(rows))),
1534
+ showDelay: firstNonNegative(option?.showDelay, configuration?.showDelay) ?? 300,
1535
+ minDuration: firstNonNegative(option?.minDuration, configuration?.minDuration) ?? 400,
1536
+ dim: firstFlag(option?.dim, configuration?.dim) ?? true,
1537
+ };
1538
+ }
1539
+ const TEXT_WIDTHS = [72, 54, 84, 62, 46];
1540
+ const NUMBER_WIDTHS = [64, 48, 80, 56, 72];
1541
+ const FIXED_WIDTHS = { date: '76px', datetime: '116px', time: '44px', boolean: '40px' };
1542
+ const TEXT_TYPES = new Set(['string', 'values', 'lazy-values']);
1543
+ const EMPTY_COLUMNS = new Set(['sdCommand', 'sdReorder', 'sdSubInformationAction', 'sdFiller']);
1544
+ function skeletonCell(column, row, dataColumn) {
1545
+ const { field, type } = column;
1546
+ if (field === 'sdSelection')
1547
+ return { field, shape: 'box', align: 'center' };
1548
+ if (field === 'sdIndex')
1549
+ return { field, shape: 'bar', align: 'center', width: '16px' };
1550
+ if (!type || EMPTY_COLUMNS.has(field))
1551
+ return { field, shape: 'none', align: 'start' };
1552
+ if (type === 'children')
1553
+ return { field, shape: 'none', align: 'start', hidden: true };
1554
+ const align = column.align === 'right' ? 'end' : 'start';
1555
+ const step = (row + dataColumn) % 5;
1556
+ if (column.badge)
1557
+ return { field, shape: 'pill', align, width: '64px' };
1558
+ if (type === 'number' && !column.template)
1559
+ return { field, shape: 'bar', align, width: `${NUMBER_WIDTHS[step]}%`, maxWidth: '120px' };
1560
+ if (FIXED_WIDTHS[type] && !column.template)
1561
+ return { field, shape: 'bar', align, width: FIXED_WIDTHS[type], maxWidth: '100%' };
1562
+ if (TEXT_TYPES.has(type) || column.template)
1563
+ return { field, shape: 'bar', align, width: `${TEXT_WIDTHS[step]}%`, maxWidth: '240px' };
1564
+ return { field, shape: 'none', align };
1565
+ }
1566
+ /**
1567
+ * `rows` skeleton rows over the displayed columns. Bar widths follow the column type, the row `i` and the data
1568
+ * column `j` (the table's own columns do not count), so the rows look like text without repeating.
1569
+ */
1570
+ function buildTableSkeleton(columns, rows) {
1571
+ return Array.from({ length: rows }, (_, row) => {
1572
+ let dataColumn = 0;
1573
+ return columns.map(column => skeletonCell(column, row, column.type && column.type !== 'children' ? dataColumn++ : dataColumn));
1574
+ });
1575
+ }
1576
+ /** 5 rows × 4 text columns, without a header: what the table shows before its configuration is ready. */
1577
+ const TABLE_GENERIC_SKELETON = buildTableSkeleton(['a', 'b', 'c', 'd'].map(field => ({ field, type: 'string' })), TABLE_SKELETON_ROWS);
1578
+ /**
1579
+ * Rows that fill the visible body of a table with a fixed height, at most `pageSize` and 20; `undefined` when
1580
+ * the height is not fixed or not measurable yet.
1581
+ */
1582
+ function skeletonFillRows(body, rowHeight, pageSize) {
1583
+ if (!(body > 0) || !(rowHeight > 0))
1584
+ return undefined;
1585
+ const rows = Math.max(1, Math.floor(body / rowHeight));
1586
+ return Math.min(rows, TABLE_SKELETON_MAX_ROWS, pageSize && pageSize > 0 ? pageSize : TABLE_SKELETON_MAX_ROWS);
1587
+ }
1588
+ /** A resolved `max-height` in pixels; `undefined` for `none`, percentages and anything else not measurable. */
1589
+ function pixelLength(value) {
1590
+ return value && /^-?\d+(\.\d+)?px$/.test(value.trim()) ? parseFloat(value) : undefined;
1591
+ }
1592
+ /**
1593
+ * - `skeleton`: the table has no rows and something is on its way — a read is loading, the first read of the
1594
+ * option is scheduled, the configuration is not ready yet, or a read replaces one that showed the skeleton
1595
+ * (`pending`).
1596
+ * - `refresh`: the progress bar is on and there is something under it: a read, a read waiting to replace it
1597
+ * (`scheduled`), or the rows it keeps.
1598
+ */
1599
+ function tableLoadingView(state) {
1600
+ if (state.skeleton && !state.rows && (state.loading || state.pending))
1601
+ return 'skeleton';
1602
+ return state.refresh && (state.loading || state.scheduled || state.rows) ? 'refresh' : 'none';
1603
+ }
1604
+ /**
1605
+ * Turns the progress bar of a table on and off. It comes on once the table has been busy for `showDelay` and
1606
+ * stays for at least `minDuration`. Busy means a read is loading, or a read that replaces it is waiting in the
1607
+ * schedule while the bar already shows: the debounce between two reads must not switch the bar off, but it
1608
+ * never switches the bar on either.
1609
+ */
1610
+ class TableRefreshTimer {
1611
+ schedule;
1612
+ now;
1613
+ #shown = signal(false);
1614
+ /** Progress bar (and dimmed rows) on. */
1615
+ shown = this.#shown.asReadonly();
1616
+ #busy = false;
1617
+ #shownAt = 0;
1618
+ #cancel;
1619
+ #destroyed = false;
1620
+ constructor(schedule, now = () => Date.now()) {
1621
+ this.schedule = schedule;
1622
+ this.now = now;
1623
+ }
1624
+ /**
1625
+ * @param state.loading `loading()` of the table.
1626
+ * @param state.scheduled a read waits in the schedule (debounce).
1627
+ * @param state.skeleton the table draws skeleton rows for this read, so no bar is scheduled.
1628
+ * @param state.rows the table has rows; `minDuration` is only kept over a result with rows.
1629
+ */
1630
+ update(state, settings) {
1631
+ if (this.#destroyed)
1632
+ return;
1633
+ // why: rows that went away while nothing loads (an option change resets the table) leave nothing for a held
1634
+ // bar to cover; it must not come back over the next rows.
1635
+ if (!state.loading && !state.scheduled && !state.rows && this.#shown()) {
1636
+ this.#clear();
1637
+ this.#shown.set(false);
1638
+ }
1639
+ const busy = state.loading || (this.#shown() && state.scheduled);
1640
+ if (busy === this.#busy)
1641
+ return;
1642
+ this.#busy = busy;
1643
+ this.#clear();
1644
+ if (busy) {
1645
+ // why: a skeleton read has no rows to keep; a bar still held over rows that are gone (an option change
1646
+ // during the hold) must not come back over the new rows.
1647
+ if (state.skeleton) {
1648
+ this.#shown.set(false);
1649
+ return;
1650
+ }
1651
+ // A new read while the bar shows (or is being held) keeps it and its start time.
1652
+ if (this.#shown())
1653
+ return;
1654
+ this.#after(settings.showDelay, () => {
1655
+ this.#shownAt = this.now();
1656
+ this.#shown.set(true);
1657
+ });
1658
+ return;
1659
+ }
1660
+ if (!this.#shown())
1661
+ return;
1662
+ const remaining = this.#shownAt + settings.minDuration - this.now();
1663
+ // why: an empty or failed result removes the rows; its empty/error region must show at once.
1664
+ if (remaining > 0 && state.rows)
1665
+ this.#after(remaining, () => this.#shown.set(false));
1666
+ else
1667
+ this.#shown.set(false);
1668
+ }
1669
+ destroy() {
1670
+ this.#destroyed = true;
1671
+ this.#clear();
1672
+ }
1673
+ #after(ms, callback) {
1674
+ if (ms <= 0) {
1675
+ callback();
1676
+ return;
1677
+ }
1678
+ this.#cancel = this.schedule(() => {
1679
+ this.#cancel = undefined;
1680
+ if (!this.#destroyed)
1681
+ callback();
1682
+ }, ms);
1683
+ }
1684
+ #clear() {
1685
+ this.#cancel?.();
1686
+ this.#cancel = undefined;
1687
+ }
1688
+ }
1689
+
1690
+ /** A phone screen shows about three cards; more skeleton cards would only be scrolled past. */
1691
+ const MOBILE_SKELETON_CARDS = 3;
1008
1692
  const INTERACTIVE = 'a[href],button,input,select,textarea,summary,label,[contenteditable]:not([contenteditable="false"]),[role="button"],[role="link"],[role="checkbox"],[role="radio"],[role="switch"],[role="textbox"],[tabindex]:not([tabindex="-1"]),sd-button,sd-table,[cdkDragHandle]';
1009
1693
  class SdTableMobileCardsComponent {
1010
1694
  table = input.required();
@@ -1028,6 +1712,16 @@ class SdTableMobileCardsComponent {
1028
1712
  #focusOrigin;
1029
1713
  #pointer;
1030
1714
  #dragged = false;
1715
+ /** Skeleton cards while the table has no rows yet: `loading.skeletonRows`, at most 3. */
1716
+ skeletonCards = computed(() => {
1717
+ const table = this.table();
1718
+ if (table.loadingView() !== 'skeleton')
1719
+ return [];
1720
+ const count = Math.min(table.loadingSettings().skeletonRows ?? TABLE_SKELETON_ROWS, MOBILE_SKELETON_CARDS);
1721
+ return Array.from({ length: count }, (_, index) => index);
1722
+ });
1723
+ /** The cards on screen are being replaced: dim them and ignore taps (scrolling and the keyboard still work). */
1724
+ dimmed = computed(() => this.table().loadingView() === 'refresh' && this.table().loadingSettings().dim);
1031
1725
  cards = computed(() => {
1032
1726
  const table = this.table();
1033
1727
  table.selectedTableItems();
@@ -1260,7 +1954,7 @@ class SdTableMobileCardsComponent {
1260
1954
  this.#commandRevision++;
1261
1955
  }
1262
1956
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableMobileCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1263
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableMobileCardsComponent, isStandalone: true, selector: "sd-table-mobile-cards", inputs: { table: { classPropertyName: "table", publicName: "table", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, dataRows: { classPropertyName: "dataRows", publicName: "dataRows", isSignal: true, isRequired: false, transformFunction: null }, aggregateTemplate: { classPropertyName: "aggregateTemplate", publicName: "aggregateTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupTemplate: { classPropertyName: "groupTemplate", publicName: "groupTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n <sd-icon\n [name]=\"_meta.tree?.isExpanding ? 'hourglass_empty' : _meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n <sd-icon\n [name]=\"\n _meta.expand?.isExpanding ? 'hourglass_empty' : _meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\n \"></sd-icon>\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px}.sd-mobile-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1957
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableMobileCardsComponent, isStandalone: true, selector: "sd-table-mobile-cards", inputs: { table: { classPropertyName: "table", publicName: "table", isSignal: true, isRequired: true, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, dataRows: { classPropertyName: "dataRows", publicName: "dataRows", isSignal: true, isRequired: false, transformFunction: null }, aggregateTemplate: { classPropertyName: "aggregateTemplate", publicName: "aggregateTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupTemplate: { classPropertyName: "groupTemplate", publicName: "groupTemplate", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n@let _skeletonCards = skeletonCards();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n [class.sd-mobile-list--dim]=\"dimmed()\"\n [attr.role]=\"_skeletonCards.length ? null : 'list'\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n <!-- why: khung x\u01B0\u01A1ng ch\u1EC9 c\u00F3 khi ch\u01B0a c\u00F3 th\u1EBB n\u00E0o, n\u1EB1m trong c\u00F9ng danh s\u00E1ch \u0111\u1EC3 gi\u1EEF gap/\u0111\u1EC7m; trang tr\u00ED n\u00EAn aria-hidden\n (v\u00F9ng .sd-table-live c\u1EE7a b\u1EA3ng b\u00E1o \"\u0111ang t\u1EA3i\"). -->\n @for (index of _skeletonCards; track index) {\n <div class=\"sd-mobile-skeleton-card\" aria-hidden=\"true\">\n <div class=\"sd-mobile-skeleton-body\">\n <span class=\"sd-mobile-skeleton-bar\"></span>\n <span class=\"sd-mobile-skeleton-bar\"></span>\n <span class=\"sd-mobile-skeleton-bar\"></span>\n </div>\n </div>\n }\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-busy]=\"_meta.tree?.isExpanding ? 'true' : null\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n @if (_meta.tree?.isExpanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n }\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-busy]=\"_meta.expand?.isExpanding ? 'true' : null\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n @if (_meta.expand?.isExpanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"></sd-icon>\n }\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px;transition:opacity var(--sd-duration-fast, .12s)}@media(prefers-reduced-motion:reduce){.sd-mobile-list{transition:none}}.sd-mobile-list--dim{opacity:var(--sd-table-loading-dim, .55)}.sd-mobile-list--dim,.sd-mobile-list--dim *{pointer-events:none!important}.sd-mobile-card,.sd-mobile-skeleton-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}@keyframes sd-table-spin{to{transform:rotate(360deg)}}.sd-table-spinner{display:inline-block;flex:0 0 auto;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;border:2px solid var(--sd-table-progress-track);border-top-color:var(--sd-table-spinner);border-radius:50%;animation:sd-table-spin .8s linear infinite}@media(prefers-reduced-motion:reduce){.sd-table-spinner{animation:none}}@media(forced-colors:active){.sd-table-spinner{forced-color-adjust:none;border-color:GrayText;border-top-color:Highlight}}@keyframes sd-table-skeleton-sweep{to{background-position:480px 0}}.sd-mobile-skeleton-body{display:flex;flex-direction:column;gap:8px;padding:4px 0}.sd-mobile-skeleton-bar{display:block;height:12px;border-radius:var(--sd-radius-4, 4px);background:linear-gradient(90deg,var(--sd-table-skeleton-bg) 0,var(--sd-table-skeleton-highlight) 40%,var(--sd-table-skeleton-bg) 80%) 0 0/480px 100%;animation:sd-table-skeleton-sweep 1.4s linear infinite}@media(prefers-reduced-motion:reduce){.sd-mobile-skeleton-bar{animation:none}}@media(forced-colors:active){.sd-mobile-skeleton-bar{forced-color-adjust:none;background:GrayText}}.sd-mobile-skeleton-bar:nth-child(1){width:60%;height:14px}.sd-mobile-skeleton-bar:nth-child(2){width:85%}.sd-mobile-skeleton-bar:nth-child(3){width:40%}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1264
1958
  }
1265
1959
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableMobileCardsComponent, decorators: [{
1266
1960
  type: Component,
@@ -1274,10 +1968,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
1274
1968
  SdIcon,
1275
1969
  SdTranslatePipe,
1276
1970
  SdTableMobileActionsComponent,
1277
- ], template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n role=\"list\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n <sd-icon\n [name]=\"_meta.tree?.isExpanding ? 'hourglass_empty' : _meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n <sd-icon\n [name]=\"\n _meta.expand?.isExpanding ? 'hourglass_empty' : _meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\n \"></sd-icon>\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px}.sd-mobile-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"] }]
1971
+ ], template: "@let _table = table();\n@let _option = option();\n@let _selectionMode = selectionMode();\n@let _autoId = _table.autoId();\n@let _commands = resolvedCommands();\n@let _actions = actions();\n@let _active = active();\n@let _expandTemplate = _table.sdSubInformation();\n@let _skeletonCards = skeletonCards();\n\n@if (_option.selector?.visible) {\n <span class=\"sd-mobile-sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ selectionSummary() }}</span>\n}\n\n<div\n class=\"sd-mobile-list\"\n [class.sd-mobile-list--dim]=\"dimmed()\"\n [attr.role]=\"_skeletonCards.length ? null : 'list'\"\n cdkDropList\n [cdkDropListData]=\"dataRows() ?? rows()\"\n [cdkDropListDisabled]=\"!_option.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"_table.reorderSortPredicate\"\n (cdkDropListDropped)=\"_table.onReorderDrop($event)\">\n <!-- why: khung x\u01B0\u01A1ng ch\u1EC9 c\u00F3 khi ch\u01B0a c\u00F3 th\u1EBB n\u00E0o, n\u1EB1m trong c\u00F9ng danh s\u00E1ch \u0111\u1EC3 gi\u1EEF gap/\u0111\u1EC7m; trang tr\u00ED n\u00EAn aria-hidden\n (v\u00F9ng .sd-table-live c\u1EE7a b\u1EA3ng b\u00E1o \"\u0111ang t\u1EA3i\"). -->\n @for (index of _skeletonCards; track index) {\n <div class=\"sd-mobile-skeleton-card\" aria-hidden=\"true\">\n <div class=\"sd-mobile-skeleton-body\">\n <span class=\"sd-mobile-skeleton-bar\"></span>\n <span class=\"sd-mobile-skeleton-bar\"></span>\n <span class=\"sd-mobile-skeleton-bar\"></span>\n </div>\n </div>\n }\n @for (card of cards(); track card.row.meta.id) {\n @let _row = card.row;\n @let _meta = _row.meta;\n @if (_table.aggregateRenderHost.rows.get(_row); as summary) {\n <div role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"aggregateTemplate() ?? null; context: { summary: summary }\"></ng-container>\n </div>\n } @else if (_meta.group?.isGroupHeader) {\n <div class=\"sd-mobile-group\" role=\"listitem\">\n <ng-container *ngTemplateOutlet=\"groupTemplate(); context: { item: _row }\"></ng-container>\n </div>\n } @else {\n <article\n class=\"sd-mobile-card\"\n role=\"listitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"card.label\"\n [attr.data-autoid]=\"card.context.autoId\"\n [class.selected]=\"_meta.selector?.isSelected\"\n [class.sd-mobile-card-commandable]=\"!_selectionMode && _commands.get(_row)?.length\"\n [class.sd-mobile-card-active]=\"_active?.row === _row\"\n [ngStyle]=\"_meta.rowStyle\"\n [style.margin-inline-start.px]=\"_option.tree ? (_meta.tree?.level ?? 0) * (_option.tree?.indentSize ?? 20) : 0\"\n (click)=\"onCardClick(card, $event)\"\n (keydown)=\"onCardKey(card, $event)\"\n (pointerdown)=\"pointerStart($event)\"\n (pointermove)=\"pointerMove($event)\"\n (pointercancel)=\"cancelPointer()\"\n cdkDrag\n [cdkDragData]=\"_row\"\n [cdkDragDisabled]=\"!_option.rowReorder?.enabled || card.reorderDisabled\"\n (cdkDragStarted)=\"dragStart()\">\n <div class=\"sd-mobile-card-controls d-flex align-items-center gap-8\">\n @if (_option.selector?.visible && _meta.selector?.visible) {\n @if (_option.selector?.single) {\n <mat-radio-button\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"sd-mobile-card-selector\"\n [checked]=\"_meta.selector?.isSelected\"\n [disabled]=\"_meta.selector?.disabled\"\n [aria-label]=\"card.selectLabel\"\n (change)=\"select(card)\"></mat-checkbox>\n }\n }\n @if (_option.tree) {\n <span class=\"sd-mobile-sr-only\">{{ card.treeLabel }}</span>\n @if (_meta.tree?.hasChildren) {\n <button\n mat-icon-button\n type=\"button\"\n [disabled]=\"_meta.tree?.isExpanding\"\n [attr.aria-busy]=\"_meta.tree?.isExpanding ? 'true' : null\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.aria-expanded]=\"_meta.tree?.isExpanded\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-tree-toggle-' + _meta.id : null\"\n (click)=\"_table.onTreeToggle(_row)\">\n @if (_meta.tree?.isExpanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_meta.tree?.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n }\n </button>\n }\n @if (_option.index?.enabled) {\n <span>{{ _meta.tree?.indexPath?.join('.') }}</span>\n }\n }\n @if (_option.rowReorder?.enabled) {\n <button\n mat-icon-button\n type=\"button\"\n cdkDragHandle\n [disabled]=\"card.reorderDisabled\"\n [attr.aria-label]=\"'core.component.table.mobile.reorder' | sdTranslate\">\n <sd-icon [name]=\"_option.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n </button>\n }\n <span class=\"flex-1\"></span>\n </div>\n <div class=\"sd-mobile-card-body\">\n <ng-container *ngTemplateOutlet=\"_table.sdRowMobileDef()!.templateRef; context: card.context\"></ng-container>\n </div>\n @if ((_expandTemplate && !_option.expand?.always) || (!_selectionMode && _commands.get(_row)?.length)) {\n <div class=\"sd-mobile-card-actions\">\n @if (_expandTemplate && !_option.expand?.always) {\n <button\n mat-button\n type=\"button\"\n [disabled]=\"card.expandDisabled || _meta.expand?.isExpanding\"\n [attr.aria-busy]=\"_meta.expand?.isExpanding ? 'true' : null\"\n [attr.aria-expanded]=\"_meta.expand?.isExpanded\"\n [attr.aria-label]=\"card.expandLabel\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-expand-' + _meta.id : null\"\n (click)=\"_table.onExpand(_row)\">\n @if (_meta.expand?.isExpanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"></sd-icon>\n }\n {{ 'core.component.table.mobile.details' | sdTranslate }}\n </button>\n }\n @if (!_selectionMode && _commands.get(_row)?.length) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"sd-mobile-command-trigger\"\n aria-haspopup=\"dialog\"\n (click)=\"openCommand(card, $event)\"\n [attr.aria-label]=\"card.commandLabel\"\n [attr.aria-expanded]=\"_active?.row === _row\"\n [attr.data-autoid]=\"card.context.autoId ? card.context.autoId + '-commands' : null\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n </button>\n }\n </div>\n }\n @if (_expandTemplate && (_option.expand?.always || _meta.expand?.isExpanded)) {\n <div class=\"sd-mobile-expand\">\n <ng-container *ngTemplateOutlet=\"_expandTemplate.templateRef; context: { item: _row }\"></ng-container>\n </div>\n }\n </article>\n }\n }\n</div>\n@if (containerOpen() && (_actions.length || _selectionMode)) {\n <sd-table-mobile-actions\n [class.sd-mobile-floating]=\"_selectionMode\"\n [actions]=\"_actions\"\n [title]=\"actionTitle()\"\n [selection]=\"_selectionMode\"\n [autoId]=\"_autoId\"\n [count]=\"selected().length\"\n (end)=\"endActions()\"></sd-table-mobile-actions>\n}\n", styles: [":host{display:block;min-width:0}.sd-mobile-list{display:flex;flex-direction:column;gap:24px;padding:20px 20px 8px;transition:opacity var(--sd-duration-fast, .12s)}@media(prefers-reduced-motion:reduce){.sd-mobile-list{transition:none}}.sd-mobile-list--dim{opacity:var(--sd-table-loading-dim, .55)}.sd-mobile-list--dim,.sd-mobile-list--dim *{pointer-events:none!important}.sd-mobile-card,.sd-mobile-skeleton-card{position:relative;border:1px solid var(--sd-border);border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface);color:var(--sd-text);min-width:0;padding:8px 12px;overflow-wrap:anywhere}.sd-mobile-card.selected{border-color:var(--sd-primary);background:color-mix(in srgb,var(--sd-primary) 10%,var(--sd-surface))}.sd-mobile-card-active{border-color:var(--sd-primary)}.sd-mobile-card:focus-visible,button:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}.sd-mobile-card-commandable{min-height:76px}.sd-mobile-card-selector{position:absolute;z-index:1;top:-20px;inset-inline-end:-20px;width:40px;height:40px;display:flex;align-items:center;justify-content:center;--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-state-layer-size: 40px;--mdc-radio-state-layer-size: 40px;--mat-radio-state-layer-size: 40px}.sd-mobile-card-selector:before{content:\"\";position:absolute;inset:8px;border:1px solid var(--sd-border);border-radius:50%;background:var(--sd-surface)}.sd-mobile-card-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.sd-mobile-command-trigger{flex:0 0 44px;margin-inline-start:auto;width:44px;height:44px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__background{width:14px;height:14px;top:13px;left:13px}:host ::ng-deep .sd-mobile-card-selector .mdc-radio__background{transform:scale(.7)}:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-touch-target,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-touch-target{width:40px;height:40px}:host ::ng-deep .sd-mobile-card-selector .mdc-checkbox__ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-checkbox-ripple,:host ::ng-deep .sd-mobile-card-selector .mat-mdc-radio-ripple{width:24px;height:24px;inset:8px}.sd-mobile-card-body{padding:4px 0;min-width:0}@keyframes sd-table-spin{to{transform:rotate(360deg)}}.sd-table-spinner{display:inline-block;flex:0 0 auto;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;border:2px solid var(--sd-table-progress-track);border-top-color:var(--sd-table-spinner);border-radius:50%;animation:sd-table-spin .8s linear infinite}@media(prefers-reduced-motion:reduce){.sd-table-spinner{animation:none}}@media(forced-colors:active){.sd-table-spinner{forced-color-adjust:none;border-color:GrayText;border-top-color:Highlight}}@keyframes sd-table-skeleton-sweep{to{background-position:480px 0}}.sd-mobile-skeleton-body{display:flex;flex-direction:column;gap:8px;padding:4px 0}.sd-mobile-skeleton-bar{display:block;height:12px;border-radius:var(--sd-radius-4, 4px);background:linear-gradient(90deg,var(--sd-table-skeleton-bg) 0,var(--sd-table-skeleton-highlight) 40%,var(--sd-table-skeleton-bg) 80%) 0 0/480px 100%;animation:sd-table-skeleton-sweep 1.4s linear infinite}@media(prefers-reduced-motion:reduce){.sd-mobile-skeleton-bar{animation:none}}@media(forced-colors:active){.sd-mobile-skeleton-bar{forced-color-adjust:none;background:GrayText}}.sd-mobile-skeleton-bar:nth-child(1){width:60%;height:14px}.sd-mobile-skeleton-bar:nth-child(2){width:85%}.sd-mobile-skeleton-bar:nth-child(3){width:40%}.sd-mobile-group{overflow-wrap:anywhere}.sd-mobile-expand{padding:12px 0;border-top:1px solid var(--sd-border)}.sd-mobile-floating{position:sticky;bottom:0;padding-bottom:var(--sd-table-mobile-bottom-offset, 0px);z-index:2}button{min-width:44px;min-height:44px;height:auto}[cdkDragHandle]{touch-action:none;cursor:grab}.sd-mobile-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.cdk-drag-placeholder{opacity:.3}\n"] }]
1278
1972
  }], ctorParameters: () => [] });
1279
1973
 
1280
- let nextId = 0;
1974
+ let nextId$1 = 0;
1281
1975
  /**
1282
1976
  * @internal Paginator of `<sd-table>` for `paginate.total: 'unknown'`.
1283
1977
  *
@@ -1295,7 +1989,7 @@ class SdTableUnknownTotalPaginator {
1295
1989
  autoId = input();
1296
1990
  page = output();
1297
1991
  intl = inject(MatPaginatorIntl);
1298
- pageSizeLabelId = `sd-table-unknown-total-page-size-${nextId++}`;
1992
+ pageSizeLabelId = `sd-table-unknown-total-page-size-${nextId$1++}`;
1299
1993
  displayedPageSizeOptions = computed(() => {
1300
1994
  const options = new Set((this.pageSizeOptions() ?? []).filter(size => size > 0));
1301
1995
  options.add(this.state().pageSize);
@@ -1330,7 +2024,7 @@ class SdTableUnknownTotalPaginator {
1330
2024
  this.page.emit({ pageIndex: 0, pageSize });
1331
2025
  }
1332
2026
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableUnknownTotalPaginator, deps: [], target: i0.ɵɵFactoryTarget.Component });
1333
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableUnknownTotalPaginator, isStandalone: true, selector: "sd-table-unknown-total-paginator", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, hidePageSize: { classPropertyName: "hidePageSize", publicName: "hidePageSize", isSignal: true, isRequired: false, transformFunction: null }, showFirstButton: { classPropertyName: "showFirstButton", publicName: "showFirstButton", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "page" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-busy": "state().busy ? \"true\" : null", "attr.data-autoid": "autoId() ? autoId() + \"-paginator\" : null" }, classAttribute: "mat-mdc-paginator sd-table-unknown-total-paginator" }, ngImport: i0, template: "@let _state = state();\n@let _autoId = autoId();\n<div class=\"mat-mdc-paginator-outer-container\">\n <div class=\"mat-mdc-paginator-container\">\n @if (!hidePageSize()) {\n <div class=\"mat-mdc-paginator-page-size\">\n <div class=\"mat-mdc-paginator-page-size-label\" [attr.id]=\"pageSizeLabelId\">\n {{ intl.itemsPerPageLabel }}\n </div>\n @if (displayedPageSizeOptions().length > 1) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" class=\"mat-mdc-paginator-page-size-select\">\n <mat-select\n [value]=\"_state.pageSize\"\n [disabled]=\"_state.busy\"\n [aria-labelledby]=\"pageSizeLabelId\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-page-size' : null\"\n (selectionChange)=\"changePageSize($event.value)\"\n hideSingleSelectionIndicator>\n @for (pageSizeOption of displayedPageSizeOptions(); track pageSizeOption) {\n <mat-option [value]=\"pageSizeOption\">{{ pageSizeOption }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n } @else {\n <div class=\"mat-mdc-paginator-page-size-value\">{{ _state.pageSize }}</div>\n }\n </div>\n }\n\n <div class=\"mat-mdc-paginator-range-actions\">\n <div class=\"mat-mdc-paginator-range-label\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Same contract as mat-paginator: `disabledInteractive` keeps focus on a button that becomes\n disabled while its page loads, and tabindex -1 keeps disabled buttons out of the tab order. -->\n @if (showFirstButton()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-first\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-first' : null\"\n [attr.aria-label]=\"intl.firstPageLabel\"\n [matTooltip]=\"intl.firstPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"first()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\" />\n </svg>\n </button>\n }\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-previous\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-previous' : null\"\n [attr.aria-label]=\"intl.previousPageLabel\"\n [matTooltip]=\"intl.previousPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"previous()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\" />\n </svg>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-next\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-next' : null\"\n [attr.aria-label]=\"intl.nextPageLabel\"\n [matTooltip]=\"intl.nextPageLabel\"\n [matTooltipDisabled]=\"nextDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"nextDisabled()\"\n [tabindex]=\"nextDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"next()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </svg>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}:host ::ng-deep .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}:host-context([dir=rtl]) .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}:host-context([dir=rtl]) .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors:active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2027
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTableUnknownTotalPaginator, isStandalone: true, selector: "sd-table-unknown-total-paginator", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null }, hidePageSize: { classPropertyName: "hidePageSize", publicName: "hidePageSize", isSignal: true, isRequired: false, transformFunction: null }, showFirstButton: { classPropertyName: "showFirstButton", publicName: "showFirstButton", isSignal: true, isRequired: false, transformFunction: null }, autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { page: "page" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-busy": "state().busy ? \"true\" : null", "attr.data-autoid": "autoId() ? autoId() + \"-paginator\" : null" }, classAttribute: "mat-mdc-paginator sd-table-unknown-total-paginator" }, ngImport: i0, template: "@let _state = state();\n@let _autoId = autoId();\n<div class=\"mat-mdc-paginator-outer-container\">\n <div class=\"mat-mdc-paginator-container\">\n @if (!hidePageSize()) {\n <div class=\"mat-mdc-paginator-page-size\">\n <div class=\"mat-mdc-paginator-page-size-label\" [attr.id]=\"pageSizeLabelId\">\n {{ intl.itemsPerPageLabel }}\n </div>\n @if (displayedPageSizeOptions().length > 1) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" class=\"mat-mdc-paginator-page-size-select\">\n <mat-select\n [value]=\"_state.pageSize\"\n [disabled]=\"_state.busy\"\n [aria-labelledby]=\"pageSizeLabelId\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-page-size' : null\"\n (selectionChange)=\"changePageSize($event.value)\"\n [panelClass]=\"['sd-select-panel', 'sd-table-page-size-panel']\"\n hideSingleSelectionIndicator>\n @for (pageSizeOption of displayedPageSizeOptions(); track pageSizeOption) {\n <mat-option [value]=\"pageSizeOption\">{{ pageSizeOption }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n } @else {\n <div class=\"mat-mdc-paginator-page-size-value\">{{ _state.pageSize }}</div>\n }\n </div>\n }\n\n <div class=\"mat-mdc-paginator-range-actions\">\n <div class=\"mat-mdc-paginator-range-label\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Same contract as mat-paginator: `disabledInteractive` keeps focus on a button that becomes\n disabled while its page loads, and tabindex -1 keeps disabled buttons out of the tab order. -->\n @if (showFirstButton()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-first\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-first' : null\"\n [attr.aria-label]=\"intl.firstPageLabel\"\n [matTooltip]=\"intl.firstPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"first()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\" />\n </svg>\n </button>\n }\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-previous\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-previous' : null\"\n [attr.aria-label]=\"intl.previousPageLabel\"\n [matTooltip]=\"intl.previousPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"previous()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\" />\n </svg>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-next\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-next' : null\"\n [attr.aria-label]=\"intl.nextPageLabel\"\n [matTooltip]=\"intl.nextPageLabel\"\n [matTooltipDisabled]=\"nextDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"nextDisabled()\"\n [tabindex]=\"nextDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"next()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </svg>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}:host ::ng-deep .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}:host-context([dir=rtl]) .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}:host-context([dir=rtl]) .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors:active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1334
2028
  }
1335
2029
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTableUnknownTotalPaginator, decorators: [{
1336
2030
  type: Component,
@@ -1339,7 +2033,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
1339
2033
  role: 'group',
1340
2034
  '[attr.aria-busy]': 'state().busy ? "true" : null',
1341
2035
  '[attr.data-autoid]': 'autoId() ? autoId() + "-paginator" : null',
1342
- }, template: "@let _state = state();\n@let _autoId = autoId();\n<div class=\"mat-mdc-paginator-outer-container\">\n <div class=\"mat-mdc-paginator-container\">\n @if (!hidePageSize()) {\n <div class=\"mat-mdc-paginator-page-size\">\n <div class=\"mat-mdc-paginator-page-size-label\" [attr.id]=\"pageSizeLabelId\">\n {{ intl.itemsPerPageLabel }}\n </div>\n @if (displayedPageSizeOptions().length > 1) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" class=\"mat-mdc-paginator-page-size-select\">\n <mat-select\n [value]=\"_state.pageSize\"\n [disabled]=\"_state.busy\"\n [aria-labelledby]=\"pageSizeLabelId\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-page-size' : null\"\n (selectionChange)=\"changePageSize($event.value)\"\n hideSingleSelectionIndicator>\n @for (pageSizeOption of displayedPageSizeOptions(); track pageSizeOption) {\n <mat-option [value]=\"pageSizeOption\">{{ pageSizeOption }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n } @else {\n <div class=\"mat-mdc-paginator-page-size-value\">{{ _state.pageSize }}</div>\n }\n </div>\n }\n\n <div class=\"mat-mdc-paginator-range-actions\">\n <div class=\"mat-mdc-paginator-range-label\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Same contract as mat-paginator: `disabledInteractive` keeps focus on a button that becomes\n disabled while its page loads, and tabindex -1 keeps disabled buttons out of the tab order. -->\n @if (showFirstButton()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-first\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-first' : null\"\n [attr.aria-label]=\"intl.firstPageLabel\"\n [matTooltip]=\"intl.firstPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"first()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\" />\n </svg>\n </button>\n }\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-previous\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-previous' : null\"\n [attr.aria-label]=\"intl.previousPageLabel\"\n [matTooltip]=\"intl.previousPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"previous()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\" />\n </svg>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-next\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-next' : null\"\n [attr.aria-label]=\"intl.nextPageLabel\"\n [matTooltip]=\"intl.nextPageLabel\"\n [matTooltipDisabled]=\"nextDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"nextDisabled()\"\n [tabindex]=\"nextDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"next()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </svg>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}:host ::ng-deep .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}:host-context([dir=rtl]) .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}:host-context([dir=rtl]) .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors:active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}\n"] }]
2036
+ }, template: "@let _state = state();\n@let _autoId = autoId();\n<div class=\"mat-mdc-paginator-outer-container\">\n <div class=\"mat-mdc-paginator-container\">\n @if (!hidePageSize()) {\n <div class=\"mat-mdc-paginator-page-size\">\n <div class=\"mat-mdc-paginator-page-size-label\" [attr.id]=\"pageSizeLabelId\">\n {{ intl.itemsPerPageLabel }}\n </div>\n @if (displayedPageSizeOptions().length > 1) {\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" class=\"mat-mdc-paginator-page-size-select\">\n <mat-select\n [value]=\"_state.pageSize\"\n [disabled]=\"_state.busy\"\n [aria-labelledby]=\"pageSizeLabelId\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-page-size' : null\"\n (selectionChange)=\"changePageSize($event.value)\"\n [panelClass]=\"['sd-select-panel', 'sd-table-page-size-panel']\"\n hideSingleSelectionIndicator>\n @for (pageSizeOption of displayedPageSizeOptions(); track pageSizeOption) {\n <mat-option [value]=\"pageSizeOption\">{{ pageSizeOption }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n } @else {\n <div class=\"mat-mdc-paginator-page-size-value\">{{ _state.pageSize }}</div>\n }\n </div>\n }\n\n <div class=\"mat-mdc-paginator-range-actions\">\n <div class=\"mat-mdc-paginator-range-label\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Same contract as mat-paginator: `disabledInteractive` keeps focus on a button that becomes\n disabled while its page loads, and tabindex -1 keeps disabled buttons out of the tab order. -->\n @if (showFirstButton()) {\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-first\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-first' : null\"\n [attr.aria-label]=\"intl.firstPageLabel\"\n [matTooltip]=\"intl.firstPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"first()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\" />\n </svg>\n </button>\n }\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-previous\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-previous' : null\"\n [attr.aria-label]=\"intl.previousPageLabel\"\n [matTooltip]=\"intl.previousPageLabel\"\n [matTooltipDisabled]=\"previousDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"previousDisabled()\"\n [tabindex]=\"previousDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"previous()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\" />\n </svg>\n </button>\n <button\n mat-icon-button\n type=\"button\"\n class=\"mat-mdc-paginator-navigation-next\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-paginator-next' : null\"\n [attr.aria-label]=\"intl.nextPageLabel\"\n [matTooltip]=\"intl.nextPageLabel\"\n [matTooltipDisabled]=\"nextDisabled()\"\n matTooltipPosition=\"above\"\n [disabled]=\"nextDisabled()\"\n [tabindex]=\"nextDisabled() ? -1 : null\"\n disabledInteractive\n (click)=\"next()\">\n <svg class=\"mat-mdc-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\" aria-hidden=\"true\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\" />\n </svg>\n </button>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color, var(--mat-sys-on-surface));background-color:var(--mat-paginator-container-background-color, var(--mat-sys-surface));font-family:var(--mat-paginator-container-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-paginator-container-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-paginator-container-text-size, var(--mat-sys-body-small-size));font-weight:var(--mat-paginator-container-text-weight, var(--mat-sys-body-small-weight));letter-spacing:var(--mat-paginator-container-text-tracking, var(--mat-sys-body-small-tracking));--mat-form-field-container-height: var(--mat-paginator-form-field-container-height, 40px);--mat-form-field-container-vertical-padding: var(--mat-paginator-form-field-container-vertical-padding, 8px)}:host ::ng-deep .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size, var(--mat-sys-body-small-size))}:host ::ng-deep .mat-mdc-form-field-subscript-wrapper{display:none}:host ::ng-deep .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size, 56px)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}:host-context([dir=rtl]) .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}:host-context([dir=rtl]) .mat-mdc-paginator-icon{transform:rotate(180deg)}@media(forced-colors:active){.mat-mdc-icon-button[aria-disabled] .mat-mdc-paginator-icon,.mat-mdc-paginator-icon{fill:currentColor}.mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}.mat-mdc-paginator-range-actions .mat-mdc-icon-button[aria-disabled]{color:GrayText}}\n"] }]
1343
2037
  }] });
1344
2038
 
1345
2039
  /** `paginate.total: 'unknown'` only applies to server tables; local tables always know their total. */
@@ -1371,31 +2065,6 @@ function samePagePosition(a, b) {
1371
2065
  return !!a && !!b && a.pageIndex === b.pageIndex && a.pageSize === b.pageSize;
1372
2066
  }
1373
2067
 
1374
- /** Kiểu cột mà column-filter render control mặc định (nhận chip operator — thiết kế đợt 2 · G). */
1375
- const CONTROL_FILTER_TYPES = new Set([
1376
- 'string',
1377
- 'number',
1378
- 'boolean',
1379
- 'values',
1380
- 'lazy-values',
1381
- 'date',
1382
- 'datetime',
1383
- 'time',
1384
- ]);
1385
- /**
1386
- * Cột lọc bằng control mặc định: không có template `filterDef`, không phải `split-number` / `split-date` (hai ô).
1387
- * Chỉ ở đây operator nằm trong control và control khoá ô khi chọn `NULL` / `NOT_NULL`.
1388
- */
1389
- const isDefaultControlFilter = (column) => {
1390
- const filter = column.filter;
1391
- return CONTROL_FILTER_TYPES.has(column.type) && !filter?.filterDef && filter?.type !== 'split-number' && filter?.type !== 'split-date';
1392
- };
1393
- /**
1394
- * `NULL` / `NOT_NULL` trên control mặc định: ô bị khoá và để trống, nên filter có hiệu lực mà không cần giá trị.
1395
- * Template custom và filter split giữ cách cũ (chỉ lọc khi có giá trị).
1396
- */
1397
- const isNoDataColumnOperator = (column, operator) => (operator === 'NULL' || operator === 'NOT_NULL') && isDefaultControlFilter(column);
1398
-
1399
2068
  /**
1400
2069
  * Machine-zone date math, exactly the payload sent before time zones: the local bounds of
1401
2070
  * `SdDateTimeService`, and a datetime still read by `new Date(value)`.
@@ -1552,8 +2221,8 @@ const SdConvertToPagingReq = (filterRequest, args) => {
1552
2221
  }
1553
2222
  }
1554
2223
  }
1555
- // Xử lý column filter
1556
- for (const column of columns || []) {
2224
+ // Xử lý column filter — cột lá: cột con của header nhóm có filter riêng, header nhóm thì không.
2225
+ for (const column of leafColumns(columns)) {
1557
2226
  const value = rawColumnFilter?.[column.field];
1558
2227
  const field = fieldMapping?.[column.field] || column.field;
1559
2228
  const operator = columnOperator?.[column.field] || column.filter?.operator?.default;
@@ -2184,6 +2853,18 @@ class ColumnFilterComponent {
2184
2853
  this.#emitFilterOnChange();
2185
2854
  this.filterChange.emit();
2186
2855
  };
2856
+ /**
2857
+ * Ghi một đầu của filter tách đôi (split-number / split-date) vào columnFilter dùng chung. Ghi tại chỗ vào object
2858
+ * { from, to } đang có; nếu bảng đã đặt lại columnFilter (xoá lọc, setFilter) làm mất object đó thì tạo lại.
2859
+ */
2860
+ setRangeEnd(field, end, value) {
2861
+ const filter = this.columnFilter();
2862
+ const range = filter[field];
2863
+ if (range && typeof range === 'object')
2864
+ range[end] = value;
2865
+ else
2866
+ filter[field] = { from: null, to: null, [end]: value };
2867
+ }
2187
2868
  // Blur input: commit giá trị KHÔNG trigger reload.
2188
2869
  onFilterCommit = () => {
2189
2870
  this.#emitFilterOnChange();
@@ -2203,11 +2884,11 @@ class ColumnFilterComponent {
2203
2884
  };
2204
2885
  #filterValueHash = (value) => Utilities.hash({ value });
2205
2886
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ColumnFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2206
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ColumnFilterComponent, isStandalone: true, selector: "column-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, columnFilter: { classPropertyName: "columnFilter", publicName: "columnFilter", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, operator: { classPropertyName: "operator", publicName: "operator", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { operator: "operatorChange", filterChange: "filterChange", filterCommit: "filterCommit" }, ngImport: i0, template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _controlOperators = controlOperators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator: chip trong control m\u1EB7c \u0111\u1ECBnh (thi\u1EBFt k\u1EBF \u0111\u1EE3t 2 \u00B7 G). Template custom (filterDef) v\u00E0 filter split\n (hai control) kh\u00F4ng ch\u00E8n chip \u0111\u01B0\u1EE3c n\u00EAn gi\u1EEF sd-operator r\u1EDDi nh\u01B0 c\u0169. -->\n @if (_operators.length && !operatorInControl()) {\n <!-- Chip 24px nh\u01B0 chip trong control; tint primary khi c\u1ED9t \u0111ang c\u00F3 gi\u00E1 tr\u1ECB. Ch\u01B0a c\u00F3 operator: ph\u1EC5u x\u00E1m, kh\u00F4ng g\u00E1n\n m\u1EB7c \u0111\u1ECBnh (handoff sd-operator B5, ph\u01B0\u01A1ng \u00E1n b). -->\n <sd-operator class=\"mr-4\" size=\"sm\" [active]=\"hasFilterValue()\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column{--sd-control-label-bg: var(--sd-table-bg, #ffffff)}:host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId", "size", "readonly", "active", "showCode"], outputs: ["modelChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { 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: 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: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "label", "description", "tooltip", "icon", "size", "pulse"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2887
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ColumnFilterComponent, isStandalone: true, selector: "column-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, columnFilter: { classPropertyName: "columnFilter", publicName: "columnFilter", isSignal: true, isRequired: false, transformFunction: null }, cacheValues: { classPropertyName: "cacheValues", publicName: "cacheValues", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, operator: { classPropertyName: "operator", publicName: "operator", isSignal: true, isRequired: false, transformFunction: null }, isMobile: { classPropertyName: "isMobile", publicName: "isMobile", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { operator: "operatorChange", filterChange: "filterChange", filterCommit: "filterCommit" }, ngImport: i0, template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _controlOperators = controlOperators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator: chip trong control m\u1EB7c \u0111\u1ECBnh (thi\u1EBFt k\u1EBF \u0111\u1EE3t 2 \u00B7 G). Template custom (filterDef) v\u00E0 filter split\n (hai control) kh\u00F4ng ch\u00E8n chip \u0111\u01B0\u1EE3c n\u00EAn gi\u1EEF sd-operator r\u1EDDi nh\u01B0 c\u0169. -->\n @if (_operators.length && !operatorInControl()) {\n <!-- Chip 24px nh\u01B0 chip trong control; tint primary khi c\u1ED9t \u0111ang c\u00F3 gi\u00E1 tr\u1ECB. Ch\u01B0a c\u00F3 operator: ph\u1EC5u x\u00E1m, kh\u00F4ng g\u00E1n\n m\u1EB7c \u0111\u1ECBnh (handoff sd-operator B5, ph\u01B0\u01A1ng \u00E1n b). -->\n <sd-operator class=\"mr-4\" size=\"sm\" [active]=\"hasFilterValue()\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<!-- why: `[model]` \u0111\u1ECDc `?.` v\u00E0 `(modelChange)` qua setRangeEnd \u2014 b\u1EA3ng c\u00F3 th\u1EC3 \u0111\u1EB7t l\u1EA1i columnFilter t\u1EA1i ch\u1ED7 (xo\u00E1 l\u1ECDc,\n setFilter) l\u00E0m m\u1EA5t object { from, to }; `[(model)]=\"\u2026[field].from\"` khi \u0111\u00F3 \u0111\u1ECDc / ghi v\u00E0o undefined v\u00E0 n\u00E9m l\u1ED7i. -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [model]=\"_columnFilter[field]?.from\"\n (modelChange)=\"setRangeEnd(field, 'from', $event)\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [model]=\"_columnFilter[field]?.to\"\n (modelChange)=\"setRangeEnd(field, 'to', $event)\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [model]=\"_columnFilter[field]?.from\"\n (modelChange)=\"setRangeEnd(field, 'from', $event)\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [model]=\"_columnFilter[field]?.to\"\n (modelChange)=\"setRangeEnd(field, 'to', $event)\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column{--sd-control-label-bg: var(--sd-table-bg, #ffffff)}:host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SdOperator, selector: "sd-operator", inputs: ["model", "operators", "disabled", "autoId", "size", "readonly", "active", "showCode"], outputs: ["modelChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { 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: 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: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange"] }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "label", "description", "tooltip", "icon", "size", "pulse"], outputs: ["click"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2207
2888
  }
2208
2889
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ColumnFilterComponent, decorators: [{
2209
2890
  type: Component,
2210
- args: [{ selector: 'column-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdOperator, SdInput, SdInputNumber, SdSelect, SdDate, SdDateRange, SdBadge], template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _controlOperators = controlOperators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator: chip trong control m\u1EB7c \u0111\u1ECBnh (thi\u1EBFt k\u1EBF \u0111\u1EE3t 2 \u00B7 G). Template custom (filterDef) v\u00E0 filter split\n (hai control) kh\u00F4ng ch\u00E8n chip \u0111\u01B0\u1EE3c n\u00EAn gi\u1EEF sd-operator r\u1EDDi nh\u01B0 c\u0169. -->\n @if (_operators.length && !operatorInControl()) {\n <!-- Chip 24px nh\u01B0 chip trong control; tint primary khi c\u1ED9t \u0111ang c\u00F3 gi\u00E1 tr\u1ECB. Ch\u01B0a c\u00F3 operator: ph\u1EC5u x\u00E1m, kh\u00F4ng g\u00E1n\n m\u1EB7c \u0111\u1ECBnh (handoff sd-operator B5, ph\u01B0\u01A1ng \u00E1n b). -->\n <sd-operator class=\"mr-4\" size=\"sm\" [active]=\"hasFilterValue()\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[field].from\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [(model)]=\"_columnFilter[field].to\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column{--sd-control-label-bg: var(--sd-table-bg, #ffffff)}:host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"] }]
2891
+ args: [{ selector: 'column-filter', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdOperator, SdInput, SdInputNumber, SdSelect, SdDate, SdDateRange, SdBadge], template: "@let _column = column();\n@let _columnFilter = columnFilter();\n@let _autoId = autoId();\n@let _templateRef = templateRef();\n@let _operators = operators();\n@let _controlOperators = controlOperators();\n@let _items = items();\n@let _label = label();\n@let _context = { columnFilter: _columnFilter, autoId: _autoId };\n\n<div class=\"d-flex c-inline-column align-items-center\" style=\"width: 100%; max-width: 100%\">\n @if (\n _column.type === 'string' ||\n _column.type === 'number' ||\n _column.type === 'boolean' ||\n _column.type === 'values' ||\n _column.type === 'lazy-values' ||\n _column.type === 'date' ||\n _column.type === 'datetime' ||\n _column.type === 'time'\n ) {\n <!-- Operator: chip trong control m\u1EB7c \u0111\u1ECBnh (thi\u1EBFt k\u1EBF \u0111\u1EE3t 2 \u00B7 G). Template custom (filterDef) v\u00E0 filter split\n (hai control) kh\u00F4ng ch\u00E8n chip \u0111\u01B0\u1EE3c n\u00EAn gi\u1EEF sd-operator r\u1EDDi nh\u01B0 c\u0169. -->\n @if (_operators.length && !operatorInControl()) {\n <!-- Chip 24px nh\u01B0 chip trong control; tint primary khi c\u1ED9t \u0111ang c\u00F3 gi\u00E1 tr\u1ECB. Ch\u01B0a c\u00F3 operator: ph\u1EC5u x\u00E1m, kh\u00F4ng g\u00E1n\n m\u1EB7c \u0111\u1ECBnh (handoff sd-operator B5, ph\u01B0\u01A1ng \u00E1n b). -->\n <sd-operator class=\"mr-4\" size=\"sm\" [active]=\"hasFilterValue()\" [(model)]=\"operator\" [operators]=\"operatorValues()\" />\n }\n\n <!-- N\u1EBFu filter nh\u1EADn v\u00E0o template -->\n @if (_templateRef) {\n <ng-container *ngTemplateOutlet=\"_templateRef; context: _context\"></ng-container>\n }\n <!-- M\u1EB7c \u0111\u1ECBnh theo type v\u00E0 gi\u00E1 tr\u1ECB values defined c\u1EE7a column -->\n @else {\n @if (_column.type === 'string') {\n <sd-input\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n type=\"text\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (_column.type === 'number') {\n @if (!_column.filter?.type) {\n <sd-input-number\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (keyupEnter)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (_column.filter?.type === 'split-number') {\n <ng-container *ngTemplateOutlet=\"splitNumberTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n } @else if (_column.type === 'boolean') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"[\n { value: '1', display: _column.option?.displayOnTrue || 'True' },\n { value: '0', display: _column.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n <ng-template sdItemDef let-item=\"item\">\n @if (item.value === '1') {\n <sd-badge color=\"success\" [title]=\"_column.option?.displayOnTrue || 'True'\"> </sd-badge>\n } @else {\n <sd-badge color=\"error\" [title]=\"_column.option?.displayOnFalse || 'False'\"> </sd-badge>\n }\n </ng-template>\n </sd-select>\n } @else if (_column.type === 'values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'lazy-values') {\n <sd-select\n minWidthPanel=\"200px\"\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n [style.width]=\"'100%'\"\n size=\"sm\"\n [label]=\"_label\"\n [items]=\"_items\"\n [valueField]=\"_column.option.valueField\"\n [displayField]=\"_column.option.displayField\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n [multiple]=\"_column.option.selection === 'MULTIPLE'\"\n hideInlineError>\n </sd-select>\n } @else if (_column.type === 'date' || _column.type === 'datetime' || _column.type === 'time') {\n @if (!_column.filter?.type || _column.filter?.type === 'daterange') {\n <sd-date-range\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n hideInlineError>\n </sd-date-range>\n } @else if (_column.filter?.type === 'date') {\n <sd-date\n [autoId]=\"_autoId\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [(model)]=\"_columnFilter[_column.field]\"\n [operators]=\"_controlOperators\"\n [(operator)]=\"operator\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"_column.filter?.disabled\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (_column.filter?.type === 'split-date') {\n <ng-container *ngTemplateOutlet=\"splitDateTpl; context: { field: _column.field, disabled: _column.filter?.disabled }\">\n </ng-container>\n }\n }\n }\n } @else {\n <sd-input [autoId]=\"_autoId\" style=\"flex: 1 1 0%; min-width: 0\" type=\"text\" size=\"sm\" disabled></sd-input>\n }\n</div>\n\n<!-- ================================================ -->\n<!-- Split from/to templates (\u0111\u01B0a xu\u1ED1ng cu\u1ED1i file) -->\n<!-- ================================================ -->\n<!-- why: `[model]` \u0111\u1ECDc `?.` v\u00E0 `(modelChange)` qua setRangeEnd \u2014 b\u1EA3ng c\u00F3 th\u1EC3 \u0111\u1EB7t l\u1EA1i columnFilter t\u1EA1i ch\u1ED7 (xo\u00E1 l\u1ECDc,\n setFilter) l\u00E0m m\u1EA5t object { from, to }; `[(model)]=\"\u2026[field].from\"` khi \u0111\u00F3 \u0111\u1ECDc / ghi v\u00E0o undefined v\u00E0 n\u00E9m l\u1ED7i. -->\n<ng-template #splitNumberTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-input-number\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [label]=\"_label\"\n [model]=\"_columnFilter[field]?.from\"\n (modelChange)=\"setRangeEnd(field, 'from', $event)\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n <div class=\"mx-4\">-</div>\n <sd-input-number\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n size=\"sm\"\n [model]=\"_columnFilter[field]?.to\"\n (modelChange)=\"setRangeEnd(field, 'to', $event)\"\n (sdChange)=\"onFilterChange()\"\n (sdBlur)=\"onFilterCommit()\"\n (cleared)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-input-number>\n </div>\n</ng-template>\n\n<ng-template #splitDateTpl let-field=\"field\" let-disabled=\"disabled\">\n <div class=\"d-flex align-items-center\" style=\"flex: 1 1 0%; min-width: 0\">\n <sd-date\n [autoId]=\"_autoId + '-from'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [label]=\"_label\"\n [model]=\"_columnFilter[field]?.from\"\n (modelChange)=\"setRangeEnd(field, 'from', $event)\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n <div class=\"mx-4\">-</div>\n <sd-date\n [autoId]=\"_autoId + '-to'\"\n style=\"flex: 1 1 0%; min-width: 0\"\n type=\"date\"\n size=\"sm\"\n [model]=\"_columnFilter[field]?.to\"\n (modelChange)=\"setRangeEnd(field, 'to', $event)\"\n (sdChange)=\"onFilterChange()\"\n [disabled]=\"disabled\"\n clearable\n hideInlineError>\n </sd-date>\n </div>\n</ng-template>\n", styles: [":host ::ng-deep .c-inline-column{--sd-control-label-bg: var(--sd-table-bg, #ffffff)}:host ::ng-deep .c-inline-column .mat-mdc-text-field-wrapper{background-color:var(--sd-table-bg, #ffffff)}\n"] }]
2211
2892
  }], ctorParameters: () => [] });
2212
2893
 
2213
2894
  class ExternalFilterComponent {
@@ -2218,6 +2899,8 @@ class ExternalFilterComponent {
2218
2899
  filter = input(undefined);
2219
2900
  externalFilters = input([]);
2220
2901
  filterRegister = input(undefined);
2902
+ /** Mặc định thu gọn khi option không đặt `externalFilterCollapsed` (bảng chính của sd-page-list lúc màn thấp). */
2903
+ collapsedByDefault = input(false);
2221
2904
  // ==========================================
2222
2905
  // 2. INJECT
2223
2906
  // ==========================================
@@ -2228,6 +2911,8 @@ class ExternalFilterComponent {
2228
2911
  externalFilter = signal({});
2229
2912
  inlineExternal = signal({});
2230
2913
  filtered = signal(false);
2914
+ /** Trạng thái thu gọn của sd-section; người dùng mở/thu thì giữ đến khi mặc định đổi. */
2915
+ collapsed = signal(false);
2231
2916
  isMobileOrTablet = BrowserUtilities.isMobile();
2232
2917
  // FormGroup là instance, parent đọc qua viewChild — giữ readonly field.
2233
2918
  form = new FormGroup({});
@@ -2243,7 +2928,16 @@ class ExternalFilterComponent {
2243
2928
  col = computed(() => (this.filter()?.externalFilterPerRow === 4 ? 3 : 2));
2244
2929
  // Normalize externalFilters về mảng (input có thể null/undefined).
2245
2930
  filterItems = computed(() => this.externalFilters() || []);
2931
+ #initialCollapsed = computed(() => {
2932
+ const filter = this.filter();
2933
+ if (filter?.collapsible === false)
2934
+ return false;
2935
+ return filter?.externalFilterCollapsed ?? this.collapsedByDefault();
2936
+ });
2246
2937
  constructor() {
2938
+ // why: mặc định đổi (ví dụ màn chuyển giữa thấp và cao) thì áp lại; giữa hai lần đổi, lựa chọn của người dùng
2939
+ // được giữ.
2940
+ effect(() => this.collapsed.set(this.#initialCollapsed()));
2247
2941
  // Subscribe filterRegister observers — re-subscribe khi input đổi, cleanup khi đổi/destroy.
2248
2942
  // QUAN TRỌNG: phải wrap untracked(). Observer có startWith() → emit ĐỒNG BỘ ngay khi
2249
2943
  // subscribe, callback đọc this.externalFilter() (qua #filtered) sẽ bị effect track →
@@ -2335,7 +3029,7 @@ class ExternalFilterComponent {
2335
3029
  });
2336
3030
  };
2337
3031
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ExternalFilterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2338
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ExternalFilterComponent, isStandalone: true, selector: "external-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { 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: 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: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange"] }, { 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: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3032
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ExternalFilterComponent, isStandalone: true, selector: "external-filter", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, externalFilters: { classPropertyName: "externalFilters", publicName: "externalFilters", isSignal: true, isRequired: false, transformFunction: null }, filterRegister: { classPropertyName: "filterRegister", publicName: "filterRegister", isSignal: true, isRequired: false, transformFunction: null }, collapsedByDefault: { classPropertyName: "collapsedByDefault", publicName: "collapsedByDefault", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\"\n [(collapsed)]=\"collapsed\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i2$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: SdSection, selector: "sd-section", inputs: ["title", "subTitle", "icon", "iconColor", "iconShape", "collapsed", "collapsible", "hideHeader"], outputs: ["collapsedChange"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdInputNumber, selector: "sd-input-number", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "type", "precision", "format", "min", "max", "validator", "inlineError", "hyperlink", "appearance", "floatLabel", "labelPlacement", "inputmode", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { 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: 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: SdDateRange, selector: "sd-date-range", inputs: ["autoId", "name", "size", "operators", "operator", "form", "label", "helperText", "hideInlineError", "required", "disabled", "viewed", "clearable", "appearance", "floatLabel", "min", "max", "transform", "model"], outputs: ["operatorChange", "modelChange", "sdChange"] }, { 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: "pipe", type: FilterValuesPipe, name: "filterValues" }, { kind: "component", type: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2339
3033
  }
2340
3034
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ExternalFilterComponent, decorators: [{
2341
3035
  type: Component,
@@ -2354,7 +3048,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
2354
3048
  FilterValuesPipe,
2355
3049
  SdCheckbox,
2356
3050
  SdTranslatePipe,
2357
- ], template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"] }]
3051
+ ], template: "@let _filter = filter();\n@let _autoId = autoId();\n@let _filterItems = filterItems();\n@let _externalFilter = externalFilter();\n@let _inlineExternal = inlineExternal();\n@let _filtered = filtered();\n@let _col = col();\n\n@if (!_filter?.disabled) {\n @if (!isMobileOrTablet && _filterItems.length) {\n <sd-section\n [hideHeader]=\"_filter?.hideExternalFilterToolbar\"\n icon=\"filter_alt\"\n iconColor=\"secondary\"\n [title]=\"'core.component.table.filter' | sdTranslate\"\n [collapsible]=\"_filter?.collapsible ?? true\"\n [(collapsed)]=\"collapsed\">\n <div class=\"d-flex gap-8 mr-4\" sdHeaderRight>\n <sd-button\n [autoId]=\"_autoId + 'clear'\"\n [disabled]=\"!_filtered\"\n type=\"text\"\n prefixIcon=\"cleaning_services\"\n [tooltip]=\"'core.component.table.clear-selection' | sdTranslate\"\n (click)=\"$event.stopPropagation(); clearFilter($event)\"></sd-button>\n <sd-button\n [autoId]=\"_autoId + 'setting'\"\n type=\"text\"\n prefixIcon=\"settings\"\n [tooltip]=\"'core.component.table.customize' | sdTranslate\"\n [matMenuTriggerFor]=\"menu\"\n (click)=\"$event.stopPropagation()\"></sd-button>\n <mat-menu #menu=\"matMenu\" class=\"sd-custom-panel-filter-configuration\" [attr.data-autoid]=\"_autoId + 'setting-menu'\">\n @for (externalFilter of _filterItems; track externalFilter.field) {\n <button\n [attr.data-autoid]=\"_autoId + 'setting-' + externalFilter.field\"\n mat-menu-item\n (click)=\"onCheckboxChange($event, externalFilter)\"\n [disabled]=\"externalFilter.required\">\n <sd-checkbox\n [autoId]=\"_autoId + 'setting-' + externalFilter.field + '-checkbox'\"\n [label]=\"externalFilter.title\"\n [model]=\"_inlineExternal[externalFilter.field]\"\n [disabled]=\"externalFilter.required\" />\n </button>\n }\n </mat-menu>\n </div>\n <div class=\"sd-external-filter-body\">\n <div class=\"row mx-0\" style=\"row-gap: 16px\">\n @for (item of _filterItems; track item.field) {\n @if (_inlineExternal[item.field]) {\n <div class=\"col-md-3 col-sm-6 px-8\" [class.col-lg-2]=\"_col === 2\" [class.col-lg-3]=\"_col === 3\">\n @if (item.type === 'string') {\n <sd-input\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n type=\"text\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input>\n } @else if (item.type === 'number') {\n <sd-input-number\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (keyupEnter)=\"onKeyupEnter()\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n clearable\n hideInlineError>\n </sd-input-number>\n } @else if (item.type === 'boolean') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"[\n { value: true, display: item.option?.displayOnTrue || 'True' },\n { value: false, display: item.option?.displayOnFalse || 'False' },\n ]\"\n valueField=\"value\"\n displayField=\"display\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.type === 'date') {\n <sd-date\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-date>\n } @else if (item.type === 'datetime') {\n <sd-datetime\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n clearable\n hideInlineError>\n </sd-datetime>\n } @else if (item.type === 'daterange') {\n <sd-date-range\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n [form]=\"form\"\n [required]=\"item.required\"\n [min]=\"item.minDate\"\n [max]=\"item.maxDate\"\n appearance=\"outline\"\n hideInlineError>\n </sd-date-range>\n } @else if (item.type === 'values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'AUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else if (item.option.selection === 'MULTIPLEAUTOCOMPLETE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items | filterValues | async\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'lazy-values') {\n @if (item.option.selection === 'MULTIPLE') {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n multiple\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n } @else {\n <sd-select\n [autoId]=\"_autoId + item.field\"\n size=\"sm\"\n [label]=\"item.title\"\n [items]=\"item.option.items\"\n [valueField]=\"item.option.valueField\"\n [displayField]=\"item.option.displayField\"\n [(model)]=\"_externalFilter[item.field]\"\n (sdChange)=\"onFilter(item)\"\n appearance=\"outline\"\n [form]=\"form\"\n [required]=\"item.required\"\n hideInlineError>\n </sd-select>\n }\n } @else if (item.type === 'custom' && item.filterDef) {\n <ng-container\n *ngTemplateOutlet=\"\n item.filterDef;\n context: { form: form, externalFilter: _externalFilter, autoId: _autoId + item.field }\n \">\n </ng-container>\n }\n </div>\n }\n }\n </div>\n @if (_filter?.manualFilter) {\n <div class=\"d-flex justify-content-end mt-16 px-8\">\n <sd-button\n [autoId]=\"_autoId + 'submit'\"\n [disabled]=\"form.invalid\"\n type=\"fill\"\n color=\"primary\"\n [title]=\"'core.component.table.search' | sdTranslate\"\n prefixIcon=\"filter_alt\"\n (click)=\"onSubmit()\">\n </sd-button>\n </div>\n }\n </div>\n </sd-section>\n }\n}\n", styles: [":host{display:block;padding-left:0;padding-right:0}.sd-external-filter-body{padding:16px 8px}::ng-deep .sd-custom-panel-filter-configuration{width:240px;max-height:550px;overflow-y:auto}\n"] }]
2358
3052
  }], ctorParameters: () => [] });
2359
3053
 
2360
3054
  /**
@@ -2515,6 +3209,56 @@ const DEFAULT_TABLE_CONFIG = {
2515
3209
  };
2516
3210
  const SD_TABLE_CONFIGURATION = new InjectionToken('sd-table.configuration');
2517
3211
 
3212
+ const SD_TABLE_LAYOUT = new InjectionToken('SD_TABLE_LAYOUT');
3213
+
3214
+ /** The column setup of an option before anyone changes it: every column that is not `hidden`, in option order. */
3215
+ const defaultConfiguredTable = (option) => ({
3216
+ columns: option?.columns
3217
+ ?.filter(e => !e.hidden)
3218
+ .map(e => ({
3219
+ origin: {
3220
+ field: e.field,
3221
+ title: typeof e.title === 'string' ? e.title : e.title?.title,
3222
+ width: e.width,
3223
+ invisible: e.invisible,
3224
+ fixed: e.fixed,
3225
+ truncate: e?.cell?.truncate?.enable,
3226
+ },
3227
+ title: typeof e.title === 'string' ? e.title : e.title?.title,
3228
+ width: e.width,
3229
+ invisible: e.invisible,
3230
+ fixed: e.fixed,
3231
+ truncate: e?.cell?.truncate?.enable,
3232
+ })) || [],
3233
+ });
3234
+ // why: so với `origin` đã lưu chứ không với option hiện tại — tiêu đề dịch theo ngôn ngữ hay đổi trong code không
3235
+ // phải là thiết lập của người dùng. Giá trị rỗng nghĩa là "dùng giá trị gốc", như `loadConfigurationResult` đọc.
3236
+ const changedFromOrigin = (column) => {
3237
+ const { origin } = column;
3238
+ return ((column.title || origin.title) !== origin.title ||
3239
+ (column.width || origin.width) !== origin.width ||
3240
+ !!column.invisible !== !!origin.invisible ||
3241
+ !!column.fixed !== !!origin.fixed ||
3242
+ !!(column.truncate ?? origin.truncate) !== !!origin.truncate);
3243
+ };
3244
+ /**
3245
+ * Whether the table uses a setup of its own: the stored columns differ from the defaults in order, visibility, title,
3246
+ * width (the settings modal or a resize on the table), fixed or truncate, or the inline external filters differ from
3247
+ * `defaultShowing`. Columns added to or removed from the option since the setup was stored do not count.
3248
+ */
3249
+ const sdTableHasCustomSetup = ({ option, configuration, inlineExternal, }) => {
3250
+ const defaults = defaultConfiguredTable(option).columns.map(column => column.origin.field);
3251
+ const known = new Set(defaults);
3252
+ const stored = (configuration?.columns ?? []).filter(column => known.has(column.origin.field));
3253
+ const storedFields = new Set(stored.map(column => column.origin.field));
3254
+ const order = defaults.filter(field => storedFields.has(field));
3255
+ if (stored.some((column, index) => column.origin.field !== order[index] || changedFromOrigin(column)))
3256
+ return true;
3257
+ if (!inlineExternal || option?.filter?.disabled)
3258
+ return false;
3259
+ return (option?.filter?.externalFilters ?? []).some(filter => !!inlineExternal[filter.field] !== !!filter.defaultShowing);
3260
+ };
3261
+
2518
3262
  // Aggregate templates contain Angular view references; they must never enter the storage-key hash.
2519
3263
  function storageColumns(columns) {
2520
3264
  return columns.map(({ aggregate: _aggregate, ...column }) => column.type === 'children' ? { ...column, children: storageColumns(column.children) } : column);
@@ -2720,28 +3464,8 @@ class ConfigService {
2720
3464
  this.#storage.setSilent({ ...current, columns });
2721
3465
  this.#widthChange.next({ field, width });
2722
3466
  };
2723
- #default = (tableOption) => {
2724
- const columns = tableOption?.columns
2725
- ?.filter(e => !e.hidden)
2726
- .map(e => ({
2727
- origin: {
2728
- field: e.field,
2729
- title: typeof e.title === 'string' ? e.title : e.title?.title,
2730
- width: e.width,
2731
- invisible: e.invisible,
2732
- fixed: e.fixed,
2733
- truncate: e?.cell?.truncate?.enable,
2734
- },
2735
- title: typeof e.title === 'string' ? e.title : e.title?.title,
2736
- width: e.width,
2737
- invisible: e.invisible,
2738
- fixed: e.fixed,
2739
- truncate: e?.cell?.truncate?.enable,
2740
- })) || [];
2741
- return {
2742
- columns,
2743
- };
2744
- };
3467
+ // why: bảng dùng cùng hàm để biết thiết lập đang lưu có khác mặc định không (chấm trên nút Thiết lập).
3468
+ #default = (tableOption) => defaultConfiguredTable(tableOption);
2745
3469
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2746
3470
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ConfigService });
2747
3471
  }
@@ -2749,6 +3473,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
2749
3473
  type: Injectable
2750
3474
  }], ctorParameters: () => [] });
2751
3475
 
3476
+ // why: độ rộng cột là chuỗi CSS tự do ('120px', '20%', '12rem'). Modal chỉ sửa được px bằng số; mọi đơn vị khác hiện
3477
+ // nguyên văn. Một số trần cũng coi là px, vì đó là cái người dùng gõ vào ô số.
3478
+ const PX_WIDTH = /^\s*(\d+(?:\.\d+)?)\s*(?:px)?\s*$/i;
3479
+ /** The px value of a width, `undefined` when it is empty or uses another unit. */
3480
+ const configWidthPx = (value) => {
3481
+ const match = PX_WIDTH.exec(value ?? '');
3482
+ return match ? Number(match[1]) : undefined;
3483
+ };
3484
+ // A number as an `<input type="number">` may hold it: sign, decimals, exponent, optional px.
3485
+ const NUMBER_INPUT = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?\s*(?:px)?$/i;
3486
+ /**
3487
+ * What the width field stores: a positive number becomes `${n}px`, zero or a negative number and an empty field become
3488
+ * `undefined`, anything else (`20%`, `12rem`) stays verbatim.
3489
+ */
3490
+ const configWidthFromInput = (value) => {
3491
+ const text = String(value ?? '').trim();
3492
+ if (!text)
3493
+ return undefined;
3494
+ if (!NUMBER_INPUT.test(text))
3495
+ return text;
3496
+ const px = Number(text.replace(/px$/i, '').trim());
3497
+ return Number.isFinite(px) && px > 0 ? `${px}px` : undefined;
3498
+ };
3499
+ /** Rounds a px width and keeps it inside the px `minWidth` / `maxWidth`; bounds in another unit cannot be compared. */
3500
+ const configWidthClamp = (width, min, max) => {
3501
+ const px = configWidthPx(width);
3502
+ if (px === undefined)
3503
+ return width;
3504
+ const low = configWidthPx(min);
3505
+ const high = configWidthPx(max);
3506
+ let value = Math.round(px);
3507
+ if (low !== undefined)
3508
+ value = Math.max(value, low);
3509
+ if (high !== undefined)
3510
+ value = Math.min(value, high);
3511
+ return `${value}px`;
3512
+ };
3513
+
3514
+ /** The find box shows only past this many columns. */
3515
+ const FIND_THRESHOLD = 8;
3516
+ let nextId = 0;
2752
3517
  class ConfigComponent {
2753
3518
  // ==========================================
2754
3519
  // 1. SIGNAL INPUTS / OUTPUTS
@@ -2756,13 +3521,16 @@ class ConfigComponent {
2756
3521
  autoIdInput = input(undefined, { alias: 'autoId' });
2757
3522
  tableOption = input(undefined);
2758
3523
  changes = output();
3524
+ /** Restore defaults was confirmed and the stored setup removed. */
3525
+ defaultsRestored = output();
2759
3526
  // Base autoId (đã là `components-table-<scope>` từ parent), '' khi parent không set.
2760
3527
  autoId = computed(() => this.autoIdInput() || '');
2761
3528
  // ==========================================
2762
3529
  // 2. SIGNAL QUERIES
2763
3530
  // ==========================================
2764
3531
  modal = viewChild(SdModal);
2765
- table = viewChild.required(MatTable);
3532
+ // why: signal query không đặt được trên member `#private`.
3533
+ handles = viewChildren('handle');
2766
3534
  // ==========================================
2767
3535
  // 3. INJECT
2768
3536
  // ==========================================
@@ -2770,25 +3538,50 @@ class ConfigComponent {
2770
3538
  #confirmService = inject(SdConfirmService);
2771
3539
  #configService = inject(ConfigService);
2772
3540
  #i18n = inject(I18nService);
3541
+ #injector = inject(Injector);
2773
3542
  // ==========================================
2774
3543
  // 4. STATE
2775
3544
  // ==========================================
3545
+ // why: mỗi lần sửa thay object cột (không mutate) — giá trị lấy từ storage không bị đổi khi người dùng bấm Bỏ qua,
3546
+ // và các computed bên dưới tự tính lại.
2776
3547
  configuration = signal(undefined);
2777
- // dragDisabled không nên là signal (mutated trong drag handlers, không trigger render).
2778
- dragDisabled = true;
3548
+ /** Text of the find box. */
3549
+ query = signal('');
3550
+ /** Field of the open row; one row at a time. */
3551
+ expanded = signal(null);
3552
+ // why: ô độ rộng đang ở chế độ chữ (giá trị %/rem…) giữ nguyên chế độ đó tới khi blur, để gõ "1.5rem" không bị đổi
3553
+ // sang ô số ngay ở ký tự "1".
3554
+ #textWidthField = signal(null);
3555
+ #id = `sd-table-config-${nextId++}`;
3556
+ hintId = `${this.#id}-hint`;
2779
3557
  #setting;
3558
+ /** Widths as opened; only an edited width is rounded and clamped (an untouched `120.5px` stays as it is). */
3559
+ #openedWidths = new Map();
3560
+ /** Row lifted from the keyboard, and the order Escape goes back to. */
3561
+ picked = signal(null);
3562
+ /** Text of the live region: each keyboard reorder step. */
3563
+ announcement = signal('');
3564
+ // why: @for dời node DOM khi đổi thứ tự nên handle có thể mất focus giữa chừng; blur lúc đó không phải người dùng rời
3565
+ // handle, không được coi là thả.
3566
+ #refocusing = false;
3567
+ #allColumns = computed(() => this.configuration()?.columns ?? []);
3568
+ searchable = computed(() => this.#allColumns().length > FIND_THRESHOLD);
3569
+ #term = computed(() => (this.searchable() ? sdNormalizeSearchText(this.query()) : ''));
3570
+ /** Reordering is off while a search narrows the list: the hidden rows would make the drop index ambiguous. */
3571
+ searching = computed(() => !!this.#term());
3572
+ /** Rows on screen: every column, or those whose current or original title matches the search. */
3573
+ columns = computed(() => {
3574
+ const term = this.#term();
3575
+ const columns = this.#allColumns();
3576
+ if (!term)
3577
+ return columns;
3578
+ return columns.filter(column => [column.title, column.origin.title].some(title => sdNormalizeSearchText(title).includes(term)));
3579
+ });
3580
+ totalCount = computed(() => this.#allColumns().length);
3581
+ shownCount = computed(() => this.#allColumns().filter(column => !column.invisible).length);
3582
+ allShown = computed(() => this.shownCount() === this.totalCount());
2780
3583
  // ==========================================
2781
- // 5. WINDOW MOUSEUP — tự destroy qua takeUntilDestroyed (thay @HostListener)
2782
- // ==========================================
2783
- constructor() {
2784
- fromEvent(window, 'mouseup')
2785
- .pipe(takeUntilDestroyed())
2786
- .subscribe(() => {
2787
- this.dragDisabled = true;
2788
- });
2789
- }
2790
- // ==========================================
2791
- // 6. PUBLIC API
3584
+ // 5. PUBLIC API
2792
3585
  // ==========================================
2793
3586
  open = async () => {
2794
3587
  const opt = this.tableOption();
@@ -2796,6 +3589,12 @@ class ConfigComponent {
2796
3589
  return;
2797
3590
  this.#setting = this.#configService.init(opt);
2798
3591
  this.configuration.set(this.#setting?.get());
3592
+ this.#openedWidths = new Map(this.configuration()?.columns?.map(column => [column.origin.field, column.width]));
3593
+ this.query.set('');
3594
+ this.expanded.set(null);
3595
+ this.#textWidthField.set(null);
3596
+ this.picked.set(null);
3597
+ this.announcement.set('');
2799
3598
  this.modal()?.open();
2800
3599
  };
2801
3600
  close = () => {
@@ -2804,54 +3603,206 @@ class ConfigComponent {
2804
3603
  onSave = () => {
2805
3604
  const cfg = this.configuration();
2806
3605
  if (cfg)
2807
- this.#setting?.set(cfg);
3606
+ this.#setting?.set({ ...cfg, columns: cfg.columns?.map(column => ({ ...column, width: this.#settledWidth(column) })) });
2808
3607
  this.modal()?.close();
2809
3608
  this.#ref.detectChanges();
2810
3609
  };
2811
3610
  onReset = async () => {
2812
3611
  this.#confirmService.confirm(this.#i18n.t('core.component.table.config.confirm-reset')).then(() => {
2813
3612
  this.#setting?.remove();
3613
+ this.defaultsRestored.emit();
2814
3614
  this.modal()?.close();
2815
3615
  this.#ref.detectChanges();
2816
3616
  });
2817
3617
  };
2818
3618
  /**
2819
- * Cột đang tắt hiển thị thì tiêu đề / độ rộng / cố định / giới hạn ký tự đều vô nghĩa —
2820
- * khoá chúng lại để row nói rõ trạng thái, chỉ chừa ô "Hiển thị" để bật lại.
3619
+ * Cột đang tắt hiển thị thì tiêu đề / độ rộng / cố định / rút gọn đều vô nghĩa — khoá phần chi tiết lại, chỉ chừa
3620
+ * ô "Hiện" để bật lại.
2821
3621
  */
2822
3622
  isRowDisabled = (item) => !!item?.invisible;
2823
- dropTable(event) {
2824
- const cols = this.configuration()?.columns;
2825
- if (!cols)
3623
+ // ==========================================
3624
+ // 6. LIST
3625
+ // ==========================================
3626
+ onFind = (value) => {
3627
+ this.query.set(String(value ?? ''));
3628
+ // why: dòng đang mở mà bị lọc mất thì đóng lại — không để phần chi tiết treo ở trạng thái không nhìn thấy.
3629
+ const open = this.expanded();
3630
+ if (open && !this.columns().some(column => column.origin.field === open))
3631
+ this.expanded.set(null);
3632
+ };
3633
+ toggleRow = (field) => this.expanded.update(current => (current === field ? null : field));
3634
+ /**
3635
+ * Pressing the handle of the open row closes it first, so its preview is the summary row. Another open row stays open:
3636
+ * closing it would move the pressed row away from the pointer before CDK measures.
3637
+ */
3638
+ onHandlePointerDown = (field) => {
3639
+ if (this.expanded() === field)
3640
+ this.expanded.set(null);
3641
+ };
3642
+ drop = (event) => {
3643
+ this.picked.set(null);
3644
+ if (this.searching() || event.previousIndex === event.currentIndex)
2826
3645
  return;
2827
- moveItemInArray(cols, event.previousIndex, event.currentIndex);
2828
- this.table().renderRows();
2829
- }
2830
- handleMouseDown() {
2831
- this.dragDisabled = false;
2832
- }
2833
- handleMouseUp() {
2834
- this.dragDisabled = true;
2835
- }
3646
+ const columns = [...this.#allColumns()];
3647
+ moveItemInArray(columns, event.previousIndex, event.currentIndex);
3648
+ this.configuration.update(cfg => cfg && { ...cfg, columns });
3649
+ };
3650
+ showAll = () => this.#update(column => (column.invisible ? { ...column, invisible: false } : column));
3651
+ setShown = (field, shown) => this.#patch(field, { invisible: !shown });
3652
+ setFixed = (field, fixed) => this.#patch(field, { fixed });
3653
+ setTruncate = (field, truncate) => this.#patch(field, { truncate });
3654
+ // ==========================================
3655
+ // 7. KEYBOARD REORDER
3656
+ // ==========================================
3657
+ /** Space / Enter picks up and drops, ↑ / ↓ move the picked row, Escape puts the order back. */
3658
+ onHandleKeydown = (event, field) => {
3659
+ const picked = this.picked();
3660
+ switch (event.key) {
3661
+ case ' ':
3662
+ case 'Enter':
3663
+ if (picked?.field === field)
3664
+ this.#dropPicked();
3665
+ else
3666
+ this.#pick(field);
3667
+ break;
3668
+ case 'ArrowUp':
3669
+ case 'ArrowDown':
3670
+ if (picked?.field !== field)
3671
+ return;
3672
+ this.#movePicked(field, event.key === 'ArrowUp' ? -1 : 1);
3673
+ break;
3674
+ case 'Escape':
3675
+ if (!picked)
3676
+ return;
3677
+ this.#cancelPick(picked);
3678
+ break;
3679
+ default:
3680
+ return;
3681
+ }
3682
+ // why: khi đang giữ dòng, Escape không được đóng modal và ↑ ↓ không được cuộn danh sách.
3683
+ event.preventDefault();
3684
+ event.stopPropagation();
3685
+ };
3686
+ /** Leaving the handle while a row is held drops it where it is. */
3687
+ onHandleBlur = (field) => {
3688
+ if (!this.#refocusing && this.picked()?.field === field)
3689
+ this.#dropPicked();
3690
+ };
3691
+ #pick = (field) => {
3692
+ if (this.searching())
3693
+ return;
3694
+ const order = this.#allColumns();
3695
+ this.picked.set({ field, order });
3696
+ this.#announce('core.component.table.config.reorder-picked', field, { total: order.length });
3697
+ };
3698
+ #movePicked = (field, delta) => {
3699
+ const columns = [...this.#allColumns()];
3700
+ const from = columns.findIndex(column => column.origin.field === field);
3701
+ const to = from + delta;
3702
+ if (from < 0 || to < 0 || to >= columns.length)
3703
+ return;
3704
+ moveItemInArray(columns, from, to);
3705
+ this.configuration.update(cfg => cfg && { ...cfg, columns });
3706
+ this.#announce('core.component.table.config.reorder-moved', field, { total: columns.length });
3707
+ this.#refocus(field);
3708
+ };
3709
+ #dropPicked = () => {
3710
+ const field = this.picked()?.field;
3711
+ this.picked.set(null);
3712
+ if (field)
3713
+ this.#announce('core.component.table.config.reorder-dropped', field);
3714
+ };
3715
+ #cancelPick = (picked) => {
3716
+ this.picked.set(null);
3717
+ this.configuration.update(cfg => cfg && { ...cfg, columns: picked.order });
3718
+ this.announcement.set(this.#i18n.t('core.component.table.config.reorder-cancelled'));
3719
+ this.#refocus(picked.field);
3720
+ };
3721
+ /** Announces a step with the row's title and its 1-based position in the current order. */
3722
+ #announce = (key, field, params = {}) => {
3723
+ const columns = this.#allColumns();
3724
+ const index = columns.findIndex(column => column.origin.field === field);
3725
+ const column = columns[index];
3726
+ if (!column)
3727
+ return;
3728
+ this.announcement.set(this.#i18n.t(key, { title: this.titleOf(column), index: index + 1, ...params }));
3729
+ };
3730
+ #refocus = (field) => {
3731
+ this.#refocusing = true;
3732
+ afterNextRender(() => {
3733
+ this.handles()
3734
+ .find(handle => handle.nativeElement.closest('.c-item')?.getAttribute('data-field') === field)
3735
+ ?.nativeElement.focus();
3736
+ this.#refocusing = false;
3737
+ }, { injector: this.#injector });
3738
+ };
3739
+ // ==========================================
3740
+ // 8. TITLE
3741
+ // ==========================================
3742
+ titleOf = (item) => item.title || item.origin.title;
3743
+ renamed = (item) => !!item.title && item.title !== item.origin.title;
3744
+ setTitle = (field, value) => this.#patch(field, { title: String(value ?? '') || undefined });
3745
+ restoreTitle = (field) => this.#patch(field, { title: undefined });
3746
+ // ==========================================
3747
+ // 9. WIDTH
3748
+ // ==========================================
3749
+ /** A width in another unit than px is edited as text, verbatim. */
3750
+ widthIsText = (item) => this.#textWidthField() === item.origin.field || (!!item.width && configWidthPx(item.width) === undefined);
3751
+ widthValue = (item) => {
3752
+ if (this.widthIsText(item))
3753
+ return item.width ?? '';
3754
+ const px = configWidthPx(item.width);
3755
+ return px === undefined ? '' : String(px);
3756
+ };
3757
+ /** Empty falls back to the original width, so that is the placeholder; "auto" when the option has none. */
3758
+ widthPlaceholder = (item) => {
3759
+ const origin = item.origin.width;
3760
+ if (!origin)
3761
+ return this.#i18n.t('core.component.table.config.width-auto');
3762
+ const px = configWidthPx(origin);
3763
+ return px === undefined ? origin : String(px);
3764
+ };
3765
+ widthSummary = (item) => {
3766
+ if (item.invisible)
3767
+ return this.#i18n.t('core.component.table.config.hidden');
3768
+ const width = item.width || item.origin.width;
3769
+ if (!width)
3770
+ return this.#i18n.t('core.component.table.config.width-auto');
3771
+ const px = configWidthPx(width);
3772
+ return px === undefined ? width : `${px} px`;
3773
+ };
3774
+ onWidthFocus = (item) => {
3775
+ if (this.widthIsText(item))
3776
+ this.#textWidthField.set(item.origin.field);
3777
+ };
3778
+ setWidth = (field, value) => {
3779
+ // why: chế độ chữ giữ nguyên chuỗi đang gõ; chuyển sang px (và kẹp) khi blur.
3780
+ const width = this.#textWidthField() === field ? String(value ?? '').trim() || undefined : configWidthFromInput(value);
3781
+ this.#patch(field, { width });
3782
+ };
3783
+ commitWidth = (field) => {
3784
+ this.#textWidthField.set(null);
3785
+ const column = this.#allColumns().find(item => item.origin.field === field);
3786
+ if (column)
3787
+ this.#patch(field, { width: this.#settledWidth(column) });
3788
+ };
3789
+ detailsId = (field) => `${this.#id}-${field.replace(/[^\w-]/g, '_')}`;
3790
+ /** Number → px, then rounded and kept within the column's px `minWidth` / `maxWidth`. */
3791
+ #settledWidth = (column) => {
3792
+ if (column.width === this.#openedWidths.get(column.origin.field))
3793
+ return column.width;
3794
+ const option = this.tableOption()?.columns?.find(item => item.field === column.origin.field);
3795
+ return configWidthClamp(configWidthFromInput(column.width), option?.minWidth, option?.maxWidth);
3796
+ };
3797
+ #patch = (field, patch) => this.#update(column => (column.origin.field === field ? { ...column, ...patch } : column));
3798
+ #update = (map) => this.configuration.update(cfg => cfg && { ...cfg, columns: cfg.columns?.map(map) });
2836
3799
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2837
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ConfigComponent, isStandalone: true, selector: "config", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changes: "changes" }, providers: [ConfigService], viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true, isSignal: true }, { propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }], ngImport: i0, template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _columns = ['invisible', 'title', 'width', 'fixed', 'truncate'];\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <!-- why: drag handle l\u00E0 affordance duy nh\u1EA5t cho vi\u1EC7c \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t, v\u00E0 n\u00F3 kh\u00F4ng t\u1EF1 n\u00F3i ra\n \u0111i\u1EC1u \u0111\u00F3 \u2014 m\u1ED9t d\u00F2ng hint tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng.\n K\u00FD hi\u1EC7u \u283F n\u1EB1m S\u1EB4N trong chu\u1ED7i i18n (\u0111\u00FAng v\u1ECB tr\u00ED trong c\u00E2u), n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\">{{ 'core.component.table.config.drag-hint' | sdTranslate }}</p>\n\n <div class=\"c-table\">\n <table\n mat-table\n [dataSource]=\"_configuration.columns!\"\n cdkDropList\n [cdkDropListData]=\"_configuration.columns\"\n (cdkDropListDropped)=\"dropTable($event)\">\n <ng-container matColumnDef=\"invisible\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.form-builder.display' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <div class=\"c-display-cell\">\n <button\n type=\"button\"\n class=\"c-handle\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n (mousedown)=\"handleMouseDown()\"\n (mouseup)=\"handleMouseUp()\">\n <sd-icon name=\"drag_indicator\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC3n th\u1ECB\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t\n c\u1ED9t \u0111\u00E3 t\u1EAFt. -->\n <sd-checkbox [model]=\"!item.invisible\" (modelChange)=\"item.invisible = !item.invisible\" />\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.table.column-header' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.title\"\n [(model)]=\"item.title\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"width\">\n <th mat-header-cell class=\"c-th c-col-width\" *matHeaderCellDef>\n {{ 'core.component.table.width' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-width\" *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.width\"\n [(model)]=\"item.width\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"fixed\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.fixed' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.fixed\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"truncate\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.char-limit' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.truncate\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"_columns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: _columns\"\n [class.c-row-hidden]=\"isRowDisabled(row)\"\n cdkDrag\n [cdkDragData]=\"row\"\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"dragDisabled\">\n </tr>\n </table>\n </div>\n </div>\n }\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n (click)=\"close()\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n (click)=\"onReset()\"\n [title]=\"'core.component.form-builder.default' | sdTranslate\"\n color=\"primary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n (click)=\"onSave()\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;min-height:200px}.c-hint{margin:0 0 12px;color:var(--sd-text-secondary, #6b7280);font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px)}.c-table{position:relative;overflow:auto;max-height:60vh;border:1px solid var(--sd-border, rgba(0, 0, 0, .08));border-radius:var(--sd-radius-8, 8px)}.c-table table{--mat-table-header-container-height: 40px;--mat-table-row-item-container-height: 48px;width:100%;background:transparent}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #6b7280);background:var(--sd-surface, #f7f8fa);white-space:nowrap}.c-table .mat-mdc-header-cell,.c-table .mat-mdc-cell{padding:4px 12px;vertical-align:middle;border-bottom-color:var(--sd-border, rgba(0, 0, 0, .08))}.c-table .mat-mdc-header-cell:first-of-type,.c-table .mat-mdc-cell:first-of-type{padding-left:12px}.c-table .mat-mdc-row:last-of-type .mat-mdc-cell{border-bottom:none}.c-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .02))}.c-table .c-col-width{width:104px}.c-table .c-col-toggle{width:88px;text-align:center}sd-checkbox{display:inline-flex;align-items:center;vertical-align:middle}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}sd-checkbox ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0}.c-display-cell{display:flex;align-items:center;gap:8px}.c-handle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:none;color:var(--sd-text-disabled, #b6bcc6);cursor:grab;transition:color .15s ease}.c-handle:hover,.c-handle:focus-visible{color:var(--sd-text-secondary, #6b7280);outline:none}.c-handle:active{cursor:grabbing}.c-row-hidden .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .015))}.c-row-hidden sd-input,.c-row-hidden .c-col-toggle sd-checkbox{opacity:.55}.cdk-drag-preview{display:table;border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface, #fff);outline:1px solid var(--sd-primary, #2a66f4);box-shadow:0 12px 28px #00000029,0 2px 8px #00000014;opacity:.98}.cdk-drag-preview .mat-mdc-cell{border-bottom:none;padding:4px 12px;vertical-align:middle}.cdk-drag-preview .c-handle{color:var(--sd-primary, #2a66f4);cursor:grabbing}.cdk-drag-placeholder .mat-mdc-cell{background:var(--sd-primary-light, rgba(42, 102, 244, .06));border-bottom:none;box-shadow:inset 0 1px 0 var(--sd-primary, #2a66f4),inset 0 -1px 0 var(--sd-primary, #2a66f4)}.cdk-drag-placeholder .mat-mdc-cell>*{visibility:hidden}.cdk-drag-animating,.c-table.cdk-drop-list-dragging .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}.c-table.cdk-drop-list-dragging .mat-mdc-row:hover .mat-mdc-cell{background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: CdkTableModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { 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: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
3800
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ConfigComponent, isStandalone: true, selector: "config", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, tableOption: { classPropertyName: "tableOption", publicName: "tableOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changes: "changes", defaultsRestored: "defaultsRestored" }, providers: [ConfigService], viewQueries: [{ propertyName: "modal", first: true, predicate: SdModal, descendants: true, isSignal: true }, { propertyName: "handles", predicate: ["handle"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _searching = searching();\n@let _expanded = expanded();\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <div class=\"c-toolbar\">\n @if (searchable()) {\n <sd-input\n class=\"c-find\"\n size=\"sm\"\n hideInlineError\n [autoId]=\"_autoId ? _autoId + '-config-find' : null\"\n [placeholder]=\"'core.component.table.config.find-column' | sdTranslate\"\n [model]=\"query()\"\n (modelChange)=\"onFind($event)\">\n <ng-template sdSuffixDef>\n <sd-icon class=\"c-find-icon\" name=\"search\" size=\"18px\" aria-hidden=\"true\"></sd-icon>\n </ng-template>\n </sd-input>\n }\n <div class=\"c-toolbar-end\">\n <span class=\"c-shown-count\">\n {{ 'core.component.table.config.shown-count' | sdTranslate: { shown: shownCount(), total: totalCount() } }}\n </span>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-show-all' : null\"\n type=\"text\"\n color=\"primary\"\n size=\"sm\"\n [title]=\"'core.component.table.config.show-all' | sdTranslate\"\n [disabled]=\"allShown()\"\n (click)=\"showAll()\">\n </sd-button>\n </div>\n </div>\n\n <!-- why: handle \u283F l\u00E0 c\u00E1ch duy nh\u1EA5t \u0111\u1EC3 \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t v\u00E0 t\u1EF1 n\u00F3 kh\u00F4ng n\u00F3i ra \u0111i\u1EC1u \u0111\u00F3 \u2014 d\u00F2ng g\u1EE3i \u00FD tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi\n d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng. K\u00FD hi\u1EC7u \u283F n\u1EB1m s\u1EB5n trong chu\u1ED7i i18n n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\" [id]=\"hintId\">\n {{ (_searching ? 'core.component.table.config.drag-disabled-search' : 'core.component.table.config.drag-hint') | sdTranslate }}\n </p>\n\n <!-- why: v\u00F9ng live n\u1EB1m TRONG modal \u2014 v\u00F9ng n\u1EB1m ngo\u00E0i m\u1ED9t h\u1ED9p tho\u1EA1i aria-modal c\u00F3 th\u1EC3 b\u1ECB tr\u00ECnh \u0111\u1ECDc m\u00E0n h\u00ECnh b\u1ECF qua. -->\n <div class=\"c-live sd-visually-hidden\" aria-live=\"assertive\" aria-atomic=\"true\">{{ announcement() }}</div>\n\n <div\n class=\"c-list\"\n cdkDropList\n cdkDropListLockAxis=\"y\"\n [cdkDropListData]=\"columns()\"\n [cdkDropListDisabled]=\"_searching\"\n (cdkDropListDropped)=\"drop($event)\">\n @for (item of columns(); track item.origin.field) {\n @let _field = item.origin.field;\n @let _open = _expanded === _field;\n @let _hidden = isRowDisabled(item);\n @let _title = titleOf(item);\n <div\n class=\"c-item\"\n cdkDrag\n [cdkDragData]=\"item\"\n [attr.data-field]=\"_field\"\n [class.c-item--open]=\"_open\"\n [class.c-item--hidden]=\"_hidden\"\n [class.c-item--picked]=\"picked()?.field === _field\">\n <div class=\"c-row\">\n <button\n #handle\n type=\"button\"\n class=\"c-handle\"\n cdkDragHandle\n [disabled]=\"_searching\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"('core.component.table.config.drag-handle' | sdTranslate) + ': ' + _title\"\n [attr.aria-describedby]=\"hintId\"\n (pointerdown)=\"onHandlePointerDown(_field)\"\n (keydown)=\"onHandleKeydown($event, _field)\"\n (blur)=\"onHandleBlur(_field)\">\n <sd-icon name=\"drag_indicator\" size=\"20px\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC7n\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t c\u1ED9t \u0111\u00E3 t\u1EAFt. Nh\u00E3n b\u1ECB \u1EA9n\n kh\u1ECFi m\u00E0n h\u00ECnh nh\u01B0ng v\u1EABn l\u00E0 t\u00EAn c\u1EE7a \u00F4 cho tr\u00ECnh \u0111\u1ECDc m\u00E0n h\u00ECnh. -->\n <sd-checkbox\n class=\"c-show\"\n [label]=\"('core.component.form-builder.display' | sdTranslate) + ': ' + _title\"\n [model]=\"!item.invisible\"\n (modelChange)=\"setShown(_field, !!$event)\">\n </sd-checkbox>\n <button\n type=\"button\"\n class=\"c-toggle\"\n [attr.aria-expanded]=\"_open\"\n [attr.aria-controls]=\"_open ? detailsId(_field) : null\"\n (click)=\"toggleRow(_field)\">\n <span class=\"c-title\">{{ _title }}</span>\n @if (!_hidden && item.fixed) {\n @let _fixedLabel = 'core.component.table.config.fixed-label' | sdTranslate;\n <sd-icon class=\"c-pin\" name=\"push_pin\" size=\"16px\" [title]=\"_fixedLabel\" [ariaLabel]=\"_fixedLabel\"></sd-icon>\n }\n @if (!_hidden && (item.truncate ?? item.origin.truncate)) {\n @let _truncateLabel = 'core.component.table.config.truncate-label' | sdTranslate;\n <sd-icon class=\"c-trunc\" name=\"short_text\" size=\"16px\" [title]=\"_truncateLabel\" [ariaLabel]=\"_truncateLabel\"></sd-icon>\n }\n <span class=\"c-width-meta\">{{ widthSummary(item) }}</span>\n <sd-icon class=\"c-chevron\" size=\"20px\" [name]=\"_open ? 'expand_less' : 'expand_more'\" aria-hidden=\"true\"></sd-icon>\n </button>\n </div>\n\n @if (_open) {\n <div class=\"c-details\" [id]=\"detailsId(_field)\">\n <div class=\"c-fields\">\n <div class=\"c-field-title\">\n <sd-input\n size=\"sm\"\n hideInlineError\n [label]=\"'core.component.table.column-header' | sdTranslate\"\n [placeholder]=\"item.origin.title\"\n [model]=\"item.title\"\n [disabled]=\"_hidden\"\n (modelChange)=\"setTitle(_field, $event)\">\n </sd-input>\n @if (renamed(item)) {\n <div class=\"c-origin\">\n {{ 'core.component.table.config.origin' | sdTranslate: { title: item.origin.title } }} \u00B7\n <button type=\"button\" class=\"c-restore\" [disabled]=\"_hidden\" (click)=\"restoreTitle(_field)\">\n {{ 'core.component.table.config.restore' | sdTranslate }}\n </button>\n </div>\n }\n </div>\n <div class=\"c-field-width\">\n @let _textWidth = widthIsText(item);\n <sd-input\n size=\"sm\"\n hideInlineError\n [type]=\"_textWidth ? 'text' : 'number'\"\n [label]=\"'core.component.table.width' | sdTranslate\"\n [placeholder]=\"widthPlaceholder(item)\"\n [model]=\"widthValue(item)\"\n [disabled]=\"_hidden\"\n (sdFocus)=\"onWidthFocus(item)\"\n (modelChange)=\"setWidth(_field, $event)\"\n (sdBlur)=\"commitWidth(_field)\">\n @if (!_textWidth) {\n <ng-template sdSuffixDef><span class=\"c-px\">px</span></ng-template>\n }\n </sd-input>\n </div>\n </div>\n <div class=\"c-checks\">\n <sd-checkbox\n class=\"c-fixed\"\n [label]=\"'core.component.table.config.fixed-label' | sdTranslate\"\n [model]=\"!!item.fixed\"\n [disabled]=\"_hidden\"\n (modelChange)=\"setFixed(_field, !!$event)\">\n </sd-checkbox>\n <div class=\"c-truncate-field\">\n <sd-checkbox\n class=\"c-truncate\"\n [label]=\"'core.component.table.config.truncate-label' | sdTranslate\"\n [model]=\"!!(item.truncate ?? item.origin.truncate)\"\n [disabled]=\"_hidden\"\n (modelChange)=\"setTruncate(_field, !!$event)\">\n </sd-checkbox>\n <span class=\"c-check-hint\">{{ 'core.component.table.config.truncate-hint' | sdTranslate }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n <ng-container sdFooterLeft>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n type=\"text\"\n color=\"primary\"\n size=\"sm\"\n prefixIcon=\"restart_alt\"\n [title]=\"'core.component.table.config.reset' | sdTranslate\"\n (click)=\"onReset()\">\n </sd-button>\n </ng-container>\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n type=\"outline\"\n size=\"sm\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n (click)=\"close()\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n (click)=\"onSave()\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;display:flex;flex-direction:column;gap:10px;min-height:200px}.c-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-height:32px}.c-find{flex:none;width:220px}.c-find-icon{color:var(--sd-text-secondary)}.c-toolbar-end{display:flex;align-items:center;gap:8px;margin-left:auto}.c-shown-count{color:var(--sd-text-secondary);font-size:var(--sd-font-size-13);font-variant-numeric:tabular-nums;white-space:nowrap}.c-hint{margin:0;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12);line-height:var(--sd-line-height-18)}.c-list{overflow-x:hidden;overflow-y:auto;max-height:min(400px,50vh);border:1px solid var(--sd-border);border-radius:var(--sd-radius-8)}.c-item+.c-item{border-top:1px solid var(--sd-border)}.c-item--open{background:color-mix(in srgb,var(--sd-text) 4%,transparent)}.c-row{display:flex;align-items:center;gap:10px;box-sizing:border-box;height:44px;padding:0 8px 0 12px}.c-handle{position:relative;z-index:1;display:inline-flex;flex:none;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--sd-radius-4);background:none;color:var(--sd-disabled-text);cursor:grab;transition:color var(--sd-duration-fast) var(--sd-ease-standard)}.c-handle:hover:not(:disabled),.c-handle:focus-visible{color:var(--sd-text-secondary)}.c-handle:focus-visible{outline:2px solid var(--sd-focus-ring-color);outline-offset:2px}.c-handle:active:not(:disabled){cursor:grabbing}.c-handle:disabled{cursor:default;opacity:.5}sd-checkbox{display:inline-flex;align-items:center}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}.c-show{flex:none}.c-show ::ng-deep .mdc-checkbox{margin:0 -11px}.c-show ::ng-deep .mdc-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.c-toggle{position:relative;z-index:1;display:flex;flex:1;align-items:center;gap:8px;min-width:0;height:44px;padding:0 4px 0 2px;border:0;border-radius:var(--sd-radius-4);background:transparent;color:var(--sd-text);font:inherit;font-size:var(--sd-font-size-14);text-align:left;cursor:pointer}.c-toggle:focus-visible{outline:2px solid var(--sd-focus-ring-color);outline-offset:-2px}.c-toggle:hover .c-chevron{color:var(--sd-text)}.c-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-item--hidden .c-title{color:var(--sd-disabled-text)}@media(forced-colors:active){.c-item--hidden .c-title{color:GrayText}}.c-pin{flex:none;color:var(--sd-primary)}.c-trunc{flex:none;color:var(--sd-text-secondary)}.c-width-meta{flex:none;min-width:58px;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}.c-chevron{flex:none;color:var(--sd-text-secondary)}.c-details{display:flex;flex-direction:column;gap:12px;padding:8px 16px 14px 62px}.c-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,112px);gap:12px;align-items:start}.c-origin{margin-top:4px;padding-left:2px;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12);line-height:var(--sd-line-height-16)}.c-restore{padding:0;border:0;border-radius:var(--sd-radius-2);background:none;color:var(--sd-primary);font:inherit;font-weight:var(--sd-font-weight-medium);cursor:pointer}.c-restore:hover:not(:disabled){text-decoration:underline}.c-restore:focus-visible{outline:2px solid var(--sd-focus-ring-color);outline-offset:2px}.c-restore:disabled{color:var(--sd-disabled-text);cursor:default}.c-px{padding-right:8px;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12)}.c-checks{display:flex;flex-wrap:wrap;gap:8px 24px}.c-truncate-field{display:flex;flex-direction:column}.c-check-hint{padding-left:40px;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12);line-height:var(--sd-line-height-16)}.cdk-drag-preview.c-item{box-sizing:border-box;border-radius:var(--sd-radius-8);background:var(--sd-surface);outline:1px solid var(--sd-primary);box-shadow:var(--sd-shadow-lg);opacity:.98}.cdk-drag-preview.c-item .c-handle{color:var(--sd-primary);cursor:grabbing}.cdk-drag-placeholder.c-item{background:var(--sd-primary-light);box-shadow:inset 0 1px 0 var(--sd-primary),inset 0 -1px 0 var(--sd-primary)}.cdk-drag-placeholder.c-item>*{visibility:hidden}.c-item--picked{position:relative;z-index:2;border-radius:var(--sd-radius-4);background:var(--sd-surface);outline:1px solid var(--sd-primary);outline-offset:-1px;box-shadow:var(--sd-shadow-md)}.c-item--picked .c-handle{color:var(--sd-primary)}.cdk-drag-animating,.c-list.cdk-drop-list-dragging .c-item:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}@media(prefers-reduced-motion:reduce){.c-handle,.cdk-drag-animating,.c-list.cdk-drop-list-dragging .c-item:not(.cdk-drag-placeholder){transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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: SdCheckbox, selector: "sd-checkbox", inputs: ["autoId", "name", "form", "label", "color", "disabled", "size", "viewed", "inlineError", "model"], outputs: ["modelChange", "sdChange"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdInput, selector: "sd-input", inputs: ["autoId", "name", "appearance", "floatLabel", "labelPlacement", "size", "operators", "operator", "form", "label", "helperText", "placeholder", "type", "mask", "inputmode", "autocomplete", "hideInlineError", "blurOnEnter", "clearable", "required", "readonly", "disabled", "viewed", "minlength", "maxlength", "pattern", "patternErrorMessage", "validator", "inlineError", "hyperlink", "model"], outputs: ["operatorChange", "modelChange", "sdChange", "sdFocus", "sdBlur", "keyupEnter", "cleared", "sdFocusForceBlur"] }, { kind: "component", type: SdModal, selector: "sd-modal", inputs: ["autoId", "title", "color", "width", "height", "view", "modalClass", "lazyLoadContent", "hideClose", "disableBackdropClose", "beforeClose"], outputs: ["sdClosed", "sdCloseError"] }, { kind: "directive", type: SdSuffixDefDirective, selector: "[sdSuffixDef]" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }] });
2838
3801
  }
2839
3802
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ConfigComponent, decorators: [{
2840
3803
  type: Component,
2841
- args: [{ selector: 'config', standalone: true, imports: [
2842
- CommonModule,
2843
- FormsModule,
2844
- MatTableModule,
2845
- CdkTableModule,
2846
- DragDropModule,
2847
- SdButton,
2848
- SdCheckbox,
2849
- SdIcon,
2850
- SdInput,
2851
- SdModal,
2852
- SdTranslatePipe,
2853
- ], providers: [ConfigService], template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _columns = ['invisible', 'title', 'width', 'fixed', 'truncate'];\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <!-- why: drag handle l\u00E0 affordance duy nh\u1EA5t cho vi\u1EC7c \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t, v\u00E0 n\u00F3 kh\u00F4ng t\u1EF1 n\u00F3i ra\n \u0111i\u1EC1u \u0111\u00F3 \u2014 m\u1ED9t d\u00F2ng hint tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng.\n K\u00FD hi\u1EC7u \u283F n\u1EB1m S\u1EB4N trong chu\u1ED7i i18n (\u0111\u00FAng v\u1ECB tr\u00ED trong c\u00E2u), n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\">{{ 'core.component.table.config.drag-hint' | sdTranslate }}</p>\n\n <div class=\"c-table\">\n <table\n mat-table\n [dataSource]=\"_configuration.columns!\"\n cdkDropList\n [cdkDropListData]=\"_configuration.columns\"\n (cdkDropListDropped)=\"dropTable($event)\">\n <ng-container matColumnDef=\"invisible\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.form-builder.display' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <div class=\"c-display-cell\">\n <button\n type=\"button\"\n class=\"c-handle\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n (mousedown)=\"handleMouseDown()\"\n (mouseup)=\"handleMouseUp()\">\n <sd-icon name=\"drag_indicator\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC3n th\u1ECB\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t\n c\u1ED9t \u0111\u00E3 t\u1EAFt. -->\n <sd-checkbox [model]=\"!item.invisible\" (modelChange)=\"item.invisible = !item.invisible\" />\n </div>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell class=\"c-th\" *matHeaderCellDef>\n {{ 'core.component.table.column-header' | sdTranslate }}\n </th>\n <td mat-cell *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.title\"\n [(model)]=\"item.title\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"width\">\n <th mat-header-cell class=\"c-th c-col-width\" *matHeaderCellDef>\n {{ 'core.component.table.width' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-width\" *matCellDef=\"let item\">\n <sd-input\n size=\"sm\"\n [placeholder]=\"item?.origin?.width\"\n [(model)]=\"item.width\"\n [disabled]=\"isRowDisabled(item)\"\n hideInlineError></sd-input>\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"fixed\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.fixed' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.fixed\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"truncate\">\n <th mat-header-cell class=\"c-th c-col-toggle\" *matHeaderCellDef>\n {{ 'core.component.table.char-limit' | sdTranslate }}\n </th>\n <td mat-cell class=\"c-col-toggle\" *matCellDef=\"let item\">\n <sd-checkbox [(model)]=\"item.truncate\" [disabled]=\"isRowDisabled(item)\" />\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"_columns; sticky: true\"></tr>\n <tr\n mat-row\n *matRowDef=\"let row; columns: _columns\"\n [class.c-row-hidden]=\"isRowDisabled(row)\"\n cdkDrag\n [cdkDragData]=\"row\"\n cdkDragLockAxis=\"y\"\n [cdkDragDisabled]=\"dragDisabled\">\n </tr>\n </table>\n </div>\n </div>\n }\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n (click)=\"close()\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n color=\"secondary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n (click)=\"onReset()\"\n [title]=\"'core.component.form-builder.default' | sdTranslate\"\n color=\"primary\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n (click)=\"onSave()\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n type=\"fill\"\n color=\"primary\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;min-height:200px}.c-hint{margin:0 0 12px;color:var(--sd-text-secondary, #6b7280);font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px)}.c-table{position:relative;overflow:auto;max-height:60vh;border:1px solid var(--sd-border, rgba(0, 0, 0, .08));border-radius:var(--sd-radius-8, 8px)}.c-table table{--mat-table-header-container-height: 40px;--mat-table-row-item-container-height: 48px;width:100%;background:transparent}.c-table .c-th{font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-13, 13px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-text-secondary, #6b7280);background:var(--sd-surface, #f7f8fa);white-space:nowrap}.c-table .mat-mdc-header-cell,.c-table .mat-mdc-cell{padding:4px 12px;vertical-align:middle;border-bottom-color:var(--sd-border, rgba(0, 0, 0, .08))}.c-table .mat-mdc-header-cell:first-of-type,.c-table .mat-mdc-cell:first-of-type{padding-left:12px}.c-table .mat-mdc-row:last-of-type .mat-mdc-cell{border-bottom:none}.c-table .mat-mdc-row:hover .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .02))}.c-table .c-col-width{width:104px}.c-table .c-col-toggle{width:88px;text-align:center}sd-checkbox{display:inline-flex;align-items:center;vertical-align:middle}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}sd-checkbox ::ng-deep .mat-mdc-checkbox .mdc-label{padding:0}.c-display-cell{display:flex;align-items:center;gap:8px}.c-handle{display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;background:none;color:var(--sd-text-disabled, #b6bcc6);cursor:grab;transition:color .15s ease}.c-handle:hover,.c-handle:focus-visible{color:var(--sd-text-secondary, #6b7280);outline:none}.c-handle:active{cursor:grabbing}.c-row-hidden .mat-mdc-cell{background:var(--sd-surface, rgba(0, 0, 0, .015))}.c-row-hidden sd-input,.c-row-hidden .c-col-toggle sd-checkbox{opacity:.55}.cdk-drag-preview{display:table;border-radius:var(--sd-radius-8, 8px);background:var(--sd-surface, #fff);outline:1px solid var(--sd-primary, #2a66f4);box-shadow:0 12px 28px #00000029,0 2px 8px #00000014;opacity:.98}.cdk-drag-preview .mat-mdc-cell{border-bottom:none;padding:4px 12px;vertical-align:middle}.cdk-drag-preview .c-handle{color:var(--sd-primary, #2a66f4);cursor:grabbing}.cdk-drag-placeholder .mat-mdc-cell{background:var(--sd-primary-light, rgba(42, 102, 244, .06));border-bottom:none;box-shadow:inset 0 1px 0 var(--sd-primary, #2a66f4),inset 0 -1px 0 var(--sd-primary, #2a66f4)}.cdk-drag-placeholder .mat-mdc-cell>*{visibility:hidden}.cdk-drag-animating,.c-table.cdk-drop-list-dragging .mat-mdc-row:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}.c-table.cdk-drop-list-dragging .mat-mdc-row:hover .mat-mdc-cell{background:transparent}\n"] }]
2854
- }], ctorParameters: () => [] });
3804
+ args: [{ selector: 'config', standalone: true, imports: [DragDropModule, SdButton, SdCheckbox, SdIcon, SdInput, SdModal, SdSuffixDefDirective, SdTranslatePipe], providers: [ConfigService], template: "@let _configuration = configuration();\n@let _autoId = autoId();\n@let _searching = searching();\n@let _expanded = expanded();\n\n<sd-modal width=\"sm\" [title]=\"'core.component.table.setup' | sdTranslate\" #modal>\n @if (_configuration) {\n <div class=\"c-container sd-table-config\">\n <div class=\"c-toolbar\">\n @if (searchable()) {\n <sd-input\n class=\"c-find\"\n size=\"sm\"\n hideInlineError\n [autoId]=\"_autoId ? _autoId + '-config-find' : null\"\n [placeholder]=\"'core.component.table.config.find-column' | sdTranslate\"\n [model]=\"query()\"\n (modelChange)=\"onFind($event)\">\n <ng-template sdSuffixDef>\n <sd-icon class=\"c-find-icon\" name=\"search\" size=\"18px\" aria-hidden=\"true\"></sd-icon>\n </ng-template>\n </sd-input>\n }\n <div class=\"c-toolbar-end\">\n <span class=\"c-shown-count\">\n {{ 'core.component.table.config.shown-count' | sdTranslate: { shown: shownCount(), total: totalCount() } }}\n </span>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-show-all' : null\"\n type=\"text\"\n color=\"primary\"\n size=\"sm\"\n [title]=\"'core.component.table.config.show-all' | sdTranslate\"\n [disabled]=\"allShown()\"\n (click)=\"showAll()\">\n </sd-button>\n </div>\n </div>\n\n <!-- why: handle \u283F l\u00E0 c\u00E1ch duy nh\u1EA5t \u0111\u1EC3 \u0111\u1ED5i th\u1EE9 t\u1EF1 c\u1ED9t v\u00E0 t\u1EF1 n\u00F3 kh\u00F4ng n\u00F3i ra \u0111i\u1EC1u \u0111\u00F3 \u2014 d\u00F2ng g\u1EE3i \u00FD tr\u00E1nh vi\u1EC7c ng\u01B0\u1EDDi\n d\u00F9ng kh\u00F4ng bao gi\u1EDD ph\u00E1t hi\u1EC7n t\u00EDnh n\u0103ng. K\u00FD hi\u1EC7u \u283F n\u1EB1m s\u1EB5n trong chu\u1ED7i i18n n\u00EAn kh\u00F4ng k\u00E8m icon ri\u00EAng. -->\n <p class=\"c-hint\" [id]=\"hintId\">\n {{ (_searching ? 'core.component.table.config.drag-disabled-search' : 'core.component.table.config.drag-hint') | sdTranslate }}\n </p>\n\n <!-- why: v\u00F9ng live n\u1EB1m TRONG modal \u2014 v\u00F9ng n\u1EB1m ngo\u00E0i m\u1ED9t h\u1ED9p tho\u1EA1i aria-modal c\u00F3 th\u1EC3 b\u1ECB tr\u00ECnh \u0111\u1ECDc m\u00E0n h\u00ECnh b\u1ECF qua. -->\n <div class=\"c-live sd-visually-hidden\" aria-live=\"assertive\" aria-atomic=\"true\">{{ announcement() }}</div>\n\n <div\n class=\"c-list\"\n cdkDropList\n cdkDropListLockAxis=\"y\"\n [cdkDropListData]=\"columns()\"\n [cdkDropListDisabled]=\"_searching\"\n (cdkDropListDropped)=\"drop($event)\">\n @for (item of columns(); track item.origin.field) {\n @let _field = item.origin.field;\n @let _open = _expanded === _field;\n @let _hidden = isRowDisabled(item);\n @let _title = titleOf(item);\n <div\n class=\"c-item\"\n cdkDrag\n [cdkDragData]=\"item\"\n [attr.data-field]=\"_field\"\n [class.c-item--open]=\"_open\"\n [class.c-item--hidden]=\"_hidden\"\n [class.c-item--picked]=\"picked()?.field === _field\">\n <div class=\"c-row\">\n <button\n #handle\n type=\"button\"\n class=\"c-handle\"\n cdkDragHandle\n [disabled]=\"_searching\"\n [title]=\"'core.component.table.config.drag-handle' | sdTranslate\"\n [attr.aria-label]=\"('core.component.table.config.drag-handle' | sdTranslate) + ': ' + _title\"\n [attr.aria-describedby]=\"hintId\"\n (pointerdown)=\"onHandlePointerDown(_field)\"\n (keydown)=\"onHandleKeydown($event, _field)\"\n (blur)=\"onHandleBlur(_field)\">\n <sd-icon name=\"drag_indicator\" size=\"20px\" aria-hidden=\"true\"></sd-icon>\n </button>\n <!-- why: \u00F4 \"Hi\u1EC7n\" KH\u00D4NG bao gi\u1EDD b\u1ECB kho\u00E1 \u2014 n\u00F3 l\u00E0 \u0111\u01B0\u1EDDng duy nh\u1EA5t \u0111\u1EC3 b\u1EADt l\u1EA1i m\u1ED9t c\u1ED9t \u0111\u00E3 t\u1EAFt. Nh\u00E3n b\u1ECB \u1EA9n\n kh\u1ECFi m\u00E0n h\u00ECnh nh\u01B0ng v\u1EABn l\u00E0 t\u00EAn c\u1EE7a \u00F4 cho tr\u00ECnh \u0111\u1ECDc m\u00E0n h\u00ECnh. -->\n <sd-checkbox\n class=\"c-show\"\n [label]=\"('core.component.form-builder.display' | sdTranslate) + ': ' + _title\"\n [model]=\"!item.invisible\"\n (modelChange)=\"setShown(_field, !!$event)\">\n </sd-checkbox>\n <button\n type=\"button\"\n class=\"c-toggle\"\n [attr.aria-expanded]=\"_open\"\n [attr.aria-controls]=\"_open ? detailsId(_field) : null\"\n (click)=\"toggleRow(_field)\">\n <span class=\"c-title\">{{ _title }}</span>\n @if (!_hidden && item.fixed) {\n @let _fixedLabel = 'core.component.table.config.fixed-label' | sdTranslate;\n <sd-icon class=\"c-pin\" name=\"push_pin\" size=\"16px\" [title]=\"_fixedLabel\" [ariaLabel]=\"_fixedLabel\"></sd-icon>\n }\n @if (!_hidden && (item.truncate ?? item.origin.truncate)) {\n @let _truncateLabel = 'core.component.table.config.truncate-label' | sdTranslate;\n <sd-icon class=\"c-trunc\" name=\"short_text\" size=\"16px\" [title]=\"_truncateLabel\" [ariaLabel]=\"_truncateLabel\"></sd-icon>\n }\n <span class=\"c-width-meta\">{{ widthSummary(item) }}</span>\n <sd-icon class=\"c-chevron\" size=\"20px\" [name]=\"_open ? 'expand_less' : 'expand_more'\" aria-hidden=\"true\"></sd-icon>\n </button>\n </div>\n\n @if (_open) {\n <div class=\"c-details\" [id]=\"detailsId(_field)\">\n <div class=\"c-fields\">\n <div class=\"c-field-title\">\n <sd-input\n size=\"sm\"\n hideInlineError\n [label]=\"'core.component.table.column-header' | sdTranslate\"\n [placeholder]=\"item.origin.title\"\n [model]=\"item.title\"\n [disabled]=\"_hidden\"\n (modelChange)=\"setTitle(_field, $event)\">\n </sd-input>\n @if (renamed(item)) {\n <div class=\"c-origin\">\n {{ 'core.component.table.config.origin' | sdTranslate: { title: item.origin.title } }} \u00B7\n <button type=\"button\" class=\"c-restore\" [disabled]=\"_hidden\" (click)=\"restoreTitle(_field)\">\n {{ 'core.component.table.config.restore' | sdTranslate }}\n </button>\n </div>\n }\n </div>\n <div class=\"c-field-width\">\n @let _textWidth = widthIsText(item);\n <sd-input\n size=\"sm\"\n hideInlineError\n [type]=\"_textWidth ? 'text' : 'number'\"\n [label]=\"'core.component.table.width' | sdTranslate\"\n [placeholder]=\"widthPlaceholder(item)\"\n [model]=\"widthValue(item)\"\n [disabled]=\"_hidden\"\n (sdFocus)=\"onWidthFocus(item)\"\n (modelChange)=\"setWidth(_field, $event)\"\n (sdBlur)=\"commitWidth(_field)\">\n @if (!_textWidth) {\n <ng-template sdSuffixDef><span class=\"c-px\">px</span></ng-template>\n }\n </sd-input>\n </div>\n </div>\n <div class=\"c-checks\">\n <sd-checkbox\n class=\"c-fixed\"\n [label]=\"'core.component.table.config.fixed-label' | sdTranslate\"\n [model]=\"!!item.fixed\"\n [disabled]=\"_hidden\"\n (modelChange)=\"setFixed(_field, !!$event)\">\n </sd-checkbox>\n <div class=\"c-truncate-field\">\n <sd-checkbox\n class=\"c-truncate\"\n [label]=\"'core.component.table.config.truncate-label' | sdTranslate\"\n [model]=\"!!(item.truncate ?? item.origin.truncate)\"\n [disabled]=\"_hidden\"\n (modelChange)=\"setTruncate(_field, !!$event)\">\n </sd-checkbox>\n <span class=\"c-check-hint\">{{ 'core.component.table.config.truncate-hint' | sdTranslate }}</span>\n </div>\n </div>\n </div>\n }\n </div>\n }\n </div>\n </div>\n }\n <ng-container sdFooterLeft>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-reset' : null\"\n type=\"text\"\n color=\"primary\"\n size=\"sm\"\n prefixIcon=\"restart_alt\"\n [title]=\"'core.component.table.config.reset' | sdTranslate\"\n (click)=\"onReset()\">\n </sd-button>\n </ng-container>\n <ng-container sdFooterRight>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-skip' : null\"\n type=\"outline\"\n size=\"sm\"\n [title]=\"'core.component.table.skip' | sdTranslate\"\n (click)=\"close()\">\n </sd-button>\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config-apply' : null\"\n type=\"fill\"\n color=\"primary\"\n size=\"sm\"\n [title]=\"'core.component.table.apply' | sdTranslate\"\n (click)=\"onSave()\">\n </sd-button>\n </ng-container>\n</sd-modal>\n", styles: [".c-container{position:relative;display:flex;flex-direction:column;gap:10px;min-height:200px}.c-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-height:32px}.c-find{flex:none;width:220px}.c-find-icon{color:var(--sd-text-secondary)}.c-toolbar-end{display:flex;align-items:center;gap:8px;margin-left:auto}.c-shown-count{color:var(--sd-text-secondary);font-size:var(--sd-font-size-13);font-variant-numeric:tabular-nums;white-space:nowrap}.c-hint{margin:0;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12);line-height:var(--sd-line-height-18)}.c-list{overflow-x:hidden;overflow-y:auto;max-height:min(400px,50vh);border:1px solid var(--sd-border);border-radius:var(--sd-radius-8)}.c-item+.c-item{border-top:1px solid var(--sd-border)}.c-item--open{background:color-mix(in srgb,var(--sd-text) 4%,transparent)}.c-row{display:flex;align-items:center;gap:10px;box-sizing:border-box;height:44px;padding:0 8px 0 12px}.c-handle{position:relative;z-index:1;display:inline-flex;flex:none;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--sd-radius-4);background:none;color:var(--sd-disabled-text);cursor:grab;transition:color var(--sd-duration-fast) var(--sd-ease-standard)}.c-handle:hover:not(:disabled),.c-handle:focus-visible{color:var(--sd-text-secondary)}.c-handle:focus-visible{outline:2px solid var(--sd-focus-ring-color);outline-offset:2px}.c-handle:active:not(:disabled){cursor:grabbing}.c-handle:disabled{cursor:default;opacity:.5}sd-checkbox{display:inline-flex;align-items:center}sd-checkbox ::ng-deep .mat-mdc-checkbox{display:flex}sd-checkbox ::ng-deep .mat-internal-form-field{margin:0}.c-show{flex:none}.c-show ::ng-deep .mdc-checkbox{margin:0 -11px}.c-show ::ng-deep .mdc-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.c-toggle{position:relative;z-index:1;display:flex;flex:1;align-items:center;gap:8px;min-width:0;height:44px;padding:0 4px 0 2px;border:0;border-radius:var(--sd-radius-4);background:transparent;color:var(--sd-text);font:inherit;font-size:var(--sd-font-size-14);text-align:left;cursor:pointer}.c-toggle:focus-visible{outline:2px solid var(--sd-focus-ring-color);outline-offset:-2px}.c-toggle:hover .c-chevron{color:var(--sd-text)}.c-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-item--hidden .c-title{color:var(--sd-disabled-text)}@media(forced-colors:active){.c-item--hidden .c-title{color:GrayText}}.c-pin{flex:none;color:var(--sd-primary)}.c-trunc{flex:none;color:var(--sd-text-secondary)}.c-width-meta{flex:none;min-width:58px;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}.c-chevron{flex:none;color:var(--sd-text-secondary)}.c-details{display:flex;flex-direction:column;gap:12px;padding:8px 16px 14px 62px}.c-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,112px);gap:12px;align-items:start}.c-origin{margin-top:4px;padding-left:2px;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12);line-height:var(--sd-line-height-16)}.c-restore{padding:0;border:0;border-radius:var(--sd-radius-2);background:none;color:var(--sd-primary);font:inherit;font-weight:var(--sd-font-weight-medium);cursor:pointer}.c-restore:hover:not(:disabled){text-decoration:underline}.c-restore:focus-visible{outline:2px solid var(--sd-focus-ring-color);outline-offset:2px}.c-restore:disabled{color:var(--sd-disabled-text);cursor:default}.c-px{padding-right:8px;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12)}.c-checks{display:flex;flex-wrap:wrap;gap:8px 24px}.c-truncate-field{display:flex;flex-direction:column}.c-check-hint{padding-left:40px;color:var(--sd-text-secondary);font-size:var(--sd-font-size-12);line-height:var(--sd-line-height-16)}.cdk-drag-preview.c-item{box-sizing:border-box;border-radius:var(--sd-radius-8);background:var(--sd-surface);outline:1px solid var(--sd-primary);box-shadow:var(--sd-shadow-lg);opacity:.98}.cdk-drag-preview.c-item .c-handle{color:var(--sd-primary);cursor:grabbing}.cdk-drag-placeholder.c-item{background:var(--sd-primary-light);box-shadow:inset 0 1px 0 var(--sd-primary),inset 0 -1px 0 var(--sd-primary)}.cdk-drag-placeholder.c-item>*{visibility:hidden}.c-item--picked{position:relative;z-index:2;border-radius:var(--sd-radius-4);background:var(--sd-surface);outline:1px solid var(--sd-primary);outline-offset:-1px;box-shadow:var(--sd-shadow-md)}.c-item--picked .c-handle{color:var(--sd-primary)}.cdk-drag-animating,.c-list.cdk-drop-list-dragging .c-item:not(.cdk-drag-placeholder){transition:transform .22s cubic-bezier(0,0,.2,1)}@media(prefers-reduced-motion:reduce){.c-handle,.cdk-drag-animating,.c-list.cdk-drop-list-dragging .c-item:not(.cdk-drag-placeholder){transition:none}}\n"] }]
3805
+ }] });
2855
3806
 
2856
3807
  class ToStringPipe {
2857
3808
  transform(value) {
@@ -2916,11 +3867,11 @@ class ViewComponent {
2916
3867
  this.item().meta.display[this.column().field]?.click?.();
2917
3868
  };
2918
3869
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2919
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ViewComponent, isStandalone: true, selector: "view", inputs: { autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <!-- why: ch\u1EC9 bind (click) khi c\u1ED9t c\u00F3 `click` \u2014 badge th\u00E0nh role=\"button\" + tabindex=0 ngay khi output c\u00F3\n ng\u01B0\u1EDDi l\u1EAFng nghe, n\u00EAn bind v\u00F4 \u0111i\u1EC1u ki\u1EC7n bi\u1EBFn m\u1ECDi badge trong b\u1EA3ng th\u00E0nh n\u00FAt. Tooltip \u0111i qua input\n `tooltip` c\u1EE7a badge: [sdTooltip] tr\u00EAn host th\u00EAm tooltip th\u1EE9 hai khi ch\u1EEF c\u1EE7a badge b\u1ECB c\u1EAFt. -->\n @if (view.click) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"view.tooltip\"\n (click)=\"view.click()\">\n </sd-badge>\n } @else {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"view.tooltip\">\n </sd-badge>\n }\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host [role=button]:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "label", "description", "tooltip", "icon", "size", "pulse"], outputs: ["click"] }, { kind: "pipe", type: SdSafeHtmlPipe, name: "sdSafeHtml" }, { kind: "directive", type: SdTooltipDirective, selector: "[sdTooltip]", inputs: ["sdTooltip", "sdTooltipPosition", "sdTooltipDelay", "sdTooltipColor"] }, { kind: "pipe", type: ToStringPipe, name: "asString" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3870
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: ViewComponent, isStandalone: true, selector: "view", inputs: { autoId: { classPropertyName: "autoId", publicName: "autoId", isSignal: true, isRequired: true, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <!-- why: ch\u1EC9 bind (click) khi c\u1ED9t c\u00F3 `click` \u2014 badge th\u00E0nh role=\"button\" + tabindex=0 ngay khi output c\u00F3\n ng\u01B0\u1EDDi l\u1EAFng nghe, n\u00EAn bind v\u00F4 \u0111i\u1EC1u ki\u1EC7n bi\u1EBFn m\u1ECDi badge trong b\u1EA3ng th\u00E0nh n\u00FAt. Tooltip \u0111i qua input\n `tooltip` c\u1EE7a badge: [sdTooltip] tr\u00EAn host th\u00EAm tooltip th\u1EE9 hai khi ch\u1EEF c\u1EE7a badge b\u1ECB c\u1EAFt.\n Tooltip c\u1EE7a c\u1ED9t \u0111\u1EE9ng tr\u01B0\u1EDBc tooltip do useBadge tr\u1EA3 v\u1EC1. -->\n @let _badgeTooltip = view.tooltip || view.badge.tooltip;\n @if (view.click) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [label]=\"view.badge.label\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"_badgeTooltip\"\n (click)=\"view.click()\">\n </sd-badge>\n } @else {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [label]=\"view.badge.label\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"_badgeTooltip\">\n </sd-badge>\n }\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host [role=button]:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SdBadge, selector: "sd-badge", inputs: ["type", "color", "primary", "secondary", "success", "info", "warning", "error", "fontSet", "title", "label", "description", "tooltip", "icon", "size", "pulse"], outputs: ["click"] }, { kind: "pipe", type: SdSafeHtmlPipe, name: "sdSafeHtml" }, { kind: "directive", type: SdTooltipDirective, selector: "[sdTooltip]", inputs: ["sdTooltip", "sdTooltipPosition", "sdTooltipDelay", "sdTooltipColor"] }, { kind: "pipe", type: ToStringPipe, name: "asString" }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2920
3871
  }
2921
3872
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: ViewComponent, decorators: [{
2922
3873
  type: Component,
2923
- args: [{ selector: 'view', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdBadge, SdSafeHtmlPipe, SdTooltipDirective, ToStringPipe, SdTranslatePipe], template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <!-- why: ch\u1EC9 bind (click) khi c\u1ED9t c\u00F3 `click` \u2014 badge th\u00E0nh role=\"button\" + tabindex=0 ngay khi output c\u00F3\n ng\u01B0\u1EDDi l\u1EAFng nghe, n\u00EAn bind v\u00F4 \u0111i\u1EC1u ki\u1EC7n bi\u1EBFn m\u1ECDi badge trong b\u1EA3ng th\u00E0nh n\u00FAt. Tooltip \u0111i qua input\n `tooltip` c\u1EE7a badge: [sdTooltip] tr\u00EAn host th\u00EAm tooltip th\u1EE9 hai khi ch\u1EEF c\u1EE7a badge b\u1ECB c\u1EAFt. -->\n @if (view.click) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"view.tooltip\"\n (click)=\"view.click()\">\n </sd-badge>\n } @else {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"view.tooltip\">\n </sd-badge>\n }\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host [role=button]:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}\n"] }]
3874
+ args: [{ selector: 'view', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule, SdBadge, SdSafeHtmlPipe, SdTooltipDirective, ToStringPipe, SdTranslatePipe], template: "@let _column = column();\n@let _item = item();\n@let _autoId = autoId();\n\n@let view = _item.meta.display[_column.field];\n@let _truncateEnable = truncateEnable();\n@let _truncateWidth = truncateWidth();\n@let _isCollapsed = isCollapsed();\n@let isExpandByMore = isOverflowing() && _column?.cell?.truncate?.type === 'more';\n@let isExpandByTooltip = isOverflowing() && _column?.cell?.truncate?.type === 'tooltip';\n\n@if (view) {\n @if (view.isHtml) {\n @if (view.click) {\n <!-- why: b\u1ECF aria-hidden=\"true\" \u2014 \u00F4 n\u00E0y c\u00F3 (click) th\u1EADt n\u00EAn n\u00F3 l\u00E0 m\u1ED9t control; aria-hidden\n v\u1EEBa xo\u00E1 n\u1ED9i dung \u00F4 kh\u1ECFi accessibility tree v\u1EEBa \u0111\u1EC3 l\u1EA1i m\u1ED9t v\u00F9ng b\u1EA5m chu\u1ED9t \"c\u00E2m\".\n Nay l\u00E0 role=\"button\" + tabindex=\"0\" + Enter/Space ch\u1EA1y \u0111\u00FAng nh\u01B0 click. -->\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n role=\"button\"\n tabindex=\"0\"\n (click)=\"view.click()\"\n (keydown.enter)=\"onViewKeydown($event)\"\n (keydown.space)=\"onViewKeydown($event)\"\n class=\"text-break cursor-pointer\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlClickTooltip : '')\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_truncateEnable\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlClickTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis-html]=\"_isCollapsed\"\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? htmlTooltip : '')\"\n containerClass=\"c-tooltip-html-d374bd93-f136-425c-bcc2-2d88cb163e44\"\n container=\"body\"\n placement=\"bottom\"\n [sdTooltipDelay]=\"100\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n\n <ng-template #htmlTooltip>\n <div\n class=\"c-tooltip-inner-content\"\n [style.max-width]=\"'calc(' + _truncateWidth + ' * 1.5)'\"\n style=\"max-height: 200px; overflow-y: auto; scrollbar-width: thin\">\n <div [innerHTML]=\"view.data | sdSafeHtml\"></div>\n </div>\n </ng-template>\n\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [sdTooltip]=\"view.tooltip || ''\"\n [style]=\"view.cellStyle\"\n [innerHTML]=\"view.data | sdSafeHtml\"></div>\n }\n <!-- End -->\n }\n } @else {\n <!-- N\u1EBFu l\u00E0 gi\u00E1 tr\u1ECB l\u1EA5y hi\u1EC3n th\u1ECB l\u1EA5y tr\u1EF1c ti\u1EBFp t\u1EEB field -->\n @if (view.badge) {\n @if (view.data) {\n <!-- why: ch\u1EC9 bind (click) khi c\u1ED9t c\u00F3 `click` \u2014 badge th\u00E0nh role=\"button\" + tabindex=0 ngay khi output c\u00F3\n ng\u01B0\u1EDDi l\u1EAFng nghe, n\u00EAn bind v\u00F4 \u0111i\u1EC1u ki\u1EC7n bi\u1EBFn m\u1ECDi badge trong b\u1EA3ng th\u00E0nh n\u00FAt. Tooltip \u0111i qua input\n `tooltip` c\u1EE7a badge: [sdTooltip] tr\u00EAn host th\u00EAm tooltip th\u1EE9 hai khi ch\u1EEF c\u1EE7a badge b\u1ECB c\u1EAFt.\n Tooltip c\u1EE7a c\u1ED9t \u0111\u1EE9ng tr\u01B0\u1EDBc tooltip do useBadge tr\u1EA3 v\u1EC1. -->\n @let _badgeTooltip = view.tooltip || view.badge.tooltip;\n @if (view.click) {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [label]=\"view.badge.label\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"_badgeTooltip\"\n (click)=\"view.click()\">\n </sd-badge>\n } @else {\n <sd-badge\n [attr.data-autoId]=\"_autoId\"\n [type]=\"view.badge.type\"\n [title]=\"view.data\"\n [label]=\"view.badge.label\"\n [color]=\"view.badge.color\"\n [icon]=\"view.badge.icon\"\n [tooltip]=\"_badgeTooltip\">\n </sd-badge>\n }\n }\n } @else {\n @if (view.click) {\n <div\n #contentContainer\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_truncateEnable\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n <a [attr.data-autoId]=\"_autoId\" href=\"javascript:;\" (click)=\"view.click()\">\n {{ view.data }}\n </a>\n </div>\n } @else {\n <!-- N\u1EBFu column c\u00F3 b\u1EADt \"gi\u1EDBi h\u1EA1n k\u00FD t\u1EF1\" -->\n @if (_truncateEnable) {\n <div\n #contentContainer\n [attr.data-autoId]=\"_autoId\"\n class=\"text-break\"\n [style]=\"view.cellStyle\"\n [style.max-width]=\"_truncateWidth\"\n [class.c-ellipsis]=\"_isCollapsed\"\n [sdTooltip]=\"view.tooltip || (isExpandByTooltip ? view.data : '') | asString\">\n {{ view.data }}\n </div>\n\n <!-- N\u1EBFu option xem full th\u00F4ng tin l\u00E0 \"btn xem th\u00EAm\" -->\n @if (isExpandByMore) {\n <button (click)=\"toggle()\" class=\"c-collapse\">{{ _isCollapsed ? ('core.component.form-builder.show-more' | sdTranslate) : ('core.component.form-builder.show-less' | sdTranslate) }}</button>\n }\n } @else {\n <div [attr.data-autoId]=\"_autoId\" class=\"text-break\" [style]=\"view.cellStyle\" [sdTooltip]=\"view.tooltip || ''\">\n {{ view.data }}\n </div>\n }\n <!-- End -->\n }\n }\n }\n}\n", styles: [".c-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.c-ellipsis-html{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;line-clamp:1;text-overflow:ellipsis;overflow:hidden}.c-collapse{background:none;color:#00e;border:none;padding:0;font-size:var(--sd-font-size-12, 12px);cursor:pointer;outline:none}.c-collapse:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host [role=button]:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:-2px}\n"] }]
2924
3875
  }], ctorParameters: () => [] });
2925
3876
 
2926
3877
  class DesktopCellComponent {
@@ -3530,6 +4481,10 @@ class SdColumnResizeDirective {
3530
4481
  #onMouseup = () => {
3531
4482
  const finalPx = `${Math.round(this.#currentWidth)}px`;
3532
4483
  this.#cleanupDrag();
4484
+ // why: bấm vào tay nắm mà không đổi độ rộng thì không có gì để lưu — trước đây nó ghi độ rộng đang hiển thị (kể cả
4485
+ // cột auto / %) vào thiết lập của bảng.
4486
+ if (Math.round(this.#currentWidth) === Math.round(this.#startWidth))
4487
+ return;
3533
4488
  // emit trong Angular zone để consumer chạy CD bình thường
3534
4489
  this.#zone.run(() => this.resizeEnd.emit(finalPx));
3535
4490
  };
@@ -4328,6 +5283,8 @@ class TableFormatService {
4328
5283
  type: badge.type ?? 'round',
4329
5284
  color: badge.color,
4330
5285
  icon: badge.icon,
5286
+ label: badge.label,
5287
+ tooltip: badge.tooltip,
4331
5288
  },
4332
5289
  title: badge.title,
4333
5290
  };
@@ -4560,7 +5517,8 @@ const matchesColumnFilter = (data, columns = [], rawColumnFilter = {}, columnOpe
4560
5517
  return true;
4561
5518
  };
4562
5519
  const filterLocalItems = (localItems, option, filterInfo) => {
4563
- const { columns } = option;
5520
+ // why: cột con của header nhóm mới có giá trị để lọc / sort; header nhóm thì không.
5521
+ const columns = leafColumns(option.columns);
4564
5522
  const { rawColumnFilter, orderBy, orderDirection, pageSize, pageNumber } = filterInfo;
4565
5523
  const quickSearch = option.filter?.disabled ? undefined : option.filter?.quickSearch;
4566
5524
  const matchesData = (data) => matchesColumnFilter(data, columns, rawColumnFilter, filterInfo.columnOperator, option.dateTime) &&
@@ -4926,6 +5884,12 @@ class SdTableFilterService {
4926
5884
  remove: () => {
4927
5885
  activeFilterValue.set(this.#defaultValue(args));
4928
5886
  },
5887
+ default: () => {
5888
+ const value = this.#defaultValue(args);
5889
+ // why: `#defaultValue` trả về chính object `args.columnOperator` (dùng chung với bảng) — tách ra để người
5890
+ // đọc không sửa nhầm vào đó.
5891
+ return { ...value, columnOperator: { ...value.columnOperator } };
5892
+ },
4929
5893
  observer: activeFilterValue.observer.pipe(
4930
5894
  // Sử dụng mặc định nếu bị reset
4931
5895
  map(value => value || this.#defaultValue(args))),
@@ -4984,8 +5948,8 @@ class SdTableFilterService {
4984
5948
  const externalFilter = {};
4985
5949
  const columnOperator = args.columnOperator || {};
4986
5950
  const { columns, externalFilters } = args;
4987
- // Filter column
4988
- for (const item of columns || []) {
5951
+ // Filter column — cột lá, kể cả cột con của header nhóm.
5952
+ for (const item of leafColumns(columns)) {
4989
5953
  columnFilter[item.field] = item?.filter?.default;
4990
5954
  if (item?.filter?.operator?.enable && item?.filter?.operator?.default) {
4991
5955
  columnOperator[item.field] = item.filter.operator.default;
@@ -5028,8 +5992,8 @@ class SdTableFilterService {
5028
5992
  const externalFilter = {};
5029
5993
  const columnOperator = args.columnOperator || {};
5030
5994
  const { columns, externalFilters } = args;
5031
- // Filter column
5032
- for (const item of columns || []) {
5995
+ // Filter column — cột lá, kể cả cột con của header nhóm.
5996
+ for (const item of leafColumns(columns)) {
5033
5997
  // why: null is a deliberate cached clear from SD controls; only a missing key should fall back to default.
5034
5998
  columnFilter[item.field] = this.#hasOwnValue(value?.columnFilter, item.field)
5035
5999
  ? value?.columnFilter?.[item.field]
@@ -5109,6 +6073,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
5109
6073
  type: Input,
5110
6074
  args: [{ required: true, alias: 'sdTableSortHeader' }]
5111
6075
  }] } });
6076
+ /** A raw filter value that filters something — the rule of `#isFiltered`: a non-empty array, a range with an end, a value. */
6077
+ const isRawFilterSet = (value) => {
6078
+ if (Array.isArray(value))
6079
+ return value.length > 0;
6080
+ if (value && typeof value === 'object' && ('from' in value || 'to' in value)) {
6081
+ const range = value;
6082
+ return !!range.from || !!range.to;
6083
+ }
6084
+ return value !== undefined && value !== null && value !== '';
6085
+ };
6086
+ const isNoDataOperator = (operator) => operator === 'NULL' || operator === 'NOT_NULL';
5112
6087
  class SdTablePaginatorIntl extends MatPaginatorIntl {
5113
6088
  // i18n labels resolved at construction. Reads VI/EN from I18nService.
5114
6089
  #i18n = inject(I18nService);
@@ -5178,6 +6153,15 @@ class SdTable {
5178
6153
  sdRowMobileDef = contentChild(SdTableRowMobileDefDirective, { descendants: false });
5179
6154
  isMobile = inject(SdViewportService).isMobile;
5180
6155
  mobileCards = computed(() => this.isMobile() && !!this.sdRowMobileDef());
6156
+ /**
6157
+ * The footer settings button carries a dot while the table uses a setup of its own: stored columns that differ from
6158
+ * the option (settings modal or a resize on the table) or inline external filters that differ from `defaultShowing`.
6159
+ */
6160
+ hasCustomSetup = computed(() => sdTableHasCustomSetup({
6161
+ option: this.tableOption(),
6162
+ configuration: this.#configuredTable(),
6163
+ inlineExternal: this.#inlineExternalSetup(),
6164
+ }));
5181
6165
  // ==========================================
5182
6166
  // 3. COMPUTED FROM QUERIES
5183
6167
  // ==========================================
@@ -5238,6 +6222,79 @@ class SdTable {
5238
6222
  #shownPage = signal(undefined);
5239
6223
  /** A read is waiting in the schedule (debounce) and has not started loading yet. */
5240
6224
  #readScheduled = signal(false);
6225
+ /** `option.loading`, then `SD_TABLE_CONFIGURATION.loading`, then the defaults, field by field. */
6226
+ loadingSettings = computed(() => resolveTableLoading(this.tableOption()?.loading, this.tableConfiguration?.loading));
6227
+ #refresh = new TableRefreshTimer((callback, ms) => {
6228
+ // why: a waiting timer outside the zone keeps it stable (whenStable, hydration); the callback runs inside it,
6229
+ // so its signal write also renders in zone apps that ignore changes outside the zone.
6230
+ const id = this.#zone.runOutsideAngular(() => setTimeout(() => this.#zone.run(callback), ms));
6231
+ return () => clearTimeout(id);
6232
+ });
6233
+ /** The skeleton showed for a read that a scheduled read now replaces (sort, page, filter during the read). */
6234
+ #skeletonHeld = signal(false);
6235
+ /**
6236
+ * Nothing to show yet but something is on its way: the configuration (column lookups) is not ready, the first
6237
+ * read of the option waits in the schedule, or a read replaces one that showed the skeleton. Without it the
6238
+ * empty-state block shows during that debounce.
6239
+ */
6240
+ #readPending = computed(() => this.readState().status !== 'error' &&
6241
+ (!this.configuration() ||
6242
+ (this.#readScheduled() && ((this.total() === undefined && this.#shownPage() === undefined) || this.#skeletonHeld()))));
6243
+ /**
6244
+ * What the loading layer draws (host `data-loading-view`). Derived only; `loading()`, `data-loading` and
6245
+ * `aria-busy` keep following every read at once.
6246
+ */
6247
+ loadingView = computed(() => tableLoadingView({
6248
+ skeleton: this.loadingSettings().skeleton,
6249
+ loading: this.loading(),
6250
+ pending: this.#readPending(),
6251
+ scheduled: this.#readScheduled(),
6252
+ rows: this.items().length > 0,
6253
+ refresh: this.#refresh.shown(),
6254
+ }));
6255
+ #liveMessage = signal('');
6256
+ /** Text of the `.sd-table-live` status region: "loading" once the loading layer shows, then the result. */
6257
+ liveMessage = this.#liveMessage.asReadonly();
6258
+ #liveLoading = false;
6259
+ /**
6260
+ * i18n key of the empty block on screen, for the status region: the title of the default block, also under a
6261
+ * custom `sdDataStateTemplate`; `undefined` while rows, a read, the loading layer or an error region show.
6262
+ */
6263
+ #emptyKey = computed(() => {
6264
+ const status = this.readState().status;
6265
+ const noRows = status !== 'error' && !this.loading() && !this.total() && !this.items().length && this.loadingView() === 'none';
6266
+ if (!noRows || (this.loadError() && !(status === 'empty' && this.dataStateTemplate())))
6267
+ return undefined;
6268
+ if (this.isFiltered())
6269
+ return 'core.component.table.no-results';
6270
+ return this.requireFiltered() ? 'core.component.table.choose-filter-hint' : 'core.component.table.no-data';
6271
+ });
6272
+ /** Rows that fill a table with a fixed height, measured when the skeleton shows. */
6273
+ #skeletonFill = signal(undefined);
6274
+ /** Skeleton rows of the desktop table (`matNoDataRow`) while `loadingView()` is `skeleton`; empty otherwise. */
6275
+ skeleton = computed(() => {
6276
+ const config = this.configuration();
6277
+ if (!config || this.loadingView() !== 'skeleton')
6278
+ return [];
6279
+ const columns = new Map([...config.firstColumns, ...config.secondColumns].map(column => [column.field, column]));
6280
+ const cellDef = this.cellDef();
6281
+ const pageSize = this.tableOption()?.paginate?.pageSize;
6282
+ const rows = this.loadingSettings().skeletonRows ??
6283
+ this.#skeletonFill() ??
6284
+ Math.min(TABLE_SKELETON_ROWS, pageSize && pageSize > 0 ? pageSize : TABLE_SKELETON_ROWS);
6285
+ return buildTableSkeleton(config.displayedColumns.map(field => {
6286
+ const column = columns.get(field);
6287
+ return {
6288
+ field,
6289
+ type: column?.type,
6290
+ align: column?.align,
6291
+ badge: !!column && 'useBadge' in column && !!column.useBadge,
6292
+ template: !!column?.cell?.templateRef || !!cellDef[field],
6293
+ };
6294
+ }), rows);
6295
+ });
6296
+ /** What the table shows before its configuration is ready: 5 rows × 4 bars, without a header. */
6297
+ genericSkeleton = TABLE_GENERIC_SKELETON;
5241
6298
  unknownTotalPager = computed(() => {
5242
6299
  if (!this.unknownTotal())
5243
6300
  return undefined;
@@ -5399,6 +6456,153 @@ class SdTable {
5399
6456
  quickSearchControl = viewChild(TableQuickSearchComponent);
5400
6457
  quickSearchValid = computed(() => quickSearchValid(this.quickSearchOption(), this.quickSearchValue()));
5401
6458
  #filterRegisterRevision = signal(0);
6459
+ // ==========================================
6460
+ // QUERY BAR (`filter.mode: 'query-bar'`) — một lớp hiển thị trên cùng TableFilterValue (handoff table-query-bar)
6461
+ // ==========================================
6462
+ /** `filter.mode` sau khi gộp `SD_TABLE_CONFIGURATION.filter.mode`. */
6463
+ filterMode = computed(() => this.tableOption()?.filter?.mode ?? 'default');
6464
+ /** Giao diện lọc đang hiển thị: mobile luôn dùng giao diện mặc định; giá trị lọc không đổi khi đổi viewport. */
6465
+ effectiveFilterMode = computed(() => (this.isMobile() ? 'default' : this.filterMode()));
6466
+ /** Thanh query bar thay quick search, external filter và filter dưới cột. */
6467
+ queryBarMode = computed(() => this.effectiveFilterMode() === 'query-bar' && !this.tableOption()?.filter?.disabled);
6468
+ queryBar = viewChild(SdQueryBar);
6469
+ /** Chip trên thanh (nháp của thanh) và ô tìm — gắn hai chiều với `sd-query-bar`. */
6470
+ barFilters = signal([]);
6471
+ barSearch = signal('');
6472
+ queryBarHintId = `sd-table-${Utilities.generateUuid()}-query-bar-hint`;
6473
+ /** Giá trị lọc đã áp dụng, theo lần phát gần nhất của filter register. */
6474
+ #appliedFilter = signal(undefined);
6475
+ #inlineExternal = signal({});
6476
+ // why: tách khỏi #inlineExternal (mặc định {}) — trước khi filter register phát lần đầu thì chưa biết, không được
6477
+ // coi là "khác defaultShowing" mà bật chấm trên nút Thiết lập.
6478
+ #inlineExternalSetup = signal(undefined);
6479
+ /** Column setup the table reads from storage; the settings button dot compares it with the option. */
6480
+ #configuredTable = signal(undefined);
6481
+ #configStorage;
6482
+ #filterConfigurationSubscription;
6483
+ /** Chip dựng từ giá trị đã áp dụng ở lần đồng bộ trước — để phân biệt nháp với giá trị đã áp dụng. */
6484
+ #barDerived = [];
6485
+ /** Mảng ghi vào `barFilters` lần cuối; khác mảng đang có nghĩa là người dùng đã sửa thanh. */
6486
+ #barWritten = this.barFilters();
6487
+ #barTerm;
6488
+ #barActive = false;
6489
+ #barPending = false;
6490
+ #barApplying = false;
6491
+ /** The last bar apply left out the search text being typed (a chip change): keep that text in the box. */
6492
+ #barKeepSearch = false;
6493
+ #barWarned = false;
6494
+ /** Cột bị ẩn qua cấu hình mà vẫn còn giá trị lọc: chip của nó ở lại thanh tới khi bị xoá. */
6495
+ #hiddenFilteredColumns = computed(() => {
6496
+ const config = this.configuration();
6497
+ const value = this.#appliedFilter();
6498
+ const option = this.tableOption();
6499
+ if (!config || !value || !option || !this.queryBarMode())
6500
+ return [];
6501
+ const shown = new Set(leafColumns([...config.firstColumns, ...config.secondColumns]).map(column => column.field));
6502
+ return leafColumns(option.columns)
6503
+ .filter(column => !column.hidden &&
6504
+ !shown.has(column.field) &&
6505
+ (isRawFilterSet(value.columnFilter?.[column.field]) || isNoDataOperator(value.columnOperator?.[column.field])))
6506
+ .map(column => column.field);
6507
+ }, { equal: (a, b) => a.length === b.length && a.every((field, index) => field === b[index]) });
6508
+ /** Field của thanh và bảng tra nguồn; `undefined` khi không ở mode query-bar. */
6509
+ queryBarModel = computed(() => {
6510
+ if (!this.queryBarMode())
6511
+ return undefined;
6512
+ const option = this.tableOption();
6513
+ const config = this.configuration();
6514
+ if (!option || !config)
6515
+ return undefined;
6516
+ this.#filterRegisterRevision();
6517
+ const filter = option.filter ?? {};
6518
+ const hidden = new Set(this.#hiddenFilteredColumns());
6519
+ const fields = sdTableQueryFields({
6520
+ columns: [...config.firstColumns, ...leafColumns(option.columns).filter(column => hidden.has(column.field))],
6521
+ externalFilters: filter.externalFilters,
6522
+ quickSearch: this.quickSearchOption(),
6523
+ inlineExternal: this.#inlineExternal(),
6524
+ queryBar: filter.queryBar,
6525
+ hideColumns: filter.hideInlineFilter === true,
6526
+ labels: {
6527
+ filters: this.#i18n.t('core.component.table.query-bar.filters'),
6528
+ columns: this.#i18n.t('core.component.table.query-bar.columns'),
6529
+ },
6530
+ filterDefs: this.sdFilterDefs().map(def => def.sdTableFilterDef()),
6531
+ cacheValues: this.cacheValues,
6532
+ });
6533
+ return { ...fields, defaultColumnOperator: untracked(() => this.filterRegister?.value.default?.().columnOperator) };
6534
+ });
6535
+ /** Giá trị đã áp dụng khác default (so trên các field của thanh) — bật nút Xoá lọc. */
6536
+ #queryBarDirty = computed(() => {
6537
+ const ctx = this.queryBarModel();
6538
+ const value = this.#appliedFilter();
6539
+ const defaults = this.filterRegister?.value.default?.();
6540
+ if (!ctx || !value || !defaults)
6541
+ return false;
6542
+ const snapshot = (input) => {
6543
+ const query = tableFilterToQuery(input, ctx);
6544
+ return Utilities.canonicalStringify({
6545
+ filters: query.filters.map(filter => [filter.field, filter.operator, filter.data]),
6546
+ search: query.search ?? '',
6547
+ });
6548
+ };
6549
+ return snapshot(value) !== snapshot(defaults);
6550
+ });
6551
+ queryBarOption = computed(() => {
6552
+ const ctx = this.queryBarModel();
6553
+ const filter = this.tableOption()?.filter;
6554
+ if (!ctx || !filter)
6555
+ return undefined;
6556
+ const autoId = this.autoId();
6557
+ return {
6558
+ autoId: autoId ? `${autoId}-query-bar` : undefined,
6559
+ fields: ctx.fields,
6560
+ mode: filter.queryBar?.editor ?? 'popover',
6561
+ density: 'compact',
6562
+ showSearch: ctx.search,
6563
+ searchPlaceholder: this.quickSearchOption()?.placeholder,
6564
+ showOperatorOnChip: 'auto',
6565
+ applyOn: filter.manualFilter ? 'search' : 'commit',
6566
+ appearance: 'flush',
6567
+ onClearAll: this.#clearQueryBar,
6568
+ clearDisabled: !this.#queryBarDirty(),
6569
+ invalidHintId: this.queryBarHintId,
6570
+ };
6571
+ });
6572
+ /** Khoá thanh của các field đang lọc theo giá trị đã áp dụng — icon lọc ở header của chúng luôn hiện. */
6573
+ queryBarActiveKeys = computed(() => {
6574
+ const ctx = this.queryBarModel();
6575
+ const value = this.#appliedFilter();
6576
+ return ctx && value ? sdTableActiveQueryKeys(value, ctx) : new Set();
6577
+ });
6578
+ /** `aria-label` của icon lọc ở header: "Lọc theo …" / "Đang lọc theo …". */
6579
+ filterTriggerLabel(column, active) {
6580
+ const title = typeof column.title === 'string' ? column.title : column.title?.title || column.field;
6581
+ return this.#i18n.t(active ? 'core.component.table.filtering-by' : 'core.component.table.filter-by', { title });
6582
+ }
6583
+ /** Icon lọc ở header: mở chip của field trên thanh (tạo chip nếu chưa có); đóng popover thì focus về icon. */
6584
+ openQueryBarField(key, trigger) {
6585
+ this.queryBar()?.openField(key, trigger instanceof HTMLElement ? trigger : undefined);
6586
+ }
6587
+ /** Dòng nhắc dưới thanh: field bắt buộc còn rỗng, kể cả quick filter bị ẩn (vẫn chặn đọc). */
6588
+ queryBarHint = computed(() => {
6589
+ const labels = (this.queryBar()?.invalidFields() ?? []).map(field => field.label);
6590
+ const value = this.quickSearchValue();
6591
+ for (const item of this.quickSearchOption()?.filters ?? []) {
6592
+ const hidden = isSignal(item.hidden) ? item.hidden() : item.hidden;
6593
+ if (item.required && hidden && !hasQuickSearchValue(value.filters?.[item.field]))
6594
+ labels.push(item.title);
6595
+ }
6596
+ // why: external bắt buộc mà thanh không hiện được (custom, filterDef, exclude…) vẫn chặn đọc — phải nói ra.
6597
+ const sources = this.queryBarModel()?.sources;
6598
+ const external = this.#appliedFilter()?.externalFilter;
6599
+ for (const item of this.tableOption()?.filter?.externalFilters ?? []) {
6600
+ if (item.required && sources && !sources.has(`external:${item.field}`) && !isRawFilterSet(external?.[item.field])) {
6601
+ labels.push(item.title);
6602
+ }
6603
+ }
6604
+ return labels.length ? this.#i18n.t('core.component.query-bar.required', { label: labels.join(', ') }) : '';
6605
+ });
5402
6606
  key = Utilities.generateUuid();
5403
6607
  columnOperator = {};
5404
6608
  columnFilter = {};
@@ -5431,6 +6635,8 @@ class SdTable {
5431
6635
  #treeSearchActive = false;
5432
6636
  // 1. Private Services
5433
6637
  #ref = inject(ChangeDetectorRef);
6638
+ #zone = inject(NgZone);
6639
+ #injector = inject(Injector);
5434
6640
  #configService = inject(ConfigService);
5435
6641
  #gridFilterService = inject(SdTableFilterService);
5436
6642
  #notifyService = inject(SdNotifyService);
@@ -5484,7 +6690,107 @@ class SdTable {
5484
6690
  exportTitle = this.#tableExportService.exportTitle;
5485
6691
  // 2. Public & Optional Token
5486
6692
  tableConfiguration = inject(SD_TABLE_CONFIGURATION, { optional: true });
6693
+ #host = inject(ElementRef).nativeElement;
6694
+ #layout = inject(SD_TABLE_LAYOUT, { optional: true });
6695
+ /** Bảng chính của khung trang (sd-page-list): lấp phần chiều cao còn lại, giữ tối thiểu header + 5 dòng. */
6696
+ fill = computed(() => {
6697
+ const target = this.#layout?.fillTarget();
6698
+ return !!target && (target === this.#host || target.contains(this.#host));
6699
+ });
6700
+ /** External filter của bảng chính thu gọn khi khung trang đang ở chế độ màn thấp. */
6701
+ externalFilterCollapsedByDefault = computed(() => this.fill() && !!this.#layout?.externalFilterCollapsed());
5487
6702
  constructor() {
6703
+ // why: ở chế độ fill bảng co theo chỗ còn lại nhưng vùng dữ liệu giữ tối thiểu header + 5 dòng. Header cao khác
6704
+ // nhau (hàng filter dưới cột, header nhóm) và phần cố định của bảng (external filter, quick search, thanh chọn,
6705
+ // footer) đổi theo cấu hình, nên đo lại mỗi khi DOM của bảng đổi. min-height: auto không dùng được: nó lấy chiều
6706
+ // cao của toàn bộ dòng đang có chứ không phải 5 dòng.
6707
+ effect(onCleanup => {
6708
+ if (!this.fill())
6709
+ return;
6710
+ const host = this.#host;
6711
+ const sync = () => {
6712
+ const data = host.querySelector('.c-container > .c-table');
6713
+ const head = data?.querySelector('thead')?.offsetHeight ?? 0;
6714
+ const row = parseFloat(getComputedStyle(host).getPropertyValue('--mat-table-row-item-container-height')) || 36;
6715
+ const dataMin = head + 5 * row;
6716
+ const fixed = data ? host.offsetHeight - data.offsetHeight : 0;
6717
+ host.style.setProperty('--sd-table-fill-head', `${head}px`);
6718
+ host.style.setProperty('--sd-table-fill-min', `${fixed + dataMin}px`);
6719
+ };
6720
+ const observer = new MutationObserver(sync);
6721
+ observer.observe(host, { childList: true, subtree: true });
6722
+ // why: chiều cao phần cố định còn đổi mà không đổi DOM (class fill vừa gắn, chữ xuống dòng khi hẹp).
6723
+ const resize = typeof ResizeObserver === 'function' ? new ResizeObserver(sync) : null;
6724
+ resize?.observe(host);
6725
+ sync();
6726
+ onCleanup(() => {
6727
+ observer.disconnect();
6728
+ resize?.disconnect();
6729
+ host.style.removeProperty('--sd-table-fill-head');
6730
+ host.style.removeProperty('--sd-table-fill-min');
6731
+ });
6732
+ });
6733
+ // why: the loading layer follows `loading()` and the read schedule; the progress bar timer and the status
6734
+ // region only change on those transitions, so rows, settings and errors are read untracked.
6735
+ effect(() => {
6736
+ const loading = this.loading();
6737
+ const scheduled = this.#readScheduled();
6738
+ const view = this.loadingView();
6739
+ untracked(() => {
6740
+ const rows = this.items().length > 0;
6741
+ this.#refresh.update({ loading, scheduled, skeleton: view === 'skeleton', rows }, this.loadingSettings());
6742
+ if (view === 'skeleton' && loading)
6743
+ this.#skeletonHeld.set(true);
6744
+ else if (!scheduled || rows)
6745
+ this.#skeletonHeld.set(false);
6746
+ // why: "loading" is announced only once a read really runs, so a skeleton that resolves at once (column
6747
+ // lookups, synchronous local data) says nothing; it stays active through the debounce of a replacing read.
6748
+ const active = view !== 'none' && (loading || (this.#liveLoading && scheduled));
6749
+ // A new read clears an earlier "loaded N", so the virtual cursor never reads a count that is out of date.
6750
+ if (loading && !active && this.#liveMessage())
6751
+ this.#liveMessage.set('');
6752
+ this.#announceLoading(active);
6753
+ // why: measured before the skeleton renders, under the header that is already on screen, so the row
6754
+ // count is right in the first frame instead of jumping from 5.
6755
+ if (view === 'skeleton')
6756
+ this.#skeletonFill.set(this.#measureSkeletonFill());
6757
+ });
6758
+ });
6759
+ // why: the empty block has no live role (content inserted together with its region is not read reliably), so
6760
+ // the status region says it, also after a read too fast to show the loading layer. Defined after the loading
6761
+ // effect, which clears the region when a read starts, so the same text is read again for the next empty result.
6762
+ effect(() => {
6763
+ const key = this.#emptyKey();
6764
+ if (key)
6765
+ untracked(() => this.#liveMessage.set(this.#i18n.t(key)));
6766
+ });
6767
+ // why: the progress bar sits in .c-container (so it does not scroll sideways with the table) right under the
6768
+ // last header row; that row's bottom depends on grouped headers, the filter row and wrapping titles. Only
6769
+ // measured while the bar shows.
6770
+ effect(onCleanup => {
6771
+ if (this.loadingView() !== 'refresh' || this.mobileCards())
6772
+ return;
6773
+ const host = this.#host;
6774
+ let resize = null;
6775
+ const measure = () => {
6776
+ const data = host.querySelector('.c-container > .c-table');
6777
+ const head = data?.querySelector(':scope > table > thead');
6778
+ if (!data || !head)
6779
+ return false;
6780
+ const sync = () => host.style.setProperty('--sd-table-head-h', `${data.offsetTop + head.offsetHeight}px`);
6781
+ resize = typeof ResizeObserver === 'function' ? new ResizeObserver(sync) : null;
6782
+ resize?.observe(head);
6783
+ sync();
6784
+ return true;
6785
+ };
6786
+ // why: right after a mobile → desktop switch the table is not in the DOM yet when this runs.
6787
+ const later = measure() ? undefined : afterNextRender(() => void measure(), { injector: this.#injector });
6788
+ onCleanup(() => {
6789
+ later?.destroy();
6790
+ resize?.disconnect();
6791
+ host.style.removeProperty('--sd-table-head-h');
6792
+ });
6793
+ });
5488
6794
  effect(() => {
5489
6795
  const option = this.option();
5490
6796
  if (option) {
@@ -5498,8 +6804,10 @@ class SdTable {
5498
6804
  this.tableOption.set(initOpt);
5499
6805
  this.#loadCompleted = false;
5500
6806
  const storage = this.#configService.init(initOpt);
6807
+ this.#configStorage = storage;
5501
6808
  this.#configurationSubscription?.unsubscribe();
5502
6809
  this.#configurationSubscription = storage.observer.subscribe(configuration => {
6810
+ this.#configuredTable.set(configuration);
5503
6811
  const configurationRevision = ++this.#configurationRevision;
5504
6812
  const valid = () => !this.#destroyed &&
5505
6813
  optionRevision === this.#optionRevision &&
@@ -5530,6 +6838,39 @@ class SdTable {
5530
6838
  this.filterRegister.value.set({ quickSearch: { ...current, filters } });
5531
6839
  });
5532
6840
  });
6841
+ // Query bar: field đổi (cột, inlineExternal, ngôn ngữ) thì đồng bộ lại; vừa vào mode (desktop) thì dựng lại từ raw.
6842
+ effect(() => {
6843
+ const ctx = this.queryBarModel();
6844
+ untracked(() => {
6845
+ if (!ctx) {
6846
+ this.#barActive = false;
6847
+ return;
6848
+ }
6849
+ if (!this.filterRegister)
6850
+ return;
6851
+ const rebuild = !this.#barActive;
6852
+ this.#barActive = true;
6853
+ this.#syncQueryBar(this.filterRegister.value.get(), rebuild);
6854
+ });
6855
+ });
6856
+ // Query bar: raw đổi trong lúc popover đang mở / chip đang dựng thì hoãn; đóng xong mới đồng bộ.
6857
+ effect(() => {
6858
+ const bar = this.queryBar();
6859
+ if (bar && (bar.editingIndex() !== null || bar.building()))
6860
+ return;
6861
+ untracked(() => {
6862
+ if (this.#barPending && this.filterRegister)
6863
+ this.#syncQueryBar(this.filterRegister.value.get(), false);
6864
+ });
6865
+ });
6866
+ // Query bar: field không lên được thanh vẫn gửi giá trị — báo cho dev một lần mỗi bảng.
6867
+ effect(() => {
6868
+ const excluded = this.queryBarModel()?.excluded;
6869
+ if (!excluded?.length || this.#barWarned || !isDevMode())
6870
+ return;
6871
+ this.#barWarned = true;
6872
+ console.warn('[sd-table] filter.mode "query-bar": these filters are not on the query bar. Their values are still sent; keep filter.mode "default" if users must edit them.', excluded);
6873
+ });
5533
6874
  effect(onCleanup => {
5534
6875
  const paginator = this.paginator();
5535
6876
  if (paginator) {
@@ -5567,6 +6908,8 @@ class SdTable {
5567
6908
  items.forEach((item, idx) => this.#itemIndexMap.set(item, idx));
5568
6909
  });
5569
6910
  this.#subscription.add(this.#configService.widthChange$.subscribe(({ field, width }) => {
6911
+ // why: persistColumnWidth ghi storage im lặng (observer không phát) nên đọc lại để chấm trên nút Thiết lập bật.
6912
+ this.#configuredTable.set(this.#configStorage?.get());
5570
6913
  // Update configuration signal local — KHÔNG gọi loadValues/reload
5571
6914
  const conf = this.configuration();
5572
6915
  if (!conf)
@@ -5612,12 +6955,56 @@ class SdTable {
5612
6955
  }
5613
6956
  ngOnDestroy() {
5614
6957
  this.#destroyed = true;
6958
+ this.#refresh.destroy();
5615
6959
  this.#cancelReload();
5616
6960
  this.#retryConfiguration = undefined;
5617
6961
  this.#read.invalidate();
5618
6962
  this.#failedRead = undefined;
5619
6963
  this.#subscription.unsubscribe();
5620
6964
  }
6965
+ /**
6966
+ * "Loading" when the loading layer shows; once the read ends, the row count, or the text of the empty block.
6967
+ * The default error region announces itself (`role="alert"`), so the region is cleared; a custom
6968
+ * `sdDataStateTemplate` may have no role, so the region reads the error. Reads faster than `showDelay` announce
6969
+ * only an empty result (see the empty effect).
6970
+ */
6971
+ #announceLoading(active) {
6972
+ if (active === this.#liveLoading)
6973
+ return;
6974
+ this.#liveLoading = active;
6975
+ if (active) {
6976
+ this.#liveMessage.set(this.#i18n.t('core.component.table.loading'));
6977
+ return;
6978
+ }
6979
+ // Rows on screen: a tree also shows the children of its expanded rows.
6980
+ const count = this.tableOption()?.tree ? countVisibleTreeRows(this.items()) : this.items().length;
6981
+ const failed = this.readState().status === 'error' || this.loadError();
6982
+ if (count)
6983
+ this.#liveMessage.set(this.#i18n.t(count === 1 ? 'core.component.table.loaded-one' : 'core.component.table.loaded', { count }));
6984
+ else if (failed && !!this.dataStateTemplate() && !this.hideReadError())
6985
+ this.#liveMessage.set(this.#i18n.t('core.component.table.error-occurred'));
6986
+ else {
6987
+ const empty = this.#emptyKey();
6988
+ this.#liveMessage.set(empty ? this.#i18n.t(empty) : '');
6989
+ }
6990
+ }
6991
+ /** Skeleton rows that fill a table with a fixed height (fill mode, `style.maxHeight`); `undefined` otherwise. */
6992
+ #measureSkeletonFill() {
6993
+ const option = this.tableOption();
6994
+ const fill = this.fill();
6995
+ if ((!fill && !option?.style?.maxHeight) || this.mobileCards())
6996
+ return undefined;
6997
+ const data = this.#host.querySelector('.c-container > .c-table');
6998
+ if (!data)
6999
+ return undefined;
7000
+ // A percentage max-height resolves to a percentage, not pixels: fall back to the default count.
7001
+ const box = fill ? data.clientHeight : pixelLength(getComputedStyle(data).maxHeight);
7002
+ if (box === undefined)
7003
+ return undefined;
7004
+ const head = data.querySelector(':scope > table > thead')?.offsetHeight ?? 0;
7005
+ const row = parseFloat(getComputedStyle(this.#host).getPropertyValue('--mat-table-row-item-container-height')) || 36;
7006
+ return skeletonFillRows(box - head, row, option?.paginate?.pageSize);
7007
+ }
5621
7008
  // --- GIỮ NGUYÊN TẤT CẢ CÁC HÀM FILTER VÀ EXPORT CŨ CỦA BẠN ---
5622
7009
  #filterExportInfo = (pageNumber, pageSize) => {
5623
7010
  const { columnOperator, columnFilter, externalFilter, quickSearch } = this.filterRegister.value.get();
@@ -5709,8 +7096,20 @@ class SdTable {
5709
7096
  this.#configurationSubscription = undefined;
5710
7097
  this.#filterRegisterSubscription?.unsubscribe();
5711
7098
  this.#filterRegisterSubscription = undefined;
7099
+ this.#filterConfigurationSubscription?.unsubscribe();
7100
+ this.#filterConfigurationSubscription = undefined;
5712
7101
  this.filterRegister = undefined;
5713
7102
  this.quickSearchValue.set({ term: '', filters: {} });
7103
+ this.#appliedFilter.set(undefined);
7104
+ this.#inlineExternal.set({});
7105
+ this.#inlineExternalSetup.set(undefined);
7106
+ this.#barDerived = [];
7107
+ this.barFilters.set([]);
7108
+ this.#barWritten = this.barFilters();
7109
+ this.barSearch.set('');
7110
+ this.#barTerm = undefined;
7111
+ this.#barActive = false;
7112
+ this.#barPending = false;
5714
7113
  this.#tableId = Utilities.generateUuid();
5715
7114
  this.key = Utilities.generateUuid();
5716
7115
  this.#loadCompleted = false;
@@ -5765,7 +7164,14 @@ class SdTable {
5765
7164
  option.filter.manualFilter = option?.filter?.manualFilter ?? this.tableConfiguration?.filter?.manualFilter;
5766
7165
  option.filter.hideExternalFilterToolbar =
5767
7166
  option?.filter?.hideExternalFilterToolbar ?? this.tableConfiguration?.filter?.hideExternalFilterToolbar;
5768
- for (const column of option.columns || []) {
7167
+ // why: chỉ ghi khi configuration có giá trị — bảng không dùng mode mới giữ nguyên object filter của consumer.
7168
+ const filterConfiguration = this.tableConfiguration?.filter;
7169
+ if (option.filter.mode === undefined && filterConfiguration?.mode)
7170
+ option.filter.mode = filterConfiguration.mode;
7171
+ if (filterConfiguration?.queryBar)
7172
+ option.filter.queryBar = { ...filterConfiguration.queryBar, ...option.filter.queryBar };
7173
+ // why: cột con của header nhóm cũng có filter và operator riêng.
7174
+ for (const column of leafColumns(option.columns)) {
5769
7175
  if (column.filter?.operator?.enable) {
5770
7176
  if (!column.filter?.operator?.list?.length) {
5771
7177
  column.filter.operator.list = this.tableConfiguration?.filter?.operator?.list?.[column.type] || [];
@@ -5796,7 +7202,8 @@ class SdTable {
5796
7202
  // why: lookup cũ có thể hoàn tất sau cấu hình/scope mới; chỉ commit cache của lần hydrate còn hiệu lực.
5797
7203
  const values = cloneReadRequest(this.cacheValues);
5798
7204
  const objectValues = cloneReadRequest(this.#cacheObjValues);
5799
- await this.#tableFormatService.loadValues(option.columns.filter(column => result.displayedColumns.includes(column.field)), values, objectValues);
7205
+ // why: cột lá — cột `values` nằm dưới header nhóm (`type: 'children'`) cũng cần danh sách để hiện nhãn và để lọc.
7206
+ await this.#tableFormatService.loadValues(leafColumns(option.columns).filter(column => result.displayedColumns.includes(column.field)), values, objectValues);
5800
7207
  if (!valid())
5801
7208
  return;
5802
7209
  this.cacheValues = values;
@@ -5837,11 +7244,22 @@ class SdTable {
5837
7244
  columnOperator: this.columnOperator,
5838
7245
  force: true,
5839
7246
  });
7247
+ // Query bar: chip ghim theo inlineExternal (người dùng đổi ở mode default). Đăng ký trước value để lần đồng bộ đầu
7248
+ // đã có giá trị này.
7249
+ this.#filterConfigurationSubscription?.unsubscribe();
7250
+ this.#filterConfigurationSubscription = this.filterRegister.configuration.observer.subscribe(configuration => {
7251
+ this.#inlineExternal.set(configuration.inlineExternal || {});
7252
+ this.#inlineExternalSetup.set(configuration.inlineExternal || {});
7253
+ });
7254
+ this.#subscription.add(this.#filterConfigurationSubscription);
5840
7255
  this.#filterRegisterSubscription?.unsubscribe();
5841
7256
  this.#filterRegisterSubscription = this.filterRegister.value.observer.subscribe(value => {
5842
7257
  this.quickSearchValue.set(value.quickSearch || { term: '', filters: {} });
5843
7258
  this.columnOperator = value.columnOperator || {};
5844
7259
  this.#syncColumnFilterInPlace(value.columnFilter || {});
7260
+ this.#appliedFilter.set(value);
7261
+ // why: lần phát do thanh áp dụng thì dựng lại thanh từ raw (nháp đã nằm trong raw); lần phát từ ngoài thì giữ nháp.
7262
+ this.#syncQueryBar(value, this.#barApplying);
5845
7263
  // why: hydrate ban đầu và onFilter chuẩn bị chính request hiện tại; không phát lịch đọc tự hủy nhánh đang chờ render.
5846
7264
  if (!this.#configurationReady)
5847
7265
  return;
@@ -5947,6 +7365,15 @@ class SdTable {
5947
7365
  }
5948
7366
  return false;
5949
7367
  };
7368
+ /**
7369
+ * External filter `required` có giá trị chưa. Mode default đọc form của `ExternalFilterComponent` như trước; mode
7370
+ * query-bar không có form đó nên kiểm tra trên giá trị đã áp dụng.
7371
+ */
7372
+ #externalFilterValid = (filterReq) => {
7373
+ if (!this.queryBarMode())
7374
+ return !this.externalFilter()?.form?.invalid;
7375
+ return (this.tableOption()?.filter?.externalFilters ?? []).every(item => !item.required || isRawFilterSet(filterReq.rawExternalFilter?.[item.field]));
7376
+ };
5950
7377
  #checkFilter = (filterReq) => {
5951
7378
  this.isFiltered.set(this.#isFiltered(filterReq));
5952
7379
  this.requireFiltered.set(!!this.tableOption()?.filter?.externalFilters?.some(e => e.required) || !this.quickSearchValid());
@@ -5970,7 +7397,7 @@ class SdTable {
5970
7397
  try {
5971
7398
  try {
5972
7399
  onFilter?.(filterReq, {
5973
- externalFilterValid: !this.externalFilter()?.form?.invalid,
7400
+ externalFilterValid: this.#externalFilterValid(filterReq),
5974
7401
  quickSearchValid: validQuickSearch,
5975
7402
  });
5976
7403
  }
@@ -5987,7 +7414,7 @@ class SdTable {
5987
7414
  // why: onFilter có thể hydrate tenant/filter từ URL trước khi chụp snapshot; kiểm tra giá trị đã áp dụng.
5988
7415
  validQuickSearch = quickSearchValid(this.quickSearchOption(), filterReq.quickSearch);
5989
7416
  this.#checkFilter(filterReq);
5990
- if (this.externalFilter()?.form?.invalid || !validQuickSearch) {
7417
+ if (!this.#externalFilterValid(filterReq) || !validQuickSearch) {
5991
7418
  this.#read.invalidate();
5992
7419
  this.#failedRead = undefined;
5993
7420
  this.loading.set(false);
@@ -6298,6 +7725,16 @@ class SdTable {
6298
7725
  fetchChunk: (pageNumber, pageSize) => this.#exportedItems(pageNumber, pageSize),
6299
7726
  };
6300
7727
  };
7728
+ /**
7729
+ * Reads the first page again with the current filters and sort. For a condition the table does not own (status
7730
+ * tabs, score cards above the table): changing it must restart paging, as a filter of the table does.
7731
+ */
7732
+ reloadFirstPage = async () => {
7733
+ if (this.paginator())
7734
+ this.paginator().pageIndex = 0;
7735
+ this.#resetUnknownTotalPage();
7736
+ await this.reload(true, true);
7737
+ };
6301
7738
  exportExcel = (columns) => {
6302
7739
  this.#tableExportService.exportExcel(this.#createExportContext(), columns);
6303
7740
  };
@@ -6422,6 +7859,105 @@ class SdTable {
6422
7859
  onQuickSearchChange = (value) => {
6423
7860
  this.filterRegister.value.set({ quickSearch: value });
6424
7861
  };
7862
+ /**
7863
+ * Query bar `(apply)`: ghi cả thanh vào filter register trong một lần `value.set`, rồi gọi callback của các filter
7864
+ * vừa đổi như control mặc định. Reload, cache, `filtered` đi đường cũ.
7865
+ */
7866
+ onQueryBarApply = (query) => {
7867
+ const ctx = this.queryBarModel();
7868
+ if (!ctx || !this.filterRegister)
7869
+ return;
7870
+ const current = this.filterRegister.value.get();
7871
+ // why: lần áp dụng do đổi chip bỏ qua chữ đang gõ dở trong ô tìm (thanh gửi từ khoá cũ) — giữ từ khoá đã áp dụng, như
7872
+ // quick search ở mode mặc định, và để nguyên chữ đang gõ trong ô.
7873
+ const typing = ctx.search && (query.search ?? '') !== untracked(() => this.barSearch());
7874
+ const applied = typing ? { ...query, search: current.quickSearch?.term ?? '' } : query;
7875
+ const { patch, changed } = queryToTableFilter(applied, ctx, current);
7876
+ const termChanged = (patch.quickSearch?.term ?? '') !== (current.quickSearch?.term ?? '');
7877
+ // why: như column-filter — đổi toán tử của cột đang trống (không phải NULL / NOT_NULL) chỉ lưu, không đọc lại.
7878
+ const silent = !termChanged &&
7879
+ changed.length > 0 &&
7880
+ changed.every(change => {
7881
+ const field = ctx.sources.get(change.key)?.field ?? '';
7882
+ return (!change.valueChanged &&
7883
+ !isNoDataOperator(change.operator) &&
7884
+ !isNoDataOperator(current.columnOperator?.[field]) &&
7885
+ !isRawFilterSet(change.value));
7886
+ });
7887
+ this.#barApplying = true;
7888
+ this.#barKeepSearch = !!typing;
7889
+ try {
7890
+ this.filterRegister.value.set(silent ? { ...patch, notReload: true } : patch);
7891
+ }
7892
+ finally {
7893
+ this.#barApplying = false;
7894
+ this.#barKeepSearch = false;
7895
+ }
7896
+ this.#runQueryBarCallbacks(changed, ctx);
7897
+ };
7898
+ /** `filter.onChange` / `operatorChange` của cột, `onChange` của external và quick filter — chỉ khi người dùng đổi. */
7899
+ #runQueryBarCallbacks = (changed, ctx) => {
7900
+ const filter = this.tableOption()?.filter;
7901
+ for (const change of changed) {
7902
+ const source = ctx.sources.get(change.key);
7903
+ if (!source)
7904
+ continue;
7905
+ if (source.column) {
7906
+ if (change.operator)
7907
+ filter?.operatorChange?.(source.column, change.operator);
7908
+ if (change.valueChanged)
7909
+ source.column.filter?.onChange?.(change.value, source.column, this.columnFilter);
7910
+ }
7911
+ else if (change.valueChanged) {
7912
+ if (source.external)
7913
+ source.external.onChange?.(change.value);
7914
+ else
7915
+ source.quick?.onChange?.(change.value);
7916
+ }
7917
+ }
7918
+ };
7919
+ /** Nút Xoá lọc của thanh: về giá trị default như nút xoá của external filter, đọc lại một lần. */
7920
+ #clearQueryBar = () => {
7921
+ if (!this.filterRegister)
7922
+ return;
7923
+ this.#barApplying = true;
7924
+ try {
7925
+ this.clearFilter();
7926
+ }
7927
+ finally {
7928
+ this.#barApplying = false;
7929
+ }
7930
+ this.tableOption()?.filter?.onClearFilter?.();
7931
+ };
7932
+ /**
7933
+ * Raw → thanh. Không đặt lại `barFilters` khi kết quả y hệt (chip giữ identity, không vòng lặp: thanh chỉ phát
7934
+ * `apply` khi người dùng thao tác). Đang mở popover / dựng chip thì hoãn tới khi đóng.
7935
+ */
7936
+ #syncQueryBar = (value, rebuild) => {
7937
+ const ctx = untracked(() => this.queryBarModel());
7938
+ if (!ctx)
7939
+ return;
7940
+ const bar = untracked(() => this.queryBar());
7941
+ if (bar && untracked(() => bar.editingIndex() !== null || !!bar.building())) {
7942
+ this.#barPending = true;
7943
+ return;
7944
+ }
7945
+ this.#barPending = false;
7946
+ const draft = untracked(() => this.barFilters());
7947
+ const derived = tableFilterToQuery(value, ctx, draft).filters;
7948
+ // why: thanh còn nháp (manualFilter, hoặc chip sửa trong lúc raw đổi từ ngoài) thì chỉ field đổi từ ngoài mới lấy raw.
7949
+ const next = !rebuild && draft !== this.#barWritten ? mergeQueryDraft(draft, this.#barDerived, derived) : derived;
7950
+ this.#barDerived = derived;
7951
+ if (next.length !== draft.length || next.some((filter, index) => filter !== draft[index]))
7952
+ this.barFilters.set(next);
7953
+ this.#barWritten = untracked(() => this.barFilters());
7954
+ const term = value.quickSearch?.term ?? '';
7955
+ // why: chỉ đẩy từ khoá khi từ khoá đã áp dụng đổi — không xoá phần đang gõ dở khi chip khác đổi.
7956
+ if ((rebuild && !this.#barKeepSearch) || term !== this.#barTerm) {
7957
+ this.#barTerm = term;
7958
+ this.barSearch.set(term);
7959
+ }
7960
+ };
6425
7961
  // Blur input filter: chỉ commit giá trị vào filterRegister, KHÔNG trigger reload.
6426
7962
  // Reload chỉ chạy khi user enter hoặc bấm nút tải lại.
6427
7963
  onFilterCommit = () => {
@@ -6733,6 +8269,10 @@ class SdTable {
6733
8269
  this.#updateSelectedItems();
6734
8270
  this.#syncSelectAllState();
6735
8271
  };
8272
+ /** Restore defaults in the settings modal also puts the inline external filters back to `defaultShowing`. */
8273
+ onConfigDefaultsRestored = () => {
8274
+ this.filterRegister?.configuration.remove();
8275
+ };
6736
8276
  onColumnResize = (field, width) => {
6737
8277
  // persistColumnWidth ghi storage (silent) và emit widthChange$,
6738
8278
  // subscriber trong constructor đã update configuration() signal đồng bộ.
@@ -6815,7 +8355,7 @@ class SdTable {
6815
8355
  this.#refreshAggregate();
6816
8356
  }
6817
8357
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: SdTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
6818
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTable, isStandalone: true, selector: "sd-table", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, hideReadError: { classPropertyName: "hideReadError", publicName: "hideReadError", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdReadStateChange: "sdReadStateChange" }, host: { attributes: { "tabindex": "0" }, properties: { "attr.data-autoid": "autoId()", "attr.data-loading": "loading() ? \"true\" : \"false\"" } }, providers: [
8358
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: SdTable, isStandalone: true, selector: "sd-table", inputs: { autoIdInput: { classPropertyName: "autoIdInput", publicName: "autoId", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: true, transformFunction: null }, hideReadError: { classPropertyName: "hideReadError", publicName: "hideReadError", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sdReadStateChange: "sdReadStateChange" }, host: { attributes: { "tabindex": "0" }, properties: { "attr.data-autoid": "autoId()", "attr.data-loading": "loading() ? \"true\" : \"false\"", "attr.data-loading-view": "loadingView()", "attr.data-filter-mode": "effectiveFilterMode()", "class.sd-table--fill": "fill()" } }, providers: [
6819
8359
  DatePipe,
6820
8360
  DecimalPipe,
6821
8361
  CdkColumnDef,
@@ -6827,7 +8367,7 @@ class SdTable {
6827
8367
  provide: MatPaginatorIntl,
6828
8368
  useClass: SdTablePaginatorIntl,
6829
8369
  },
6830
- ], queries: [{ propertyName: "dataStateTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }, { propertyName: "sdSubInformation", first: true, predicate: SdTableExpandDefDirective, descendants: true, isSignal: true }, { propertyName: "sdGroupDef", first: true, predicate: SdTableGroupDefDirective, descendants: true, isSignal: true }, { propertyName: "sdCellDefs", predicate: SdTableCellDefDirective, isSignal: true }, { propertyName: "sdCommandHeaderDef", first: true, predicate: SdTableCommandHeaderDefDirective, descendants: true, isSignal: true }, { propertyName: "sdQuickSearchRightDef", first: true, predicate: SdTableQuickSearchRightDefDirective, descendants: true, isSignal: true }, { propertyName: "sdFooterDefs", predicate: SdMaterialFooterDefDirective, isSignal: true }, { propertyName: "sdFilterDefs", predicate: SdTableFilterDefDirective, isSignal: true }, { propertyName: "sdTitleDefs", predicate: SdTableTitleDefDirective, isSignal: true }, { propertyName: "sdRowMobileDef", first: true, predicate: SdTableRowMobileDefDirective, isSignal: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "configComponent", first: true, predicate: ConfigComponent, descendants: true, isSignal: true }, { propertyName: "sdPopupExport", first: true, predicate: SdPopupExport, descendants: true, isSignal: true }, { propertyName: "scroll", first: true, predicate: SdScrollDirective, descendants: true, isSignal: true }, { propertyName: "quickAction", first: true, predicate: SdQuickAction, descendants: true, isSignal: true }, { propertyName: "externalFilter", first: true, predicate: ExternalFilterComponent, descendants: true, isSignal: true }, { propertyName: "mobileFilter", first: true, predicate: MobileFilterComponent, descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "quickSearchControl", first: true, predicate: TableQuickSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && knownRowCount()! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @if (_tree.isExpanding) {\n <span class=\"lds-ring sd-tree-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </span>\n } @else {\n @let _aid = _autoId;\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: b\u1EA3ng t\u1EA3i d\u1EEF li\u1EC7u B\u1EA4T \u0110\u1ED2NG B\u1ED8 nh\u01B0ng tr\u01B0\u1EDBc \u0111\u00E2y ch\u1EC9 c\u00F3 spinner thu\u1EA7n h\u00ECnh \u1EA3nh \u2014 screen\n reader kh\u00F4ng \u0111\u01B0\u1EE3c b\u00E1o g\u00EC c\u1EA3. role=\"status\" + aria-live=\"polite\" \u0111\u1ECDc tr\u1EA1ng th\u00E1i ngay khi\n spinner xu\u1EA5t hi\u1EC7n; aria-busy tr\u00EAn v\u00F9ng b\u1EA3ng cho bi\u1EBFt n\u1ED9i dung \u0111ang \u0111\u01B0\u1EE3c thay th\u1EBF. -->\n @if (_loading) {\n <div class=\"c-loading\" role=\"status\" aria-live=\"polite\" [attr.aria-label]=\"'core.component.table.loading' | sdTranslate\">\n <mat-spinner></mat-spinner>\n </div>\n }\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.meta.expand?.isExpanding && !_tableOption.expand?.always) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n @if (element.meta.expand?.isExpanding) {\n <div class=\"lds-ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length;\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <div class=\"c-no-data-row\" role=\"alert\">\n <p>{{ 'core.component.table.error-occurred' | sdTranslate }}</p>\n <sd-button [title]=\"'core.component.table.reload' | sdTranslate\" (click)=\"reload()\"></sd-button>\n </div>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). -->\n <div class=\"c-no-data-row\" role=\"status\" aria-live=\"polite\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let _unknownTotalPager = unknownTotalPager();\n @if (_unknownTotalPager) {\n <!-- paginate.total 'unknown': no total exists, so mat-paginator (which derives Next/Last and the\n range from `length`) is replaced by a pager that renders only the rows actually shown. -->\n @if (!_tableOption.paginate?.hidden && unknownTotalPagerVisible()) {\n <sd-table-unknown-total-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [state]=\"_unknownTotalPager\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages\"\n [hidePageSize]=\"_isMobile || !!_tableOption.paginate?.hidePageSize\"\n [showFirstButton]=\"!_isMobile && !!_tableOption.paginate?.showFirstLastButtons\"\n [autoId]=\"_autoId\"\n (page)=\"onUnknownTotalPage($event)\"></sd-table-unknown-total-paginator>\n } @else if (!_isMobile && !_tableOption.paginate?.hidden && unknownTotalSingleCount()) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ unknownTotalSingleCount() }}</span>\n </div>\n }\n } @else {\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-loading{position:absolute;inset:0 0 56px;background:#00000026;z-index:2;display:flex;align-items:center;justify-content:center}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:var(--sd-shadow-sm)}:host .lds-ring{display:inline-block;position:relative;width:40px;height:40px}:host .lds-ring div{box-sizing:border-box;display:block;position:absolute;width:32px;height:32px;margin:4px;border:4px solid var(--sd-table-spinner, #cceeff);border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--sd-table-spinner, #cceeff) transparent transparent transparent}:host .lds-ring div:nth-child(1){animation-delay:-.45s}:host .lds-ring div:nth-child(2){animation-delay:-.3s}:host .lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:var(--sd-text-muted);display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .c-container:not(.sd-table-mobile)>.c-loading{border-radius:6px 6px 0 0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{position:relative;padding-right:24px}:host ::ng-deep th[aria-sort] .sd-table-sort-header:after{content:\"\";position:absolute;top:50%;right:0;width:16px;height:16px;transform:translateY(-50%);background-color:var(--sd-text-secondary);mask-repeat:no-repeat;mask-position:center;mask-size:16px 16px;pointer-events:none}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after,:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{background-color:var(--sd-text)}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--outlined .mat-mdc-form-field-infix,:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:2px;padding-bottom:2px;min-height:32px}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select mat-select{margin-top:2px!important}:host ::ng-deep .cdk-drag-preview{box-shadow:var(--sd-shadow-md);background:var(--sd-table-bg);display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host ::ng-deep .sd-tree-spinner{transform:scale(.45)}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-loading{border-top-left-radius:0;border-top-right-radius:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdDataState, selector: "sd-data-state", inputs: ["state", "title", "message", "icon", "fontSet", "iconShape", "retryable", "retryLabel", "actionLabel", "compact", "fullPage"], outputs: ["sdRetry", "sdAction"] }, { kind: "directive", type: SdDataStateTemplateDirective, selector: "ng-template[sdDataStateTemplate]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3$3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i6.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: DesktopCommand, selector: "desktop-command", inputs: ["autoId", "item", "itemIndex", "commands"] }, { kind: "component", type: DesktopCellComponent, selector: "desktop-cell", inputs: ["column", "item", "cellDef"] }, { kind: "component", type: ColumnTitleComponent, selector: "column-title", inputs: ["column", "titleDef"] }, { kind: "component", type: ExternalFilterComponent, selector: "external-filter", inputs: ["autoId", "filter", "externalFilters", "filterRegister"] }, { kind: "component", type: TableQuickSearchComponent, selector: "sd-table-quick-search", inputs: ["option", "value", "autoId", "rightTemplate"], outputs: ["valueChange"] }, { kind: "component", type: ConfigComponent, selector: "config", inputs: ["autoId", "tableOption"], outputs: ["changes"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: MobileFilterComponent, selector: "mobile-filter", inputs: ["autoId", "filter", "externalFilters", "columns", "filterDefs", "filterRegister", "cacheValues"] }, { kind: "pipe", type: SdGroupPipe, name: "sdGroup" }, { kind: "pipe", type: SdTreePipe, name: "sdTree" }, { kind: "pipe", type: SdAggregateRowsPipe, name: "sdAggregateRows" }, { kind: "directive", type: SdAggregateLayoutDirective, selector: "table[sdAggregateLayout]" }, { kind: "directive", type: SdTableFooterRowDefDirective, selector: "[sdTableFooterRowDef]", inputs: ["sdTableFooterRowDef", "sdTableFooterRowDefSticky"] }, { kind: "directive", type: SdScrollDirective, selector: "[sdScroll]" }, { kind: "directive", type: SdHoverCopyDirective, selector: "[sdHoverCopy]", inputs: ["sdHoverCopy", "sdHoverCopyDisabled"] }, { kind: "component", type: SelectorActionComponent, selector: "selector-action", inputs: ["autoId", "tableOption", "selectedTableItems"], outputs: ["clear"] }, { kind: "directive", type: StickyShadowDirective, selector: "[stickyShadow]" }, { kind: "directive", type: SdColumnResizeDirective, selector: "[sdColumnResize]", inputs: ["sdColumnResize", "minWidth", "maxWidth"], outputs: ["resizeEnd"] }, { kind: "directive", type: SdTableSortHeaderDirective, selector: "[sdTableSortHeader]", inputs: ["sdTableSortHeader"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdTableMobileCardsComponent, selector: "sd-table-mobile-cards", inputs: ["table", "rows", "dataRows", "aggregateTemplate", "groupTemplate"] }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }, { kind: "component", type: SdTableUnknownTotalPaginator, selector: "sd-table-unknown-total-paginator", inputs: ["state", "pageSizeOptions", "hidePageSize", "showFirstButton", "autoId"], outputs: ["page"] }], animations: [
8370
+ ], queries: [{ propertyName: "dataStateTemplate", first: true, predicate: SdDataStateTemplateDirective, descendants: true, isSignal: true }, { propertyName: "sdSubInformation", first: true, predicate: SdTableExpandDefDirective, descendants: true, isSignal: true }, { propertyName: "sdGroupDef", first: true, predicate: SdTableGroupDefDirective, descendants: true, isSignal: true }, { propertyName: "sdCellDefs", predicate: SdTableCellDefDirective, isSignal: true }, { propertyName: "sdCommandHeaderDef", first: true, predicate: SdTableCommandHeaderDefDirective, descendants: true, isSignal: true }, { propertyName: "sdQuickSearchRightDef", first: true, predicate: SdTableQuickSearchRightDefDirective, descendants: true, isSignal: true }, { propertyName: "sdFooterDefs", predicate: SdMaterialFooterDefDirective, isSignal: true }, { propertyName: "sdFilterDefs", predicate: SdTableFilterDefDirective, isSignal: true }, { propertyName: "sdTitleDefs", predicate: SdTableTitleDefDirective, isSignal: true }, { propertyName: "sdRowMobileDef", first: true, predicate: SdTableRowMobileDefDirective, isSignal: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true, isSignal: true }, { propertyName: "configComponent", first: true, predicate: ConfigComponent, descendants: true, isSignal: true }, { propertyName: "sdPopupExport", first: true, predicate: SdPopupExport, descendants: true, isSignal: true }, { propertyName: "scroll", first: true, predicate: SdScrollDirective, descendants: true, isSignal: true }, { propertyName: "quickAction", first: true, predicate: SdQuickAction, descendants: true, isSignal: true }, { propertyName: "externalFilter", first: true, predicate: ExternalFilterComponent, descendants: true, isSignal: true }, { propertyName: "mobileFilter", first: true, predicate: MobileFilterComponent, descendants: true, isSignal: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "quickSearchControl", first: true, predicate: TableQuickSearchComponent, descendants: true, isSignal: true }, { propertyName: "queryBar", first: true, predicate: SdQueryBar, descendants: true, isSignal: true }], ngImport: i0, template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _loadingView = loadingView();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _queryBarMode = queryBarMode();\n@let _queryBarKeys = queryBarModel()?.columnKeys;\n@let _queryBarActive = queryBarActiveKeys();\n@let _showInlineFilter =\n !_queryBarMode &&\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && knownRowCount()! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n<!-- why: v\u00F9ng status lu\u00F4n c\u00F3 trong DOM, k\u1EC3 c\u1EA3 tr\u01B0\u1EDBc khi c\u00F3 configuration. V\u00F9ng ch\u1EC9 render trong l\u00FAc t\u1EA3i b\u1ECB g\u1EE1\n tr\u01B0\u1EDBc khi screen reader k\u1ECBp \u0111\u1ECDc v\u00E0 kh\u00F4ng b\u00E1o \u0111\u01B0\u1EE3c \"\u0111\u00E3 t\u1EA3i xong\". -->\n<span class=\"sd-table-live\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveMessage() }}</span>\n@if (_configuration) {\n @if (!_queryBarMode && !_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [collapsedByDefault]=\"externalFilterCollapsedByDefault()\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <!-- Icon l\u1ECDc \u1EDF header c\u1ED9t (mode query-bar): m\u1EDF chip c\u1EE7a field tr\u00EAn thanh. why: n\u1EB1m c\u1EA1nh .c-header-title ch\u1EE9 kh\u00F4ng\n n\u1EB1m trong \u2014 title sort \u0111\u01B0\u1EE3c l\u00E0 role=button v\u00E0 b\u1EAFt Enter, l\u1ED3ng button v\u00E0o s\u1EBD th\u00E0nh nested-interactive v\u00E0 Enter\n tr\u00EAn icon s\u1EBD sort. Ch\u1EB7n mousedown/click \u0111\u1EC3 kh\u00F4ng sort, kh\u00F4ng b\u1EAFt \u0111\u1EA7u k\u00E9o c\u1ED9t. -->\n <ng-template #queryBarTrigger let-column>\n @let _triggerKey = _queryBarKeys?.get(column.field);\n @if (_triggerKey) {\n @let _triggerActive = _queryBarActive.has(_triggerKey);\n <button\n type=\"button\"\n class=\"sd-table-filter-trigger\"\n [class.sd-table-filter-trigger--active]=\"_triggerActive\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-filter-trigger-' + column.field : null\"\n [attr.aria-label]=\"filterTriggerLabel(column, _triggerActive)\"\n aria-haspopup=\"menu\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); openQueryBarField(_triggerKey, $event.currentTarget)\">\n <sd-icon name=\"filter_alt\" aria-hidden=\"true\"></sd-icon>\n </button>\n }\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @let _aid = _autoId;\n @let _expanding = !!_tree.isExpanding;\n <!-- why: n\u00FAt lu\u00F4n n\u1EB1m trong DOM, ch\u1EC9 \u0111\u1ED5i icon th\u00E0nh spinner khi \u0111ang t\u1EA3i con; g\u1EE1 n\u00FAt l\u00E0m focus b\u00E0n ph\u00EDm r\u01A1i\n v\u1EC1 body. Click trong l\u00FAc t\u1EA3i b\u1ECB onTreeToggle b\u1ECF qua. -->\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n [attr.aria-label]=\"'core.component.table.tree-toggle' | sdTranslate\"\n [attr.aria-expanded]=\"!!_tree.isExpanded\"\n [attr.aria-busy]=\"_expanding ? 'true' : null\"\n [attr.aria-disabled]=\"_expanding ? 'true' : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n @if (_expanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n }\n </button>\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n @let _queryBarOption = queryBarOption();\n <div\n class=\"sd-table-surface\"\n [class.sd-table-surface--quick-search]=\"!!_quickSearch && !_queryBarMode\"\n [class.sd-table-surface--query-bar]=\"_queryBarMode && !!_queryBarOption\">\n @if (_queryBarMode) {\n <!-- why: thanh n\u1EB1m tr\u00EAn .c-container, ngo\u00E0i l\u1EDBp loading (l\u00E0m m\u1EDD .c-table) \u2014 lu\u00F4n b\u1EA5m \u0111\u01B0\u1EE3c khi \u0111ang t\u1EA3i. -->\n @if (_queryBarOption) {\n @let _queryBarHint = queryBarHint();\n <sd-query-bar\n class=\"sd-table-query-bar\"\n role=\"search\"\n [attr.aria-label]=\"'core.component.table.filter' | sdTranslate\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-query-bar' : null\"\n [option]=\"_queryBarOption\"\n [(filters)]=\"barFilters\"\n [(search)]=\"barSearch\"\n (apply)=\"onQueryBarApply($event)\">\n @if (sdQuickSearchRightDef(); as _right) {\n <div sdQueryBarEnd class=\"sd-table-query-bar-end\"><ng-container [ngTemplateOutlet]=\"_right.templateRef\" /></div>\n }\n </sd-query-bar>\n @if (_queryBarHint) {\n <p class=\"sd-table-query-bar-hint\" [id]=\"queryBarHintId\">\n <sd-icon name=\"error_outline\" aria-hidden=\"true\"></sd-icon>\n <span>{{ _queryBarHint }}</span>\n </p>\n }\n }\n } @else if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: l\u1EDBp loading kh\u00F4ng ph\u1EE7 l\u00EAn b\u1EA3ng: header, filter, sort v\u00E0 thanh cu\u1ED9n lu\u00F4n d\u00F9ng \u0111\u01B0\u1EE3c. Ch\u01B0a c\u00F3 d\u00F2ng th\u00EC\n khung x\u01B0\u01A1ng (matNoDataRow); \u0111\u00E3 c\u00F3 d\u00F2ng th\u00EC gi\u1EEF d\u00F2ng c\u0169, qu\u00E1 showDelay m\u1EDBi l\u00E0m m\u1EDD d\u00F2ng v\u00E0 hi\u1EC7n thanh ti\u1EBFn\n tr\u00ECnh. aria-busy v\u1EABn theo loading() th\u1EADt; v\u00F9ng .sd-table-live b\u00E1o \"\u0111ang t\u1EA3i\"/\"\u0111\u00E3 t\u1EA3i xong\". -->\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [class.c-table--dim]=\"_loadingView === 'refresh' && loadingSettings().dim\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n @if (_loadingView === 'refresh') {\n <!-- Mobile: kh\u00F4ng c\u00F3 header b\u1EA3ng; thanh n\u1EB1m \u1EDF m\u00E9p tr\u00EAn danh s\u00E1ch th\u1EBB, d\u01B0\u1EDBi command header. Anchor cao 0\n n\u00EAn thanh hi\u1EC7n/\u1EA9n kh\u00F4ng \u0111\u1EA9y th\u1EBB. -->\n <div class=\"sd-table-progress-anchor\">\n <div class=\"sd-table-progress\" aria-hidden=\"true\"></div>\n </div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!_tableOption.expand?.always) {\n @let _expanding = !!element.meta.expand?.isExpanding;\n <!-- why: n\u00FAt 35px gi\u1EEF nguy\u00EAn khi \u0111ang t\u1EA3i ([loading] thay prefix icon b\u1EB1ng spinner) \u0111\u1EC3 focus b\u00E0n ph\u00EDm\n kh\u00F4ng m\u1EA5t; onExpand b\u1ECF qua click trong l\u00FAc t\u1EA3i. color primary ch\u1EC9 \u0111\u1EC3 spinner theo m\u00E0u nh\u1EA5n. -->\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [color]=\"_expanding ? 'primary' : null\"\n [loading]=\"_expanding\"\n [attr.aria-busy]=\"_expanding ? 'true' : null\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div\n [class.sd-table-header-cell--trigger]=\"_queryBarMode && column.type !== 'children'\"\n [class.sd-table-header-cell--end]=\"_queryBarMode && column.align === 'right'\">\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_queryBarMode) {\n <ng-container *ngTemplateOutlet=\"queryBarTrigger; context: { $implicit: column }\"></ng-container>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div\n [class.sd-table-header-cell--trigger]=\"_queryBarMode\"\n [class.sd-table-header-cell--end]=\"_queryBarMode && column.align === 'right'\">\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_queryBarMode) {\n <ng-container *ngTemplateOutlet=\"queryBarTrigger; context: { $implicit: column }\"></ng-container>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n <!-- why: khung x\u01B0\u01A1ng l\u00E0 d\u00F2ng th\u1EADt trong tbody (matNoDataRow ch\u1EC9 hi\u1EC7n khi kh\u00F4ng c\u00F3 d\u00F2ng d\u1EEF li\u1EC7u) n\u00EAn \u00F4 th\u1EB3ng\n c\u1ED9t v\u1EDBi header, k\u1EC3 c\u1EA3 header nh\u00F3m, m\u00E0 kh\u00F4ng ph\u1EA3i \u0111o; footer v\u1EABn n\u1EB1m d\u01B0\u1EDBi; dataSource kh\u00F4ng \u0111\u1ED5i. -->\n <ng-template matNoDataRow>\n @for (cells of skeleton(); track $index) {\n <tr class=\"sd-table-skeleton-row\" aria-hidden=\"true\">\n @for (cell of cells; track cell.field) {\n <td class=\"sd-table-skeleton-cell\" [class.d-none]=\"cell.hidden\">\n @if (cell.shape !== 'none') {\n <span\n class=\"sd-table-skeleton-bar\"\n [attr.data-shape]=\"cell.shape\"\n [attr.data-align]=\"cell.align\"\n [style.width]=\"cell.width\"\n [style.max-width]=\"cell.maxWidth\"></span>\n }\n </td>\n }\n </tr>\n }\n </ng-template>\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length && _loadingView === 'none';\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <!-- why: b\u1EA3ng local l\u1ED7i d\u00F9ng c\u00F9ng giao di\u1EC7n l\u1ED7i v\u1EDBi b\u1EA3ng server (sd-data-state, role=\"alert\") v\u00E0 c\u00F9ng\n sdDataStateTemplate; th\u1EED l\u1EA1i = reload() v\u00EC local kh\u00F4ng c\u00F3 snapshot \u0111\u1ECDc \u0111\u1EC3 retryRead(). -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"reload()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). Kh\u00F4ng c\u00F3 role live:\n v\u00F9ng .sd-table-live (lu\u00F4n c\u00F3 trong DOM) \u0111\u1ECDc ti\u00EAu \u0111\u1EC1 c\u1EE7a kh\u1ED1i n\u00E0y. -->\n <div class=\"c-no-data-row\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (_loadingView === 'refresh' && !_mobileCards) {\n <!-- N\u1EB1m trong .c-container, kh\u00F4ng trong .c-table, \u0111\u1EC3 kh\u00F4ng cu\u1ED9n ngang theo b\u1EA3ng; top = --sd-table-head-h (\u0111o). -->\n <div class=\"sd-table-progress\" aria-hidden=\"true\"></div>\n }\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n [indicator]=\"!_isMobile && hasCustomSetup()\"\n indicatorColor=\"primary\"\n [indicatorLabel]=\"'core.component.table.config.customized' | sdTranslate\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let _unknownTotalPager = unknownTotalPager();\n @if (_unknownTotalPager) {\n <!-- paginate.total 'unknown': no total exists, so mat-paginator (which derives Next/Last and the\n range from `length`) is replaced by a pager that renders only the rows actually shown. -->\n @if (!_tableOption.paginate?.hidden && unknownTotalPagerVisible()) {\n <sd-table-unknown-total-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [state]=\"_unknownTotalPager\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages\"\n [hidePageSize]=\"_isMobile || !!_tableOption.paginate?.hidePageSize\"\n [showFirstButton]=\"!_isMobile && !!_tableOption.paginate?.showFirstLastButtons\"\n [autoId]=\"_autoId\"\n (page)=\"onUnknownTotalPage($event)\"></sd-table-unknown-total-paginator>\n } @else if (!_isMobile && !_tableOption.paginate?.hidden && unknownTotalSingleCount()) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ unknownTotalSingleCount() }}</span>\n </div>\n }\n } @else {\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"\n [selectConfig]=\"{ panelClass: ['sd-select-panel', 'sd-table-page-size-panel'] }\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" (defaultsRestored)=\"onConfigDefaultsRestored()\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n} @else if (_loadingView === 'skeleton') {\n <!-- why: lookup c\u1ED9t (values/lazy-values) c\u00F3 th\u1EC3 ch\u1EADm; ch\u01B0a c\u00F3 configuration n\u00EAn ch\u01B0a bi\u1EBFt c\u1ED9t, v\u1EBD khung x\u01B0\u01A1ng chung\n thay v\u00EC \u0111\u1EC3 tr\u1ED1ng. Hydrate kh\u00F4ng c\u00F3 lookup xong trong microtask n\u00EAn kh\u1ED1i n\u00E0y kh\u00F4ng k\u1ECBp hi\u1EC7n. -->\n <div class=\"sd-table-skeleton-block\" aria-hidden=\"true\">\n @for (cells of genericSkeleton; track $index) {\n <div class=\"sd-table-skeleton-block-row\">\n @for (cell of cells; track cell.field) {\n <span class=\"sd-table-skeleton-cell\">\n <span class=\"sd-table-skeleton-bar\" [style.width]=\"cell.width\" [style.max-width]=\"cell.maxWidth\"></span>\n </span>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%;--mat-table-row-item-container-height: 36px}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .sd-table-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1;isolation:isolate}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:var(--sd-shadow-sm)}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:var(--sd-text-muted);display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{position:relative;padding-right:24px}:host ::ng-deep th[aria-sort] .sd-table-sort-header:after{content:\"\";position:absolute;top:50%;right:0;width:16px;height:16px;transform:translateY(-50%);background-color:var(--sd-text-secondary);mask-repeat:no-repeat;mask-position:center;mask-size:16px 16px;pointer-events:none}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after,:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{background-color:var(--sd-text)}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size{align-items:center}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select{--mat-select-trigger-text-size: var(--sd-font-size-14, 14px);--mat-paginator-select-trigger-text-size: var(--sd-font-size-14, 14px)}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-infix{display:flex;align-items:center;height:32px;min-height:32px;padding-top:0;padding-bottom:0}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select.mat-mdc-form-field .mat-mdc-form-field-infix mat-select.mat-mdc-select{margin-top:0}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-text-field-wrapper{padding-right:8px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow-wrapper{width:20px;justify-content:center}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow{width:16px;height:16px;color:var(--sd-text-secondary);background-color:currentColor;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E\") center/16px 16px no-repeat}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow svg{display:none}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-flex:hover .mat-mdc-select-arrow{color:var(--sd-text)}::ng-deep .mat-mdc-select-panel.sd-select-panel.sd-table-page-size-panel .mat-mdc-option{min-height:36px;padding:7px 12px}:host ::ng-deep .cdk-drag-preview{box-shadow:var(--sd-shadow-md);background:var(--sd-table-bg);display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host ::ng-deep .sd-tree-toggle-btn[aria-busy=true]{cursor:progress}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--query-bar>.c-container:not(.sd-table-mobile)>.c-table{border-top-left-radius:0;border-top-right-radius:0}:host .sd-table-query-bar{display:block;flex:0 0 auto;min-width:0;background:var(--sd-table-bg, #ffffff);border-top-left-radius:var(--sd-radius-6, 6px);border-top-right-radius:var(--sd-radius-6, 6px);--sd-control-label-bg: var(--sd-table-bg, #ffffff)}:host .sd-table-query-bar-end{flex:none;display:flex;align-items:center;align-self:flex-start;padding-left:8px}:host .sd-table-header-cell--trigger{display:flex;align-items:center;gap:4px;min-width:0}:host .sd-table-header-cell--trigger>.c-header-title{flex:0 1 auto;min-width:0}:host .sd-table-header-cell--trigger.sd-table-header-cell--end{flex-direction:row-reverse;justify-content:flex-start}:host .sd-table-filter-trigger{flex:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:var(--sd-radius-4, 4px);background:transparent;color:var(--sd-text-secondary);cursor:pointer;opacity:0;transition:opacity var(--sd-duration-fast, .12s) ease,background-color var(--sd-duration-fast, .12s) ease}:host .sd-table-filter-trigger sd-icon{width:15px;height:15px;font-size:15px}:host .sd-table-filter-trigger:hover{background:var(--sd-table-row-hover-bg)}:host .sd-table-filter-trigger:focus-visible{opacity:1;outline:2px solid var(--sd-focus-ring-color);outline-offset:1px}:host .sd-table-filter-trigger.sd-table-filter-trigger--active{opacity:1;color:var(--sd-primary)}:host th:hover .sd-table-filter-trigger,:host th:focus-within .sd-table-filter-trigger{opacity:1}@media(pointer:coarse){:host .sd-table-filter-trigger{opacity:1}}@media(prefers-reduced-motion:reduce){:host .sd-table-filter-trigger{transition:none}}@media(forced-colors:active){:host .sd-table-filter-trigger{color:ButtonText}:host .sd-table-filter-trigger--active{color:Highlight}}:host .sd-table-query-bar-hint{display:flex;align-items:center;gap:6px;margin:0;padding:0 12px 8px;background:var(--sd-table-bg, #ffffff);font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-error)}:host .sd-table-query-bar-hint sd-icon{flex:none;width:16px;height:16px;font-size:var(--sd-font-size-16, 16px)}@keyframes sd-table-skeleton-sweep{to{background-position:480px 0}}@keyframes sd-table-progress-run{0%{transform:translate(-100%)}to{transform:translate(285.7142857143%)}}@keyframes sd-table-spin{to{transform:rotate(360deg)}}:host tr.sd-table-skeleton-row{height:var(--mat-table-row-item-container-height, 36px)}:host .sd-table-skeleton-cell{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider);vertical-align:middle}:host .sd-table-skeleton-bar{display:block;height:12px;border-radius:var(--sd-radius-4, 4px);background:linear-gradient(90deg,var(--sd-table-skeleton-bg) 0,var(--sd-table-skeleton-highlight) 40%,var(--sd-table-skeleton-bg) 80%) 0 0/480px 100%;animation:sd-table-skeleton-sweep 1.4s linear infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-skeleton-bar{animation:none}}@media(forced-colors:active){:host .sd-table-skeleton-bar{forced-color-adjust:none;background:GrayText}}:host .sd-table-skeleton-bar[data-align=end]{margin-inline-start:auto}:host .sd-table-skeleton-bar[data-align=center]{margin-inline:auto}:host .sd-table-skeleton-bar[data-shape=pill]{height:20px;border-radius:999px}:host .sd-table-skeleton-bar[data-shape=box]{width:14px;height:14px;border-radius:3px}:host .sd-table-skeleton-block{overflow:hidden;border-radius:var(--sd-radius-6, 6px);background:var(--sd-surface)}:host .sd-table-skeleton-block-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;height:var(--mat-table-row-item-container-height, 36px);border-bottom:1px solid var(--sd-table-row-divider)}:host .sd-table-skeleton-block-row>.sd-table-skeleton-cell{border-bottom:0}:host .c-table>table>::ng-deep tbody{transition:opacity var(--sd-duration-fast, .12s)}@media(prefers-reduced-motion:reduce){:host .c-table>table>::ng-deep tbody{transition:none}}:host .c-table.c-table--dim{cursor:progress}:host .c-table.c-table--dim>table>::ng-deep thead,:host .c-table.c-table--dim>table>::ng-deep tfoot{cursor:auto}:host .c-table.c-table--dim>table>::ng-deep tbody{opacity:var(--sd-table-loading-dim, .55)}:host .c-table.c-table--dim>table>::ng-deep tbody,:host .c-table.c-table--dim>table>::ng-deep tbody *{pointer-events:none!important}:host .sd-table-progress{position:absolute;top:var(--sd-table-head-h, 0px);right:0;left:0;z-index:20;height:2px;overflow:hidden;pointer-events:none;background:var(--sd-table-progress-track)}:host .sd-table-progress:before{content:\"\";position:absolute;inset:0 auto 0 0;width:35%;background:var(--sd-table-spinner);animation:sd-table-progress-run 1.1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-progress:before{width:100%;opacity:.6;animation:none}}@media(forced-colors:active){:host .sd-table-progress{forced-color-adjust:none;box-sizing:content-box;border:1px solid CanvasText;background:Canvas}:host .sd-table-progress:before{background:Highlight}}:host .sd-table-spinner{display:inline-block;flex:0 0 auto;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;border:2px solid var(--sd-table-progress-track);border-top-color:var(--sd-table-spinner);border-radius:50%;animation:sd-table-spin .8s linear infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-spinner{animation:none}}@media(forced-colors:active){:host .sd-table-spinner{forced-color-adjust:none;border-color:GrayText;border-top-color:Highlight}}:host .sd-table-progress-anchor{position:sticky;top:0;z-index:20;height:0}:host .sd-table-progress-anchor>.sd-table-progress{top:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}:host(.sd-table--fill){flex:1 1 0;height:auto;min-height:var(--sd-table-fill-min, 0px);overflow:visible}:host(.sd-table--fill) .c-container{min-height:0}:host(.sd-table--fill) .c-container>.c-table{min-height:calc(var(--sd-table-fill-head, 40px) + 5 * var(--mat-table-row-item-container-height, 36px))}:host(.sd-table--fill) .c-container>.c-paginator{flex:none;min-height:48px}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdDataState, selector: "sd-data-state", inputs: ["state", "title", "message", "icon", "fontSet", "iconShape", "retryable", "retryLabel", "actionLabel", "compact", "fullPage"], outputs: ["sdRetry", "sdAction"] }, { kind: "directive", type: SdDataStateTemplateDirective, selector: "ng-template[sdDataStateTemplate]" }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1$2.JsonPipe, name: "json" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i3$3.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i4$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i4$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i4$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i4$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i4$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i4$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i4$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i4$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i4$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i4$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i4$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i4$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i4$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i4$1.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i5.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { 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: SdButtonItem, selector: "sd-button-item", inputs: ["color", "prefixIcon", "suffixIcon", "fontSet", "disabled", "tooltip", "autoId"], outputs: ["click"] }, { kind: "component", type: DesktopCommand, selector: "desktop-command", inputs: ["autoId", "item", "itemIndex", "commands"] }, { kind: "component", type: DesktopCellComponent, selector: "desktop-cell", inputs: ["column", "item", "cellDef"] }, { kind: "component", type: ColumnTitleComponent, selector: "column-title", inputs: ["column", "titleDef"] }, { kind: "component", type: ExternalFilterComponent, selector: "external-filter", inputs: ["autoId", "filter", "externalFilters", "filterRegister", "collapsedByDefault"] }, { kind: "component", type: TableQuickSearchComponent, selector: "sd-table-quick-search", inputs: ["option", "value", "autoId", "rightTemplate"], outputs: ["valueChange"] }, { kind: "component", type: SdQueryBar, selector: "sd-query-bar", inputs: ["option", "autoId", "fields", "filters", "logic", "search", "mode", "density", "showSearch", "showSavedFilters", "savedFiltersKey", "showLogicToggle", "showClearAll", "showOperatorOnChip"], outputs: ["filtersChange", "logicChange", "searchChange", "queryChange", "apply"] }, { kind: "component", type: ConfigComponent, selector: "config", inputs: ["autoId", "tableOption"], outputs: ["changes", "defaultsRestored"] }, { kind: "component", type: ColumnFilterComponent, selector: "column-filter", inputs: ["autoId", "column", "columnFilter", "cacheValues", "value", "operator", "isMobile"], outputs: ["operatorChange", "filterChange", "filterCommit"] }, { kind: "component", type: MobileFilterComponent, selector: "mobile-filter", inputs: ["autoId", "filter", "externalFilters", "columns", "filterDefs", "filterRegister", "cacheValues"] }, { kind: "pipe", type: SdGroupPipe, name: "sdGroup" }, { kind: "pipe", type: SdTreePipe, name: "sdTree" }, { kind: "pipe", type: SdAggregateRowsPipe, name: "sdAggregateRows" }, { kind: "directive", type: SdAggregateLayoutDirective, selector: "table[sdAggregateLayout]" }, { kind: "directive", type: SdTableFooterRowDefDirective, selector: "[sdTableFooterRowDef]", inputs: ["sdTableFooterRowDef", "sdTableFooterRowDefSticky"] }, { kind: "directive", type: SdScrollDirective, selector: "[sdScroll]" }, { kind: "directive", type: SdHoverCopyDirective, selector: "[sdHoverCopy]", inputs: ["sdHoverCopy", "sdHoverCopyDisabled"] }, { kind: "component", type: SelectorActionComponent, selector: "selector-action", inputs: ["autoId", "tableOption", "selectedTableItems"], outputs: ["clear"] }, { kind: "directive", type: StickyShadowDirective, selector: "[stickyShadow]" }, { kind: "directive", type: SdColumnResizeDirective, selector: "[sdColumnResize]", inputs: ["sdColumnResize", "minWidth", "maxWidth"], outputs: ["resizeEnd"] }, { kind: "directive", type: SdTableSortHeaderDirective, selector: "[sdTableSortHeader]", inputs: ["sdTableSortHeader"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }, { kind: "component", type: SdTableMobileCardsComponent, selector: "sd-table-mobile-cards", inputs: ["table", "rows", "dataRows", "aggregateTemplate", "groupTemplate"] }, { kind: "component", type: SdTableMobileActionsComponent, selector: "sd-table-mobile-actions", inputs: ["actions", "title", "selection", "count", "autoOpen", "autoId"], outputs: ["end"] }, { kind: "component", type: SdTableUnknownTotalPaginator, selector: "sd-table-unknown-total-paginator", inputs: ["state", "pageSizeOptions", "hidePageSize", "showFirstButton", "autoId"], outputs: ["page"] }], animations: [
6831
8371
  trigger('detailExpand', [
6832
8372
  state('collapsed', style({ height: '0', minHeight: '0', visibility: 'hidden' })),
6833
8373
  state('expanded', style({ height: '*', visibility: 'visible' })),
@@ -6847,6 +8387,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
6847
8387
  '[attr.data-autoid]': 'autoId()',
6848
8388
  tabindex: '0',
6849
8389
  '[attr.data-loading]': 'loading() ? "true" : "false"',
8390
+ '[attr.data-loading-view]': 'loadingView()',
8391
+ '[attr.data-filter-mode]': 'effectiveFilterMode()',
8392
+ '[class.sd-table--fill]': 'fill()',
6850
8393
  }, providers: [
6851
8394
  DatePipe,
6852
8395
  DecimalPipe,
@@ -6868,7 +8411,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
6868
8411
  MatPaginatorModule,
6869
8412
  MatTableModule,
6870
8413
  MatSortModule,
6871
- MatProgressSpinnerModule,
6872
8414
  MatButtonModule,
6873
8415
  MatCheckboxModule,
6874
8416
  MatRadioModule,
@@ -6880,6 +8422,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
6880
8422
  ColumnTitleComponent,
6881
8423
  ExternalFilterComponent,
6882
8424
  TableQuickSearchComponent,
8425
+ SdQueryBar,
6883
8426
  ConfigComponent,
6884
8427
  ColumnFilterComponent,
6885
8428
  MobileFilterComponent,
@@ -6899,12 +8442,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
6899
8442
  SdTableMobileCardsComponent,
6900
8443
  SdTableMobileActionsComponent,
6901
8444
  SdTableUnknownTotalPaginator,
6902
- ], template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _showInlineFilter =\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && knownRowCount()! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n@if (_configuration) {\n @if (!_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @if (_tree.isExpanding) {\n <span class=\"lds-ring sd-tree-spinner\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </span>\n } @else {\n @let _aid = _autoId;\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n </button>\n }\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n <div class=\"sd-table-surface\" [class.sd-table-surface--quick-search]=\"!!_quickSearch\">\n @if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: b\u1EA3ng t\u1EA3i d\u1EEF li\u1EC7u B\u1EA4T \u0110\u1ED2NG B\u1ED8 nh\u01B0ng tr\u01B0\u1EDBc \u0111\u00E2y ch\u1EC9 c\u00F3 spinner thu\u1EA7n h\u00ECnh \u1EA3nh \u2014 screen\n reader kh\u00F4ng \u0111\u01B0\u1EE3c b\u00E1o g\u00EC c\u1EA3. role=\"status\" + aria-live=\"polite\" \u0111\u1ECDc tr\u1EA1ng th\u00E1i ngay khi\n spinner xu\u1EA5t hi\u1EC7n; aria-busy tr\u00EAn v\u00F9ng b\u1EA3ng cho bi\u1EBFt n\u1ED9i dung \u0111ang \u0111\u01B0\u1EE3c thay th\u1EBF. -->\n @if (_loading) {\n <div class=\"c-loading\" role=\"status\" aria-live=\"polite\" [attr.aria-label]=\"'core.component.table.loading' | sdTranslate\">\n <mat-spinner></mat-spinner>\n </div>\n }\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.meta.expand?.isExpanding && !_tableOption.expand?.always) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n @if (element.meta.expand?.isExpanding) {\n <div class=\"lds-ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div>\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div>\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length;\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <div class=\"c-no-data-row\" role=\"alert\">\n <p>{{ 'core.component.table.error-occurred' | sdTranslate }}</p>\n <sd-button [title]=\"'core.component.table.reload' | sdTranslate\" (click)=\"reload()\"></sd-button>\n </div>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). -->\n <div class=\"c-no-data-row\" role=\"status\" aria-live=\"polite\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let _unknownTotalPager = unknownTotalPager();\n @if (_unknownTotalPager) {\n <!-- paginate.total 'unknown': no total exists, so mat-paginator (which derives Next/Last and the\n range from `length`) is replaced by a pager that renders only the rows actually shown. -->\n @if (!_tableOption.paginate?.hidden && unknownTotalPagerVisible()) {\n <sd-table-unknown-total-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [state]=\"_unknownTotalPager\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages\"\n [hidePageSize]=\"_isMobile || !!_tableOption.paginate?.hidePageSize\"\n [showFirstButton]=\"!_isMobile && !!_tableOption.paginate?.showFirstLastButtons\"\n [autoId]=\"_autoId\"\n (page)=\"onUnknownTotalPage($event)\"></sd-table-unknown-total-paginator>\n } @else if (!_isMobile && !_tableOption.paginate?.hidden && unknownTotalSingleCount()) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ unknownTotalSingleCount() }}</span>\n </div>\n }\n } @else {\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-loading{position:absolute;inset:0 0 56px;background:#00000026;z-index:2;display:flex;align-items:center;justify-content:center}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:var(--sd-shadow-sm)}:host .lds-ring{display:inline-block;position:relative;width:40px;height:40px}:host .lds-ring div{box-sizing:border-box;display:block;position:absolute;width:32px;height:32px;margin:4px;border:4px solid var(--sd-table-spinner, #cceeff);border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--sd-table-spinner, #cceeff) transparent transparent transparent}:host .lds-ring div:nth-child(1){animation-delay:-.45s}:host .lds-ring div:nth-child(2){animation-delay:-.3s}:host .lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:var(--sd-text-muted);display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .c-container:not(.sd-table-mobile)>.c-loading{border-radius:6px 6px 0 0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{position:relative;padding-right:24px}:host ::ng-deep th[aria-sort] .sd-table-sort-header:after{content:\"\";position:absolute;top:50%;right:0;width:16px;height:16px;transform:translateY(-50%);background-color:var(--sd-text-secondary);mask-repeat:no-repeat;mask-position:center;mask-size:16px 16px;pointer-events:none}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after,:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{background-color:var(--sd-text)}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--outlined .mat-mdc-form-field-infix,:host ::ng-deep .c-paginator .mat-mdc-paginator .mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:2px;padding-bottom:2px;min-height:32px}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select mat-select{margin-top:2px!important}:host ::ng-deep .cdk-drag-preview{box-shadow:var(--sd-shadow-md);background:var(--sd-table-bg);display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host ::ng-deep .sd-tree-spinner{transform:scale(.45)}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-loading{border-top-left-radius:0;border-top-right-radius:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"] }]
8445
+ ], template: "@let _visibleSelectAll = visibleSelectAll();\n@let _isSelectIndeterminate = isSelectIndeterminate();\n@let _isSelectAll = isSelectAll();\n@let _configuration = configuration();\n@let _tableOption = tableOption()!;\n@let _loading = loading();\n@let _loadingView = loadingView();\n@let _readState = readState();\n@let _hideReadError = hideReadError();\n@let _dataStateTemplate = dataStateTemplate();\n@let _items = items();\n@let _total = total();\n@let _isFiltered = isFiltered();\n@let _requireFiltered = requireFiltered();\n@let _export = _tableOption?.export;\n@let _exporting = exporting();\n@let _titleDef = titleDef();\n@let _autoId = autoId();\n@let _exportTitle = exportTitle();\n@let _cellDef = cellDef();\n@let _footerDef = footerDef();\n@let _sdSubInformation = sdSubInformation();\n@let _configComponent = configComponent();\n@let _mobileFilter = mobileFilter();\n@let _selectedTableItems = selectedTableItems();\n@let _rowCommands = rowCommands();\n@let _mobileCards = mobileCards();\n@let _isMobile = isMobile();\n@let _queryBarMode = queryBarMode();\n@let _queryBarKeys = queryBarModel()?.columnKeys;\n@let _queryBarActive = queryBarActiveKeys();\n@let _showInlineFilter =\n !_queryBarMode &&\n !_isMobile &&\n !_tableOption?.filter?.disabled &&\n _tableOption?.filter?.hideInlineFilter !== true &&\n !(_tableOption?.filter?.hideInlineFilter === 'auto' && !_isFiltered && knownRowCount()! <= 10);\n@let _commandHeaderDef = sdCommandHeaderDef();\n@let _quickSearch = quickSearchOption();\n@let _aggregate = aggregateSnapshot();\n@let _aggregateColumns = aggregateColumns();\n@let _aggregateColumnIds = aggregateColumnIds();\n@let _headerFilterColumns = headerFilterColumns();\n<!-- why: tree kh\u00F4ng c\u00F2n c\u1ED9t ri\u00EAng \u2014 khi KH\u00D4NG c\u00F3 c\u1ED9t Index, icon expand nh\u00FAng v\u00E0o\n c\u1ED9t data \u0111\u1EA7u ti\u00EAn. \u0110\u00E2y l\u00E0 field c\u1EE7a c\u1ED9t \u0111\u00F3 (null n\u1EBFu c\u00F3 Index ho\u1EB7c kh\u00F4ng tree). -->\n@let _treeFirstField = _tableOption?.tree && !_tableOption.index?.enabled ? _configuration?.firstColumns?.[0]?.field : null;\n\n<!-- why: v\u00F9ng status lu\u00F4n c\u00F3 trong DOM, k\u1EC3 c\u1EA3 tr\u01B0\u1EDBc khi c\u00F3 configuration. V\u00F9ng ch\u1EC9 render trong l\u00FAc t\u1EA3i b\u1ECB g\u1EE1\n tr\u01B0\u1EDBc khi screen reader k\u1ECBp \u0111\u1ECDc v\u00E0 kh\u00F4ng b\u00E1o \u0111\u01B0\u1EE3c \"\u0111\u00E3 t\u1EA3i xong\". -->\n<span class=\"sd-table-live\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveMessage() }}</span>\n@if (_configuration) {\n @if (!_queryBarMode && !_mobileCards && !_tableOption.filter?.disabled && !!_tableOption.filter?.externalFilters?.length && filterRegister) {\n <external-filter\n class=\"mb-16\"\n [autoId]=\"_autoId\"\n [filterRegister]=\"filterRegister\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [collapsedByDefault]=\"externalFilterCollapsedByDefault()\">\n </external-filter>\n }\n @let groupedItems = _items | sdTree: _tableOption.tree : treeRevision() | sdGroup: _tableOption : groupExpandState : groupHost;\n @let renderItems = groupedItems | sdAggregateRows: _aggregate : _tableOption : aggregateRenderHost;\n\n <ng-template #aggregateCell let-cell>\n @if (cell) {\n @if (cell.templateRef) {\n <ng-container *ngTemplateOutlet=\"cell.templateRef; context: cell.context\"></ng-container>\n } @else {\n <span [attr.data-complete]=\"cell.context.isComplete\">{{ cell.text }}</span>\n }\n }\n </ng-template>\n <ng-template #inlineColumnFilter let-column>\n <column-filter\n [autoId]=\"_autoId\"\n [value]=\"columnFilter?.[column.field!]!\"\n [operator]=\"columnOperator[column.field]\"\n (operatorChange)=\"columnOperator[column.field] = $event!; onOperatorChange(column, $event)\"\n [columnFilter]=\"columnFilter!\"\n [cacheValues]=\"cacheValues\"\n [column]=\"column\"\n (filterChange)=\"onFilterChange()\"\n (filterCommit)=\"onFilterCommit()\">\n </column-filter>\n </ng-template>\n <!-- Icon l\u1ECDc \u1EDF header c\u1ED9t (mode query-bar): m\u1EDF chip c\u1EE7a field tr\u00EAn thanh. why: n\u1EB1m c\u1EA1nh .c-header-title ch\u1EE9 kh\u00F4ng\n n\u1EB1m trong \u2014 title sort \u0111\u01B0\u1EE3c l\u00E0 role=button v\u00E0 b\u1EAFt Enter, l\u1ED3ng button v\u00E0o s\u1EBD th\u00E0nh nested-interactive v\u00E0 Enter\n tr\u00EAn icon s\u1EBD sort. Ch\u1EB7n mousedown/click \u0111\u1EC3 kh\u00F4ng sort, kh\u00F4ng b\u1EAFt \u0111\u1EA7u k\u00E9o c\u1ED9t. -->\n <ng-template #queryBarTrigger let-column>\n @let _triggerKey = _queryBarKeys?.get(column.field);\n @if (_triggerKey) {\n @let _triggerActive = _queryBarActive.has(_triggerKey);\n <button\n type=\"button\"\n class=\"sd-table-filter-trigger\"\n [class.sd-table-filter-trigger--active]=\"_triggerActive\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-filter-trigger-' + column.field : null\"\n [attr.aria-label]=\"filterTriggerLabel(column, _triggerActive)\"\n aria-haspopup=\"menu\"\n (mousedown)=\"$event.stopPropagation()\"\n (click)=\"$event.stopPropagation(); openQueryBarField(_triggerKey, $event.currentTarget)\">\n <sd-icon name=\"filter_alt\" aria-hidden=\"true\"></sd-icon>\n </button>\n }\n </ng-template>\n <ng-template #mobileAggregate let-summary=\"summary\">\n <div class=\"sd-mobile-aggregate p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (entry of _aggregateColumns; track entry.field) {\n @let cell = summary.cells.get(entry.field);\n @if (cell && entry.column) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"entry.column\" [titleDef]=\"_titleDef[entry.field]\"></column-title>\n <ng-container *ngTemplateOutlet=\"aggregateCell; context: { $implicit: cell }\"></ng-container>\n </div>\n }\n }\n </div>\n </ng-template>\n\n <!-- Tree toggle d\u00F9ng chung: indent (theo c\u1EA5p) + slot chevron/spinner. Nh\u00FAng v\u00E0o\n c\u1ED9t Index ho\u1EB7c c\u1ED9t data \u0111\u1EA7u qua *ngTemplateOutlet (context: { row }). -->\n <ng-template #sdTreeToggle let-row=\"row\">\n @let _tree = row?.meta?.tree;\n @if (_tree) {\n <span class=\"sd-tree-indent\" [style.width.px]=\"(_tree.level ?? 0) * (_tableOption.tree?.indentSize ?? 20)\"></span>\n <span class=\"sd-tree-toggle-slot\">\n @if (_tree.hasChildren) {\n @let _aid = _autoId;\n @let _expanding = !!_tree.isExpanding;\n <!-- why: n\u00FAt lu\u00F4n n\u1EB1m trong DOM, ch\u1EC9 \u0111\u1ED5i icon th\u00E0nh spinner khi \u0111ang t\u1EA3i con; g\u1EE1 n\u00FAt l\u00E0m focus b\u00E0n ph\u00EDm r\u01A1i\n v\u1EC1 body. Click trong l\u00FAc t\u1EA3i b\u1ECB onTreeToggle b\u1ECF qua. -->\n <button\n type=\"button\"\n class=\"sd-tree-toggle-btn\"\n [attr.data-autoid]=\"_aid ? _aid + '-tree-toggle-' + row.meta.id : null\"\n [attr.aria-label]=\"'core.component.table.tree-toggle' | sdTranslate\"\n [attr.aria-expanded]=\"!!_tree.isExpanded\"\n [attr.aria-busy]=\"_expanding ? 'true' : null\"\n [attr.aria-disabled]=\"_expanding ? 'true' : null\"\n (click)=\"onTreeToggle(row); $event.stopPropagation()\">\n @if (_expanding) {\n <span class=\"sd-table-spinner\" aria-hidden=\"true\"></span>\n } @else {\n <sd-icon [name]=\"_tree.isExpanded ? 'expand_more' : 'chevron_right'\"></sd-icon>\n }\n </button>\n }\n </span>\n }\n </ng-template>\n\n <ng-template #sdGroupHeader let-item=\"item\">\n <div class=\"sd-group-row d-flex align-items-center py-8\">\n @if (_tableOption.selector?.visible && !_tableOption.selector?.single) {\n <div class=\"sd-group-selection-slot d-flex align-items-center justify-content-center\">\n <mat-checkbox\n class=\"c-selection\"\n color=\"primary\"\n [checked]=\"isGroupAllSelected(item)\"\n [indeterminate]=\"isGroupIndeterminate(item)\"\n (change)=\"onSelectGroup(item, $event.checked)\">\n </mat-checkbox>\n </div>\n } @else {\n <div class=\"sd-group-selection-slot\"></div>\n }\n @if (_tableOption.group?.collapsible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-group-toggle-' + (item.meta.group?.key || item.meta.id) : null\"\n type=\"text\"\n [prefixIcon]=\"item.meta.group.isExpanded ? 'expand_more' : 'chevron_right'\"\n width=\"32px\"\n (click)=\"toggleGroupExpand(item)\">\n </sd-button>\n }\n @if (sdGroupDef()?.templateRef; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: groupContext(item)\"></ng-container>\n } @else {\n <span class=\"T14R\">{{ item.meta.group.values | json }}</span>\n }\n </div>\n </ng-template>\n\n <ng-content select=\"[sdTableTop]\"></ng-content>\n @let _queryBarOption = queryBarOption();\n <div\n class=\"sd-table-surface\"\n [class.sd-table-surface--quick-search]=\"!!_quickSearch && !_queryBarMode\"\n [class.sd-table-surface--query-bar]=\"_queryBarMode && !!_queryBarOption\">\n @if (_queryBarMode) {\n <!-- why: thanh n\u1EB1m tr\u00EAn .c-container, ngo\u00E0i l\u1EDBp loading (l\u00E0m m\u1EDD .c-table) \u2014 lu\u00F4n b\u1EA5m \u0111\u01B0\u1EE3c khi \u0111ang t\u1EA3i. -->\n @if (_queryBarOption) {\n @let _queryBarHint = queryBarHint();\n <sd-query-bar\n class=\"sd-table-query-bar\"\n role=\"search\"\n [attr.aria-label]=\"'core.component.table.filter' | sdTranslate\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-query-bar' : null\"\n [option]=\"_queryBarOption\"\n [(filters)]=\"barFilters\"\n [(search)]=\"barSearch\"\n (apply)=\"onQueryBarApply($event)\">\n @if (sdQuickSearchRightDef(); as _right) {\n <div sdQueryBarEnd class=\"sd-table-query-bar-end\"><ng-container [ngTemplateOutlet]=\"_right.templateRef\" /></div>\n }\n </sd-query-bar>\n @if (_queryBarHint) {\n <p class=\"sd-table-query-bar-hint\" [id]=\"queryBarHintId\">\n <sd-icon name=\"error_outline\" aria-hidden=\"true\"></sd-icon>\n <span>{{ _queryBarHint }}</span>\n </p>\n }\n }\n } @else if (_quickSearch) {\n <sd-table-quick-search\n [option]=\"_quickSearch\"\n [value]=\"quickSearchValue()\"\n [autoId]=\"_autoId\"\n [rightTemplate]=\"sdQuickSearchRightDef()?.templateRef\"\n (valueChange)=\"onQuickSearchChange($event)\" />\n }\n <div class=\"c-container\" [class.sd-table-mobile]=\"_mobileCards\">\n <!-- why: l\u1EDBp loading kh\u00F4ng ph\u1EE7 l\u00EAn b\u1EA3ng: header, filter, sort v\u00E0 thanh cu\u1ED9n lu\u00F4n d\u00F9ng \u0111\u01B0\u1EE3c. Ch\u01B0a c\u00F3 d\u00F2ng th\u00EC\n khung x\u01B0\u01A1ng (matNoDataRow); \u0111\u00E3 c\u00F3 d\u00F2ng th\u00EC gi\u1EEF d\u00F2ng c\u0169, qu\u00E1 showDelay m\u1EDBi l\u00E0m m\u1EDD d\u00F2ng v\u00E0 hi\u1EC7n thanh ti\u1EBFn\n tr\u00ECnh. aria-busy v\u1EABn theo loading() th\u1EADt; v\u00F9ng .sd-table-live b\u00E1o \"\u0111ang t\u1EA3i\"/\"\u0111\u00E3 t\u1EA3i xong\". -->\n <div\n class=\"c-table\"\n sdScroll\n stickyShadow\n matSort\n [matSortDisabled]=\"!_tableOption.sort?.enable\"\n [class.c-table--dim]=\"_loadingView === 'refresh' && loadingSettings().dim\"\n [attr.aria-busy]=\"_loading ? 'true' : null\"\n [style.max-height]=\"_tableOption.style?.maxHeight\"\n [style.min-height]=\"_tableOption.style?.minHeight\">\n @if (_mobileCards) {\n @if (_commandHeaderDef) {\n <div class=\"sd-mobile-command-header\"><ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container></div>\n }\n @if (_loadingView === 'refresh') {\n <!-- Mobile: kh\u00F4ng c\u00F3 header b\u1EA3ng; thanh n\u1EB1m \u1EDF m\u00E9p tr\u00EAn danh s\u00E1ch th\u1EBB, d\u01B0\u1EDBi command header. Anchor cao 0\n n\u00EAn thanh hi\u1EC7n/\u1EA9n kh\u00F4ng \u0111\u1EA9y th\u1EBB. -->\n <div class=\"sd-table-progress-anchor\">\n <div class=\"sd-table-progress\" aria-hidden=\"true\"></div>\n </div>\n }\n <sd-table-mobile-cards\n [table]=\"this\"\n [rows]=\"renderItems\"\n [dataRows]=\"groupedItems\"\n [groupTemplate]=\"sdGroupHeader\"\n [aggregateTemplate]=\"mobileAggregate\"></sd-table-mobile-cards>\n @if (_aggregate.total; as summary) {\n <ng-container *ngTemplateOutlet=\"mobileAggregate; context: { summary: summary }\"></ng-container>\n }\n @if (hasFooter()) {\n <div class=\"sd-mobile-footer p-12\" role=\"region\" [attr.aria-label]=\"'core.component.table.mobile.summary' | sdTranslate\">\n @for (column of mobileFooterColumns(); track column.field) {\n <div class=\"d-flex align-items-center flex-wrap gap-8 py-8\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n <ng-container\n *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\"></ng-container>\n </div>\n }\n </div>\n }\n } @else {\n <table\n mat-table\n [class.sd-table-grouped-header]=\"_configuration.multipleHeader\"\n sdAggregateLayout\n [dataSource]=\"renderItems\"\n [trackBy]=\"trackBy\"\n multiTemplateDataRows\n cdkDropList\n [cdkDropListData]=\"groupedItems\"\n [cdkDropListDisabled]=\"!_tableOption.rowReorder?.enabled\"\n [cdkDropListSortPredicate]=\"reorderSortPredicate\"\n (cdkDropListDropped)=\"onReorderDrop($event)\">\n @if (_tableOption.rowReorder?.enabled) {\n <ng-container matColumnDef=\"sdReorder\">\n <th mat-header-cell *matHeaderCellDef class=\"sd-reorder-header\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let row\" class=\"sd-reorder-cell\">\n @if (!row.meta?.group?.items?.length) {\n <sd-icon\n cdkDragHandle\n [class.sd-reorder-disabled]=\"isReorderDisabled(row)\"\n [name]=\"_tableOption.rowReorder?.icon || 'drag_indicator'\"></sd-icon>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n }\n\n <ng-container matColumnDef=\"sdSubInformation\" sticky>\n <td class=\"p-0\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"_configuration.displayedColumns.length\">\n @if (_sdSubInformation?.templateRef) {\n @if (_tableOption.expand?.always) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n } @else {\n <div [@detailExpand]=\"item.meta.expand?.isExpanded ? 'expanded' : 'collapsed'\">\n @if (item.meta.expand?.isExpanded) {\n <ng-container *ngTemplateOutlet=\"_sdSubInformation?.templateRef!; context: { item: item }\"> </ng-container>\n }\n </div>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSubInformationAction\" stickyEnd>\n <th\n class=\"p-0\"\n mat-header-cell\n *matHeaderCellDef\n style=\"width: 1px\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!_tableOption.expand?.always) {\n @let _expanding = !!element.meta.expand?.isExpanding;\n <!-- why: n\u00FAt 35px gi\u1EEF nguy\u00EAn khi \u0111ang t\u1EA3i ([loading] thay prefix icon b\u1EB1ng spinner) \u0111\u1EC3 focus b\u00E0n ph\u00EDm\n kh\u00F4ng m\u1EA5t; onExpand b\u1ECF qua click trong l\u00FAc t\u1EA3i. color primary ch\u1EC9 \u0111\u1EC3 spinner theo m\u00E0u nh\u1EA5n. -->\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-expand-' + element.meta.id : null\"\n type=\"text\"\n [color]=\"_expanding ? 'primary' : null\"\n [loading]=\"_expanding\"\n [attr.aria-busy]=\"_expanding ? 'true' : null\"\n [prefixIcon]=\"element.meta.expand?.isExpanded ? 'expand_less' : 'expand_more'\"\n (click)=\"onExpand(element)\"\n width=\"35px\">\n </sd-button>\n }\n </td>\n </ng-container>\n\n <ng-container matColumnDef=\"sdSelection\" sticky>\n <th class=\"sd-selection-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_visibleSelectAll) {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [indeterminate]=\"_isSelectIndeterminate\"\n [ngModel]=\"_isSelectAll\"\n (ngModelChange)=\"isSelectAll.set($event)\"\n (change)=\"onSelectAll()\">\n </mat-checkbox>\n }\n </th>\n\n <td class=\"sd-selection-cell p-0\" mat-cell *matCellDef=\"let item\">\n @let visible = item.meta.selector?.visible;\n @if (visible) {\n @if (_tableOption.selector?.single) {\n <mat-radio-button\n class=\"c-selection px-8\"\n color=\"primary\"\n [checked]=\"item.meta.selector.isSelected\"\n (change)=\"item.meta.selector.isSelected = true; onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-radio-button>\n } @else {\n <mat-checkbox\n class=\"c-selection px-8\"\n color=\"primary\"\n [(ngModel)]=\"item.meta.selector.isSelected\"\n (change)=\"onSelect(item)\"\n [disabled]=\"item.meta.selector?.disabled\">\n </mat-checkbox>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @if (_tableOption.index?.enabled) {\n @let _pageOffset = pageOffset();\n @let _indexWidth = _tableOption.index?.width || '50px';\n <!-- why: khi tree, c\u1ED9t Index \"\u00F4m\" th\u00EAm chevron + indent. D\u00F9ng width:1px +\n nowrap (.sd-tree-index-cell) \u0111\u1EC3 c\u1ED9t co S\u00C1T n\u1ED9i dung, kh\u00F4ng chi\u1EBFm ch\u1ED7\n th\u1EEBa; header \"#\" canh tr\u00E1i l\u00F9i v\u00E0o (.sd-tree-index-header) cho th\u1EB3ng s\u1ED1. -->\n @let _treeIndex = !!_tableOption.tree;\n <ng-container matColumnDef=\"sdIndex\" sticky>\n <th\n [class.p-0]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n [class.sd-tree-index-header]=\"_treeIndex\"\n mat-header-cell\n *matHeaderCellDef\n [style.width]=\"_treeIndex ? '1px' : _indexWidth\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n {{ _tableOption.index?.title || '#' }}\n </th>\n <td\n [class.px-4]=\"!_treeIndex\"\n [class.text-center]=\"!_treeIndex\"\n [class.sd-tree-index-cell]=\"_treeIndex\"\n mat-cell\n *matCellDef=\"let item; let i = dataIndex\"\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\">\n @if (!item?.meta?.group?.isGroupHeader) {\n @if (_treeIndex) {\n <!-- why: tree \u2192 chevron + indent + STT ph\u00E2n c\u1EA5p (1, 1.2, 1.2.1). T\u00F4 \u0111\u1EADm root (level 0). -->\n <span class=\"sd-tree-line\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n @if (item?.meta?.tree?.indexPath?.length) {\n <span class=\"sd-tree-stt\" [class.sd-stt-root]=\"(item.meta.tree.level ?? 0) === 0\">\n {{ item.meta.tree.indexPath.join('.') }}\n </span>\n }\n </span>\n } @else {\n {{ _pageOffset + (aggregateRenderHost.indices.get(item) ?? i) + 1 }}\n }\n }\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n [style.width]=\"_treeIndex ? '1px' : null\"\n [style.min-width]=\"_treeIndex ? null : _indexWidth\"\n [style.max-width]=\"_treeIndex ? null : _indexWidth\"></td>\n </ng-container>\n }\n <ng-container\n matColumnDef=\"sdCommand\"\n [sticky]=\"_tableOption.command?.align !== 'right'\"\n [stickyEnd]=\"_tableOption.command?.align === 'right'\">\n <!-- why: \u00F4 header c\u1EE7a c\u1ED9t command v\u1ED1n \u0111\u1EC3 tr\u1ED1ng. Cho consumer chi\u1EBFm ch\u1ED7 \u0111\u00F3 b\u1EB1ng\n `sdTableCommandHeaderDef` (th\u01B0\u1EDDng l\u00E0 n\u00FAt th\u00EAm d\u00F2ng) th\u00EC h\u00E0nh \u0111\u1ED9ng c\u1EA5p b\u1EA3ng n\u1EB1m ngay\n tr\u00EAn c\u1EE5m n\u00FAt c\u1EE7a t\u1EEBng d\u00F2ng, thay v\u00EC ph\u1EA3i d\u1EF1ng th\u00EAm m\u1ED9t d\u1EA3i ri\u00EAng d\u01B0\u1EDBi b\u1EA3ng. -->\n <th class=\"p-0\" mat-header-cell *matHeaderCellDef style=\"width: 50px\" [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\">\n @if (_commandHeaderDef) {\n <div class=\"sd-command-header d-flex align-items-center justify-content-center\">\n <ng-container *ngTemplateOutlet=\"_commandHeaderDef.templateRef\"></ng-container>\n </div>\n }\n </th>\n <!-- why: `dataIndex` do CDK c\u1EA5p s\u1EB5n. B\u1EA3n c\u0169 d\u00F9ng `groupedItems.indexOf(item)` \u2014\n qu\u00E9t to\u00E0n m\u1EA3ng cho M\u1ED6I d\u00F2ng render \u1EDF M\u1ED6I CD pass (O(n\u00B2) tr\u00EAn \u0111\u01B0\u1EDDng render),\n v\u00E0 c\u00F2n tr\u1EA3 sai index khi 2 d\u00F2ng tr\u00F9ng reference. -->\n <td class=\"px-8\" mat-cell *matCellDef=\"let item; let i = dataIndex\">\n <desktop-command\n [autoId]=\"_autoId\"\n [commands]=\"_rowCommands\"\n [item]=\"item\"\n [itemIndex]=\"aggregateRenderHost.indices.get(item) ?? i\"></desktop-command>\n </td>\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n <!-- why: group header row d\u00F9ng matRowDef RI\u00CANG v\u1EDBi column list ['sdGroupHeader']\n qua predicate when:isGroupHeaderRow. Cell colspan = displayedColumns.length \u0111\u1EC3\n span TO\u00C0N B\u1ED8 width data row. Tr\u00E1nh colspan trick overflow row khi c\u00E1c TD kh\u00E1c render. -->\n <ng-container matColumnDef=\"sdGroupHeader\">\n <td class=\"p-0 sd-group-header-cell\" mat-cell *matCellDef=\"let item\" [attr.colspan]=\"sdGroupColspan()\">\n <ng-container *ngTemplateOutlet=\"sdGroupHeader; context: { item: item }\"></ng-container>\n </td>\n </ng-container>\n <!-- why: filler column \u1EDF cu\u1ED1i h\u1EA5p th\u1EE5 leftover space khi t\u1ED5ng width c\u00E1c c\u1ED9t data < container \u2014 gi\u1EEF cho selection/STT/command kh\u00F4ng b\u1ECB d\u00E3n. -->\n <ng-container matColumnDef=\"sdFiller\">\n <th class=\"sd-filler-cell p-0\" mat-header-cell *matHeaderCellDef [attr.rowspan]=\"_configuration.multipleHeader ? 2 : 1\"></th>\n <td class=\"sd-filler-cell p-0\" mat-cell *matCellDef=\"let item\"></td>\n <td class=\"sd-filler-cell p-0\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n @for (column of _configuration.firstColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"px-8 c-th\"\n [class.sd-column-group]=\"column.type === 'children'\"\n [attr.scope]=\"column.type === 'children' ? 'colgroup' : 'col'\"\n [sdColumnResize]=\"!!_tableOption.config?.resizable && column.type !== 'children'\"\n [minWidth]=\"column.minWidth\"\n [maxWidth]=\"column.maxWidth\"\n (resizeEnd)=\"onColumnResize(column.field, $event)\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.rowspan]=\"_configuration.multipleHeader && column.type !== 'children' ? 2 : 1\"\n [attr.colspan]=\"column.type === 'children' ? column.children.length : 1\"\n [attr.aria-sort]=\"\n _tableOption.sort?.enable && column.type !== 'children' && column.sortable ? getSortAria(column.field) : null\n \">\n <div\n [class.sd-table-header-cell--trigger]=\"_queryBarMode && column.type !== 'children'\"\n [class.sd-table-header-cell--end]=\"_queryBarMode && column.align === 'right'\">\n <!-- why: sort control ch\u1EC9 \u00F4m title; filter l\u00E0 sibling n\u00EAn kh\u00F4ng th\u00E0nh interactive\n descendant. aria-sort thu\u1ED9c semantic <th>, kh\u00F4ng thu\u1ED9c control n\u00E0y. -->\n @if (column.type === 'children') {\n <div class=\"c-header-title sd-column-group-title\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_queryBarMode) {\n <ng-container *ngTemplateOutlet=\"queryBarTrigger; context: { $implicit: column }\"></ng-container>\n }\n @if (_showInlineFilter && !_configuration.multipleHeader) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: column }\"></ng-container>\n }\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n [class.d-none]=\"column.type === 'children'\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"(item.data && item.data[column.field]) || ''\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children' && !item?.meta?.group?.isGroupHeader) {\n @if (_treeFirstField && column.field === _treeFirstField) {\n <!-- why: kh\u00F4ng c\u00F3 c\u1ED9t Index \u2192 chevron + indent nh\u00FAng v\u00E0o c\u1ED9t data \u0111\u1EA7u (nh\u01B0 file explorer). -->\n <span class=\"sd-tree-line px-8\">\n <ng-container *ngTemplateOutlet=\"sdTreeToggle; context: { row: item }\"></ng-container>\n <desktop-cell class=\"d-block\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"></desktop-cell>\n </span>\n } @else {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n }\n </td>\n <td mat-footer-cell *matFooterCellDef [class.d-none]=\"column.type === 'children'\">\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n @for (column of _configuration.secondColumns; track column.field) {\n <ng-container [matColumnDef]=\"column.field\" [sticky]=\"_configuration.fixedColumn[column.field]\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th px-8\"\n scope=\"col\"\n [style.width]=\"column.width\"\n [style.min-width]=\"column.minWidth || column.width\"\n [style.max-width]=\"column.maxWidth\"\n [attr.aria-sort]=\"_tableOption.sort?.enable && column.sortable ? getSortAria(column.field) : null\">\n <div\n [class.sd-table-header-cell--trigger]=\"_queryBarMode\"\n [class.sd-table-header-cell--end]=\"_queryBarMode && column.align === 'right'\">\n @if (_tableOption.sort?.enable && column.sortable) {\n <div\n [sdTableSortHeader]=\"column.field\"\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n } @else {\n <div\n class=\"c-header-title\"\n [class.justify-content-end]=\"column.align === 'right'\"\n [class.text-right]=\"column.align === 'right'\">\n <column-title [column]=\"column\" [titleDef]=\"_titleDef[column.field]\"></column-title>\n </div>\n }\n @if (_queryBarMode) {\n <ng-container *ngTemplateOutlet=\"queryBarTrigger; context: { $implicit: column }\"></ng-container>\n }\n </div>\n </th>\n <td\n class=\"c-td px-0\"\n mat-cell\n *matCellDef=\"let item\"\n [sdHoverCopy]=\"item[column.field]\"\n [sdHoverCopyDisabled]=\"!column.cell?.copiable\">\n @if (column.type !== 'children') {\n <desktop-cell class=\"d-block px-8\" [column]=\"column\" [item]=\"item\" [cellDef]=\"_cellDef\"> </desktop-cell>\n }\n </td>\n <td mat-footer-cell *matFooterCellDef>\n <ng-container *ngIf=\"_footerDef[column.field]\">\n <ng-container *ngTemplateOutlet=\"_footerDef[column.field].templateRef; context: { items: _items, column: column }\">\n </ng-container>\n </ng-container>\n </td>\n </ng-container>\n }\n <tr class=\"c-first-header\" mat-header-row *matHeaderRowDef=\"_configuration.firstHeaders; sticky: true\"></tr>\n @for (entry of _aggregateColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"\n aggregateCell;\n context: { $implicit: aggregateRenderHost.rows.get(row)?.cells?.get(entry.field) }\n \"></ng-container>\n </td>\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"sd-aggregate-cell px-8 py-8\"\n [class.d-none]=\"entry.hidden\"\n [style.text-align]=\"entry.column?.align\"\n [style.width]=\"entry.column?.width\"\n [style.min-width]=\"entry.column?.minWidth || entry.column?.width\">\n <ng-container\n *ngTemplateOutlet=\"aggregateCell; context: { $implicit: _aggregate.total?.cells?.get(entry.field) }\"></ng-container>\n </td>\n </ng-container>\n }\n <tr mat-row *matRowDef=\"let row; columns: _aggregateColumnIds; when: isAggregateRow\" class=\"sd-aggregate-row\"></tr>\n @if (!!_configuration.secondHeaders.length) {\n <tr class=\"c-second-header\" mat-header-row *matHeaderRowDef=\"_configuration.secondHeaders; sticky: true\"></tr>\n }\n @if (_configuration.multipleHeader) {\n @for (entry of _headerFilterColumns; track entry.id) {\n <ng-container [matColumnDef]=\"entry.id\" [sticky]=\"entry.sticky\" [stickyEnd]=\"entry.stickyEnd\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"c-th sd-filter-header\"\n [class.px-8]=\"!!entry.column\"\n [class.p-0]=\"!entry.column\"\n [class.sd-filler-cell]=\"entry.field === 'sdFiller'\"\n scope=\"col\">\n @if (_showInlineFilter && entry.column) {\n <ng-container *ngTemplateOutlet=\"inlineColumnFilter; context: { $implicit: entry.column }\"></ng-container>\n }\n </th>\n </ng-container>\n }\n <!-- why: gi\u1EEF row definition \u1ED5n \u0111\u1ECBnh; CDK c\u1EADp nh\u1EADt columns \u0111\u1EC3 b\u1ECF controls/sticky offsets khi \u1EA9n filter. -->\n <tr\n class=\"c-filter-header\"\n [style.display]=\"_showInlineFilter ? null : 'none'\"\n mat-header-row\n *matHeaderRowDef=\"_showInlineFilter ? headerFilterColumnIds() : []; sticky: _showInlineFilter\"></tr>\n }\n <!-- Group header row \u2014 ch\u1EC9 1 cell sdGroupHeader colspan to\u00E0n width. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdGroupHeader']; when: isGroupHeaderRow\" class=\"c-group-row-tr\"></tr>\n\n <!-- Data row \u2014 d\u00F9ng displayedColumns \u0111\u1EA7y \u0111\u1EE7; when isDataRow \u0111\u1EC3 lo\u1EA1i tr\u1EEB group header. -->\n <!-- why: [ngStyle] \u0111\u1ECDc meta.rowStyle \u2014 style.rowCss \u0111\u00E3 \u0111\u01B0\u1EE3c resolve 1 l\u1EA7n m\u1ED7i l\u1EA7n\n render. B\u1EA3n c\u0169 g\u1ECDi rowStyle(row) ngay trong binding \u2192 ch\u1EA1y callback c\u1EE7a consumer\n cho T\u1EEANG d\u00F2ng \u1EDF M\u1ED6I CD pass, v\u00E0 v\u00EC tr\u1EA3 object M\u1EDAI n\u00EAn NgStyle ph\u1EA3i ch\u1EA1y l\u1EA1i\n KeyValueDiffer tr\u00EAn m\u1ECDi d\u00F2ng \u1EDF m\u1ECDi pass. -->\n <tr\n mat-row\n cdkDrag\n [cdkDragData]=\"row\"\n [cdkDragDisabled]=\"\n !_tableOption.rowReorder?.enabled ||\n !!row.meta?.group?.items?.length ||\n (row.meta?.tree?.level ?? 0) > 0 ||\n isReorderDisabled(row)\n \"\n *matRowDef=\"let row; columns: _configuration.displayedColumns; when: isDataRow\"\n matRipple\n class=\"c-row\"\n [class.sd-tree-row]=\"!!_tableOption.tree\"\n [ngClass]=\"_tableOption.tree ? 'sd-tree-level-' + (row.meta?.tree?.level ?? 0) : null\"\n [ngStyle]=\"row.meta.rowStyle\"\n [class.selected]=\"row.meta.selector.isSelected\"></tr>\n\n <!-- Sub-information row \u2014 also gated b\u1EDFi isDataRow \u0111\u1EC3 KH\u00D4NG render empty expand row d\u01B0\u1EDBi group header. -->\n <tr mat-row *matRowDef=\"let row; columns: ['sdSubInformation']; when: isDataRow\" class=\"c-detail-row\"></tr>\n @if (_aggregate.total) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_aggregateColumnIds; sticky: true\" class=\"sd-aggregate-total\"></tr>\n }\n @if (hasFooter() && !!_configuration.displayedFooters.length) {\n <tr mat-footer-row *sdTableFooterRowDef=\"_configuration.displayedFooters; sticky: true\"></tr>\n }\n <!-- why: khung x\u01B0\u01A1ng l\u00E0 d\u00F2ng th\u1EADt trong tbody (matNoDataRow ch\u1EC9 hi\u1EC7n khi kh\u00F4ng c\u00F3 d\u00F2ng d\u1EEF li\u1EC7u) n\u00EAn \u00F4 th\u1EB3ng\n c\u1ED9t v\u1EDBi header, k\u1EC3 c\u1EA3 header nh\u00F3m, m\u00E0 kh\u00F4ng ph\u1EA3i \u0111o; footer v\u1EABn n\u1EB1m d\u01B0\u1EDBi; dataSource kh\u00F4ng \u0111\u1ED5i. -->\n <ng-template matNoDataRow>\n @for (cells of skeleton(); track $index) {\n <tr class=\"sd-table-skeleton-row\" aria-hidden=\"true\">\n @for (cell of cells; track cell.field) {\n <td class=\"sd-table-skeleton-cell\" [class.d-none]=\"cell.hidden\">\n @if (cell.shape !== 'none') {\n <span\n class=\"sd-table-skeleton-bar\"\n [attr.data-shape]=\"cell.shape\"\n [attr.data-align]=\"cell.align\"\n [style.width]=\"cell.width\"\n [style.max-width]=\"cell.maxWidth\"></span>\n }\n </td>\n }\n </tr>\n }\n </ng-template>\n </table>\n }\n @let _readError = _readState.status === 'error';\n <!-- why: d\u00F2ng c\u0169 b\u1ECB g\u1EE1 khi l\u1EA7n \u0111\u1ECDc hi\u1EC7n h\u00E0nh l\u1ED7i, n\u00EAn v\u00F9ng l\u1ED7i/empty ch\u1EC9 hi\u1EC7n khi b\u1EA3ng kh\u00F4ng c\u00F2n d\u00F2ng n\u00E0o\n \u2014 end user kh\u00F4ng bao gi\u1EDD th\u1EA5y d\u1EEF li\u1EC7u v\u00E0 l\u1ED7i c\u00F9ng l\u00FAc (NSP-4877). -->\n @let _noRows = !_readError && !_loading && !_total && !_items.length && _loadingView === 'none';\n @if ((_readError && !_hideReadError) || (_noRows && _readState.status === 'empty' && !!_dataStateTemplate)) {\n <sd-data-state [state]=\"_readError ? 'error' : 'empty'\" [retryable]=\"_readError\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (!_loading && loadError() && !_hideReadError) {\n <!-- why: b\u1EA3ng local l\u1ED7i d\u00F9ng c\u00F9ng giao di\u1EC7n l\u1ED7i v\u1EDBi b\u1EA3ng server (sd-data-state, role=\"alert\") v\u00E0 c\u00F9ng\n sdDataStateTemplate; th\u1EED l\u1EA1i = reload() v\u00EC local kh\u00F4ng c\u00F3 snapshot \u0111\u1ECDc \u0111\u1EC3 retryRead(). -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"reload()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n } @else if (_noRows && !loadError()) {\n <!-- why: empty m\u1EB7c \u0111\u1ECBnh gi\u1EEF 3 tr\u1EA1ng th\u00E1i (filter kh\u00F4ng c\u00F3 k\u1EBFt qu\u1EA3 / ch\u01B0a ch\u1ECDn filter b\u1EAFt bu\u1ED9c / ch\u01B0a c\u00F3 d\u1EEF li\u1EC7u)\n c\u00F9ng \u1EA3nh c\u1EA5u h\u00ECnh qua SD_TABLE_CONFIGURATION.images, cho c\u1EA3 b\u1EA3ng server (NSP-5551). Kh\u00F4ng c\u00F3 role live:\n v\u00F9ng .sd-table-live (lu\u00F4n c\u00F3 trong DOM) \u0111\u1ECDc ti\u00EAu \u0111\u1EC1 c\u1EE7a kh\u1ED1i n\u00E0y. -->\n <div class=\"c-no-data-row\">\n @if (_isFiltered) {\n @if (tableConfiguration?.images?.filterEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterEmpty\" alt=\"filter-empty\" />\n } @else {\n <img class=\"c-image sd-image-filter-empty\" alt=\"filter-empty\" />\n }\n <div class=\"T16M\">{{ 'core.component.table.no-results' | sdTranslate }}</div>\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-results-hint' | sdTranslate }}</div>\n } @else {\n @if (_requireFiltered) {\n @if (tableConfiguration?.images?.filterRequired) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.filterRequired\" alt=\"filter-required\" />\n } @else {\n <img class=\"c-image sd-image-filter-required\" alt=\"filter-required\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.choose-filter-hint' | sdTranslate }}</div>\n } @else {\n @if (tableConfiguration?.images?.dataEmpty) {\n <img class=\"c-image\" [src]=\"tableConfiguration!.images!.dataEmpty\" alt=\"data-empty\" />\n } @else {\n <img class=\"c-image sd-image-data-empty\" alt=\"data-empty\" />\n }\n <div class=\"T16R text-secondary\">{{ 'core.component.table.no-data' | sdTranslate }}</div>\n }\n }\n </div>\n }\n </div>\n @if (_loadingView === 'refresh' && !_mobileCards) {\n <!-- N\u1EB1m trong .c-container, kh\u00F4ng trong .c-table, \u0111\u1EC3 kh\u00F4ng cu\u1ED9n ngang theo b\u1EA3ng; top = --sd-table-head-h (\u0111o). -->\n <div class=\"sd-table-progress\" aria-hidden=\"true\"></div>\n }\n @if (!_mobileCards) {\n <selector-action\n [autoId]=\"_autoId\"\n [tableOption]=\"_tableOption\"\n [selectedTableItems]=\"_selectedTableItems\"\n (clear)=\"onClearSelection()\" />\n }\n <div class=\"c-paginator\">\n <div class=\"c-action\">\n @if (_mobileCards) {\n @let _tools = mobileToolsActions();\n @if (_tools.length) {\n <button\n mat-button\n type=\"button\"\n class=\"sd-mobile-tools-trigger\"\n aria-haspopup=\"dialog\"\n [attr.data-autoid]=\"_autoId ? _autoId + '-mobile-tools' : null\"\n (click)=\"mobileTools.openMore()\">\n <sd-icon name=\"tune\"></sd-icon><span>{{ 'core.component.table.mobile.tools' | sdTranslate }}</span>\n </button>\n <sd-table-mobile-actions\n #mobileTools\n [actions]=\"_tools\"\n [autoOpen]=\"false\"\n [title]=\"'core.component.table.mobile.tools-title' | sdTranslate\"\n [autoId]=\"_autoId\"></sd-table-mobile-actions>\n }\n } @else {\n @if (_tableOption.reload?.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-reload' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.reload' | sdTranslate\"\n prefixIcon=\"refresh\"\n (click)=\"reload()\"\n type=\"text\">\n </sd-button>\n }\n @if (_export && _items.length) {\n @if (_export.type === 'custom') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCustom()\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible) {\n @if (_exporting) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [loading]=\"_exporting\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n </sd-button>\n } @else {\n @if (_export.visible === 'ALL' || !_export.visible) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n type=\"text\">\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportExcel()\"\n >{{ 'core.component.table.export-excel' | sdTranslate }}</sd-button-item\n >\n <sd-button-item\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n prefixIcon=\"file_download\"\n (click)=\"exportCSV()\"\n >{{ 'core.component.table.export-csv' | sdTranslate }}</sd-button-item\n >\n </sd-button>\n } @else if (_export.visible === 'EXCEL') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-excel' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportExcel()\"\n type=\"text\">\n </sd-button>\n } @else if (_export.visible === 'CSV') {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-export-csv' : null\"\n class=\"mr-8\"\n [title]=\"_exportTitle\"\n prefixIcon=\"get_app\"\n (click)=\"exportCSV()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n }\n }\n\n @if (_configComponent) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-config' : null\"\n class=\"mr-8\"\n [title]=\"'core.component.table.setup-short' | sdTranslate\"\n prefixIcon=\"settings\"\n [indicator]=\"!_isMobile && hasCustomSetup()\"\n indicatorColor=\"primary\"\n [indicatorLabel]=\"'core.component.table.config.customized' | sdTranslate\"\n (click)=\"_configComponent.open()\"\n type=\"text\">\n </sd-button>\n }\n <!-- Mobile: n\u00FAt Filter m\u1EDF mobile-filter drawer (inline filter \u1EA9n tr\u00EAn mobile) -->\n @if (_isMobile) {\n @if (!_tableOption.filter?.disabled && _mobileFilter) {\n <sd-button\n [autoId]=\"_autoId ? _autoId + '-mobile-filter-open' : null\"\n class=\"mr-8\"\n prefixIcon=\"filter_alt\"\n [title]=\"_mobileCards ? ('core.component.table.filter' | sdTranslate) : undefined\"\n (click)=\"_mobileFilter.open()\"\n type=\"text\">\n </sd-button>\n }\n }\n }\n </div>\n @let _unknownTotalPager = unknownTotalPager();\n @if (_unknownTotalPager) {\n <!-- paginate.total 'unknown': no total exists, so mat-paginator (which derives Next/Last and the\n range from `length`) is replaced by a pager that renders only the rows actually shown. -->\n @if (!_tableOption.paginate?.hidden && unknownTotalPagerVisible()) {\n <sd-table-unknown-total-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [state]=\"_unknownTotalPager\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages\"\n [hidePageSize]=\"_isMobile || !!_tableOption.paginate?.hidePageSize\"\n [showFirstButton]=\"!_isMobile && !!_tableOption.paginate?.showFirstLastButtons\"\n [autoId]=\"_autoId\"\n (page)=\"onUnknownTotalPage($event)\"></sd-table-unknown-total-paginator>\n } @else if (!_isMobile && !_tableOption.paginate?.hidden && unknownTotalSingleCount()) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ unknownTotalSingleCount() }}</span>\n </div>\n }\n } @else {\n @let hidePaginator = !_tableOption.paginate?.pageSize || _total === undefined || _total <= _tableOption.paginate?.pageSize!;\n <mat-paginator\n [class.sd-mobile-paginator]=\"_mobileCards\"\n [class.d-none]=\"_tableOption.paginate?.hidden || hidePaginator\"\n [length]=\"_total\"\n [pageSize]=\"_tableOption.paginate?.pageSize\"\n [pageSizeOptions]=\"_tableOption.paginate?.pages!\"\n [showFirstLastButtons]=\"!_isMobile && _tableOption.paginate?.showFirstLastButtons\"\n [hidePageSize]=\"_isMobile || _tableOption.paginate?.hidePageSize\"\n [selectConfig]=\"{ panelClass: ['sd-select-panel', 'sd-table-page-size-panel'] }\"></mat-paginator>\n <!-- \"\u0110ang hi\u1EC3n th\u1ECB...\" ch\u1EC9 desktop -->\n @if (!_isMobile) {\n @if (!_tableOption.paginate?.hidden && hidePaginator && _total !== undefined && _total > 0) {\n <div class=\"T14R c-summary\">\n {{ 'core.component.table.showing' | sdTranslate }} <span class=\"T14M ml-2\">1-{{ _total }}/{{ _total }}</span>\n </div>\n }\n }\n }\n </div>\n </div>\n </div>\n\n @if (_tableOption.config?.visible) {\n <config [autoId]=\"_autoId\" [tableOption]=\"_tableOption\" (defaultsRestored)=\"onConfigDefaultsRestored()\" />\n }\n <!-- Mobile filter drawer \u2014 ch\u1EC9 instantiate khi c\u1EA7n render tr\u00EAn mobile -->\n @if (!_tableOption.filter?.disabled && filterRegister) {\n <mobile-filter\n [autoId]=\"_autoId\"\n [filter]=\"_tableOption.filter!\"\n [externalFilters]=\"_tableOption.filter?.externalFilters!\"\n [columns]=\"mobileColumns()\"\n [filterDefs]=\"sdFilterDefs()\"\n [filterRegister]=\"filterRegister\"\n [cacheValues]=\"cacheValues\">\n </mobile-filter>\n }\n} @else if (_readState.status === 'error' && !_hideReadError) {\n <!-- why: lookup c\u00F3 th\u1EC3 l\u1ED7i tr\u01B0\u1EDBc khi c\u00F3 configuration; v\u1EABn ph\u1EA3i c\u00F3 l\u1ED1i retry v\u00E0 custom error template. -->\n <sd-data-state state=\"error\" [retryable]=\"true\" (sdRetry)=\"retryRead()\">\n @if (_dataStateTemplate; as custom) {\n <ng-template sdDataStateTemplate let-current let-retry=\"retry\" let-action=\"action\">\n <ng-container\n [ngTemplateOutlet]=\"custom.template\"\n [ngTemplateOutletContext]=\"{ $implicit: current, state: current, retry: retry, action: action }\"></ng-container>\n </ng-template>\n }\n </sd-data-state>\n} @else if (_loadingView === 'skeleton') {\n <!-- why: lookup c\u1ED9t (values/lazy-values) c\u00F3 th\u1EC3 ch\u1EADm; ch\u01B0a c\u00F3 configuration n\u00EAn ch\u01B0a bi\u1EBFt c\u1ED9t, v\u1EBD khung x\u01B0\u01A1ng chung\n thay v\u00EC \u0111\u1EC3 tr\u1ED1ng. Hydrate kh\u00F4ng c\u00F3 lookup xong trong microtask n\u00EAn kh\u1ED1i n\u00E0y kh\u00F4ng k\u1ECBp hi\u1EC7n. -->\n <div class=\"sd-table-skeleton-block\" aria-hidden=\"true\">\n @for (cells of genericSkeleton; track $index) {\n <div class=\"sd-table-skeleton-block-row\">\n @for (cell of cells; track cell.field) {\n <span class=\"sd-table-skeleton-cell\">\n <span class=\"sd-table-skeleton-bar\" [style.width]=\"cell.width\" [style.max-width]=\"cell.maxWidth\"></span>\n </span>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;overflow:auto;width:100%;height:100%;--mat-table-row-item-container-height: 36px}:host:focus-visible{outline:var(--sd-focus-ring-width, 2px) solid var(--sd-focus-ring-color, var(--sd-primary));outline-offset:2px}:host .sd-table-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host .c-header-title{height:40px;display:flex;align-items:center}:host .sd-table-surface{display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;background:var(--sd-surface, #fff);border-radius:var(--sd-radius-6, 6px)}:host .c-container{position:relative;min-height:50px;display:flex;flex-direction:column;flex:1;isolation:isolate}:host .c-container .c-table{position:relative;flex:1;display:flex;flex-direction:column}:host .c-container .c-table table{border-collapse:separate;width:100%}:host .c-container .c-table table tr.c-first-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table tr.c-second-header.mat-mdc-header-row{height:40px}:host .c-container .c-table table.sd-table-grouped-header th.c-th{vertical-align:middle;padding-block:4px}:host .c-container .c-table table.sd-table-grouped-header tr.c-first-header.mat-mdc-header-row{height:32px}:host .c-container .c-table table.sd-table-grouped-header tr.c-filter-header.mat-mdc-header-row{height:auto}:host .c-container .c-table table.sd-table-grouped-header th.sd-filter-header{padding-block:0 8px;vertical-align:bottom}:host .c-container .c-table table.sd-table-grouped-header column-filter{display:flex;align-items:center;min-height:36px}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group{padding-block:4px;vertical-align:middle;background-color:color-mix(in srgb,var(--sd-border, #c4c6d0) 18%,var(--sd-table-group-header-mix, #f2f3f4));box-shadow:inset 0 -1px var(--sd-border, #c4c6d0)}:host .c-container .c-table table.sd-table-grouped-header th.sd-column-group .sd-column-group-title{height:auto;min-height:24px;justify-content:center;text-align:center;font-weight:var(--sd-font-weight-semibold, 600)}:host .c-container .c-table table tr.c-detail-row{height:0}:host .c-container .c-table table tr.c-row.activated{background-color:var(--sd-table-row-activated-bg, #e5ecff)}:host .c-container .c-table table tr.c-row.selected{background-color:var(--sd-table-row-selected-bg, #eef2ff)}:host .c-container .c-table table tr.c-row:not(.selected):not(.activated):hover{background-color:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table tr.c-row td{border-bottom-width:0}:host .c-container .c-table table tr.c-row.c-expandable{cursor:pointer}:host .c-container .c-table table tr.c-row.c-expandable:hover{background:var(--sd-table-row-hover-bg, #f5f5f5)}:host .c-container .c-table table th.mat-mdc-header-cell{background-color:var(--sd-table-header-bg, #f2f3f4);border-bottom:0!important}:host .c-container .c-table table td.mat-mdc-cell,:host .c-container .c-table table td.mat-mdc-footer-cell,:host .c-container .c-table table th.mat-mdc-header-cell{border-bottom-color:var(--sd-table-row-divider, #f2f2f2)!important}:host .c-container .c-table .c-th{vertical-align:middle;padding-block:8px;font-weight:var(--sd-font-weight-medium, 500);font-size:var(--sd-font-size-14, 14px);line-height:var(--sd-line-height-20, 20px);color:var(--sd-table-header-text, #212121)}:host .c-container .c-table .c-th.sd-col-resize-host{position:relative}:host .c-container .c-table .c-th.sd-resizing{-webkit-user-select:none;user-select:none}:host .c-container .c-table .c-th .sd-col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;z-index:2}:host .c-container .c-table .c-th .sd-col-resize-handle:hover{background:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host .c-container .c-table .c-td:first{padding-left:10px}:host .c-container .c-table .c-no-data-row{flex:1;width:100%;position:sticky;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .c-container .c-table .c-no-data-row .c-image{margin-bottom:16px;width:96px}:host .c-container .c-paginator{display:flex;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--sd-table-bg, #ffffff)}:host .c-container .c-paginator .mat-mdc-paginator{background:transparent;--mat-paginator-container-size: 40px;--mat-icon-button-state-layer-size: 32px;--mdc-icon-button-state-layer-size: 32px;--mdc-icon-button-icon-size: 20px}:host .c-container .c-paginator .c-action{padding:0}:host .c-container .c-paginator .c-action sd-button{margin:8px 5px}:host .c-container .c-paginator .c-summary{padding:8px 16px}:host .c-container .c-empty{text-align:center;background-color:var(--sd-table-bg, #ffffff);border:none!important}:host .c-container .c-empty sd-icon{font-size:150px;margin-top:30px;margin-bottom:30px;opacity:.2;width:auto;height:auto}:host button.c-btn-add{background-color:var(--sd-table-bg, #ffffff);box-shadow:var(--sd-shadow-sm)}:host .sd-reorder-header,:host .sd-reorder-cell{width:40px;min-width:40px;padding:0 4px;box-sizing:border-box}:host .sd-reorder-cell sd-icon{cursor:grab;color:var(--sd-text-muted);display:flex;align-items:center}:host .sd-reorder-cell sd-icon:active{cursor:grabbing}:host .sd-reorder-cell sd-icon.sd-reorder-disabled{opacity:.3;cursor:not-allowed;pointer-events:none}:host ::ng-deep .sd-mobile-paginator .mat-mdc-paginator-range-label{margin-inline:4px;white-space:nowrap}:host .c-container:not(.sd-table-mobile)>.c-table{border-radius:6px 6px 0 0}:host .c-container:not(.sd-table-mobile)>.c-paginator{border-radius:0}:host .sd-mobile-command-header{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;padding:4px}:host .c-container.sd-table-mobile .c-paginator{flex-wrap:wrap;gap:4px}:host .c-container.sd-table-mobile .c-action{display:flex;align-items:center;min-width:0}:host .c-container.sd-table-mobile .sd-mobile-tools-trigger{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px}:host .c-container.sd-table-mobile .sd-mobile-paginator{margin-inline-start:auto}:host .c-container.sd-table-mobile .c-paginator,:host .c-container.sd-table-mobile .c-empty{background-color:var(--sd-surface);color:var(--sd-text)}:host .c-container.sd-table-mobile .c-paginator{background-color:var(--sd-table-bg, #ffffff)}:host ::ng-deep .sd-table-mobile .c-paginator button{min-width:44px;min-height:44px}:host .c-container.sd-table-mobile .c-paginator .sd-mobile-paginator{--mat-icon-button-state-layer-size: 44px;--mdc-icon-button-state-layer-size: 44px}:host ::ng-deep .mat-select-arrow{color:var(--sd-table-select-arrow, #a6a6a6)}:host ::ng-deep .sd-table-sort-header{cursor:pointer;outline:none}:host ::ng-deep .sd-table-sort-header:focus-visible{border-bottom:solid 1px currentColor}:host ::ng-deep th[aria-sort] .sd-table-sort-header{position:relative;padding-right:24px}:host ::ng-deep th[aria-sort] .sd-table-sort-header:after{content:\"\";position:absolute;top:50%;right:0;width:16px;height:16px;transform:translateY(-50%);background-color:var(--sd-text-secondary);mask-repeat:no-repeat;mask-position:center;mask-size:16px 16px;pointer-events:none}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after,:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{background-color:var(--sd-text)}:host ::ng-deep th[aria-sort=none] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=ascending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E\")}:host ::ng-deep th[aria-sort=descending] .sd-table-sort-header:after{mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='%23000000'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath fill='%237A7A7A' d='M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z'/%3E%3C/svg%3E\")}:host ::ng-deep .c-paginator .mat-mdc-paginator-range-label{margin:0 4px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size{align-items:center}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select{--mat-select-trigger-text-size: var(--sd-font-size-14, 14px);--mat-paginator-select-trigger-text-size: var(--sd-font-size-14, 14px)}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-infix{display:flex;align-items:center;height:32px;min-height:32px;padding-top:0;padding-bottom:0}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select.mat-mdc-form-field .mat-mdc-form-field-infix mat-select.mat-mdc-select{margin-top:0}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-text-field-wrapper{padding-right:8px}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow-wrapper{width:20px;justify-content:center}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow{width:16px;height:16px;color:var(--sd-text-secondary);background-color:currentColor;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E\") center/16px 16px no-repeat}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-select-arrow svg{display:none}:host ::ng-deep .c-paginator .mat-mdc-paginator-page-size-select .mat-mdc-form-field-flex:hover .mat-mdc-select-arrow{color:var(--sd-text)}::ng-deep .mat-mdc-select-panel.sd-select-panel.sd-table-page-size-panel .mat-mdc-option{min-height:36px;padding:7px 12px}:host ::ng-deep .cdk-drag-preview{box-shadow:var(--sd-shadow-md);background:var(--sd-table-bg);display:table;width:100%}:host ::ng-deep .cdk-drag-preview td{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider)}:host ::ng-deep .cdk-drag-placeholder{opacity:0}:host ::ng-deep .cdk-drop-list-dragging tr.c-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}:host ::ng-deep .sd-selection-cell{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .sd-filler-cell{width:auto;min-width:0;padding:0!important;border:0}:host ::ng-deep .sd-group-header-cell{background:var(--sd-table-group-row-bg, #f5f7fc);border-top:1px solid var(--sd-table-group-row-border, #e6e9f2);border-bottom:1px solid var(--sd-table-group-row-border, #e6e9f2)}:host ::ng-deep .sd-group-row{min-height:36px}:host ::ng-deep .sd-group-selection-slot{width:42px;min-width:42px;max-width:42px}:host ::ng-deep .c-selection{transform:scale(.85);transform-origin:center}:host ::ng-deep .sd-tree-line{display:inline-flex;align-items:center;min-height:32px}:host ::ng-deep .sd-tree-indent{flex:0 0 auto}:host ::ng-deep .sd-tree-toggle-slot{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px}:host ::ng-deep .sd-tree-toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:transparent;border-radius:50%;cursor:pointer;color:var(--sd-text-secondary, #5b6472);transition:background-color .15s ease}:host ::ng-deep .sd-tree-toggle-btn sd-icon{font-size:var(--sd-font-size-18, 18px);width:18px;height:18px;line-height:var(--sd-line-height-18, 18px)}:host ::ng-deep .sd-tree-toggle-btn:hover{background-color:color-mix(in srgb,var(--sd-text) 8%,transparent)}:host ::ng-deep .sd-tree-toggle-btn[aria-busy=true]{cursor:progress}:host ::ng-deep .sd-tree-stt{margin-left:2px;white-space:nowrap}:host ::ng-deep .sd-tree-index-cell{text-align:left!important;white-space:nowrap;padding-left:8px;padding-right:8px}:host ::ng-deep .sd-tree-index-header{padding-left:32px}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0{background:var(--sd-table-tree-level-0-bg, #fbfcfe)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-0>td{font-weight:var(--sd-font-weight-medium, 500)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-1{background:var(--sd-table-tree-level-1-bg, #ffffff)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-2{background:var(--sd-table-tree-level-2-bg, #fafbfd)}:host ::ng-deep tr.c-row.sd-tree-row.sd-tree-level-3{background:var(--sd-table-tree-level-3-bg, #f6f8fb)}:host ::ng-deep .sd-stt-root{font-weight:var(--sd-font-weight-bold, 700);color:var(--sd-table-tree-root-text, #1f2330)}:host ::ng-deep .sd-mobile-tools-trigger .mdc-button__label{display:inline-flex;align-items:center;gap:6px}:host .sd-table-surface--quick-search>.c-container:not(.sd-table-mobile)>.c-table,:host .sd-table-surface--query-bar>.c-container:not(.sd-table-mobile)>.c-table{border-top-left-radius:0;border-top-right-radius:0}:host .sd-table-query-bar{display:block;flex:0 0 auto;min-width:0;background:var(--sd-table-bg, #ffffff);border-top-left-radius:var(--sd-radius-6, 6px);border-top-right-radius:var(--sd-radius-6, 6px);--sd-control-label-bg: var(--sd-table-bg, #ffffff)}:host .sd-table-query-bar-end{flex:none;display:flex;align-items:center;align-self:flex-start;padding-left:8px}:host .sd-table-header-cell--trigger{display:flex;align-items:center;gap:4px;min-width:0}:host .sd-table-header-cell--trigger>.c-header-title{flex:0 1 auto;min-width:0}:host .sd-table-header-cell--trigger.sd-table-header-cell--end{flex-direction:row-reverse;justify-content:flex-start}:host .sd-table-filter-trigger{flex:none;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:0;border-radius:var(--sd-radius-4, 4px);background:transparent;color:var(--sd-text-secondary);cursor:pointer;opacity:0;transition:opacity var(--sd-duration-fast, .12s) ease,background-color var(--sd-duration-fast, .12s) ease}:host .sd-table-filter-trigger sd-icon{width:15px;height:15px;font-size:15px}:host .sd-table-filter-trigger:hover{background:var(--sd-table-row-hover-bg)}:host .sd-table-filter-trigger:focus-visible{opacity:1;outline:2px solid var(--sd-focus-ring-color);outline-offset:1px}:host .sd-table-filter-trigger.sd-table-filter-trigger--active{opacity:1;color:var(--sd-primary)}:host th:hover .sd-table-filter-trigger,:host th:focus-within .sd-table-filter-trigger{opacity:1}@media(pointer:coarse){:host .sd-table-filter-trigger{opacity:1}}@media(prefers-reduced-motion:reduce){:host .sd-table-filter-trigger{transition:none}}@media(forced-colors:active){:host .sd-table-filter-trigger{color:ButtonText}:host .sd-table-filter-trigger--active{color:Highlight}}:host .sd-table-query-bar-hint{display:flex;align-items:center;gap:6px;margin:0;padding:0 12px 8px;background:var(--sd-table-bg, #ffffff);font-size:var(--sd-font-size-12, 12px);line-height:var(--sd-line-height-18, 18px);color:var(--sd-error)}:host .sd-table-query-bar-hint sd-icon{flex:none;width:16px;height:16px;font-size:var(--sd-font-size-16, 16px)}@keyframes sd-table-skeleton-sweep{to{background-position:480px 0}}@keyframes sd-table-progress-run{0%{transform:translate(-100%)}to{transform:translate(285.7142857143%)}}@keyframes sd-table-spin{to{transform:rotate(360deg)}}:host tr.sd-table-skeleton-row{height:var(--mat-table-row-item-container-height, 36px)}:host .sd-table-skeleton-cell{padding:0 8px;border-bottom:1px solid var(--sd-table-row-divider);vertical-align:middle}:host .sd-table-skeleton-bar{display:block;height:12px;border-radius:var(--sd-radius-4, 4px);background:linear-gradient(90deg,var(--sd-table-skeleton-bg) 0,var(--sd-table-skeleton-highlight) 40%,var(--sd-table-skeleton-bg) 80%) 0 0/480px 100%;animation:sd-table-skeleton-sweep 1.4s linear infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-skeleton-bar{animation:none}}@media(forced-colors:active){:host .sd-table-skeleton-bar{forced-color-adjust:none;background:GrayText}}:host .sd-table-skeleton-bar[data-align=end]{margin-inline-start:auto}:host .sd-table-skeleton-bar[data-align=center]{margin-inline:auto}:host .sd-table-skeleton-bar[data-shape=pill]{height:20px;border-radius:999px}:host .sd-table-skeleton-bar[data-shape=box]{width:14px;height:14px;border-radius:3px}:host .sd-table-skeleton-block{overflow:hidden;border-radius:var(--sd-radius-6, 6px);background:var(--sd-surface)}:host .sd-table-skeleton-block-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:center;height:var(--mat-table-row-item-container-height, 36px);border-bottom:1px solid var(--sd-table-row-divider)}:host .sd-table-skeleton-block-row>.sd-table-skeleton-cell{border-bottom:0}:host .c-table>table>::ng-deep tbody{transition:opacity var(--sd-duration-fast, .12s)}@media(prefers-reduced-motion:reduce){:host .c-table>table>::ng-deep tbody{transition:none}}:host .c-table.c-table--dim{cursor:progress}:host .c-table.c-table--dim>table>::ng-deep thead,:host .c-table.c-table--dim>table>::ng-deep tfoot{cursor:auto}:host .c-table.c-table--dim>table>::ng-deep tbody{opacity:var(--sd-table-loading-dim, .55)}:host .c-table.c-table--dim>table>::ng-deep tbody,:host .c-table.c-table--dim>table>::ng-deep tbody *{pointer-events:none!important}:host .sd-table-progress{position:absolute;top:var(--sd-table-head-h, 0px);right:0;left:0;z-index:20;height:2px;overflow:hidden;pointer-events:none;background:var(--sd-table-progress-track)}:host .sd-table-progress:before{content:\"\";position:absolute;inset:0 auto 0 0;width:35%;background:var(--sd-table-spinner);animation:sd-table-progress-run 1.1s ease-in-out infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-progress:before{width:100%;opacity:.6;animation:none}}@media(forced-colors:active){:host .sd-table-progress{forced-color-adjust:none;box-sizing:content-box;border:1px solid CanvasText;background:Canvas}:host .sd-table-progress:before{background:Highlight}}:host .sd-table-spinner{display:inline-block;flex:0 0 auto;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;border:2px solid var(--sd-table-progress-track);border-top-color:var(--sd-table-spinner);border-radius:50%;animation:sd-table-spin .8s linear infinite}@media(prefers-reduced-motion:reduce){:host .sd-table-spinner{animation:none}}@media(forced-colors:active){:host .sd-table-spinner{forced-color-adjust:none;border-color:GrayText;border-top-color:Highlight}}:host .sd-table-progress-anchor{position:sticky;top:0;z-index:20;height:0}:host .sd-table-progress-anchor>.sd-table-progress{top:0}.sd-aggregate-row,.sd-aggregate-total,.sd-mobile-aggregate{background:color-mix(in srgb,var(--sd-surface-muted) 35%,var(--sd-surface));color:var(--sd-text);font-weight:var(--sd-font-weight-medium, 500)}.sd-aggregate-cell{background:inherit;border-top:1px solid var(--sd-border)}:host(.sd-table--fill){flex:1 1 0;height:auto;min-height:var(--sd-table-fill-min, 0px);overflow:visible}:host(.sd-table--fill) .c-container{min-height:0}:host(.sd-table--fill) .c-container>.c-table{min-height:calc(var(--sd-table-fill-head, 40px) + 5 * var(--mat-table-row-item-container-height, 36px))}:host(.sd-table--fill) .c-container>.c-paginator{flex:none;min-height:48px}\n", ":host ::ng-deep .sticky-shadow-right{overflow:visible!important}:host ::ng-deep .sticky-shadow-right:after{content:\"\";position:absolute;top:0;right:0;bottom:0;width:8px;transform:translate(100%);background:linear-gradient(to right,rgba(0,0,0,.12),transparent);pointer-events:none}:host ::ng-deep .sticky-shadow-left{overflow:visible!important}:host ::ng-deep .sticky-shadow-left:after{content:\"\";position:absolute;top:0;left:0;bottom:0;width:8px;transform:translate(-100%);background:linear-gradient(to left,rgba(0,0,0,.12),transparent);pointer-events:none}\n"] }]
6903
8446
  }], ctorParameters: () => [] });
6904
8447
 
6905
8448
  /**
6906
8449
  * Generated bundle index. Do not edit.
6907
8450
  */
6908
8451
 
6909
- export { SD_TABLE_CONFIGURATION, SdConvertToPagingReq, SdMaterialFooterDefDirective, SdTable, SdTableCellDefDirective, SdTableCommandHeaderDefDirective, SdTableExpandDefDirective, SdTableFilterDefDirective, SdTableGroupDefDirective, SdTablePaginatorIntl, SdTableQuickSearchRightDefDirective, SdTableRowMobileDefDirective, SdTableTitleDefDirective };
8452
+ export { SD_TABLE_CONFIGURATION, SD_TABLE_LAYOUT, SdConvertToPagingReq, SdMaterialFooterDefDirective, SdTable, SdTableCellDefDirective, SdTableCommandHeaderDefDirective, SdTableExpandDefDirective, SdTableFilterDefDirective, SdTableGroupDefDirective, SdTablePaginatorIntl, SdTableQuickSearchRightDefDirective, SdTableRowMobileDefDirective, SdTableTitleDefDirective };
6910
8453
  //# sourceMappingURL=sdcorejs-angular-components-table.mjs.map