@sdcorejs/angular 22.3.3 → 22.3.5

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 (152) hide show
  1. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +5 -5
  2. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  3. package/fesm2022/sdcorejs-angular-components-import-excel.mjs +1 -1
  4. package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
  5. package/fesm2022/sdcorejs-angular-components-modal.mjs +46 -10
  6. package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
  7. package/fesm2022/sdcorejs-angular-components-query-bar.mjs +549 -82
  8. package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
  9. package/fesm2022/sdcorejs-angular-components-table.mjs +6528 -3510
  10. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  11. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +1 -1
  12. package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
  13. package/fesm2022/sdcorejs-angular-forms-select.mjs +23 -4
  14. package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
  15. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
  16. package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
  17. package/fesm2022/sdcorejs-angular-i18n.mjs +330 -5
  18. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  19. package/fesm2022/sdcorejs-angular-modules-layout.mjs +97 -11
  20. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  21. package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-Cfmr0L_5.mjs → sdcorejs-angular-modules-pattern-base-api.service-C2o5xPVB.mjs} +2 -2
  22. package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-Cfmr0L_5.mjs.map → sdcorejs-angular-modules-pattern-base-api.service-C2o5xPVB.mjs.map} +1 -1
  23. package/fesm2022/{sdcorejs-angular-modules-pattern-create-side-drawer.component-CxgmaNod.mjs → sdcorejs-angular-modules-pattern-create-side-drawer.component-CRc9T7rb.mjs} +18 -4
  24. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CRc9T7rb.mjs.map +1 -0
  25. package/fesm2022/{sdcorejs-angular-modules-pattern-create-side-drawer.component-C7-itJqB.mjs → sdcorejs-angular-modules-pattern-create-side-drawer.component-Cz-MjRG0.mjs} +18 -4
  26. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-Cz-MjRG0.mjs.map +1 -0
  27. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-C2GdGhkJ.mjs → sdcorejs-angular-modules-pattern-create.component-CxicczH7.mjs} +19 -5
  28. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CxicczH7.mjs.map +1 -0
  29. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-DIivNX4o.mjs → sdcorejs-angular-modules-pattern-create.component-D3MzNJ3F.mjs} +2 -2
  30. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-DIivNX4o.mjs.map → sdcorejs-angular-modules-pattern-create.component-D3MzNJ3F.mjs.map} +1 -1
  31. package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-CzJh4LMR.mjs → sdcorejs-angular-modules-pattern-create.component-RBvVv88D.mjs} +36 -12
  32. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-RBvVv88D.mjs.map +1 -0
  33. package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-B0nhFd_M.mjs → sdcorejs-angular-modules-pattern-customer.service-3hWkJClX.mjs} +2 -2
  34. package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-B0nhFd_M.mjs.map → sdcorejs-angular-modules-pattern-customer.service-3hWkJClX.mjs.map} +1 -1
  35. package/fesm2022/{sdcorejs-angular-modules-pattern-detail-side-drawer.component-D1dqsKX0.mjs → sdcorejs-angular-modules-pattern-detail-side-drawer.component-DzDAX3B7.mjs} +2 -2
  36. package/fesm2022/{sdcorejs-angular-modules-pattern-detail-side-drawer.component-D1dqsKX0.mjs.map → sdcorejs-angular-modules-pattern-detail-side-drawer.component-DzDAX3B7.mjs.map} +1 -1
  37. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-WK0AcxNJ.mjs → sdcorejs-angular-modules-pattern-detail.component-CEhbU12j.mjs} +2 -2
  38. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-WK0AcxNJ.mjs.map → sdcorejs-angular-modules-pattern-detail.component-CEhbU12j.mjs.map} +1 -1
  39. package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-Dkmm0a2Y.mjs → sdcorejs-angular-modules-pattern-detail.component-CcpYULut.mjs} +28 -11
  40. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-CcpYULut.mjs.map +1 -0
  41. package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-BvhEMUgY.mjs → sdcorejs-angular-modules-pattern-flow.component-G5lHfG81.mjs} +2 -2
  42. package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-BvhEMUgY.mjs.map → sdcorejs-angular-modules-pattern-flow.component-G5lHfG81.mjs.map} +1 -1
  43. package/fesm2022/{sdcorejs-angular-modules-pattern-general-information-form.component-cxNRkeRU.mjs → sdcorejs-angular-modules-pattern-general-information-form.component-BJaYcNzf.mjs} +3 -3
  44. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BJaYcNzf.mjs.map +1 -0
  45. package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-D1zWXyN6.mjs → sdcorejs-angular-modules-pattern-index.component-CosbQK0W.mjs} +4 -4
  46. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-CosbQK0W.mjs.map +1 -0
  47. package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-DmmVKrgM.mjs +836 -0
  48. package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-DmmVKrgM.mjs.map +1 -0
  49. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-CaXgC8wK.mjs → sdcorejs-angular-modules-pattern-list.component-BjehcQEk.mjs} +2 -2
  50. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-CaXgC8wK.mjs.map → sdcorejs-angular-modules-pattern-list.component-BjehcQEk.mjs.map} +1 -1
  51. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-1Xn1WaAP.mjs → sdcorejs-angular-modules-pattern-list.component-CNVqk3JC.mjs} +3 -3
  52. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-1Xn1WaAP.mjs.map → sdcorejs-angular-modules-pattern-list.component-CNVqk3JC.mjs.map} +1 -1
  53. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-Bv_l7vnz.mjs → sdcorejs-angular-modules-pattern-list.component-C_pVqRcC.mjs} +2 -2
  54. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-Bv_l7vnz.mjs.map → sdcorejs-angular-modules-pattern-list.component-C_pVqRcC.mjs.map} +1 -1
  55. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-ChwTb4BU.mjs → sdcorejs-angular-modules-pattern-list.component-EaNDEtCn.mjs} +2 -2
  56. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-ChwTb4BU.mjs.map → sdcorejs-angular-modules-pattern-list.component-EaNDEtCn.mjs.map} +1 -1
  57. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-B6Ndq542.mjs → sdcorejs-angular-modules-pattern-list.component-jB3E20UF.mjs} +2 -2
  58. package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-B6Ndq542.mjs.map → sdcorejs-angular-modules-pattern-list.component-jB3E20UF.mjs.map} +1 -1
  59. package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-DKK3NmbN.mjs → sdcorejs-angular-modules-pattern-mock-backend.factory-CFljqhjv.mjs} +2 -2
  60. package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-DKK3NmbN.mjs.map → sdcorejs-angular-modules-pattern-mock-backend.factory-CFljqhjv.mjs.map} +1 -1
  61. package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs → sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs} +9 -2
  62. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +1 -0
  63. package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs → sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs} +21 -19
  64. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +1 -0
  65. package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-GSlXwL2Z.mjs → sdcorejs-angular-modules-pattern-product.service-DitXmlr1.mjs} +2 -2
  66. package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-GSlXwL2Z.mjs.map → sdcorejs-angular-modules-pattern-product.service-DitXmlr1.mjs.map} +1 -1
  67. package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-DPBwMafn.mjs → sdcorejs-angular-modules-pattern-profile.component-Dxw7Ix9d.mjs} +2 -2
  68. package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-DPBwMafn.mjs.map → sdcorejs-angular-modules-pattern-profile.component-Dxw7Ix9d.mjs.map} +1 -1
  69. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B6z9lJYB.mjs → sdcorejs-angular-modules-pattern-routes-BOiWZHqg.mjs} +3 -3
  70. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-B6z9lJYB.mjs.map → sdcorejs-angular-modules-pattern-routes-BOiWZHqg.mjs.map} +1 -1
  71. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-h66efEeH.mjs → sdcorejs-angular-modules-pattern-routes-BWZxOMhB.mjs} +7 -7
  72. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-h66efEeH.mjs.map → sdcorejs-angular-modules-pattern-routes-BWZxOMhB.mjs.map} +1 -1
  73. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DeThmv4f.mjs → sdcorejs-angular-modules-pattern-routes-BxXgJVsW.mjs} +4 -4
  74. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DeThmv4f.mjs.map → sdcorejs-angular-modules-pattern-routes-BxXgJVsW.mjs.map} +1 -1
  75. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-t3O2L2J5.mjs → sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs} +3 -3
  76. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-t3O2L2J5.mjs.map → sdcorejs-angular-modules-pattern-routes-C43Q4Wtq.mjs.map} +1 -1
  77. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-D1fsRfRB.mjs → sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs} +5 -5
  78. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-D1fsRfRB.mjs.map → sdcorejs-angular-modules-pattern-routes-CJ-RAMa5.mjs.map} +1 -1
  79. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DdCFCwxY.mjs → sdcorejs-angular-modules-pattern-routes-CWixJ2If.mjs} +3 -3
  80. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DdCFCwxY.mjs.map → sdcorejs-angular-modules-pattern-routes-CWixJ2If.mjs.map} +1 -1
  81. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-1kifjm82.mjs → sdcorejs-angular-modules-pattern-routes-CophQH_L.mjs} +5 -5
  82. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-1kifjm82.mjs.map → sdcorejs-angular-modules-pattern-routes-CophQH_L.mjs.map} +1 -1
  83. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-bQpdxKlY.mjs → sdcorejs-angular-modules-pattern-routes-w4VY9P_H.mjs} +9 -9
  84. package/fesm2022/{sdcorejs-angular-modules-pattern-routes-bQpdxKlY.mjs.map → sdcorejs-angular-modules-pattern-routes-w4VY9P_H.mjs.map} +1 -1
  85. package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-B6w4N6wo.mjs → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs} +12 -12
  86. package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-B6w4N6wo.mjs.map → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-BQCWgQsr.mjs.map} +1 -1
  87. package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-BIYHlzVQ.mjs → sdcorejs-angular-modules-pattern-shell.component-BOjJteMd.mjs} +4 -4
  88. package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-BIYHlzVQ.mjs.map → sdcorejs-angular-modules-pattern-shell.component-BOjJteMd.mjs.map} +1 -1
  89. package/fesm2022/{sdcorejs-angular-modules-pattern-update-side-drawer.component-nnldn2cz.mjs → sdcorejs-angular-modules-pattern-update-side-drawer.component-BT2PzXTG.mjs} +4 -4
  90. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-BT2PzXTG.mjs.map +1 -0
  91. package/fesm2022/{sdcorejs-angular-modules-pattern-update-side-drawer.component-DKgmhJT2.mjs → sdcorejs-angular-modules-pattern-update-side-drawer.component-qmGn2tCI.mjs} +4 -4
  92. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-qmGn2tCI.mjs.map +1 -0
  93. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-p9R5-eou.mjs → sdcorejs-angular-modules-pattern-update.component-CS3jlV-R.mjs} +5 -5
  94. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CS3jlV-R.mjs.map +1 -0
  95. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-C0Bewuwz.mjs → sdcorejs-angular-modules-pattern-update.component-CUgQPcR4.mjs} +22 -12
  96. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CUgQPcR4.mjs.map +1 -0
  97. package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-Qlh3Lm2p.mjs → sdcorejs-angular-modules-pattern-update.component-lGwicZKW.mjs} +12 -10
  98. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-lGwicZKW.mjs.map +1 -0
  99. package/fesm2022/sdcorejs-angular-modules-pattern.mjs +1 -1
  100. package/fesm2022/sdcorejs-angular-services-api.mjs +11 -11
  101. package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
  102. package/fesm2022/sdcorejs-angular-services-cache.mjs +7 -5
  103. package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
  104. package/fesm2022/sdcorejs-angular-services-excel.mjs +34 -0
  105. package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
  106. package/fesm2022/sdcorejs-angular-services-storage.mjs +6 -4
  107. package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
  108. package/modules/pattern/docs/drawer.md +1 -1
  109. package/modules/pattern/docs/form.md +445 -148
  110. package/modules/pattern/docs/header-actions.md +14 -12
  111. package/modules/pattern/docs/select.md +9 -1
  112. package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +8 -1
  113. package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +1 -1
  114. package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +8 -1
  115. package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +1 -1
  116. package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +1 -1
  117. package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +124 -147
  118. package/modules/pattern/features/order/components/lines-form/order-lines.ts +101 -0
  119. package/modules/pattern/features/order/components/lines-table-form/lines-table-form.component.ts +196 -0
  120. package/modules/pattern/features/order/pages/create/create.component.ts +18 -4
  121. package/modules/pattern/features/order/pages/detail/detail.component.ts +14 -12
  122. package/modules/pattern/features/order/pages/update/update.component.ts +11 -4
  123. package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +1 -1
  124. package/modules/pattern/features/product/components/product-select/product-select.component.ts +9 -1
  125. package/modules/pattern/features/product/pages/create/create.component.ts +8 -1
  126. package/modules/pattern/features/product/pages/update/update.component.ts +1 -1
  127. package/modules/pattern/features/settings/pages/update/update.component.ts +5 -4
  128. package/package.json +1 -1
  129. package/types/sdcorejs-angular-components-modal.d.ts +6 -1
  130. package/types/sdcorejs-angular-components-query-bar.d.ts +154 -13
  131. package/types/sdcorejs-angular-components-table.d.ts +448 -29
  132. package/types/sdcorejs-angular-i18n.d.ts +66 -1
  133. package/types/sdcorejs-angular-services-api.d.ts +5 -5
  134. package/types/sdcorejs-angular-services-cache.d.ts +4 -2
  135. package/types/sdcorejs-angular-services-excel.d.ts +59 -0
  136. package/types/sdcorejs-angular-services-storage.d.ts +3 -1
  137. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-C7-itJqB.mjs.map +0 -1
  138. package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CxgmaNod.mjs.map +0 -1
  139. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-C2GdGhkJ.mjs.map +0 -1
  140. package/fesm2022/sdcorejs-angular-modules-pattern-create.component-CzJh4LMR.mjs.map +0 -1
  141. package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-Dkmm0a2Y.mjs.map +0 -1
  142. package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-cxNRkeRU.mjs.map +0 -1
  143. package/fesm2022/sdcorejs-angular-modules-pattern-index.component-D1zWXyN6.mjs.map +0 -1
  144. package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BK__9Mzb.mjs +0 -541
  145. package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BK__9Mzb.mjs.map +0 -1
  146. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs.map +0 -1
  147. package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs.map +0 -1
  148. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-DKgmhJT2.mjs.map +0 -1
  149. package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-nnldn2cz.mjs.map +0 -1
  150. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-C0Bewuwz.mjs.map +0 -1
  151. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Qlh3Lm2p.mjs.map +0 -1
  152. package/fesm2022/sdcorejs-angular-modules-pattern-update.component-p9R5-eou.mjs.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { TemplateRef, Signal, InjectionToken, AfterViewInit, OnDestroy } from '@angular/core';
