@sdcorejs/angular 20.3.3 → 20.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/query-bar/index.d.ts +126 -11
- package/components/table/index.d.ts +174 -13
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +460 -42
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +1228 -113
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +140 -5
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +87 -5
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-BubUwgBK.mjs → sdcorejs-angular-modules-pattern-base-api.service-okZVmcd5.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-base-api.service-BubUwgBK.mjs.map → sdcorejs-angular-modules-pattern-base-api.service-okZVmcd5.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-create-side-drawer.component-s7ZXoakT.mjs → sdcorejs-angular-modules-pattern-create-side-drawer.component-CB4F9cBe.mjs} +18 -4
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CB4F9cBe.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-create-side-drawer.component-C9WQdsEi.mjs → sdcorejs-angular-modules-pattern-create-side-drawer.component-CowdEzyv.mjs} +18 -4
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-CowdEzyv.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-BxfQux1Q.mjs → sdcorejs-angular-modules-pattern-create.component-2-dyjvCH.mjs} +19 -5
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-2-dyjvCH.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-DlYVJqHo.mjs → sdcorejs-angular-modules-pattern-create.component-BCoG3bVV.mjs} +36 -12
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BCoG3bVV.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-D4GrcahQ.mjs → sdcorejs-angular-modules-pattern-create.component-LPUj7MqG.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-create.component-D4GrcahQ.mjs.map → sdcorejs-angular-modules-pattern-create.component-LPUj7MqG.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-Bfx6_CmA.mjs → sdcorejs-angular-modules-pattern-customer.service-Caua6Xto.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-customer.service-Bfx6_CmA.mjs.map → sdcorejs-angular-modules-pattern-customer.service-Caua6Xto.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail-side-drawer.component-3PUIy1Vi.mjs → sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bu6E63bN.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail-side-drawer.component-3PUIy1Vi.mjs.map → sdcorejs-angular-modules-pattern-detail-side-drawer.component-Bu6E63bN.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-c__NdSt3.mjs → sdcorejs-angular-modules-pattern-detail.component-B2Y0PbbC.mjs} +27 -10
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-B2Y0PbbC.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CbYMo3D1.mjs → sdcorejs-angular-modules-pattern-detail.component-_c_4slgf.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-detail.component-CbYMo3D1.mjs.map → sdcorejs-angular-modules-pattern-detail.component-_c_4slgf.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-Bjvq6wJz.mjs → sdcorejs-angular-modules-pattern-flow.component-C_HziBQN.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-flow.component-Bjvq6wJz.mjs.map → sdcorejs-angular-modules-pattern-flow.component-C_HziBQN.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-general-information-form.component-pqT7lnS6.mjs → sdcorejs-angular-modules-pattern-general-information-form.component-BttbZ_yr.mjs} +3 -3
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-BttbZ_yr.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-index.component-DZXPZuM4.mjs → sdcorejs-angular-modules-pattern-index.component-B2dNqckm.mjs} +4 -4
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-B2dNqckm.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-Dq8Q8Vfm.mjs +812 -0
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-table-form.component-Dq8Q8Vfm.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DkVrMSPZ.mjs → sdcorejs-angular-modules-pattern-list.component-B3-th1z4.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DkVrMSPZ.mjs.map → sdcorejs-angular-modules-pattern-list.component-B3-th1z4.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-Bf9QWXBp.mjs → sdcorejs-angular-modules-pattern-list.component-Bs9hhMr7.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-Bf9QWXBp.mjs.map → sdcorejs-angular-modules-pattern-list.component-Bs9hhMr7.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-CuDjsIzi.mjs → sdcorejs-angular-modules-pattern-list.component-CRttQEXa.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-CuDjsIzi.mjs.map → sdcorejs-angular-modules-pattern-list.component-CRttQEXa.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DkxheDVz.mjs → sdcorejs-angular-modules-pattern-list.component-CeX57FPi.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-DkxheDVz.mjs.map → sdcorejs-angular-modules-pattern-list.component-CeX57FPi.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-E8rkFCkK.mjs → sdcorejs-angular-modules-pattern-list.component-DS8A17mM.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-list.component-E8rkFCkK.mjs.map → sdcorejs-angular-modules-pattern-list.component-DS8A17mM.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-DgmM-wTI.mjs → sdcorejs-angular-modules-pattern-mock-backend.factory-Dfil91qL.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-mock-backend.factory-DgmM-wTI.mjs.map → sdcorejs-angular-modules-pattern-mock-backend.factory-Dfil91qL.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs → sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs} +9 -2
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BqHwKfoc.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs → sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs} +21 -19
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-CIiLOizq.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-C3coYwmZ.mjs → sdcorejs-angular-modules-pattern-product.service-PaIGZ1ve.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-product.service-C3coYwmZ.mjs.map → sdcorejs-angular-modules-pattern-product.service-PaIGZ1ve.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-YsWsrKWJ.mjs → sdcorejs-angular-modules-pattern-profile.component-B8j8cieu.mjs} +2 -2
- package/fesm2022/{sdcorejs-angular-modules-pattern-profile.component-YsWsrKWJ.mjs.map → sdcorejs-angular-modules-pattern-profile.component-B8j8cieu.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BfpsCkim.mjs → sdcorejs-angular-modules-pattern-routes-0Vh73aXL.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-BfpsCkim.mjs.map → sdcorejs-angular-modules-pattern-routes-0Vh73aXL.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-dBuQqYkO.mjs → sdcorejs-angular-modules-pattern-routes-BoB2usST.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-dBuQqYkO.mjs.map → sdcorejs-angular-modules-pattern-routes-BoB2usST.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CGeqkySv.mjs → sdcorejs-angular-modules-pattern-routes-CFLETqYK.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-CGeqkySv.mjs.map → sdcorejs-angular-modules-pattern-routes-CFLETqYK.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-C7b5dRrJ.mjs → sdcorejs-angular-modules-pattern-routes-CFT9DyKj.mjs} +9 -9
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-C7b5dRrJ.mjs.map → sdcorejs-angular-modules-pattern-routes-CFT9DyKj.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-9ujH01cX.mjs → sdcorejs-angular-modules-pattern-routes-CZusLcS3.mjs} +7 -7
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-9ujH01cX.mjs.map → sdcorejs-angular-modules-pattern-routes-CZusLcS3.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-rR-MpQFh.mjs → sdcorejs-angular-modules-pattern-routes-Cq4BqjE9.mjs} +5 -5
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-rR-MpQFh.mjs.map → sdcorejs-angular-modules-pattern-routes-Cq4BqjE9.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-quSIwMOx.mjs → sdcorejs-angular-modules-pattern-routes-Cw9uJySU.mjs} +3 -3
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-quSIwMOx.mjs.map → sdcorejs-angular-modules-pattern-routes-Cw9uJySU.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DoBxGoRE.mjs → sdcorejs-angular-modules-pattern-routes-nrxSHE-O.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-routes-DoBxGoRE.mjs.map → sdcorejs-angular-modules-pattern-routes-nrxSHE-O.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-LQNpFSmN.mjs → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CJ6hUHjk.mjs} +12 -12
- package/fesm2022/{sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-LQNpFSmN.mjs.map → sdcorejs-angular-modules-pattern-sdcorejs-angular-modules-pattern-CJ6hUHjk.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-CcmrUIvP.mjs → sdcorejs-angular-modules-pattern-shell.component-C_AFK_9X.mjs} +4 -4
- package/fesm2022/{sdcorejs-angular-modules-pattern-shell.component-CcmrUIvP.mjs.map → sdcorejs-angular-modules-pattern-shell.component-C_AFK_9X.mjs.map} +1 -1
- package/fesm2022/{sdcorejs-angular-modules-pattern-update-side-drawer.component-Cq72tG9h.mjs → sdcorejs-angular-modules-pattern-update-side-drawer.component-C74EEboR.mjs} +4 -4
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-C74EEboR.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update-side-drawer.component-xFbutFLY.mjs → sdcorejs-angular-modules-pattern-update-side-drawer.component-Dj9lvkCP.mjs} +4 -4
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-Dj9lvkCP.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-DYPI_CRD.mjs → sdcorejs-angular-modules-pattern-update.component-B7H9pp-R.mjs} +5 -5
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-B7H9pp-R.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-CsfGgGJb.mjs → sdcorejs-angular-modules-pattern-update.component-Dhfba-qx.mjs} +22 -12
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-Dhfba-qx.mjs.map +1 -0
- package/fesm2022/{sdcorejs-angular-modules-pattern-update.component-lHmdUXWT.mjs → sdcorejs-angular-modules-pattern-update.component-hRTu79uE.mjs} +12 -10
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-hRTu79uE.mjs.map +1 -0
- package/fesm2022/sdcorejs-angular-modules-pattern.mjs +1 -1
- package/fesm2022/sdcorejs-angular-services-api.mjs +11 -11
- package/fesm2022/sdcorejs-angular-services-api.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-cache.mjs +7 -5
- package/fesm2022/sdcorejs-angular-services-cache.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-storage.mjs +6 -4
- package/fesm2022/sdcorejs-angular-services-storage.mjs.map +1 -1
- package/i18n/index.d.ts +28 -1
- package/modules/pattern/docs/drawer.md +1 -1
- package/modules/pattern/docs/form.md +445 -148
- package/modules/pattern/docs/header-actions.md +14 -12
- package/modules/pattern/docs/select.md +9 -1
- package/modules/pattern/features/category/components/create-side-drawer/create-side-drawer.component.ts +8 -1
- package/modules/pattern/features/category/components/update-side-drawer/update-side-drawer.component.ts +1 -1
- package/modules/pattern/features/customer/components/create-side-drawer/create-side-drawer.component.ts +8 -1
- package/modules/pattern/features/customer/components/update-side-drawer/update-side-drawer.component.ts +1 -1
- package/modules/pattern/features/order/components/general-information-form/general-information-form.component.ts +1 -1
- package/modules/pattern/features/order/components/lines-form/lines-form.component.ts +124 -147
- package/modules/pattern/features/order/components/lines-form/order-lines.ts +101 -0
- package/modules/pattern/features/order/components/lines-table-form/lines-table-form.component.ts +196 -0
- package/modules/pattern/features/order/pages/create/create.component.ts +18 -4
- package/modules/pattern/features/order/pages/detail/detail.component.ts +14 -12
- package/modules/pattern/features/order/pages/update/update.component.ts +11 -4
- package/modules/pattern/features/product/components/general-information-form/general-information-form.component.ts +1 -1
- package/modules/pattern/features/product/components/product-select/product-select.component.ts +9 -1
- package/modules/pattern/features/product/pages/create/create.component.ts +8 -1
- package/modules/pattern/features/product/pages/update/update.component.ts +1 -1
- package/modules/pattern/features/settings/pages/update/update.component.ts +5 -4
- package/package.json +1 -1
- package/services/api/index.d.ts +5 -5
- package/services/cache/index.d.ts +4 -2
- package/services/storage/index.d.ts +3 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-C9WQdsEi.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create-side-drawer.component-s7ZXoakT.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-BxfQux1Q.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-create.component-DlYVJqHo.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-detail.component-c__NdSt3.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-general-information-form.component-pqT7lnS6.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-index.component-DZXPZuM4.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BjMOON6K.mjs +0 -522
- package/fesm2022/sdcorejs-angular-modules-pattern-lines-form.component-BjMOON6K.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source-viewer-BpLQaYP5.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-pattern-source.generated-BrejHvB2.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-Cq72tG9h.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update-side-drawer.component-xFbutFLY.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-CsfGgGJb.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-DYPI_CRD.mjs.map +0 -1
- package/fesm2022/sdcorejs-angular-modules-pattern-update.component-lHmdUXWT.mjs.map +0 -1
|
@@ -29,6 +29,18 @@ interface SdQueryFieldBase<T = unknown> {
|
|
|
29
29
|
defaultOperator?: Operator;
|
|
30
30
|
/** Field is offered in picker but not interactive (read-only badge in chip). */
|
|
31
31
|
disabled?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The chip is always on the bar: no remove button, left out of the field picker, and an empty
|
|
34
|
+
* chip reads "All". The host keeps one entry for the field in `filters`; the bar never adds it.
|
|
35
|
+
*/
|
|
36
|
+
pinned?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The field needs a value: its empty chip is marked invalid, the Search button is disabled and
|
|
39
|
+
* `SdQueryBar.invalidFields()` lists it. The explanation line belongs to the host.
|
|
40
|
+
*/
|
|
41
|
+
required?: boolean;
|
|
42
|
+
/** Field-picker group heading. Groups follow their first appearance; one group shows no heading. */
|
|
43
|
+
group?: string;
|
|
32
44
|
}
|
|
33
45
|
interface SdQueryFieldString<T = unknown> extends SdQueryFieldBase<T> {
|
|
34
46
|
type: 'string';
|
|
@@ -77,6 +89,11 @@ interface SdQueryFieldLazyValues<T = unknown, K = Record<string, any>> extends S
|
|
|
77
89
|
search: SdSearch<K>;
|
|
78
90
|
valueField: NestedKeyOf<K>;
|
|
79
91
|
displayField: NestedKeyOf<K>;
|
|
92
|
+
/**
|
|
93
|
+
* Resolves the items of values restored on a chip (cache, URL). Without it the bar asks
|
|
94
|
+
* `search({ type: 'VALUE', value })` once. Mirrors `SdTableColumnLazyValues.option.views`.
|
|
95
|
+
*/
|
|
96
|
+
views?: (values: any[]) => Promise<K[]>;
|
|
80
97
|
};
|
|
81
98
|
}
|
|
82
99
|
type SdQueryField<T = unknown> = SdQueryFieldString<T> | SdQueryFieldNumber<T> | SdQueryFieldBoolean<T> | SdQueryFieldDate<T> | SdQueryFieldValues<T> | SdQueryFieldLazyValues<T>;
|
|
@@ -106,9 +123,35 @@ interface SdQueryBarOption<T = unknown> {
|
|
|
106
123
|
savedFiltersKey?: string;
|
|
107
124
|
showLogicToggle?: boolean;
|
|
108
125
|
showClearAll?: boolean;
|
|
109
|
-
|
|
126
|
+
/**
|
|
127
|
+
* Operator symbol on the chip face. `'auto'` shows it when the field offers more than one
|
|
128
|
+
* operator, or when the chip's operator differs from `SD_QUERY_DEFAULT_OPERATOR_BY_TYPE[type]`.
|
|
129
|
+
*/
|
|
130
|
+
showOperatorOnChip?: boolean | 'auto';
|
|
110
131
|
onQueryChange?: (query: SdQuery<T>) => void;
|
|
111
132
|
onApply?: (query: SdQuery<T>) => void;
|
|
133
|
+
/**
|
|
134
|
+
* When chip edits fire `apply`.
|
|
135
|
+
* - `'search'` (default): edits stay a draft until the Search button or Enter in the search box.
|
|
136
|
+
* - `'commit'`: a popover that closes with a changed operator or value, an inline commit, removing
|
|
137
|
+
* a chip that had a value, and Enter in the search box apply at once; the Search button is hidden.
|
|
138
|
+
* An added chip that closes empty is dropped without applying.
|
|
139
|
+
* @defaultValue 'search'
|
|
140
|
+
*/
|
|
141
|
+
applyOn?: 'search' | 'commit';
|
|
142
|
+
/**
|
|
143
|
+
* `'flush'` drops the bar's own border, radius, shadow and background so it sits inside a host card.
|
|
144
|
+
* @defaultValue 'default'
|
|
145
|
+
*/
|
|
146
|
+
appearance?: 'default' | 'flush';
|
|
147
|
+
/** Replaces the built-in clear-all (which empties every chip and keeps pinned ones). */
|
|
148
|
+
onClearAll?: () => void;
|
|
149
|
+
/** Disables the clear-all button, for a host that knows nothing differs from its defaults. */
|
|
150
|
+
clearDisabled?: boolean;
|
|
151
|
+
/** Placeholder of the free-text search box; overrides `core.component.query-bar.search-placeholder`. */
|
|
152
|
+
searchPlaceholder?: string;
|
|
153
|
+
/** Id of the host element explaining missing required values; set as `aria-describedby` on empty required chips. */
|
|
154
|
+
invalidHintId?: string;
|
|
112
155
|
}
|
|
113
156
|
/** Persisted bookmark of a query (filters + logic + search) — managed by `[savedFiltersKey]`. */
|
|
114
157
|
interface SdSavedFilter<T = unknown> {
|
|
@@ -256,6 +299,16 @@ declare class SdQueryPopoverChip {
|
|
|
256
299
|
readonly showOperator: _angular_core.InputSignal<boolean>;
|
|
257
300
|
/** Rendered value text for the value slot. */
|
|
258
301
|
readonly valueText: _angular_core.InputSignal<string>;
|
|
302
|
+
/** Muted text shown after the label while the chip has no value ("All" on a pinned chip). */
|
|
303
|
+
readonly emptyText: _angular_core.InputSignal<string>;
|
|
304
|
+
/** Pinned chip — no remove button. */
|
|
305
|
+
readonly pinned: _angular_core.InputSignal<boolean>;
|
|
306
|
+
/** Read-only chip — does not open its popover. */
|
|
307
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
308
|
+
/** Required chip without a value — error look, `aria-invalid`. */
|
|
309
|
+
readonly invalid: _angular_core.InputSignal<boolean>;
|
|
310
|
+
/** Id set as `aria-describedby` (the host's required hint). */
|
|
311
|
+
readonly describedBy: _angular_core.InputSignal<string | undefined>;
|
|
259
312
|
/** Chip popover mat-menu instance supplied by the parent. */
|
|
260
313
|
readonly menu: _angular_core.InputSignal<MatMenu>;
|
|
261
314
|
/** Fired when the chip popover opens (parent seeds its editing state). */
|
|
@@ -266,10 +319,14 @@ declare class SdQueryPopoverChip {
|
|
|
266
319
|
filterField(): string;
|
|
267
320
|
filterOperator(): Operator;
|
|
268
321
|
private readonly trigger;
|
|
269
|
-
|
|
322
|
+
/**
|
|
323
|
+
* Opens the chip popover. With `returnFocusTo`, that element (e.g. the host control that asked
|
|
324
|
+
* for the chip) gets focus back when the popover closes, instead of the chip.
|
|
325
|
+
*/
|
|
326
|
+
openMenu(returnFocusTo?: HTMLElement): void;
|
|
270
327
|
closeMenu(): void;
|
|
271
328
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdQueryPopoverChip, never>;
|
|
272
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdQueryPopoverChip, "sd-query-popover-chip", never, { "field": { "alias": "field"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": true; "isSignal": true; }; "active": { "alias": "active"; "required": true; "isSignal": true; }; "showOperator": { "alias": "showOperator"; "required": false; "isSignal": true; }; "valueText": { "alias": "valueText"; "required": false; "isSignal": true; }; "menu": { "alias": "menu"; "required": true; "isSignal": true; }; }, { "open": "open"; "remove": "remove"; }, never, never, true, never>;
|
|
329
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdQueryPopoverChip, "sd-query-popover-chip", never, { "field": { "alias": "field"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": true; "isSignal": true; }; "active": { "alias": "active"; "required": true; "isSignal": true; }; "showOperator": { "alias": "showOperator"; "required": false; "isSignal": true; }; "valueText": { "alias": "valueText"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "pinned": { "alias": "pinned"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "describedBy": { "alias": "describedBy"; "required": false; "isSignal": true; }; "menu": { "alias": "menu"; "required": true; "isSignal": true; }; }, { "open": "open"; "remove": "remove"; }, never, never, true, never>;
|
|
273
330
|
}
|
|
274
331
|
|
|
275
332
|
type Density = 'compact' | 'comfortable';
|
|
@@ -330,14 +387,21 @@ declare class SdQueryBar {
|
|
|
330
387
|
readonly showLogicToggle: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
331
388
|
/** Show "Clear all" button when at least one filter is active. */
|
|
332
389
|
readonly showClearAll: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
333
|
-
/**
|
|
334
|
-
|
|
390
|
+
/**
|
|
391
|
+
* Render the operator label on the chip face (default: hidden — operator only visible in popover).
|
|
392
|
+
* `'auto'`: only on chips whose field offers a choice or whose operator is not the type default.
|
|
393
|
+
*/
|
|
394
|
+
readonly showOperatorOnChip: _angular_core.InputSignalWithTransform<boolean | "auto", string | boolean | null | undefined>;
|
|
335
395
|
/** Composite payload — emitted whenever filters / logic / search change. */
|
|
336
396
|
readonly queryChange: _angular_core.OutputEmitterRef<SdQuery<unknown>>;
|
|
337
397
|
/** Fires when the user presses "Áp dụng" inside a chip popover — host should reload data. */
|
|
338
398
|
readonly apply: _angular_core.OutputEmitterRef<SdQuery<unknown>>;
|
|
339
|
-
/** Placeholder của ô tìm kiếm tự do bên trái. */
|
|
399
|
+
/** Placeholder của ô tìm kiếm tự do bên trái; `option.searchPlaceholder` thắng i18n. */
|
|
340
400
|
readonly searchPlaceholder: _angular_core.Signal<string>;
|
|
401
|
+
/** Chữ trên chip ghim đang rỗng. */
|
|
402
|
+
readonly allLabel: _angular_core.Signal<string>;
|
|
403
|
+
/** Chữ trên chip bắt buộc đang rỗng — "Tất cả" sai nghĩa khi field không cho phép bỏ trống. */
|
|
404
|
+
readonly selectValueLabel: _angular_core.Signal<string>;
|
|
341
405
|
/** Tooltip nút "+" khi consumer chưa khai `fields`. */
|
|
342
406
|
readonly noFieldsLabel: _angular_core.Signal<string>;
|
|
343
407
|
/** Tooltip nút "+" ở trạng thái bình thường. */
|
|
@@ -352,14 +416,26 @@ declare class SdQueryBar {
|
|
|
352
416
|
readonly resolvedSavedFiltersKey: _angular_core.Signal<string | undefined>;
|
|
353
417
|
readonly resolvedShowLogicToggle: _angular_core.Signal<boolean>;
|
|
354
418
|
readonly resolvedShowClearAll: _angular_core.Signal<boolean>;
|
|
355
|
-
readonly resolvedShowOperatorOnChip: _angular_core.Signal<boolean>;
|
|
419
|
+
readonly resolvedShowOperatorOnChip: _angular_core.Signal<boolean | "auto">;
|
|
420
|
+
readonly resolvedApplyOn: _angular_core.Signal<"search" | "commit">;
|
|
421
|
+
readonly resolvedAppearance: _angular_core.Signal<"default" | "flush">;
|
|
422
|
+
readonly resolvedClearDisabled: _angular_core.Signal<boolean>;
|
|
423
|
+
readonly resolvedInvalidHintId: _angular_core.Signal<string | undefined>;
|
|
356
424
|
constructor();
|
|
357
425
|
readonly fieldByKey: _angular_core.Signal<Record<string, SdQueryField>>;
|
|
358
426
|
/** Field keys already chained on a chip — the picker greys these out. */
|
|
359
427
|
readonly usedFieldKeys: _angular_core.Signal<Set<string>>;
|
|
428
|
+
/** Fields the user can add: pinned fields always have their chip, so the picker leaves them out. */
|
|
429
|
+
readonly pickerFields: _angular_core.Signal<SdQueryField[]>;
|
|
430
|
+
/** "+" is disabled when nothing is left to add. */
|
|
431
|
+
readonly addDisabled: _angular_core.Signal<boolean>;
|
|
432
|
+
/** Required fields without a chip value. The host renders the explanation from this list. */
|
|
433
|
+
readonly invalidFields: _angular_core.Signal<SdQueryField[]>;
|
|
434
|
+
/** Chips holding a value — the number shown in the clear-all label. */
|
|
435
|
+
readonly activeCount: _angular_core.Signal<number>;
|
|
360
436
|
/** Render the global AND/OR connector text between chips when `logic === 'OR'`. */
|
|
361
437
|
readonly showOrConnector: _angular_core.Signal<boolean>;
|
|
362
|
-
/** Search button is actionable only when there is something to apply. */
|
|
438
|
+
/** Search button is actionable only when there is something to apply and no required field is empty. */
|
|
363
439
|
readonly canSearch: _angular_core.Signal<boolean>;
|
|
364
440
|
/** Index of the chip whose popover is open. Reset to null after commit / close. */
|
|
365
441
|
readonly editingIndex: _angular_core.WritableSignal<number | null>;
|
|
@@ -387,10 +463,26 @@ declare class SdQueryBar {
|
|
|
387
463
|
*/
|
|
388
464
|
rowId(filter: Filter): string;
|
|
389
465
|
readonly iconFor: typeof sdQueryFieldIcon;
|
|
390
|
-
/**
|
|
466
|
+
/**
|
|
467
|
+
* Chip is "active" when it has a non-empty value OR a no-data operator (NULL/NOT_NULL).
|
|
468
|
+
* A BETWEEN range is active when either end is set; `{ from: null, to: null }` is empty.
|
|
469
|
+
*/
|
|
391
470
|
isFilterActive(filter: Filter): boolean;
|
|
392
471
|
/** Rendered value text on a chip. */
|
|
393
472
|
chipValueText(filter: Filter): string;
|
|
473
|
+
/** The field of a chip, or `undefined` for a key the bar does not know. */
|
|
474
|
+
fieldOf(filter: Filter): SdQueryField | undefined;
|
|
475
|
+
/** Pinned chips have no remove button and survive removeFilter / clearAll. */
|
|
476
|
+
isPinned(filter: Filter): boolean;
|
|
477
|
+
/** Empty chip of a required field. */
|
|
478
|
+
isInvalid(filter: Filter): boolean;
|
|
479
|
+
/** Text of an empty chip: "All" on a pinned chip, "Select a value" on a required one, nothing otherwise. */
|
|
480
|
+
emptyTextFor(field: SdQueryField | undefined): string;
|
|
481
|
+
/**
|
|
482
|
+
* Whether a chip of `field` shows its operator. A boolean setting applies to every chip; `'auto'`
|
|
483
|
+
* shows it when the field offers a choice, or when the operator is not the default of the type.
|
|
484
|
+
*/
|
|
485
|
+
showOperatorFor(field: SdQueryField | undefined, operator: Operator | undefined): boolean;
|
|
394
486
|
isNoDataOperator(op: Operator | string): boolean;
|
|
395
487
|
readonly building: _angular_core.Signal<BuildingChip<unknown> | null>;
|
|
396
488
|
/**
|
|
@@ -401,6 +493,13 @@ declare class SdQueryBar {
|
|
|
401
493
|
*/
|
|
402
494
|
allowedOperatorsFor(field: SdQueryField): Operator[];
|
|
403
495
|
inlineAutoId(index: number, role: string): string;
|
|
496
|
+
/** Value committed by a completed inline chip (seamless input, picker, boolean toggle). */
|
|
497
|
+
onInlineCommit(index: number, data: unknown): void;
|
|
498
|
+
/** Range committed by a completed inline BETWEEN chip. */
|
|
499
|
+
onInlineRange(index: number, ev: {
|
|
500
|
+
from: unknown;
|
|
501
|
+
to: unknown;
|
|
502
|
+
} | null): void;
|
|
404
503
|
/** Entry point from the field picker — start building a chip for `field`. */
|
|
405
504
|
beginBuild(field: SdQueryField): void;
|
|
406
505
|
/** Operator chosen during build — finish (no-data) or advance to the value step. */
|
|
@@ -425,24 +524,40 @@ declare class SdQueryBar {
|
|
|
425
524
|
to: unknown;
|
|
426
525
|
} | null): void;
|
|
427
526
|
addFilter(field: SdQueryField): void;
|
|
527
|
+
/**
|
|
528
|
+
* Opens the editor of `key` — for a host control outside the bar, such as a table header icon.
|
|
529
|
+
* Popover mode opens the chip's popover, adding the chip first when the field has none; inline
|
|
530
|
+
* mode focuses the chip or starts building one. `returnFocusTo` receives focus when the popover
|
|
531
|
+
* closes, instead of the chip.
|
|
532
|
+
*/
|
|
533
|
+
openField(key: string, returnFocusTo?: HTMLElement | null): void;
|
|
534
|
+
/** Clear-all button: the host's `onClearAll` when given, else the built-in clearAll(). */
|
|
535
|
+
onClearClick(): void;
|
|
428
536
|
/** Swap the field of an existing chip — reset operator + value to the new field's defaults. */
|
|
429
537
|
changeFilterField(index: number, field: SdQueryField): void;
|
|
430
538
|
updateFilter(index: number, patch: Partial<Filter>): void;
|
|
431
539
|
updateFilterData(index: number, data: unknown): void;
|
|
432
540
|
removeFilter(index: number): void;
|
|
541
|
+
/** Empties the bar. Pinned chips stay, reset to their field's default operator and no value. */
|
|
433
542
|
clearAll(): void;
|
|
434
543
|
setLogic(value: SdQueryLogic): void;
|
|
435
544
|
setSearch(value: string): void;
|
|
545
|
+
/** Enter in the search box: applies the typed text too, unless a required field is still empty. */
|
|
546
|
+
applySearch(): void;
|
|
436
547
|
triggerApply(): void;
|
|
437
548
|
/**
|
|
438
549
|
* Called when a popover-mode chip is clicked — set editingIndex and seed the
|
|
439
550
|
* child popover's staging signals from the chip's Filter.
|
|
440
551
|
*/
|
|
441
552
|
openChipPopover(index: number): void;
|
|
442
|
-
/**
|
|
553
|
+
/**
|
|
554
|
+
* Receive `(commit)` from the child popover — splice into filters, null the index. With
|
|
555
|
+
* `applyOn: 'commit'` a changed chip applies at once, and an unpinned chip that closes empty is
|
|
556
|
+
* dropped (applying only when it had a value before).
|
|
557
|
+
*/
|
|
443
558
|
onChipPopoverCommit(next: Filter): void;
|
|
444
559
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SdQueryBar, never>;
|
|
445
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdQueryBar, "sd-query-bar", never, { "option": { "alias": "option"; "required": false; "isSignal": true; }; "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "logic": { "alias": "logic"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "showSavedFilters": { "alias": "showSavedFilters"; "required": false; "isSignal": true; }; "savedFiltersKey": { "alias": "savedFiltersKey"; "required": false; "isSignal": true; }; "showLogicToggle": { "alias": "showLogicToggle"; "required": false; "isSignal": true; }; "showClearAll": { "alias": "showClearAll"; "required": false; "isSignal": true; }; "showOperatorOnChip": { "alias": "showOperatorOnChip"; "required": false; "isSignal": true; }; }, { "filters": "filtersChange"; "logic": "logicChange"; "search": "searchChange"; "queryChange": "queryChange"; "apply": "apply"; }, never,
|
|
560
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SdQueryBar, "sd-query-bar", never, { "option": { "alias": "option"; "required": false; "isSignal": true; }; "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "required": false; "isSignal": true; }; "logic": { "alias": "logic"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "showSavedFilters": { "alias": "showSavedFilters"; "required": false; "isSignal": true; }; "savedFiltersKey": { "alias": "savedFiltersKey"; "required": false; "isSignal": true; }; "showLogicToggle": { "alias": "showLogicToggle"; "required": false; "isSignal": true; }; "showClearAll": { "alias": "showClearAll"; "required": false; "isSignal": true; }; "showOperatorOnChip": { "alias": "showOperatorOnChip"; "required": false; "isSignal": true; }; }, { "filters": "filtersChange"; "logic": "logicChange"; "search": "searchChange"; "queryChange": "queryChange"; "apply": "apply"; }, never, ["[sdQueryBarEnd]"], true, never>;
|
|
446
561
|
}
|
|
447
562
|
|
|
448
563
|
export { SD_QUERY_DEFAULT_OPERATOR_BY_TYPE, SD_QUERY_MULTI_OPERATORS, SD_QUERY_NO_DATA_OPERATORS, SD_QUERY_OPERATORS_BY_TYPE, SD_QUERY_TYPE_ICON, SdQueryBar, sdQueryAllowedOperators, sdQueryDefaultOperator, sdQueryFieldIcon, sdQueryShowOperatorSelector };
|
|
@@ -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,7 +13,8 @@ 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 {
|
|
16
|
+
import { SdQueryField, 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';
|
|
@@ -413,6 +414,29 @@ interface SdTableOptionFilter<T = unknown> {
|
|
|
413
414
|
hideExternalFilterToolbar?: boolean;
|
|
414
415
|
/** Hàm xử lý khi trigger clear filter từ external filter */
|
|
415
416
|
onClearFilter?: () => void;
|
|
417
|
+
/**
|
|
418
|
+
* 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
|
|
419
|
+
* bảng; giá trị lọc, cache và `pagingReq` giữ nguyên như `'default'`. Mobile luôn dùng giao diện `'default'`.
|
|
420
|
+
* @defaultValue 'default'
|
|
421
|
+
*/
|
|
422
|
+
mode?: 'default' | 'query-bar';
|
|
423
|
+
/** Chỉ dùng khi `mode` là `'query-bar'`. */
|
|
424
|
+
queryBar?: SdTableOptionFilterQueryBar;
|
|
425
|
+
}
|
|
426
|
+
/** Tuỳ chọn của `filter.mode: 'query-bar'`. */
|
|
427
|
+
interface SdTableOptionFilterQueryBar {
|
|
428
|
+
/**
|
|
429
|
+
* Cách sửa chip: popover hoặc control ngay trên thanh (`sd-query-bar` mode `'inline'`).
|
|
430
|
+
* @defaultValue 'popover'
|
|
431
|
+
*/
|
|
432
|
+
editor?: 'popover' | 'inline';
|
|
433
|
+
/**
|
|
434
|
+
* 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à
|
|
435
|
+
* `field` của `quickSearch.filters` / `externalFilters` / `columns`. Field `required` luôn được ghim.
|
|
436
|
+
*/
|
|
437
|
+
pinned?: string[];
|
|
438
|
+
/** Field không đưa vào thanh; giá trị đang có vẫn được gửi đi. */
|
|
439
|
+
exclude?: string[];
|
|
416
440
|
}
|
|
417
441
|
declare const SdConvertToPagingReq: (filterRequest: SdTableFilterRequest, args: {
|
|
418
442
|
columns?: SdTableColumnAnyRow[];
|
|
@@ -513,6 +537,8 @@ interface TableFilterRegister {
|
|
|
513
537
|
set: (value: Partial<TableFilterValue>) => TableFilterValue;
|
|
514
538
|
remove: () => void;
|
|
515
539
|
observer: Observable<TableFilterValue>;
|
|
540
|
+
/** 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. */
|
|
541
|
+
default?: () => TableFilterValue;
|
|
516
542
|
};
|
|
517
543
|
}
|
|
518
544
|
|
|
@@ -1419,6 +1445,56 @@ interface TableSkeletonCell {
|
|
|
1419
1445
|
readonly hidden?: boolean;
|
|
1420
1446
|
}
|
|
1421
1447
|
|
|
1448
|
+
type SdTableQuerySourceKind = 'quick' | 'external' | 'column';
|
|
1449
|
+
/**
|
|
1450
|
+
* How a chip value is stored in the raw record.
|
|
1451
|
+
* - `scalar`: one value; `multi`: an array (chip `IN`); `range`: `{ from, to }` (chip `BETWEEN`);
|
|
1452
|
+
* - `boolean`: `true` / `false` (external boolean); `flag`: `'1'` / `'0'` (column boolean select).
|
|
1453
|
+
*/
|
|
1454
|
+
type SdTableQueryShape = 'scalar' | 'multi' | 'range' | 'boolean' | 'flag';
|
|
1455
|
+
/** Field of the bar → the filter it edits. */
|
|
1456
|
+
interface SdTableQuerySource {
|
|
1457
|
+
/** `${source}:${field}` — the bar's `SdQueryField.key`. Never reaches filterReq, pagingReq or the cache. */
|
|
1458
|
+
key: string;
|
|
1459
|
+
source: SdTableQuerySourceKind;
|
|
1460
|
+
/** Field of the raw record. */
|
|
1461
|
+
field: string;
|
|
1462
|
+
column?: SdTableColumnAnyRow;
|
|
1463
|
+
external?: SdTableExternalFilter;
|
|
1464
|
+
quick?: SdTableQuickSearchFilter;
|
|
1465
|
+
shape: SdTableQueryShape;
|
|
1466
|
+
/** Operator of a chip with a value when the raw record holds no operator for it. */
|
|
1467
|
+
operator: Operator;
|
|
1468
|
+
/**
|
|
1469
|
+
* What reaches `columnOperator`: nothing (`none`), the chip operator (`chip`, a column whose operator the user
|
|
1470
|
+
* picks), or only `NULL` / `NOT_NULL` (`no-data`, a column whose chip operator `IN` / `BETWEEN` / `EQUAL` is
|
|
1471
|
+
* implied by the value shape).
|
|
1472
|
+
*/
|
|
1473
|
+
operatorMode: 'none' | 'chip' | 'no-data';
|
|
1474
|
+
}
|
|
1475
|
+
interface SdTableQueryFields {
|
|
1476
|
+
/** Fields of the bar, in order: quick filters, external filters, leaf columns. */
|
|
1477
|
+
fields: SdQueryField[];
|
|
1478
|
+
sources: Map<string, SdTableQuerySource>;
|
|
1479
|
+
/** Filters the bar cannot edit. Their raw values stay as they are and are still sent. */
|
|
1480
|
+
excluded: {
|
|
1481
|
+
field: string;
|
|
1482
|
+
reason: string;
|
|
1483
|
+
}[];
|
|
1484
|
+
/** Column fields hidden behind an external filter of the same field. Their raw value is always cleared. */
|
|
1485
|
+
covered: string[];
|
|
1486
|
+
/** Column field → bar key its header icon opens (`column:<field>`, or `external:<field>` when covered). */
|
|
1487
|
+
columnKeys: Map<string, string>;
|
|
1488
|
+
/** The bar shows the search box (bound to `quickSearch.term`). */
|
|
1489
|
+
search: boolean;
|
|
1490
|
+
/** The table has quick search: the patch carries `quickSearch`. */
|
|
1491
|
+
quickSearch: boolean;
|
|
1492
|
+
}
|
|
1493
|
+
interface SdTableQueryContext extends SdTableQueryFields {
|
|
1494
|
+
/** Column operators of the table defaults — restored when a `NULL` / `NOT_NULL` chip goes away. */
|
|
1495
|
+
defaultColumnOperator?: Record<string, Operator>;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1422
1498
|
/** Internal presentation only; closures keep row and selection callbacks distinct. */
|
|
1423
1499
|
interface SdTableMobileAction {
|
|
1424
1500
|
key: string;
|
|
@@ -1547,26 +1623,73 @@ declare class ConfigComponent {
|
|
|
1547
1623
|
autoIdInput: _angular_core.InputSignal<string | null | undefined>;
|
|
1548
1624
|
tableOption: _angular_core.InputSignal<SdTableOption | undefined>;
|
|
1549
1625
|
changes: _angular_core.OutputEmitterRef<ConfiguredTableResult>;
|
|
1626
|
+
/** Restore defaults was confirmed and the stored setup removed. */
|
|
1627
|
+
defaultsRestored: _angular_core.OutputEmitterRef<void>;
|
|
1550
1628
|
autoId: _angular_core.Signal<string>;
|
|
1551
1629
|
modal: _angular_core.Signal<SdModal | undefined>;
|
|
1552
|
-
|
|
1630
|
+
protected readonly handles: _angular_core.Signal<readonly ElementRef<HTMLButtonElement>[]>;
|
|
1553
1631
|
configuration: _angular_core.WritableSignal<ConfiguredTable | undefined>;
|
|
1554
|
-
|
|
1555
|
-
|
|
1632
|
+
/** Text of the find box. */
|
|
1633
|
+
readonly query: _angular_core.WritableSignal<string>;
|
|
1634
|
+
/** Field of the open row; one row at a time. */
|
|
1635
|
+
readonly expanded: _angular_core.WritableSignal<string | null>;
|
|
1636
|
+
readonly hintId: string;
|
|
1637
|
+
/** Row lifted from the keyboard, and the order Escape goes back to. */
|
|
1638
|
+
readonly picked: _angular_core.WritableSignal<{
|
|
1639
|
+
field: string;
|
|
1640
|
+
order: ConfiguredColumn[];
|
|
1641
|
+
} | null>;
|
|
1642
|
+
/** Text of the live region: each keyboard reorder step. */
|
|
1643
|
+
readonly announcement: _angular_core.WritableSignal<string>;
|
|
1644
|
+
readonly searchable: _angular_core.Signal<boolean>;
|
|
1645
|
+
/** Reordering is off while a search narrows the list: the hidden rows would make the drop index ambiguous. */
|
|
1646
|
+
readonly searching: _angular_core.Signal<boolean>;
|
|
1647
|
+
/** Rows on screen: every column, or those whose current or original title matches the search. */
|
|
1648
|
+
readonly columns: _angular_core.Signal<ConfiguredColumn[]>;
|
|
1649
|
+
readonly totalCount: _angular_core.Signal<number>;
|
|
1650
|
+
readonly shownCount: _angular_core.Signal<number>;
|
|
1651
|
+
readonly allShown: _angular_core.Signal<boolean>;
|
|
1556
1652
|
open: () => Promise<void>;
|
|
1557
1653
|
close: () => void;
|
|
1558
1654
|
onSave: () => void;
|
|
1559
1655
|
onReset: () => Promise<void>;
|
|
1560
1656
|
/**
|
|
1561
|
-
* Cột đang tắt hiển thị thì tiêu đề / độ rộng / cố định /
|
|
1562
|
-
*
|
|
1657
|
+
* 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
|
|
1658
|
+
* ô "Hiện" để bật lại.
|
|
1563
1659
|
*/
|
|
1564
1660
|
isRowDisabled: (item: ConfiguredColumn) => boolean;
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1661
|
+
onFind: (value: unknown) => void;
|
|
1662
|
+
toggleRow: (field: string) => void;
|
|
1663
|
+
/**
|
|
1664
|
+
* Pressing the handle of the open row closes it first, so its preview is the summary row. Another open row stays open:
|
|
1665
|
+
* closing it would move the pressed row away from the pointer before CDK measures.
|
|
1666
|
+
*/
|
|
1667
|
+
onHandlePointerDown: (field: string) => void;
|
|
1668
|
+
drop: (event: CdkDragDrop<ConfiguredColumn[]>) => void;
|
|
1669
|
+
showAll: () => void;
|
|
1670
|
+
setShown: (field: string, shown: boolean) => void;
|
|
1671
|
+
setFixed: (field: string, fixed: boolean) => void;
|
|
1672
|
+
setTruncate: (field: string, truncate: boolean) => void;
|
|
1673
|
+
/** Space / Enter picks up and drops, ↑ / ↓ move the picked row, Escape puts the order back. */
|
|
1674
|
+
onHandleKeydown: (event: KeyboardEvent, field: string) => void;
|
|
1675
|
+
/** Leaving the handle while a row is held drops it where it is. */
|
|
1676
|
+
onHandleBlur: (field: string) => void;
|
|
1677
|
+
titleOf: (item: ConfiguredColumn) => string;
|
|
1678
|
+
renamed: (item: ConfiguredColumn) => boolean;
|
|
1679
|
+
setTitle: (field: string, value: unknown) => void;
|
|
1680
|
+
restoreTitle: (field: string) => void;
|
|
1681
|
+
/** A width in another unit than px is edited as text, verbatim. */
|
|
1682
|
+
widthIsText: (item: ConfiguredColumn) => boolean;
|
|
1683
|
+
widthValue: (item: ConfiguredColumn) => string;
|
|
1684
|
+
/** Empty falls back to the original width, so that is the placeholder; "auto" when the option has none. */
|
|
1685
|
+
widthPlaceholder: (item: ConfiguredColumn) => string;
|
|
1686
|
+
widthSummary: (item: ConfiguredColumn) => string;
|
|
1687
|
+
onWidthFocus: (item: ConfiguredColumn) => void;
|
|
1688
|
+
setWidth: (field: string, value: unknown) => void;
|
|
1689
|
+
commitWidth: (field: string) => void;
|
|
1690
|
+
detailsId: (field: string) => string;
|
|
1568
1691
|
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>;
|
|
1692
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfigComponent, "config", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "tableOption": { "alias": "tableOption"; "required": false; "isSignal": true; }; }, { "changes": "changes"; "defaultsRestored": "defaultsRestored"; }, never, never, true, never>;
|
|
1570
1693
|
}
|
|
1571
1694
|
|
|
1572
1695
|
declare class SdPopupExport {
|
|
@@ -1630,6 +1753,10 @@ interface ISdTableConfiguration {
|
|
|
1630
1753
|
manualFilter?: SdTableOptionFilter['manualFilter'];
|
|
1631
1754
|
/** Ẩ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
1755
|
hideExternalFilterToolbar?: SdTableOptionFilter['hideExternalFilterToolbar'];
|
|
1756
|
+
/** Giao diện lọc mặc định cho mọi bảng; `option.filter.mode` thắng. Mặc định là `'default'`. */
|
|
1757
|
+
mode?: SdTableOptionFilter['mode'];
|
|
1758
|
+
/** Tuỳ chọn mặc định của mode `'query-bar'`; gộp theo từng field với `option.filter.queryBar`. */
|
|
1759
|
+
queryBar?: SdTableOptionFilter['queryBar'];
|
|
1633
1760
|
operator?: {
|
|
1634
1761
|
list?: Partial<Record<SdTableColumn['type'], Operator[]>>;
|
|
1635
1762
|
default?: Partial<Record<SdTableColumn['type'], Operator>>;
|
|
@@ -1718,6 +1845,11 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
|
|
|
1718
1845
|
readonly sdRowMobileDef: _angular_core.Signal<SdTableRowMobileDefDirective<T> | undefined>;
|
|
1719
1846
|
readonly isMobile: _angular_core.Signal<boolean>;
|
|
1720
1847
|
readonly mobileCards: _angular_core.Signal<boolean>;
|
|
1848
|
+
/**
|
|
1849
|
+
* The footer settings button carries a dot while the table uses a setup of its own: stored columns that differ from
|
|
1850
|
+
* the option (settings modal or a resize on the table) or inline external filters that differ from `defaultShowing`.
|
|
1851
|
+
*/
|
|
1852
|
+
readonly hasCustomSetup: _angular_core.Signal<boolean>;
|
|
1721
1853
|
cellDef: _angular_core.Signal<Record<string, SdTableCellDefDirective<any>>>;
|
|
1722
1854
|
footerDef: _angular_core.Signal<Record<string, SdMaterialFooterDefDirective<any>>>;
|
|
1723
1855
|
hasFooter: _angular_core.Signal<boolean>;
|
|
@@ -1817,6 +1949,28 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
|
|
|
1817
1949
|
readonly quickSearchValue: _angular_core.WritableSignal<SdTableQuickSearchValue>;
|
|
1818
1950
|
private readonly quickSearchControl;
|
|
1819
1951
|
readonly quickSearchValid: _angular_core.Signal<boolean>;
|
|
1952
|
+
/** `filter.mode` sau khi gộp `SD_TABLE_CONFIGURATION.filter.mode`. */
|
|
1953
|
+
readonly filterMode: _angular_core.Signal<"default" | "query-bar">;
|
|
1954
|
+
/** 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. */
|
|
1955
|
+
readonly effectiveFilterMode: _angular_core.Signal<"default" | "query-bar">;
|
|
1956
|
+
/** Thanh query bar thay quick search, external filter và filter dưới cột. */
|
|
1957
|
+
readonly queryBarMode: _angular_core.Signal<boolean>;
|
|
1958
|
+
readonly queryBar: _angular_core.Signal<SdQueryBar | undefined>;
|
|
1959
|
+
/** Chip trên thanh (nháp của thanh) và ô tìm — gắn hai chiều với `sd-query-bar`. */
|
|
1960
|
+
readonly barFilters: _angular_core.WritableSignal<Filter[]>;
|
|
1961
|
+
readonly barSearch: _angular_core.WritableSignal<string>;
|
|
1962
|
+
readonly queryBarHintId: string;
|
|
1963
|
+
/** Field của thanh và bảng tra nguồn; `undefined` khi không ở mode query-bar. */
|
|
1964
|
+
readonly queryBarModel: _angular_core.Signal<SdTableQueryContext | undefined>;
|
|
1965
|
+
readonly queryBarOption: _angular_core.Signal<SdQueryBarOption<unknown> | undefined>;
|
|
1966
|
+
/** 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. */
|
|
1967
|
+
readonly queryBarActiveKeys: _angular_core.Signal<Set<string>>;
|
|
1968
|
+
/** `aria-label` của icon lọc ở header: "Lọc theo …" / "Đang lọc theo …". */
|
|
1969
|
+
filterTriggerLabel(column: SdTableColumn, active: boolean): string;
|
|
1970
|
+
/** 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. */
|
|
1971
|
+
openQueryBarField(key: string, trigger: EventTarget | null): void;
|
|
1972
|
+
/** 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). */
|
|
1973
|
+
readonly queryBarHint: _angular_core.Signal<string>;
|
|
1820
1974
|
key: string;
|
|
1821
1975
|
columnOperator: Record<string, Operator>;
|
|
1822
1976
|
columnFilter?: NonNullable<TableFilterValue['columnFilter']>;
|
|
@@ -1850,6 +2004,11 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
|
|
|
1850
2004
|
onTreeToggle: (row: SdTableItem<T>) => Promise<void>;
|
|
1851
2005
|
onFilterChange: () => void;
|
|
1852
2006
|
onQuickSearchChange: (value: SdTableQuickSearchValue) => void;
|
|
2007
|
+
/**
|
|
2008
|
+
* 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
|
|
2009
|
+
* vừa đổi như control mặc định. Reload, cache, `filtered` đi đường cũ.
|
|
2010
|
+
*/
|
|
2011
|
+
onQueryBarApply: (query: SdQuery) => void;
|
|
1853
2012
|
onFilterCommit: () => void;
|
|
1854
2013
|
onExpand: (row: SdTableItem<T>) => Promise<void>;
|
|
1855
2014
|
onSelect: (rowData: SdTableItem<T>) => void;
|
|
@@ -1907,6 +2066,8 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
|
|
|
1907
2066
|
get dataItems(): T[];
|
|
1908
2067
|
get selectedItems(): T[];
|
|
1909
2068
|
detectChanges: () => void;
|
|
2069
|
+
/** Restore defaults in the settings modal also puts the inline external filters back to `defaultShowing`. */
|
|
2070
|
+
onConfigDefaultsRestored: () => void;
|
|
1910
2071
|
onColumnResize: (field: string, width: string) => void;
|
|
1911
2072
|
getSortAria: (field: string) => "none" | "ascending" | "descending";
|
|
1912
2073
|
onOperatorChange: (column: SdTableColumn, operator: Operator | undefined) => void;
|
|
@@ -1920,4 +2081,4 @@ declare class SdTable<T = unknown> implements AfterViewInit, OnDestroy {
|
|
|
1920
2081
|
}
|
|
1921
2082
|
|
|
1922
2083
|
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 };
|
|
2084
|
+
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, SdTableOptionFilterQueryBar, SdTableOptionLoading, SdTableOptionQuickSearch, SdTableOptionTree, SdTableQuickFilter, SdTableQuickSearchFilter, SdTableQuickSearchFilterValue, SdTableQuickSearchValue, SdTableRowMobileDefContext, SdTableServerHasMoreResult, SdTableServerTotalResult, TableFilterConfiguration, TableFilterRegister, TableFilterValue, TableOptionTreeLazy, TableOptionTreeStatic };
|