@sdcorejs/angular 19.3.4 → 19.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.
- package/components/modal/src/modal.component.d.ts +6 -1
- package/components/query-bar/index.d.ts +1 -0
- package/components/query-bar/src/query-bar-chip-text.d.ts +27 -0
- package/components/table/src/components/config/config.component.d.ts +69 -1
- package/components/table/src/components/filter/mobile-filter/mobile-field-sheet.component.d.ts +35 -0
- package/components/table/src/components/filter/mobile-filter/mobile-filter-field.component.d.ts +64 -0
- package/components/table/src/components/filter/mobile-filter/mobile-filter-summary.d.ts +11 -0
- package/components/table/src/components/filter/mobile-filter/mobile-filter.component.d.ts +47 -15
- package/components/table/src/components/mobile-cards/mobile-card-data.component.d.ts +45 -0
- package/components/table/src/components/mobile-cards/mobile-cards.component.d.ts +13 -1
- package/components/table/src/components/mobile-sheet/mobile-sheet.d.ts +35 -0
- package/components/table/src/components/mobile-sort/mobile-sort-sheet.component.d.ts +36 -0
- package/components/table/src/components/mobile-toolbar/mobile-filter-chips.component.d.ts +49 -0
- package/components/table/src/components/mobile-toolbar/mobile-tools-sheet.component.d.ts +48 -0
- package/components/table/src/components/mobile-toolbar/pull-refresh.component.d.ts +21 -0
- package/components/table/src/configurations/table.configuration.d.ts +9 -0
- package/components/table/src/models/index.d.ts +1 -0
- package/components/table/src/models/table-mobile.model.d.ts +55 -0
- package/components/table/src/models/table-option.model.d.ts +11 -1
- package/components/table/src/services/config-custom.util.d.ts +11 -3
- package/components/table/src/services/mobile/mobile-view.util.d.ts +77 -0
- package/components/table/src/services/table-export/table-export.service.d.ts +2 -0
- package/components/table/src/services/table-filter/table-filter.model.d.ts +12 -2
- package/components/table/src/services/table-filter/table-mobile-filter.util.d.ts +54 -0
- package/components/table/src/services/table-filter/table-query-bar.util.d.ts +21 -1
- package/components/table/src/table.component.d.ts +57 -6
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +5 -5
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs +1 -1
- package/fesm2022/sdcorejs-angular-components-import-excel.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +45 -9
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs +171 -151
- package/fesm2022/sdcorejs-angular-components-query-bar.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +5376 -3610
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-entity-picker.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-select.mjs +23 -4
- package/fesm2022/sdcorejs-angular-forms-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs +1 -1
- package/fesm2022/sdcorejs-angular-forms-tree-select.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +190 -0
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +10 -6
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-services-excel.mjs +34 -0
- package/fesm2022/sdcorejs-angular-services-excel.mjs.map +1 -1
- package/i18n/src/en.d.ts +38 -0
- package/package.json +9 -9
- package/services/excel/src/lib/excel.model.d.ts +29 -0
- package/services/excel/src/lib/excel.service.d.ts +30 -0
|
@@ -22,6 +22,11 @@ export declare class SdModal implements OnDestroy {
|
|
|
22
22
|
hideClose: import("@angular/core").InputSignalWithTransform<boolean, boolean | "">;
|
|
23
23
|
disableBackdropClose: import("@angular/core").InputSignalWithTransform<boolean, boolean | "">;
|
|
24
24
|
beforeClose: import("@angular/core").InputSignal<SdModalBeforeClose | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Close when the browser history changes (Back, a route change). `false` lets the content handle Back itself, e.g.
|
|
27
|
+
* a sheet with pages. Same name as `MatDialogConfig.closeOnNavigation`.
|
|
28
|
+
*/
|
|
29
|
+
closeOnNavigation: import("@angular/core").InputSignalWithTransform<boolean, boolean | "">;
|
|
25
30
|
sdClosed: import("@angular/core").OutputEmitterRef<void>;
|
|
26
31
|
sdCloseError: import("@angular/core").OutputEmitterRef<unknown>;
|
|
27
32
|
isOpened: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -33,5 +38,5 @@ export declare class SdModal implements OnDestroy {
|
|
|
33
38
|
requestClose: () => Promise<boolean>;
|
|
34
39
|
forceClose: () => void;
|
|
35
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdModal, never>;
|
|
36
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "modalClass": { "alias": "modalClass"; "required": false; "isSignal": true; }; "lazyLoadContent": { "alias": "lazyLoadContent"; "required": false; "isSignal": true; }; "hideClose": { "alias": "hideClose"; "required": false; "isSignal": true; }; "disableBackdropClose": { "alias": "disableBackdropClose"; "required": false; "isSignal": true; }; "beforeClose": { "alias": "beforeClose"; "required": false; "isSignal": true; }; }, { "sdClosed": "sdClosed"; "sdCloseError": "sdCloseError"; }, never, ["[sdHeaderLeft]", "[sdHeaderRight]", "*", "[sdFooterLeft]", "[sdFooterRight]"], true, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdModal, "sd-modal", never, { "autoIdInput": { "alias": "autoId"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "modalClass": { "alias": "modalClass"; "required": false; "isSignal": true; }; "lazyLoadContent": { "alias": "lazyLoadContent"; "required": false; "isSignal": true; }; "hideClose": { "alias": "hideClose"; "required": false; "isSignal": true; }; "disableBackdropClose": { "alias": "disableBackdropClose"; "required": false; "isSignal": true; }; "beforeClose": { "alias": "beforeClose"; "required": false; "isSignal": true; }; "closeOnNavigation": { "alias": "closeOnNavigation"; "required": false; "isSignal": true; }; }, { "sdClosed": "sdClosed"; "sdCloseError": "sdCloseError"; }, never, ["[sdHeaderLeft]", "[sdHeaderRight]", "*", "[sdFooterLeft]", "[sdFooterRight]"], true, never>;
|
|
37
42
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Filter } from '@sdcorejs/utils/models';
|
|
2
|
+
import { SdQueryField } from './query-bar.model';
|
|
3
|
+
/** What `ɵsdQueryChipValueText` needs from its host: translations, date formatting and the labels it knows. */
|
|
4
|
+
export interface ɵSdQueryChipTextContext {
|
|
5
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
6
|
+
toFormat: (value: unknown, format: string) => string;
|
|
7
|
+
/** Options already loaded for the chip being edited (the popover's options). */
|
|
8
|
+
options?: readonly unknown[];
|
|
9
|
+
/** Labels of the field's values loaded by `ɵSdQueryChipLabels`. */
|
|
10
|
+
labels?: ReadonlyMap<unknown, string>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Value text of a chip, shared by the query bar and the sd-table phone filters so both show the same string:
|
|
14
|
+
* one value → its label; several → `first +n`; a date range in one year → `01/10 – 31/10/2026`; one open end →
|
|
15
|
+
* `From x` / `To y`; `NULL` / `NOT_NULL` → empty.
|
|
16
|
+
*/
|
|
17
|
+
export declare const ɵsdQueryChipValueText: (filter: Filter, field: SdQueryField | undefined, context: ɵSdQueryChipTextContext) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Labels of `values` / `lazy-values` chip values that are not in memory (restored from a cache, a URL or the
|
|
20
|
+
* table's filter): looked up once per field (`values` with an items function) or per field + value (`lazy-values`,
|
|
21
|
+
* through `views` or `search`). `get` reads a signal, so a view re-renders when a lookup lands.
|
|
22
|
+
*/
|
|
23
|
+
export declare class ɵSdQueryChipLabels {
|
|
24
|
+
#private;
|
|
25
|
+
get(key: string): ReadonlyMap<unknown, string> | undefined;
|
|
26
|
+
resolve(filter: Filter, field: SdQueryField | undefined): void;
|
|
27
|
+
}
|
|
@@ -3,7 +3,43 @@ import { ElementRef } from '@angular/core';
|
|
|
3
3
|
import { SdModal } from '@sdcorejs/angular/components/modal';
|
|
4
4
|
import { ConfiguredColumn, ConfiguredTable, ConfiguredTableResult } from '../../models/table-option-config.model';
|
|
5
5
|
import { SdTableOption } from '../../models/table-option.model';
|
|
6
|
+
import { SdTableOptionFilter, TableFilterConfiguration } from '../../services/table-filter/table-filter.model';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
8
|
+
type FilterMode = NonNullable<SdTableOptionFilter['mode']>;
|
|
9
|
+
type ConfigTab = 'columns' | 'filters';
|
|
10
|
+
interface ConfigFilterRow {
|
|
11
|
+
field: string;
|
|
12
|
+
title: string;
|
|
13
|
+
on: boolean;
|
|
14
|
+
locked: boolean;
|
|
15
|
+
/** i18n key of the text under the title. */
|
|
16
|
+
note?: string;
|
|
17
|
+
}
|
|
18
|
+
/** What the "Bộ lọc" tab shows; the table builds it, and `undefined` hides the tab. */
|
|
19
|
+
export interface ConfigFilterSetup {
|
|
20
|
+
/** `filter.mode` after `SD_TABLE_CONFIGURATION`: the kind without a stored choice. */
|
|
21
|
+
mode: FilterMode;
|
|
22
|
+
/** The stored choice of the user (`TableFilterConfiguration.mode`). */
|
|
23
|
+
storedMode?: FilterMode;
|
|
24
|
+
/** `filter.modeSelectable !== false`: the kinds are offered. */
|
|
25
|
+
modeSelectable: boolean;
|
|
26
|
+
/** Stored `TableFilterConfiguration.inlineExternal`. */
|
|
27
|
+
inlineExternal: Record<string, boolean>;
|
|
28
|
+
/** External filters in option order; `offBar`: the query bar cannot show it. */
|
|
29
|
+
externalFilters: {
|
|
30
|
+
field: string;
|
|
31
|
+
title: string;
|
|
32
|
+
required: boolean;
|
|
33
|
+
offBar: boolean;
|
|
34
|
+
}[];
|
|
35
|
+
/** `filter.queryBar.pinned`: the app picks the pinned chips, so the list cannot change them on the bar. */
|
|
36
|
+
pinned?: string[];
|
|
37
|
+
/**
|
|
38
|
+
* Titles of the required external filters the bar cannot show. The bar would block the read with no place to fill
|
|
39
|
+
* them, so the bar card is off while there is any.
|
|
40
|
+
*/
|
|
41
|
+
barBlockedBy: string[];
|
|
42
|
+
}
|
|
7
43
|
export declare class ConfigComponent {
|
|
8
44
|
#private;
|
|
9
45
|
autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
|
|
@@ -11,6 +47,10 @@ export declare class ConfigComponent {
|
|
|
11
47
|
changes: import("@angular/core").OutputEmitterRef<ConfiguredTableResult>;
|
|
12
48
|
/** Restore defaults was confirmed and the stored setup removed. */
|
|
13
49
|
defaultsRestored: import("@angular/core").OutputEmitterRef<void>;
|
|
50
|
+
/** The "Bộ lọc" tab; `undefined` hides it. */
|
|
51
|
+
filterSetup: import("@angular/core").InputSignal<ConfigFilterSetup | undefined>;
|
|
52
|
+
/** Apply with a changed "Bộ lọc" tab: the filter setup to store. `mode` is left out when the kind cannot be picked. */
|
|
53
|
+
filterApplied: import("@angular/core").OutputEmitterRef<Partial<TableFilterConfiguration>>;
|
|
14
54
|
autoId: import("@angular/core").Signal<string>;
|
|
15
55
|
modal: import("@angular/core").Signal<SdModal | undefined>;
|
|
16
56
|
protected readonly handles: import("@angular/core").Signal<readonly ElementRef<HTMLButtonElement>[]>;
|
|
@@ -35,6 +75,25 @@ export declare class ConfigComponent {
|
|
|
35
75
|
readonly totalCount: import("@angular/core").Signal<number>;
|
|
36
76
|
readonly shownCount: import("@angular/core").Signal<number>;
|
|
37
77
|
readonly allShown: import("@angular/core").Signal<boolean>;
|
|
78
|
+
/** Tab on screen; Cột when the table gives no "Bộ lọc" tab. */
|
|
79
|
+
readonly tab: import("@angular/core").Signal<ConfigTab>;
|
|
80
|
+
readonly tabs: readonly ConfigTab[];
|
|
81
|
+
readonly modes: readonly FilterMode[];
|
|
82
|
+
/** Picked filter kind (draft until Apply). */
|
|
83
|
+
readonly filterMode: import("@angular/core").WritableSignal<FilterMode>;
|
|
84
|
+
/** Inline external filters (draft until Apply). */
|
|
85
|
+
readonly inlineExternal: import("@angular/core").WritableSignal<Record<string, boolean>>;
|
|
86
|
+
/**
|
|
87
|
+
* 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
|
|
88
|
+
* the bar cannot show is off, a required one is always pinned, and `queryBar.pinned` decides for the app.
|
|
89
|
+
*/
|
|
90
|
+
readonly filterRows: import("@angular/core").Signal<ConfigFilterRow[]>;
|
|
91
|
+
/** Text under the filter list: what its switches do for the picked kind. */
|
|
92
|
+
readonly filterListHint: import("@angular/core").Signal<"core.component.table.config.filters-hint-panel" | "core.component.table.config.filters-hint-pinned" | "core.component.table.config.filters-hint-bar">;
|
|
93
|
+
/** Titles that keep the bar card off, joined for its note; '' when the bar can be picked. */
|
|
94
|
+
readonly barBlockedBy: import("@angular/core").Signal<string>;
|
|
95
|
+
/** On the bar, a filter it cannot show still filters by its value, with no chip to clear it. */
|
|
96
|
+
readonly offBarWarning: import("@angular/core").Signal<boolean>;
|
|
38
97
|
open: () => Promise<void>;
|
|
39
98
|
close: () => void;
|
|
40
99
|
onSave: () => void;
|
|
@@ -44,6 +103,14 @@ export declare class ConfigComponent {
|
|
|
44
103
|
* ô "Hiện" để bật lại.
|
|
45
104
|
*/
|
|
46
105
|
isRowDisabled: (item: ConfiguredColumn) => boolean;
|
|
106
|
+
readonly tabId: (tab: ConfigTab) => string;
|
|
107
|
+
readonly panelId: (tab: ConfigTab) => string;
|
|
108
|
+
readonly modeName: string;
|
|
109
|
+
selectTab: (tab: ConfigTab) => void;
|
|
110
|
+
/** ← → move between the tabs, Home / End go to the first / last (tablist pattern of the APG, roving tabindex). */
|
|
111
|
+
onTabKeydown: (event: KeyboardEvent) => void;
|
|
112
|
+
pickMode: (mode: FilterMode) => void;
|
|
113
|
+
setInline: (field: string, on: boolean) => void;
|
|
47
114
|
onFind: (value: unknown) => void;
|
|
48
115
|
toggleRow: (field: string) => void;
|
|
49
116
|
/**
|
|
@@ -75,5 +142,6 @@ export declare class ConfigComponent {
|
|
|
75
142
|
commitWidth: (field: string) => void;
|
|
76
143
|
detailsId: (field: string) => string;
|
|
77
144
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigComponent, never>;
|
|
78
|
-
static ɵcmp: i0.ɵɵ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>;
|
|
145
|
+
static ɵcmp: i0.ɵɵ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>;
|
|
79
146
|
}
|
|
147
|
+
export {};
|
package/components/table/src/components/filter/mobile-filter/mobile-field-sheet.component.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { SdModal } from '@sdcorejs/angular/components/modal';
|
|
3
|
+
import { ɵSdQueryChipLabels } from '@sdcorejs/angular/components/query-bar';
|
|
4
|
+
import type { SdTable } from '../../../table.component';
|
|
5
|
+
import { type SdTableMobileFilterItem } from '../../../services/table-filter/table-mobile-filter.util';
|
|
6
|
+
import type { TableFilterValue } from '../../../services/table-filter/table-filter.model';
|
|
7
|
+
import type { SdTableQueryContext } from '../../../services/table-filter/table-query-bar.util';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Sheet of one filter, opened from its chip (handoff table-mobile 4). Works on a copy: Apply writes that filter and
|
|
11
|
+
* reads once; Cancel, the scrim, a swipe down, Escape and Back drop the copy.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SdTableMobileFieldSheetComponent<T = unknown> {
|
|
14
|
+
#private;
|
|
15
|
+
readonly table: import("@angular/core").InputSignal<SdTable<T>>;
|
|
16
|
+
readonly labels: import("@angular/core").InputSignal<ɵSdQueryChipLabels>;
|
|
17
|
+
readonly sheet: import("@angular/core").Signal<SdModal>;
|
|
18
|
+
protected readonly head: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
19
|
+
readonly item: import("@angular/core").WritableSignal<SdTableMobileFilterItem | undefined>;
|
|
20
|
+
readonly working: import("@angular/core").WritableSignal<TableFilterValue | undefined>;
|
|
21
|
+
readonly revision: import("@angular/core").WritableSignal<number>;
|
|
22
|
+
readonly ctx: import("@angular/core").InputSignal<SdTableQueryContext | undefined>;
|
|
23
|
+
readonly autoId: import("@angular/core").Signal<string | undefined>;
|
|
24
|
+
constructor();
|
|
25
|
+
open(item: SdTableMobileFilterItem): void;
|
|
26
|
+
cancel(): void;
|
|
27
|
+
/** "Clear": empties this filter in the copy; Apply still writes it. */
|
|
28
|
+
clear(): void;
|
|
29
|
+
apply(): void;
|
|
30
|
+
/** Every close path ends here: drop the history entry the sheet pushed and the copy. */
|
|
31
|
+
onClosed(): void;
|
|
32
|
+
onChanged(): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileFieldSheetComponent<any>, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileFieldSheetComponent<any>, "sd-table-mobile-field-sheet", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "ctx": { "alias": "ctx"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
35
|
+
}
|
package/components/table/src/components/filter/mobile-filter/mobile-filter-field.component.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ɵSdQueryChipLabels, type SdQueryField } from '@sdcorejs/angular/components/query-bar';
|
|
2
|
+
import type { Filter, Operator } from '@sdcorejs/utils/models';
|
|
3
|
+
import type { SdTableMobileFilterItem } from '../../../services/table-filter/table-mobile-filter.util';
|
|
4
|
+
import type { SdTableQueryContext } from '../../../services/table-filter/table-query-bar.util';
|
|
5
|
+
import type { TableFilterValue } from '../../../services/table-filter/table-filter.model';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/** Options of a values list shown before a search box appears. */
|
|
8
|
+
export declare const SD_TABLE_MOBILE_OPTIONS_WITHOUT_SEARCH = 8;
|
|
9
|
+
type FieldKind = 'options' | 'boolean' | 'date-range' | 'number-range' | 'date' | 'datetime' | 'text' | 'number' | 'custom';
|
|
10
|
+
interface Option {
|
|
11
|
+
value: unknown;
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Controls of one filter on the phone (handoff table-mobile 4–5): the operator line, then a checkbox or radio list,
|
|
16
|
+
* two date or number boxes, or one box. Edits the working copy in place (`value`) and emits `changed`; filters only
|
|
17
|
+
* their own control can edit (`item.custom`) render that control.
|
|
18
|
+
*/
|
|
19
|
+
export declare class SdTableMobileFilterFieldComponent {
|
|
20
|
+
#private;
|
|
21
|
+
readonly item: import("@angular/core").InputSignal<SdTableMobileFilterItem>;
|
|
22
|
+
/** Working copy; edited in place. */
|
|
23
|
+
readonly value: import("@angular/core").InputSignal<TableFilterValue>;
|
|
24
|
+
readonly ctx: import("@angular/core").InputSignal<SdTableQueryContext>;
|
|
25
|
+
/** Bumped by the owner when it changed the working copy (Clear, Clear all). */
|
|
26
|
+
readonly revision: import("@angular/core").InputSignal<number>;
|
|
27
|
+
readonly cacheValues: import("@angular/core").InputSignal<Record<string, any[]> | undefined>;
|
|
28
|
+
readonly labels: import("@angular/core").InputSignal<ɵSdQueryChipLabels>;
|
|
29
|
+
readonly autoId: import("@angular/core").InputSignal<string | undefined>;
|
|
30
|
+
readonly changed: import("@angular/core").OutputEmitterRef<void>;
|
|
31
|
+
readonly search: import("@angular/core").WritableSignal<string>;
|
|
32
|
+
readonly field: import("@angular/core").Signal<SdQueryField | undefined>;
|
|
33
|
+
readonly chip: import("@angular/core").Signal<{
|
|
34
|
+
filter: Filter;
|
|
35
|
+
active: boolean;
|
|
36
|
+
} | undefined>;
|
|
37
|
+
readonly operator: import("@angular/core").Signal<Operator | undefined>;
|
|
38
|
+
readonly operatorItems: import("@angular/core").Signal<import("@sdcorejs/angular/components/operator").ɵSdOperatorItem[]>;
|
|
39
|
+
readonly operatorLabel: import("@angular/core").Signal<string>;
|
|
40
|
+
readonly noData: import("@angular/core").Signal<boolean>;
|
|
41
|
+
readonly kind: import("@angular/core").Signal<FieldKind>;
|
|
42
|
+
readonly multiple: import("@angular/core").Signal<boolean>;
|
|
43
|
+
readonly raw: import("@angular/core").Signal<any>;
|
|
44
|
+
/** values: the option list (array, signal, or loaded once); lazy-values: the last search, selected values first. */
|
|
45
|
+
readonly options: import("@angular/core").Signal<Option[]>;
|
|
46
|
+
readonly showSearch: import("@angular/core").Signal<boolean>;
|
|
47
|
+
readonly shownOptions: import("@angular/core").Signal<Option[]>;
|
|
48
|
+
readonly booleanOptions: import("@angular/core").Signal<Option[]>;
|
|
49
|
+
constructor();
|
|
50
|
+
onSearch(term: string): void;
|
|
51
|
+
isChecked(value: unknown): boolean;
|
|
52
|
+
toggle(value: unknown, checked: unknown): void;
|
|
53
|
+
setRange(end: 'from' | 'to', value: unknown): void;
|
|
54
|
+
setRaw(raw: unknown): void;
|
|
55
|
+
/** Operator menu. `NULL` / `NOT_NULL` clear the value; leaving them restores the column default. */
|
|
56
|
+
setOperator(operator: Operator): void;
|
|
57
|
+
/** External date / datetime filter the bar leaves out: the raw value only. */
|
|
58
|
+
setExternal(field: string, raw: unknown): void;
|
|
59
|
+
/** Custom controls (column-filter, templates) edit the working copy themselves. */
|
|
60
|
+
onCustomChange(): void;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileFilterFieldComponent, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileFilterFieldComponent, "sd-table-mobile-filter-field", never, { "item": { "alias": "item"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "ctx": { "alias": "ctx"; "required": true; "isSignal": true; }; "revision": { "alias": "revision"; "required": false; "isSignal": true; }; "cacheValues": { "alias": "cacheValues"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ɵSdQueryChipLabels } from '@sdcorejs/angular/components/query-bar';
|
|
2
|
+
import { type SdTableMobileFilterItem } from '../../../services/table-filter/table-mobile-filter.util';
|
|
3
|
+
import type { TableFilterValue } from '../../../services/table-filter/table-filter.model';
|
|
4
|
+
/**
|
|
5
|
+
* Summary of a phone filter for a raw record, the same string the query bar shows for that chip (handoff table-mobile
|
|
6
|
+
* 3.3): one value → its label, several → `first +n`, ranges as on the bar. A `string` / `number` value gets its operator
|
|
7
|
+
* in front (`Chứa abc`); `NULL` / `NOT_NULL` show the operator name. Empty when the filter is not active or custom.
|
|
8
|
+
*
|
|
9
|
+
* Call in an injection context. `labels` resolves values the table does not hold (lazy-values, items functions).
|
|
10
|
+
*/
|
|
11
|
+
export declare function sdTableMobileFilterSummary(): (item: SdTableMobileFilterItem, value: TableFilterValue, labels: ɵSdQueryChipLabels) => string;
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { SdModal } from '@sdcorejs/angular/components/modal';
|
|
3
|
+
import { ɵSdQueryChipLabels } from '@sdcorejs/angular/components/query-bar';
|
|
2
4
|
import { Operator } from '@sdcorejs/utils/models';
|
|
3
5
|
import { SdTableFilterDefDirective } from '../../../directives/sd-table-filter-def.directive';
|
|
4
6
|
import { SdTableColumn } from '../../../models/table-column.model';
|
|
5
|
-
import {
|
|
7
|
+
import { type SdTableMobileFilterItem } from '../../../services/table-filter/table-mobile-filter.util';
|
|
8
|
+
import type { SdTableQueryContext } from '../../../services/table-filter/table-query-bar.util';
|
|
9
|
+
import { SdTableExternalFilter, SdTableOptionFilter, TableFilterRegister, TableFilterValue } from '../../../services/table-filter/table-filter.model';
|
|
6
10
|
import * as i0 from "@angular/core";
|
|
7
11
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* 1. External filter (render inline — KHÔNG reuse external-filter component
|
|
13
|
-
* vì component đó dùng grid 2/3 cột + có chọn ẩn/hiện không phù hợp mobile).
|
|
14
|
-
* 2. filterDefs — custom templates do app khai báo qua `[sdTableFilterDef]`.
|
|
15
|
-
* 3. Column filter — 1 column-filter / column.
|
|
16
|
-
*
|
|
17
|
-
* State: local working copy. Cancel = đóng (không ghi). Apply = flush vào
|
|
18
|
-
* filterRegister + đóng.
|
|
12
|
+
* Filter sheet of the phone (handoff table-mobile 5): one `sd-modal` bottom sheet with two levels — the list of
|
|
13
|
+
* filters with their summary, and the page of one filter. Works on a copy of the filter register: Done keeps the page's
|
|
14
|
+
* edits in the copy, Apply writes every filter and reads once, Cancel / close / a swipe down / the scrim drop the copy.
|
|
15
|
+
* Order: external filters → `sdTableFilterDef` templates → columns.
|
|
19
16
|
*/
|
|
20
17
|
export declare class MobileFilterComponent {
|
|
18
|
+
#private;
|
|
21
19
|
autoIdInput: import("@angular/core").InputSignal<string | null | undefined>;
|
|
22
20
|
filter: import("@angular/core").InputSignal<SdTableOptionFilter<unknown> | undefined>;
|
|
23
21
|
externalFilters: import("@angular/core").InputSignal<SdTableExternalFilter[] | null | undefined>;
|
|
@@ -25,18 +23,52 @@ export declare class MobileFilterComponent {
|
|
|
25
23
|
filterDefs: import("@angular/core").InputSignal<readonly SdTableFilterDefDirective[] | null | undefined>;
|
|
26
24
|
filterRegister: import("@angular/core").InputSignal<TableFilterRegister | undefined>;
|
|
27
25
|
cacheValues: import("@angular/core").InputSignal<Record<string, any[]> | undefined>;
|
|
28
|
-
|
|
26
|
+
/** Filters and the query model, from the table. */
|
|
27
|
+
model: import("@angular/core").InputSignal<{
|
|
28
|
+
ctx: SdTableQueryContext;
|
|
29
|
+
items: SdTableMobileFilterItem[];
|
|
30
|
+
} | undefined>;
|
|
31
|
+
readonly sheet: import("@angular/core").Signal<SdModal>;
|
|
32
|
+
protected readonly head: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
33
|
+
protected readonly body: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
29
34
|
workingColumnFilter: import("@angular/core").WritableSignal<Record<string, any>>;
|
|
30
35
|
workingColumnOperator: import("@angular/core").WritableSignal<Record<string, Operator>>;
|
|
31
36
|
workingExternalFilter: import("@angular/core").WritableSignal<Record<string, any>>;
|
|
37
|
+
/** Filter whose page is open; `undefined` on the list. */
|
|
38
|
+
readonly page: import("@angular/core").WritableSignal<SdTableMobileFilterItem | undefined>;
|
|
39
|
+
/** Bumped when the copy changes in place, so summaries and counts follow. */
|
|
40
|
+
readonly revision: import("@angular/core").WritableSignal<number>;
|
|
41
|
+
readonly labels: ɵSdQueryChipLabels;
|
|
32
42
|
autoId: import("@angular/core").Signal<string>;
|
|
33
43
|
externalFilterItems: import("@angular/core").Signal<SdTableExternalFilter[]>;
|
|
34
44
|
columnItems: import("@angular/core").Signal<SdTableColumn[]>;
|
|
35
45
|
filterDefItems: import("@angular/core").Signal<readonly SdTableFilterDefDirective[]>;
|
|
46
|
+
/** The copy as one record; its parts are the working signals' objects, edited in place by the field pages. */
|
|
47
|
+
readonly working: import("@angular/core").Signal<TableFilterValue>;
|
|
48
|
+
readonly rows: import("@angular/core").Signal<{
|
|
49
|
+
item: SdTableMobileFilterItem;
|
|
50
|
+
summary: string;
|
|
51
|
+
active: boolean;
|
|
52
|
+
field: string;
|
|
53
|
+
}[]>;
|
|
54
|
+
readonly activeCount: import("@angular/core").Signal<number>;
|
|
55
|
+
constructor();
|
|
36
56
|
open: () => void;
|
|
37
57
|
close: () => void;
|
|
58
|
+
/** Opens the page of a filter; Back returns to the list. */
|
|
59
|
+
enter(item: SdTableMobileFilterItem): void;
|
|
60
|
+
/** Done / ← / Escape on a page: back to the list, the edits stay in the copy. */
|
|
61
|
+
back(): void;
|
|
38
62
|
onApply: () => void;
|
|
39
63
|
onCancel: () => void;
|
|
64
|
+
/** "Clear all": empties every filter of the copy; Apply still writes it. */
|
|
65
|
+
clearAll(): void;
|
|
66
|
+
/** "Clear" on a page: that filter only. */
|
|
67
|
+
clearPage(): void;
|
|
68
|
+
onChanged(): void;
|
|
69
|
+
onKeydown(event: KeyboardEvent): void;
|
|
70
|
+
/** Every close path ends here: drop the history entries the sheet pushed. */
|
|
71
|
+
onClosed(): void;
|
|
40
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<MobileFilterComponent, never>;
|
|
41
|
-
static ɵcmp: i0.ɵɵ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>;
|
|
73
|
+
static ɵcmp: i0.ɵɵ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>;
|
|
42
74
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type SdBadgeData } from '@sdcorejs/angular/components/badge';
|
|
2
|
+
import type { SdTableCellDefDirective } from '../../directives/sd-table-cell-def.directive';
|
|
3
|
+
import type { SdTableColumnAnyRow } from '../../models/table-column.model';
|
|
4
|
+
import type { SdTableItem } from '../../models/table-item.model';
|
|
5
|
+
import type { SdTableMobileView } from '../../services/mobile/mobile-view.util';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
interface DataCell {
|
|
8
|
+
column: SdTableColumnAnyRow;
|
|
9
|
+
label: string;
|
|
10
|
+
highlight: boolean;
|
|
11
|
+
/** The value goes through `desktop-cell` (cell template, or the formatted value); otherwise `text`. */
|
|
12
|
+
cell: boolean;
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Body of a phone card built from `mobile.template.data` or `autoTemplate` (handoff table-mobile 9.4): title and
|
|
17
|
+
* badge, a one-line subtitle, then a two-column grid of fields with the column title as label. Grid values take the
|
|
18
|
+
* desktop cell path; the title and subtitle are plain text.
|
|
19
|
+
*/
|
|
20
|
+
export declare class SdTableMobileCardDataComponent {
|
|
21
|
+
#private;
|
|
22
|
+
readonly view: import("@angular/core").InputSignal<SdTableMobileView>;
|
|
23
|
+
readonly row: import("@angular/core").InputSignal<SdTableItem<any>>;
|
|
24
|
+
/** Title when the view has none: the row label. */
|
|
25
|
+
readonly label: import("@angular/core").InputSignal<string>;
|
|
26
|
+
readonly cellDef: import("@angular/core").InputSignal<Record<string, SdTableCellDefDirective<any>>>;
|
|
27
|
+
readonly autoId: import("@angular/core").InputSignal<string | undefined>;
|
|
28
|
+
readonly expanded: import("@angular/core").WritableSignal<boolean>;
|
|
29
|
+
readonly title: import("@angular/core").Signal<string>;
|
|
30
|
+
readonly subtitle: import("@angular/core").Signal<string>;
|
|
31
|
+
readonly badge: import("@angular/core").Signal<{
|
|
32
|
+
kind: "badge";
|
|
33
|
+
data: SdBadgeData;
|
|
34
|
+
title: string;
|
|
35
|
+
} | {
|
|
36
|
+
kind: "text";
|
|
37
|
+
text: string;
|
|
38
|
+
} | undefined>;
|
|
39
|
+
readonly cells: import("@angular/core").Signal<DataCell[]>;
|
|
40
|
+
readonly hiddenCount: import("@angular/core").Signal<number>;
|
|
41
|
+
readonly shownCells: import("@angular/core").Signal<DataCell[]>;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileCardDataComponent, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileCardDataComponent, "sd-table-mobile-card-data", never, { "view": { "alias": "view"; "required": true; "isSignal": true; }; "row": { "alias": "row"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "cellDef": { "alias": "cellDef"; "required": false; "isSignal": true; }; "autoId": { "alias": "autoId"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -5,9 +5,19 @@ import type { SdTableRowMobileDefContext } from '../../directives/sd-table-row-m
|
|
|
5
5
|
import { Command } from '../command/pipes/filter.pipe';
|
|
6
6
|
import { SdTableMobileAction } from './mobile-action.model';
|
|
7
7
|
import type { AggregateRow } from '../../services/table-aggregate.util';
|
|
8
|
+
import { type SdTableMobileBody, type SdTableMobileView } from '../../services/mobile/mobile-view.util';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
10
|
+
type CardBody<T> = {
|
|
11
|
+
kind: 'template';
|
|
12
|
+
templateRef: TemplateRef<SdTableRowMobileDefContext<T>>;
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'data';
|
|
15
|
+
view: SdTableMobileView;
|
|
16
|
+
};
|
|
9
17
|
interface Card<T> {
|
|
10
18
|
row: SdTableItem<T>;
|
|
19
|
+
/** Card body of a data row; `undefined` for group and summary rows. */
|
|
20
|
+
body?: CardBody<T>;
|
|
11
21
|
context: SdTableRowMobileDefContext<T>;
|
|
12
22
|
label: string;
|
|
13
23
|
selectLabel: string;
|
|
@@ -20,6 +30,8 @@ interface Card<T> {
|
|
|
20
30
|
export declare class SdTableMobileCardsComponent<T = unknown> implements OnDestroy {
|
|
21
31
|
#private;
|
|
22
32
|
readonly table: import("@angular/core").InputSignal<SdTable<T>>;
|
|
33
|
+
/** Card body the table resolved (`sdTableRowMobileDef`, `mobile.template` or `autoTemplate`). */
|
|
34
|
+
readonly body: import("@angular/core").InputSignal<SdTableMobileBody<T> | undefined>;
|
|
23
35
|
readonly rows: import("@angular/core").InputSignal<SdTableItem<T>[]>;
|
|
24
36
|
readonly dataRows: import("@angular/core").InputSignal<SdTableItem<T>[] | undefined>;
|
|
25
37
|
readonly aggregateTemplate: import("@angular/core").InputSignal<TemplateRef<{
|
|
@@ -56,6 +68,6 @@ export declare class SdTableMobileCardsComponent<T = unknown> implements OnDestr
|
|
|
56
68
|
dragStart(): void;
|
|
57
69
|
ngOnDestroy(): void;
|
|
58
70
|
static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileCardsComponent<any>, never>;
|
|
59
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileCardsComponent<any>, "sd-table-mobile-cards", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "dataRows": { "alias": "dataRows"; "required": false; "isSignal": true; }; "aggregateTemplate": { "alias": "aggregateTemplate"; "required": false; "isSignal": true; }; "groupTemplate": { "alias": "groupTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
71
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileCardsComponent<any>, "sd-table-mobile-cards", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; "body": { "alias": "body"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "dataRows": { "alias": "dataRows"; "required": false; "isSignal": true; }; "aggregateTemplate": { "alias": "aggregateTemplate"; "required": false; "isSignal": true; }; "groupTemplate": { "alias": "groupTemplate"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
60
72
|
}
|
|
61
73
|
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Drag distance after which a released handle closes the sheet. */
|
|
2
|
+
export declare const SD_TABLE_SHEET_DISMISS_DISTANCE = 80;
|
|
3
|
+
/**
|
|
4
|
+
* Browser Back for the phone sheets (handoff table-mobile 15.6). Each level pushes one history entry with the same URL
|
|
5
|
+
* and state, so the router sees no navigation; Back pops the entry and runs the level's handler instead of leaving the
|
|
6
|
+
* page. When the UI closes levels itself, `release` takes their entries back off the history.
|
|
7
|
+
*
|
|
8
|
+
* The sheets open `sd-modal` with `closeOnNavigation: false`, otherwise Material would close them on that popstate.
|
|
9
|
+
*
|
|
10
|
+
* Off while the table sits in an overlay (a dialog, a bottom sheet): every popstate, the ones `release` causes
|
|
11
|
+
* included, makes Material close that overlay (`closeOnNavigation`). Back then closes the overlay, as before.
|
|
12
|
+
*/
|
|
13
|
+
export declare class SdTableSheetHistory {
|
|
14
|
+
#private;
|
|
15
|
+
/** `owner`: an element of the table, to tell whether it sits in an overlay. */
|
|
16
|
+
constructor(window: Window | null, owner?: Element | null);
|
|
17
|
+
get depth(): number;
|
|
18
|
+
/** Opens a level: Back now runs `onBack` (which must not call `release`). */
|
|
19
|
+
push(onBack: () => void): void;
|
|
20
|
+
/**
|
|
21
|
+
* The UI closed `count` levels itself (all by default): drop their entries from the history. When the URL changed
|
|
22
|
+
* since the first level opened (the router navigated, the app wrote query params), the entries are only forgotten:
|
|
23
|
+
* going back would undo that navigation.
|
|
24
|
+
*/
|
|
25
|
+
release(count?: number): void;
|
|
26
|
+
/** Destroy: stop listening. A sheet that was open has already released its levels when its modal closed. */
|
|
27
|
+
dispose(): void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Swipe down on the handle and header of a bottom sheet (`element` inside the Material container) to close it. The
|
|
31
|
+
* container follows the finger; a release past `SD_TABLE_SHEET_DISMISS_DISTANCE` calls `onDismiss`, a shorter one puts
|
|
32
|
+
* it back. Listeners are passive (they never cancel scrolling); the dragged area has `touch-action: none` in CSS.
|
|
33
|
+
* Returns the cleanup.
|
|
34
|
+
*/
|
|
35
|
+
export declare const sdTableSheetSwipe: (element: HTMLElement, onDismiss: () => void) => (() => void);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import { SortDirection } from '@angular/material/sort';
|
|
3
|
+
import { SdModal } from '@sdcorejs/angular/components/modal';
|
|
4
|
+
import { type SdSegmentedItem } from '@sdcorejs/angular/forms/segmented';
|
|
5
|
+
import type { SdTable } from '../../table.component';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Sort sheet of the phone (handoff table-mobile 6): direction (Ascending | Descending) and one sortable column, hidden
|
|
9
|
+
* columns included. Picking a column sorts at once and closes; changing the direction re-sorts while a column is
|
|
10
|
+
* picked, otherwise it is kept for the next pick; "Clear sort" goes back to no sort.
|
|
11
|
+
*/
|
|
12
|
+
export declare class SdTableMobileSortSheetComponent<T = unknown> {
|
|
13
|
+
#private;
|
|
14
|
+
readonly table: import("@angular/core").InputSignal<SdTable<T>>;
|
|
15
|
+
readonly sheet: import("@angular/core").Signal<SdModal>;
|
|
16
|
+
protected readonly head: import("@angular/core").Signal<ElementRef<HTMLElement> | undefined>;
|
|
17
|
+
readonly state: import("@angular/core").Signal<{
|
|
18
|
+
active: string;
|
|
19
|
+
direction: SortDirection;
|
|
20
|
+
}>;
|
|
21
|
+
readonly active: import("@angular/core").Signal<string>;
|
|
22
|
+
readonly direction: import("@angular/core").Signal<"desc" | "asc">;
|
|
23
|
+
readonly columns: import("@angular/core").Signal<{
|
|
24
|
+
value: string;
|
|
25
|
+
label: string;
|
|
26
|
+
}[]>;
|
|
27
|
+
readonly directions: import("@angular/core").Signal<SdSegmentedItem<"desc" | "asc">[]>;
|
|
28
|
+
constructor();
|
|
29
|
+
open(): void;
|
|
30
|
+
pickColumn(field: unknown): void;
|
|
31
|
+
pickDirection(direction: unknown): void;
|
|
32
|
+
clear(): void;
|
|
33
|
+
onClosed(): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileSortSheetComponent<any>, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileSortSheetComponent<any>, "sd-table-mobile-sort-sheet", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ɵSdQueryChipLabels } from '@sdcorejs/angular/components/query-bar';
|
|
2
|
+
import type { SdTable } from '../../table.component';
|
|
3
|
+
import type { TableFilterValue } from '../../services/table-filter/table-filter.model';
|
|
4
|
+
import type { SdTableQueryContext } from '../../services/table-filter/table-query-bar.util';
|
|
5
|
+
import { type SdTableMobileFilterItem } from '../../services/table-filter/table-mobile-filter.util';
|
|
6
|
+
import { SdTableMobileFieldSheetComponent } from '../filter/mobile-filter/mobile-field-sheet.component';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
interface FieldChip {
|
|
9
|
+
item: SdTableMobileFilterItem;
|
|
10
|
+
field: string;
|
|
11
|
+
/** `Name` when not filtering, `Name: summary` when filtering. */
|
|
12
|
+
text: string;
|
|
13
|
+
active: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Filter chips under the table search on phones (handoff table-mobile 3): Filters (with the number of active filters),
|
|
17
|
+
* Sort, a divider, then one chip per filter the table can summarise, in a fixed order. A field chip opens its own sheet;
|
|
18
|
+
* the sort chip asks the table to open the sort sheet (`sortOpen`).
|
|
19
|
+
*/
|
|
20
|
+
export declare class SdTableMobileFilterChipsComponent<T = unknown> {
|
|
21
|
+
#private;
|
|
22
|
+
readonly table: import("@angular/core").InputSignal<SdTable<T>>;
|
|
23
|
+
/** Filters of the phone UI and the applied value (from the table). */
|
|
24
|
+
readonly model: import("@angular/core").InputSignal<{
|
|
25
|
+
ctx: SdTableQueryContext;
|
|
26
|
+
items: SdTableMobileFilterItem[];
|
|
27
|
+
} | undefined>;
|
|
28
|
+
readonly value: import("@angular/core").InputSignal<TableFilterValue | undefined>;
|
|
29
|
+
readonly sortAvailable: import("@angular/core").InputSignal<boolean>;
|
|
30
|
+
readonly sortLabel: import("@angular/core").InputSignal<string>;
|
|
31
|
+
readonly fieldSheet: import("@angular/core").Signal<SdTableMobileFieldSheetComponent<any>>;
|
|
32
|
+
readonly sortOpen: import("@angular/core").OutputEmitterRef<void>;
|
|
33
|
+
readonly labels: ɵSdQueryChipLabels;
|
|
34
|
+
readonly count: import("@angular/core").Signal<number>;
|
|
35
|
+
readonly filterLabel: import("@angular/core").Signal<string>;
|
|
36
|
+
readonly chips: import("@angular/core").Signal<FieldChip[]>;
|
|
37
|
+
/** Sort chip (3.2): only an icon while the table is not sorted, else the arrow and the column. */
|
|
38
|
+
readonly sort: import("@angular/core").Signal<{
|
|
39
|
+
active: boolean;
|
|
40
|
+
title: string;
|
|
41
|
+
icon: string;
|
|
42
|
+
label: string;
|
|
43
|
+
} | undefined>;
|
|
44
|
+
openAll(): void;
|
|
45
|
+
openField(chip: FieldChip): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SdTableMobileFilterChipsComponent<any>, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SdTableMobileFilterChipsComponent<any>, "sd-table-mobile-filter-chips", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "sortAvailable": { "alias": "sortAvailable"; "required": false; "isSignal": true; }; "sortLabel": { "alias": "sortLabel"; "required": false; "isSignal": true; }; }, { "sortOpen": "sortOpen"; }, never, never, true, never>;
|
|
48
|
+
}
|
|
49
|
+
export {};
|