2
+ import { TemplateRef, Signal, ElementRef, InjectionToken, AfterViewInit, OnDestroy } from '@angular/core';
3
3
  import { SdBadgeData, SdBadge } from '@sdcorejs/angular/components/badge';
4
4
  import { SdSearch } from '@sdcorejs/angular/forms/models';
5
- import { Operator, NestedKeyOf, Order, PagingReq, Color } from '@sdcorejs/utils/models';
5
+ import { Operator, NestedKeyOf, Order, PagingReq, Color, Filter } from '@sdcorejs/utils/models';
6
6
  import { SdDateTimeService } from '@sdcorejs/angular/services/date-time';
7
7
  import { Observable } from 'rxjs';
8
8
  import { SdIconSet } from '@sdcorejs/angular/modules/icon';
@@ -13,13 +13,13 @@ import { MatPaginator, MatPaginatorIntl } from '@angular/material/paginator';
13
13
  import { MatSort, SortDirection } from '@angular/material/sort';
14
14
  import { MatTable } from '@angular/material/table';
15
15
  import { SdExcelColumn } from '@sdcorejs/angular/services';
16
- import { CdkDrag, CdkDropList, CdkDragDrop } from '@angular/cdk/drag-drop';
16
+ import { SdQueryField, ɵSdQueryChipLabels as _SdQueryChipLabels, SdQueryBar, SdQueryBarOption, SdQuery } from '@sdcorejs/angular/components/query-bar';
17
+ import { CdkDragDrop, CdkDrag, CdkDropList } from '@angular/cdk/drag-drop';
17
18
  import { SdDataStateTemplateDirective } from '@sdcorejs/angular/components/data-state';
18
19
  import { SdReadState } from '@sdcorejs/angular/utilities/read-state';
19
20
  import { SdQuickAction } from '@sdcorejs/angular/components/quick-action';
20
21
  import { SdScrollDirective } from '@sdcorejs/angular/directives';
21
22
  import { FormGroup } from '@angular/forms';
22
- import { SdSideDrawer } from '@sdcorejs/angular/components/side-drawer';
23
23
  import { SdModal } from '@sdcorejs/angular/components/modal';
24
24
  import { MatSelectionList } from '@angular/material/list';
25
25
 
@@ -361,6 +361,8 @@ interface SdTableQuickFilter {
361
361
  }
362
362
  interface TableFilterConfiguration {
363
363
  inlineExternal: Record<string, boolean>;
364
+ /** Giao diện lọc người dùng chọn trong modal Thiết lập; thắng `filter.mode` khi `filter.modeSelectable` khác `false`. */
365
+ mode?: SdTableOptionFilter['mode'];
364
366
  }
365
367
  interface TableFilterValue {
366
368
  quickSearch?: SdTableQuickSearchValue;
@@ -413,6 +415,37 @@ interface SdTableOptionFilter<T = unknown> {
413
415
  hideExternalFilterToolbar?: boolean;
414
416
  /** Hàm xử lý khi trigger clear filter từ external filter */
415
417
  onClearFilter?: () => void;
418
+ /**
419
+ * Giao diện lọc. `'query-bar'`: quick search, external filter và filter dưới cột gộp vào một `sd-query-bar` ở đầu
420
+ * bảng; giá trị lọc, cache và `pagingReq` giữ nguyên như `'default'`. Mobile luôn dùng giao diện `'default'`.
421
+ * @defaultValue 'default'
422
+ */
423
+ mode?: 'default' | 'query-bar';
424
+ /**
425
+ * Cho người dùng chọn giao diện lọc trong modal Thiết lập. Lựa chọn được lưu cùng thiết lập bộ lọc (theo `filter.key`)
426
+ * và thắng `mode`; **Khôi phục mặc định** xoá nó. `false`: luôn dùng `mode` và bỏ qua lựa chọn đã lưu.
427
+ * `SD_TABLE_CONFIGURATION.filter.modeSelectable` đặt cho mọi bảng; option thắng.
428
+ * @defaultValue true
429
+ */
430
+ modeSelectable?: boolean;
431
+ /** Chỉ dùng khi `mode` là `'query-bar'`. */
432
+ queryBar?: SdTableOptionFilterQueryBar;
433
+ }
434
+ /** Tuỳ chọn của `filter.mode: 'query-bar'`. */
435
+ interface SdTableOptionFilterQueryBar {
436
+ /**
437
+ * Cách sửa chip: control ngay trên thanh (`sd-query-bar` mode `'inline'`) hoặc popover. `sd-query-bar` đứng riêng
438
+ * vẫn mặc định `'popover'`.
439
+ * @defaultValue 'inline'
440
+ */
441
+ editor?: 'popover' | 'inline';
442
+ /**
443
+ * Thay danh sách chip ghim mặc định (quick filter đang hiện, external đang hiện inline hoặc `required`). Phần tử là
444
+ * `field` của `quickSearch.filters` / `externalFilters` / `columns`. Field `required` luôn được ghim.
445
+ */
446
+ pinned?: string[];
447
+ /** Field không đưa vào thanh; giá trị đang có vẫn được gửi đi. */
448
+ exclude?: string[];
416
449
  }
417
450
  declare const SdConvertToPagingReq: (filterRequest: SdTableFilterRequest, args: {
418
451
  columns?: SdTableColumnAnyRow[];
@@ -513,6 +546,8 @@ interface TableFilterRegister {
513
546
  set: (value: Partial<TableFilterValue>) => TableFilterValue;
514
547
  remove: () => void;
515
548
  observer: Observable<TableFilterValue>;
549
+ /** Giá trị mà `remove()` sẽ đặt — default của cột, external và quick search (signal đọc tại lúc gọi). Không ghi cache. */
550
+ default?: () => TableFilterValue;
516
551
  };
517
552
  }
518
553
 
@@ -1086,6 +1121,58 @@ interface TableOptionTreeLazy<T = any> {
1086
1121
  indentSize?: number;
1087
1122
  }
1088
1123
 
1124
+ /** A leaf column of the table, by its `field`. Checked at build time (`NestedKeyOf<T>`) and at run time (leaf column). */
1125
+ type SdTableMobileField<T> = NestedKeyOf<T>;
1126
+ /** A column value, or fixed text shown as is. */
1127
+ type SdTableMobileText<T> = SdTableMobileField<T> | {
1128
+ text: string;
1129
+ };
1130
+ /** Slots every mobile layout has. */
1131
+ interface SdTableMobileData<T> {
1132
+ /** First line, 15px medium. A missing or unknown field falls back to `mobile.rowLabel`, then `rowKey`. */
1133
+ title: SdTableMobileText<T>;
1134
+ /** Second line, one line cut with "…". */
1135
+ subtitle?: SdTableMobileText<T>;
1136
+ /** After the title. A field must be a column with `useBadge` (checked at run time), otherwise it shows as text. */
1137
+ badge?: SdTableMobileField<T> | SdBadgeData;
1138
+ /** Grid cells with the column title as label, in this order. */
1139
+ fields?: SdTableMobileField<T>[];
1140
+ }
1141
+ /** Data of a `card` (the only layout so far). */
1142
+ interface SdTableMobileCardData<T> extends SdTableMobileData<T> {
1143
+ /** First grid cell, medium weight. */
1144
+ highlight?: SdTableMobileField<T>;
1145
+ /**
1146
+ * Grid cells shown before the "{n} more fields" button, `highlight` included.
1147
+ * @defaultValue 4
1148
+ */
1149
+ maxFields?: number;
1150
+ /**
1151
+ * Not a card slot. why: TypeScript does not report excess properties of an object returned by an arrow function,
1152
+ * so `never` is what rejects `trailing` (a slot of the future `list` layout) on a card.
1153
+ */
1154
+ trailing?: never;
1155
+ }
1156
+ /** Second argument of `mobile.template.data`. */
1157
+ interface SdTableMobileDataContext {
1158
+ /** Zero-based data-row position on the current page, as in `SdTableRowMobileDefContext`. */
1159
+ index: number;
1160
+ selected: boolean;
1161
+ }
1162
+ /**
1163
+ * Builds the slots of one row. Called again when the rows are read again or `detectChanges()` runs, and when the index
1164
+ * or the selection of the row changes.
1165
+ */
1166
+ type SdTableMobileDataFn<T, D> = (item: T, context: SdTableMobileDataContext) => D;
1167
+ /**
1168
+ * Body of the phone card: a consumer template, or slots built from the row (`data`). `layout` is fixed per table;
1169
+ * leaving it out means `'card'`.
1170
+ */
1171
+ type SdTableMobileTemplate<T> = TemplateRef<SdTableRowMobileDefContext<T>> | {
1172
+ layout?: 'card';
1173
+ data: SdTableMobileDataFn<T, SdTableMobileCardData<T>>;
1174
+ };
1175
+
1089
1176
  type SdTableOption<T = any> = SdTableLocalOption<T> | SdTableServerOption<T>;
1090
1177
  interface SdTableBaseOption<T = any> {
1091
1178
  /**
@@ -1115,10 +1202,19 @@ interface SdTableBaseOption<T = any> {
1115
1202
  * cần autoId theo dòng ổn định cho E2E.
1116
1203
  */
1117
1204
  rowKey?: string;
1118
- /** Mobile cards activate automatically when sdTableRowMobileDef is projected. */
1205
+ /**
1206
+ * Phone layout. Cards activate when the table has a card body: a projected `sdTableRowMobileDef` (wins, with a dev
1207
+ * warning when `template` is set too), `template`, or `SD_TABLE_CONFIGURATION.mobile.autoTemplate`.
1208
+ */
1119
1209
  mobile?: {
1120
1210
  /** Row command title and accessible labels; falls back to rowKey, then row number. */
1121
1211
  rowLabel?: (row: T) => string;
1212
+ /**
1213
+ * Card body on phones: a `TemplateRef`, or `{ data }` to build the card from row values. `false` keeps the desktop
1214
+ * table on phones even with `autoTemplate`.
1215
+ * @example `template: { data: row => ({ title: 'code', badge: 'status', highlight: 'total' }) }`
1216
+ */
1217
+ template?: SdTableMobileTemplate<T> | false;
1122
1218
  };
1123
1219
  /**
1124
1220
  * Cấu hình hiển thị/phục hồi config của table.
@@ -1419,6 +1515,80 @@ interface TableSkeletonCell {
1419
1515
  readonly hidden?: boolean;
1420
1516
  }
1421
1517
 
1518
+ type SdTableQuerySourceKind = 'quick' | 'external' | 'column';
1519
+ /**
1520
+ * How a chip value is stored in the raw record.
1521
+ * - `scalar`: one value; `multi`: an array (chip `IN`); `range`: `{ from, to }` (chip `BETWEEN`);
1522
+ * - `boolean`: `true` / `false` (external boolean); `flag`: `'1'` / `'0'` (column boolean select).
1523
+ */
1524
+ type SdTableQueryShape = 'scalar' | 'multi' | 'range' | 'boolean' | 'flag';
1525
+ /** Field of the bar → the filter it edits. */
1526
+ interface SdTableQuerySource {
1527
+ /** `${source}:${field}` — the bar's `SdQueryField.key`. Never reaches filterReq, pagingReq or the cache. */
1528
+ key: string;
1529
+ source: SdTableQuerySourceKind;
1530
+ /** Field of the raw record. */
1531
+ field: string;
1532
+ column?: SdTableColumnAnyRow;
1533
+ external?: SdTableExternalFilter;
1534
+ quick?: SdTableQuickSearchFilter;
1535
+ shape: SdTableQueryShape;
1536
+ /** Operator of a chip with a value when the raw record holds no operator for it. */
1537
+ operator: Operator;
1538
+ /**
1539
+ * What reaches `columnOperator`: nothing (`none`), the chip operator (`chip`, a column whose operator the user
1540
+ * picks), or only `NULL` / `NOT_NULL` (`no-data`, a column whose chip operator `IN` / `BETWEEN` / `EQUAL` is
1541
+ * implied by the value shape).
1542
+ */
1543
+ operatorMode: 'none' | 'chip' | 'no-data';
1544
+ }
1545
+ interface SdTableQueryFields {
1546
+ /** Fields of the bar, in order: quick filters, external filters, leaf columns. */
1547
+ fields: SdQueryField[];
1548
+ sources: Map<string, SdTableQuerySource>;
1549
+ /** Filters the bar cannot edit. Their raw values stay as they are and are still sent. */
1550
+ excluded: {
1551
+ field: string;
1552
+ reason: string;
1553
+ }[];
1554
+ /** Column fields hidden behind an external filter of the same field. Their raw value is always cleared. */
1555
+ covered: string[];
1556
+ /** Column field → bar key its header icon opens (`column:<field>`, or `external:<field>` when covered). */
1557
+ columnKeys: Map<string, string>;
1558
+ /** The bar shows the search box (bound to `quickSearch.term`). */
1559
+ search: boolean;
1560
+ /** The table has quick search: the patch carries `quickSearch`. */
1561
+ quickSearch: boolean;
1562
+ }
1563
+ interface SdTableQueryContext extends SdTableQueryFields {
1564
+ /** Column operators of the table defaults — restored when a `NULL` / `NOT_NULL` chip goes away. */
1565
+ defaultColumnOperator?: Record<string, Operator>;
1566
+ }
1567
+
1568
+ /**
1569
+ * One filter of the phone UI (chip row and filter sheet).
1570
+ * - `source` + `field`: a filter the query-bar model can read — it gets a chip, a summary and the built-in controls.
1571
+ * - `custom`: a filter only its own control can edit (a template, a time column, an external filter the bar leaves
1572
+ * out). It has a row in the filter sheet that opens that control, but no chip and no summary.
1573
+ */
1574
+ interface SdTableMobileFilterItem {
1575
+ /** `external:<field>` / `column:<field>` as on the query bar, `custom-*:<field>` otherwise. */
1576
+ key: string;
1577
+ label: string;
1578
+ source?: SdTableQuerySource;
1579
+ field?: SdQueryField;
1580
+ custom?: {
1581
+ kind: 'column';
1582
+ column: SdTableColumnAnyRow;
1583
+ } | {
1584
+ kind: 'external';
1585
+ external: SdTableExternalFilter;
1586
+ } | {
1587
+ kind: 'def';
1588
+ def: SdTableFilterDefDirective;
1589
+ };
1590
+ }
1591
+
1422
1592
  /** Internal presentation only; closures keep row and selection callbacks distinct. */
1423
1593
  interface SdTableMobileAction {
1424
1594
  key: string;
@@ -1434,6 +1604,18 @@ interface SdTableMobileAction {
1434
1604
  run?: () => unknown;
1435
1605
  }
1436
1606
 
1607
+ /** What fills a phone card: a template, slots from `mobile.template.data`, or slots derived from the columns. */
1608
+ type SdTableMobileBody<T> = {
1609
+ kind: 'template';
1610
+ templateRef: TemplateRef<SdTableRowMobileDefContext<T>>;
1611
+ } | {
1612
+ kind: 'data';
1613
+ layout: unknown;
1614
+ data: SdTableMobileDataFn<T, SdTableMobileCardData<T>>;
1615
+ } | {
1616
+ kind: 'auto';
1617
+ };
1618
+
1437
1619
  /** What the unknown-total paginator renders; computed by `SdTable`. */
1438
1620
  interface SdTableUnknownTotalPagerState {
1439
1621
  /** Page the controls navigate from: the shown page, or the failed target after a read error. */
@@ -1506,19 +1688,13 @@ declare class ExternalFilterComponent {
1506
1688
  }
1507
1689
 
1508
1690
  /**
1509
- * Mobile-filter — side-drawer chiếm ~90% width thiết bị. Dùng cho table khi
1510
- * render trên màn hình điện thoại (inline filter bị ẩn).
1511
- *
1512
- * Layout (mỗi filter 1 hàng, size='sm'):
1513
- * 1. External filter (render inline — KHÔNG reuse external-filter component
1514
- * vì component đó dùng grid 2/3 cột + có chọn ẩn/hiện không phù hợp mobile).
1515
- * 2. filterDefs — custom templates do app khai báo qua `[sdTableFilterDef]`.
1516
- * 3. Column filter — 1 column-filter / column.
1517
- *
1518
- * State: local working copy. Cancel = đóng (không ghi). Apply = flush vào
1519
- * filterRegister + đóng.
1691
+ * Filter sheet of the phone (handoff table-mobile 5): one `sd-modal` bottom sheet with two levels — the list of
1692
+ * filters with their summary, and the page of one filter. Works on a copy of the filter register: Done keeps the page's
1693
+ * edits in the copy, Apply writes every filter and reads once, Cancel / close / a swipe down / the scrim drop the copy.
1694
+ * Order: external filters → `sdTableFilterDef` templates → columns.
1520
1695
  */
1521
1696
  declare class MobileFilterComponent {
1697
+ #private;
1522
1698
  autoIdInput: _angular_core.InputSignal<string | null | undefined>;
1523
1699
  filter: _angular_core.InputSignal<SdTableOptionFilter<unknown> | undefined>;
1524
1700
  externalFilters: _angular_core.InputSignal<SdTableExternalFilter[] | null | undefined>;
@@ -1526,47 +1702,194 @@ declare class MobileFilterComponent {
1526
1702
  filterDefs: _angular_core.InputSignal<readonly SdTableFilterDefDirective[] | null | undefined>;
1527
1703
  filterRegister: _angular_core.InputSignal<TableFilterRegister | undefined>;
1528
1704
  cacheValues: _angular_core.InputSignal<Record<string, any[]> | undefined>;
1529
- drawer: _angular_core.Signal<SdSideDrawer>;
1705
+ /** Filters and the query model, from the table. */
1706
+ model: _angular_core.InputSignal<{
1707
+ ctx: SdTableQueryContext;
1708
+ items: SdTableMobileFilterItem[];
1709
+ } | undefined>;
1710
+ readonly sheet: _angular_core.Signal<SdModal>;
1711
+ protected readonly head: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
1712
+ protected readonly body: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
1530
1713
  workingColumnFilter: _angular_core.WritableSignal<Record<string, any>>;
1531
1714
  workingColumnOperator: _angular_core.WritableSignal<Record<string, Operator>>;
1532
1715
  workingExternalFilter: _angular_core.WritableSignal<Record<string, any>>;
1716
+ /** Filter whose page is open; `undefined` on the list. */
1717
+ readonly page: _angular_core.WritableSignal<SdTableMobileFilterItem | undefined>;
1718
+ /** Bumped when the copy changes in place, so summaries and counts follow. */
1719
+ readonly revision: _angular_core.WritableSignal<number>;
1720
+ readonly labels: _SdQueryChipLabels;
1533
1721
  autoId: _angular_core.Signal<string>;
1534
1722
  externalFilterItems: _angular_core.Signal<SdTableExternalFilter[]>;
1535
1723
  columnItems: _angular_core.Signal<SdTableColumn[]>;
1536
1724
  filterDefItems: _angular_core.Signal<readonly SdTableFilterDefDirective[]>;
1725
+ /** The copy as one record; its parts are the working signals' objects, edited in place by the field pages. */
1726
+ readonly working: _angular_core.Signal<TableFilterValue>;
1727
+ readonly rows: _angular_core.Signal<{
1728
+ item: SdTableMobileFilterItem;
1729
+ summary: string;
1730
+ active: boolean;
1731
+ field: string;
1732
+ }[]>;
1733
+ readonly activeCount: _angular_core.Signal<number>;
1734
+ constructor();
1537
1735
  open: () => void;
1538
1736
  close: () => void;
1737
+ /** Opens the page of a filter; Back returns to the list. */
1738
+ enter(item: SdTableMobileFilterItem): void;
1739
+ /** Done / ← / Escape on a page: back to the list, the edits stay in the copy. */
1740
+ back(): void;
1539
1741
  onApply: () => void;
1540
1742
  onCancel: () => void;
1743
+ /** "Clear all": empties every filter of the copy; Apply still writes it. */
1744
+ clearAll(): void;
1745
+ /** "Clear" on a page: that filter only. */
1746
+ clearPage(): void;
1747
+ onChanged(): void;
1748
+ onKeydown(event: KeyboardEvent): void;
1749
+ /** Every close path ends here: drop the history entries the sheet pushed. */
1750
+ onClosed(): void;
1541
1751
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MobileFilterComponent, never>;
1542
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MobileFilterComponent, "mobile-filter", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "externalFilters": { "alias": "externalFilters"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "filterDefs": { "alias": "filterDefs"; "required": false; "isSignal": true; }; "filterRegister": { "alias": "filterRegister"; "required": false; "isSignal": true; }; "cacheValues": { "alias": "cacheValues"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1752
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MobileFilterComponent, "mobile-filter", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "externalFilters": { "alias": "externalFilters"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "filterDefs": { "alias": "filterDefs"; "required": false; "isSignal": true; }; "filterRegister": { "alias": "filterRegister"; "required": false; "isSignal": true; }; "cacheValues": { "alias": "cacheValues"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1543
1753
  }
1544
1754
 
1755
+ type FilterMode = NonNullable<SdTableOptionFilter['mode']>;
1756
+ type ConfigTab = 'columns' | 'filters';
1757
+ interface ConfigFilterRow {
1758
+ field: string;
1759
+ title: string;
1760
+ on: boolean;
1761
+ locked: boolean;
1762
+ /** i18n key of the text under the title. */
1763
+ note?: string;
1764
+ }
1765
+ /** What the "Bộ lọc" tab shows; the table builds it, and `undefined` hides the tab. */
1766
+ interface ConfigFilterSetup {
1767
+ /** `filter.mode` after `SD_TABLE_CONFIGURATION`: the kind without a stored choice. */
1768
+ mode: FilterMode;
1769
+ /** The stored choice of the user (`TableFilterConfiguration.mode`). */
1770
+ storedMode?: FilterMode;
1771
+ /** `filter.modeSelectable !== false`: the kinds are offered. */
1772
+ modeSelectable: boolean;
1773
+ /** Stored `TableFilterConfiguration.inlineExternal`. */
1774
+ inlineExternal: Record<string, boolean>;
1775
+ /** External filters in option order; `offBar`: the query bar cannot show it. */
1776
+ externalFilters: {
1777
+ field: string;
1778
+ title: string;
1779
+ required: boolean;
1780
+ offBar: boolean;
1781
+ }[];
1782
+ /** `filter.queryBar.pinned`: the app picks the pinned chips, so the list cannot change them on the bar. */
1783
+ pinned?: string[];
1784
+ /**
1785
+ * Titles of the required external filters the bar cannot show. The bar would block the read with no place to fill
1786
+ * them, so the bar card is off while there is any.
1787
+ */
1788
+ barBlockedBy: string[];
1789
+ }
1545
1790
  declare class ConfigComponent {
1546
1791
  #private;
1547
1792
  autoIdInput: _angular_core.InputSignal<string | null | undefined>;
1548
1793
  tableOption: _angular_core.InputSignal<SdTableOption | undefined>;
1549
1794
  changes: _angular_core.OutputEmitterRef<ConfiguredTableResult>;
1795
+ /** Restore defaults was confirmed and the stored setup removed. */
1796
+ defaultsRestored: _angular_core.OutputEmitterRef<void>;
1797
+ /** The "Bộ lọc" tab; `undefined` hides it. */
1798
+ filterSetup: _angular_core.InputSignal<ConfigFilterSetup | undefined>;
1799
+ /** Apply with a changed "Bộ lọc" tab: the filter setup to store. `mode` is left out when the kind cannot be picked. */
1800
+ filterApplied: _angular_core.OutputEmitterRef<Partial<TableFilterConfiguration>>;
1550
1801
  autoId: _angular_core.Signal<string>;
1551
1802
  modal: _angular_core.Signal<SdModal | undefined>;
1552
- table: _angular_core.Signal<MatTable<SdTableColumn>>;
1803
+ protected readonly handles: _angular_core.Signal<readonly ElementRef<HTMLButtonElement>[]>;
1553
1804
  configuration: _angular_core.WritableSignal<ConfiguredTable | undefined>;
1554
- dragDisabled: boolean;
1555
- constructor();
1805
+ /** Text of the find box. */
1806
+ readonly query: _angular_core.WritableSignal<string>;
1807
+ /** Field of the open row; one row at a time. */
1808
+ readonly expanded: _angular_core.WritableSignal<string | null>;
1809
+ readonly hintId: string;
1810
+ /** Row lifted from the keyboard, and the order Escape goes back to. */
1811
+ readonly picked: _angular_core.WritableSignal<{
1812
+ field: string;
1813
+ order: ConfiguredColumn[];
1814
+ } | null>;
1815
+ /** Text of the live region: each keyboard reorder step. */
1816
+ readonly announcement: _angular_core.WritableSignal<string>;
1817
+ readonly searchable: _angular_core.Signal<boolean>;
1818
+ /** Reordering is off while a search narrows the list: the hidden rows would make the drop index ambiguous. */
1819
+ readonly searching: _angular_core.Signal<boolean>;
1820
+ /** Rows on screen: every column, or those whose current or original title matches the search. */
1821
+ readonly columns: _angular_core.Signal<ConfiguredColumn[]>;
1822
+ readonly totalCount: _angular_core.Signal<number>;
1823
+ readonly shownCount: _angular_core.Signal<number>;
1824
+ readonly allShown: _angular_core.Signal<boolean>;
1825
+ /** Tab on screen; Cột when the table gives no "Bộ lọc" tab. */
1826
+ readonly tab: _angular_core.Signal<ConfigTab>;
1827
+ readonly tabs: readonly ConfigTab[];
1828
+ readonly modes: readonly FilterMode[];
1829
+ /** Picked filter kind (draft until Apply). */
1830
+ readonly filterMode: _angular_core.WritableSignal<FilterMode>;
1831
+ /** Inline external filters (draft until Apply). */
1832
+ readonly inlineExternal: _angular_core.WritableSignal<Record<string, boolean>>;
1833
+ /**
1834
+ * One row per external filter. In the panel the switch shows it there; on the bar it pins it as a chip, so a filter
1835
+ * the bar cannot show is off, a required one is always pinned, and `queryBar.pinned` decides for the app.
1836
+ */
1837
+ readonly filterRows: _angular_core.Signal<ConfigFilterRow[]>;
1838
+ /** Text under the filter list: what its switches do for the picked kind. */
1839
+ readonly filterListHint: _angular_core.Signal<"core.component.table.config.filters-hint-panel" | "core.component.table.config.filters-hint-pinned" | "core.component.table.config.filters-hint-bar">;
1840
+ /** Titles that keep the bar card off, joined for its note; '' when the bar can be picked. */
1841
+ readonly barBlockedBy: _angular_core.Signal<string>;
1842
+ /** On the bar, a filter it cannot show still filters by its value, with no chip to clear it. */
1843
+ readonly offBarWarning: _angular_core.Signal<boolean>;
1556
1844
  open: () => Promise<void>;
1557
1845
  close: () => void;
1558
1846
  onSave: () => void;
1559
1847
  onReset: () => Promise<void>;
1560
1848
  /**
1561
- * 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 —
1562
- * khoá chúng lại để row nói rõ trạng thái, chỉ chừa ô "Hiển thị" để bật lại.
1849
+ * 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
1850
+ * ô "Hiện" để bật lại.
1563
1851
  */
1564
1852
  isRowDisabled: (item: ConfiguredColumn) => boolean;
1565
- dropTable(event: any): void;
1566
- handleMouseDown(): void;
1567
- handleMouseUp(): void;
1853
+ readonly tabId: (tab: ConfigTab) => string;
1854
+ readonly panelId: (tab: ConfigTab) => string;
1855
+ readonly modeName: string;
1856
+ selectTab: (tab: ConfigTab) => void;
1857
+ /** ← → move between the tabs, Home / End go to the first / last (tablist pattern of the APG, roving tabindex). */
1858
+ onTabKeydown: (event: KeyboardEvent) => void;
1859
+ pickMode: (mode: FilterMode) => void;
1860
+ setInline: (field: string, on: boolean) => void;
1861
+ onFind: (value: unknown) => void;
1862
+ toggleRow: (field: string) => void;
1863
+ /**
1864
+ * Pressing the handle of the open row closes it first, so its preview is the summary row. Another open row stays open:
1865
+ * closing it would move the pressed row away from the pointer before CDK measures.
1866
+ */
1867
+ onHandlePointerDown: (field: string) => void;
1868
+ drop: (event: CdkDragDrop<ConfiguredColumn[]>) => void;
1869
+ showAll: () => void;
1870
+ setShown: (field: string, shown: boolean) => void;
1871
+ setFixed: (field: string, fixed: boolean) => void;
1872
+ setTruncate: (field: string, truncate: boolean) => void;
1873
+ /** Space / Enter picks up and drops, ↑ / ↓ move the picked row, Escape puts the order back. */
1874
+ onHandleKeydown: (event: KeyboardEvent, field: string) => void;
1875
+ /** Leaving the handle while a row is held drops it where it is. */
1876
+ onHandleBlur: (field: string) => void;
1877
+ titleOf: (item: ConfiguredColumn) => string;
1878
+ renamed: (item: ConfiguredColumn) => boolean;
1879
+ setTitle: (field: string, value: unknown) => void;
1880
+ restoreTitle: (field: string) => void;
1881
+ /** A width in another unit than px is edited as text, verbatim. */
1882
+ widthIsText: (item: ConfiguredColumn) => boolean;
1883
+ widthValue: (item: ConfiguredColumn) => string;
1884
+ /** Empty falls back to the original width, so that is the placeholder; "auto" when the option has none. */
1885
+ widthPlaceholder: (item: ConfiguredColumn) => string;
1886
+ widthSummary: (item: ConfiguredColumn) => string;
1887
+ onWidthFocus: (item: ConfiguredColumn) => void;
1888
+ setWidth: (field: string, value: unknown) => void;
1889
+ commitWidth: (field: string) => void;
1890
+ detailsId: (field: string) => string;
1568
1891
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfigComponent, never>;
1569
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfigComponent, "config", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "tableOption": { "alias": "tableOption"; "required": false; "isSignal": true; }; }, { "changes": "changes"; }, never, never, true, never>;
1892
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfigComponent, "config", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "tableOption": { "alias": "tableOption"; "required": false; "isSignal": true; }; "filterSetup": { "alias": "filterSetup"; "required": false; "isSignal": true; }; }, { "changes": "changes"; "defaultsRestored": "defaultsRestored"; "filterApplied": "filterApplied"; }, never, never, true, never>;
1570
1893
  }
1571
1894
 
1572
1895
  declare class SdPopupExport {
@@ -1630,6 +1953,12 @@ interface ISdTableConfiguration {
1630
1953
  manualFilter?: SdTableOptionFilter['manualFilter'];
1631
1954
  /** Ẩn toolbar (xóa bộ lọc, thiết lập) của external filter, khi có ít external filter user không cần chức năng này, mặc định là false */
1632
1955
  hideExternalFilterToolbar?: SdTableOptionFilter['hideExternalFilterToolbar'];
1956
+ /** Giao diện lọc mặc định cho mọi bảng; `option.filter.mode` thắng. Mặc định là `'default'`. */
1957
+ mode?: SdTableOptionFilter['mode'];
1958
+ /** Cho người dùng chọn giao diện lọc trong modal Thiết lập; `option.filter.modeSelectable` thắng. Mặc định là `true`. */
1959
+ modeSelectable?: SdTableOptionFilter['modeSelectable'];
1960
+ /** Tuỳ chọn mặc định của mode `'query-bar'`; gộp theo từng field với `option.filter.queryBar`. */
1961
+ queryBar?: SdTableOptionFilter['queryBar'];
1633
1962
  operator?: {
1634
1963
  list?: Partial<Record<SdTableColumn['type'], Operator[]>>;
1635
1964
  default?: Partial<Record<SdTableColumn['type'], Operator>>;
@@ -1642,6 +1971,13 @@ interface ISdTableConfiguration {
1642
1971
  };
1643
1972
  /** Lớp hiển thị khi đang tải cho mọi bảng; `option.loading` của từng bảng thắng theo từng field. */
1644
1973
  loading?: SdTableOptionLoading;
1974
+ mobile?: {
1975
+ /**
1976
+ * Phone cards for tables without a card body (`sdTableRowMobileDef` or `mobile.template`): the card is built from
1977
+ * the visible columns. `mobile.template: false` opts a table out. Mặc định là `false`.
1978
+ */
1979
+ autoTemplate?: boolean;
1980
+ };
1645
1981
  }
1646
1982
  declare const SD_TABLE_CONFIGURATION: InjectionToken<ISdTableConfiguration>;
1647
1983
 
@@ -1717,7 +2053,18 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1717
2053
  sdTitleDefs: _angular_core.Signal<readonly SdTableTitleDefDirective<any>[]>;
1718
2054
  readonly sdRowMobileDef: _angular_core.Signal<SdTableRowMobileDefDirective<T> | undefined>;
1719
2055
  readonly isMobile: _angular_core.Signal<boolean>;
2056
+ /**
2057
+ * Body of the phone cards, by priority: `sdTableRowMobileDef`, then `mobile.template` (a template or `{ data }`),
2058
+ * then `SD_TABLE_CONFIGURATION.mobile.autoTemplate`. `undefined`: phones show the desktop table.
2059
+ */
2060
+ protected readonly mobileBody: _angular_core.Signal<SdTableMobileBody<T> | undefined>;
1720
2061
  readonly mobileCards: _angular_core.Signal<boolean>;
2062
+ /**
2063
+ * The footer settings button carries a dot while the table uses a setup of its own: stored columns that differ from
2064
+ * the option (settings modal or a resize on the table), inline external filters that differ from `defaultShowing`, or
2065
+ * a stored filter mode that differs from `filter.mode`.
2066
+ */
2067
+ readonly hasCustomSetup: _angular_core.Signal<boolean>;
1721
2068
  cellDef: _angular_core.Signal<Record<string, SdTableCellDefDirective<any>>>;
1722
2069
  footerDef: _angular_core.Signal<Record<string, SdMaterialFooterDefDirective<any>>>;
1723
2070
  hasFooter: _angular_core.Signal<boolean>;
@@ -1783,11 +2130,24 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1783
2130
  active: string;
1784
2131
  direction: SortDirection;
1785
2132
  }>;
2133
+ /**
2134
+ * Columns of the phone sort sheet: sortable leaf columns of the option in their order, `invisible` and
2135
+ * settings-hidden ones included, `hidden: true` ones left out (handoff table-mobile 6), with the settings title when
2136
+ * the column is on screen.
2137
+ */
1786
2138
  readonly mobileSortColumns: _angular_core.Signal<{
1787
2139
  field: string;
1788
2140
  title: string;
1789
2141
  direction: SortDirection;
1790
2142
  }[]>;
2143
+ /** The phone shows a sort chip / button: `sort.enable` and at least one sortable column. */
2144
+ protected readonly mobileSortAvailable: _angular_core.Signal<boolean>;
2145
+ /** Accessible name of the phone sort chip / button: "Sort", or the column and direction while sorted. */
2146
+ protected readonly mobileSortLabel: _angular_core.Signal<string>;
2147
+ /**
2148
+ * Tools sheet of the phone (⋮): export and settings. Filter, sort and reload live in the chip row, the sort sheet and
2149
+ * pull to refresh. The exports are laid out flat (two at most).
2150
+ */
1791
2151
  readonly mobileToolsActions: _angular_core.Signal<SdTableMobileAction[]>;
1792
2152
  readonly pageRevision: _angular_core.WritableSignal<number>;
1793
2153
  readonly dataRevision: _angular_core.WritableSignal<number>;
@@ -1817,6 +2177,49 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1817
2177
  readonly quickSearchValue: _angular_core.WritableSignal<SdTableQuickSearchValue>;
1818
2178
  private readonly quickSearchControl;
1819
2179
  readonly quickSearchValid: _angular_core.Signal<boolean>;
2180
+ /**
2181
+ * Tab "Bộ lọc" của modal Thiết lập: kiểu lọc và external filter hiện ở khung / ghim trên thanh. Không có tab khi
2182
+ * `filter.disabled`, trên mobile (luôn dùng giao diện mặc định), khi bảng không có bộ lọc nào, hoặc khi không chọn
2183
+ * được kiểu lọc mà cũng không có external filter. `barBlockedBy`: external filter bắt buộc mà thanh không hiển thị
2184
+ * được — thanh sẽ chặn đọc dữ liệu mà người dùng không có chỗ nhập, nên modal không cho chọn thanh.
2185
+ */
2186
+ protected readonly configFilter: _angular_core.Signal<ConfigFilterSetup | undefined>;
2187
+ /**
2188
+ * Giao diện lọc đã chọn: lựa chọn đã lưu của người dùng (trừ khi `filter.modeSelectable` là `false`), rồi
2189
+ * `filter.mode` sau khi gộp `SD_TABLE_CONFIGURATION.filter.mode`.
2190
+ */
2191
+ readonly filterMode: _angular_core.Signal<"default" | "query-bar">;
2192
+ /** 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. */
2193
+ readonly effectiveFilterMode: _angular_core.Signal<"default" | "query-bar">;
2194
+ /** Thanh query bar thay quick search, external filter và filter dưới cột. */
2195
+ readonly queryBarMode: _angular_core.Signal<boolean>;
2196
+ readonly queryBar: _angular_core.Signal<SdQueryBar | undefined>;
2197
+ /** Chip trên thanh (nháp của thanh) và ô tìm — gắn hai chiều với `sd-query-bar`. */
2198
+ readonly barFilters: _angular_core.WritableSignal<Filter[]>;
2199
+ readonly barSearch: _angular_core.WritableSignal<string>;
2200
+ readonly queryBarHintId: string;
2201
+ /** Field của thanh và bảng tra nguồn; `undefined` khi không ở mode query-bar. */
2202
+ readonly queryBarModel: _angular_core.Signal<SdTableQueryContext | undefined>;
2203
+ /**
2204
+ * Filters of the phone UI (chip row and filter sheets), in the fixed order external → `sdTableFilterDef` → columns.
2205
+ * `undefined` on desktop, with `filter.disabled`, or before the configuration is known.
2206
+ */
2207
+ protected readonly mobileFilterModel: _angular_core.Signal<{
2208
+ ctx: SdTableQueryContext;
2209
+ items: SdTableMobileFilterItem[];
2210
+ } | undefined>;
2211
+ /** Applied filter value (last emission of the filter register); the phone chips summarise it. */
2212
+ protected readonly mobileFilterValue: _angular_core.Signal<TableFilterValue | undefined>;
2213
+ readonly queryBarOption: _angular_core.Signal<SdQueryBarOption<unknown> | undefined>;
2214
+ /** 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. */
2215
+ readonly queryBarActiveKeys: _angular_core.Signal<Set<string>>;
2216
+ queryBarTriggerPopup: (key: string) => "menu" | "listbox" | "dialog" | null;
2217
+ /** `aria-label` của icon lọc ở header: "Lọc theo …" / "Đang lọc theo …". */
2218
+ filterTriggerLabel(column: SdTableColumn, active: boolean): string;
2219
+ /** 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. */
2220
+ openQueryBarField(key: string, trigger: EventTarget | null): void;
2221
+ /** 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). */
2222
+ readonly queryBarHint: _angular_core.Signal<string>;
1820
2223
  key: string;
1821
2224
  columnOperator: Record<string, Operator>;
1822
2225
  columnFilter?: NonNullable<TableFilterValue['columnFilter']>;
@@ -1826,7 +2229,11 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1826
2229
  exporting: _angular_core.WritableSignal<boolean>;
1827
2230
  exportTitle: _angular_core.Signal<string>;
1828
2231
  tableConfiguration: ISdTableConfiguration | null;
1829
- /** 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. */
2232
+ /**
2233
+ * 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. Không áp
2234
+ * dụng khi điện thoại hiện thẻ: thẻ nằm theo trang và vùng cuộn của trang cuộn một lần, thay vì cuộn trong một hộp
2235
+ * thấp giữa header và paginator (và cuộn lồng với trang khi màn thấp).
2236
+ */
1830
2237
  readonly fill: _angular_core.Signal<boolean>;
1831
2238
  /** External filter của bảng chính thu gọn khi khung trang đang ở chế độ màn thấp. */
1832
2239
  readonly externalFilterCollapsedByDefault: _angular_core.Signal<boolean>;
@@ -1850,6 +2257,11 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1850
2257
  onTreeToggle: (row: SdTableItem<T>) => Promise<void>;
1851
2258
  onFilterChange: () => void;
1852
2259
  onQuickSearchChange: (value: SdTableQuickSearchValue) => void;
2260
+ /**
2261
+ * 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
2262
+ * vừa đổi như control mặc định. Reload, cache, `filtered` đi đường cũ.
2263
+ */
2264
+ onQueryBarApply: (query: SdQuery) => void;
1853
2265
  onFilterCommit: () => void;
1854
2266
  onExpand: (row: SdTableItem<T>) => Promise<void>;
1855
2267
  onSelect: (rowData: SdTableItem<T>) => void;
@@ -1907,6 +2319,13 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1907
2319
  get dataItems(): T[];
1908
2320
  get selectedItems(): T[];
1909
2321
  detectChanges: () => void;
2322
+ /**
2323
+ * Restore defaults in the settings modal also puts the inline external filters back to `defaultShowing` and clears the
2324
+ * stored filter mode.
2325
+ */
2326
+ onConfigDefaultsRestored: () => void;
2327
+ /** Apply in the settings modal with a changed "Bộ lọc" tab: store the filter kind and the inline external filters. */
2328
+ onConfigFilterApplied: (configuration: Partial<TableFilterConfiguration>) => void;
1910
2329
  onColumnResize: (field: string, width: string) => void;
1911
2330
  getSortAria: (field: string) => "none" | "ascending" | "descending";
1912
2331
  onOperatorChange: (column: SdTableColumn, operator: Operator | undefined) => void;
@@ -1920,4 +2339,4 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
1920
2339
  }
1921
2340
 
1922
2341
  export { SD_TABLE_CONFIGURATION, SD_TABLE_LAYOUT, SdConvertToPagingReq, SdMaterialFooterDefDirective, SdTable, SdTableCellDefDirective, SdTableCommandHeaderDefDirective, SdTableExpandDefDirective, SdTableFilterDefDirective, SdTableGroupDefDirective, SdTablePaginatorIntl, SdTableQuickSearchRightDefDirective, SdTableRowMobileDefDirective, SdTableTitleDefDirective };
1923
- export type { ISdTableConfiguration, SdTableAggregateCallback, SdTableAggregateContext, SdTableAggregateDefinition, SdTableAggregateGroup, SdTableAggregateOperation, SdTableAggregateResult, SdTableAggregateTemplateContext, SdTableColumn, SdTableColumnAggregate, SdTableColumnAnyRow, SdTableColumnChildren, SdTableColumnLazyValues, SdTableColumnNormal, SdTableColumnTransformFunc, SdTableColumnValues, SdTableCommand, SdTableCommandChildren, SdTableCommandNormal, SdTableCommandOption, SdTableDisplay, SdTableExternalFilter, SdTableFilterRequest, SdTableGroupDefContext, SdTableItem, SdTableLayout, SdTableMeta, SdTableOption, SdTableOptionAggregate, SdTableOptionFilter, SdTableOptionLoading, SdTableOptionQuickSearch, SdTableOptionTree, SdTableQuickFilter, SdTableQuickSearchFilter, SdTableQuickSearchFilterValue, SdTableQuickSearchValue, SdTableRowMobileDefContext, SdTableServerHasMoreResult, SdTableServerTotalResult, TableFilterConfiguration, TableFilterRegister, TableFilterValue, TableOptionTreeLazy, TableOptionTreeStatic };
2342
+ export type { ISdTableConfiguration, SdTableAggregateCallback, SdTableAggregateContext, SdTableAggregateDefinition, SdTableAggregateGroup, SdTableAggregateOperation, SdTableAggregateResult, SdTableAggregateTemplateContext, SdTableColumn, SdTableColumnAggregate, SdTableColumnAnyRow, SdTableColumnChildren, SdTableColumnLazyValues, SdTableColumnNormal, SdTableColumnTransformFunc, SdTableColumnValues, SdTableCommand, SdTableCommandChildren, SdTableCommandNormal, SdTableCommandOption, SdTableDisplay, SdTableExternalFilter, SdTableFilterRequest, SdTableGroupDefContext, SdTableItem, SdTableLayout, SdTableMeta, SdTableMobileCardData, SdTableMobileData, SdTableMobileDataContext, SdTableMobileDataFn, SdTableMobileField, SdTableMobileTemplate, SdTableMobileText, SdTableOption, SdTableOptionAggregate, SdTableOptionFilter, SdTableOptionFilterQueryBar, SdTableOptionLoading, SdTableOptionQuickSearch, SdTableOptionTree, SdTableQuickFilter, SdTableQuickSearchFilter, SdTableQuickSearchFilterValue, SdTableQuickSearchValue, SdTableRowMobileDefContext, SdTableServerHasMoreResult, SdTableServerTotalResult, TableFilterConfiguration, TableFilterRegister, TableFilterValue, TableOptionTreeLazy, TableOptionTreeStatic };