@egose/shadcn-theme-ng-tw 0.5.3 → 0.6.1
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/README.md +131 -12
- package/autocomplete/fesm2022/autocomplete.mjs +14 -4
- package/autocomplete/types/autocomplete.d.ts +4 -1
- package/checkbox/README.md +6 -2
- package/checkbox/fesm2022/checkbox.mjs +15 -9
- package/checkbox/types/checkbox.d.ts +6 -4
- package/combobox/fesm2022/combobox.mjs +22 -6
- package/combobox/types/combobox.d.ts +8 -2
- package/data-table/README.md +174 -0
- package/data-table/fesm2022/data-table.mjs +1485 -0
- package/data-table/package.json +25 -0
- package/data-table/types/data-table.d.ts +495 -0
- package/date-picker/README.md +41 -9
- package/date-picker/fesm2022/date-picker.mjs +265 -59
- package/date-picker/types/date-picker.d.ts +58 -27
- package/dropdown-menu/README.md +2 -0
- package/form-autocomplete/README.md +4 -2
- package/form-autocomplete/fesm2022/form-autocomplete.mjs +33 -8
- package/form-autocomplete/types/form-autocomplete.d.ts +9 -3
- package/form-combobox/README.md +4 -2
- package/form-combobox/fesm2022/form-combobox.mjs +65 -14
- package/form-combobox/types/form-combobox.d.ts +10 -3
- package/form-input-otp/README.md +7 -5
- package/form-input-otp/fesm2022/form-input-otp.mjs +28 -14
- package/form-input-otp/types/form-input-otp.d.ts +9 -3
- package/form-searchable-multiselect/README.md +15 -1
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +23 -3
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +9 -1
- package/form-slider/README.md +3 -1
- package/form-slider/fesm2022/form-slider.mjs +21 -6
- package/form-slider/types/form-slider.d.ts +9 -3
- package/form-text-input/fesm2022/form-text-input.mjs +1 -1
- package/form-textarea/fesm2022/form-textarea.mjs +1 -1
- package/form-toggle/README.md +22 -18
- package/form-toggle/fesm2022/form-toggle.mjs +25 -8
- package/form-toggle/types/form-toggle.d.ts +6 -2
- package/input/README.md +7 -12
- package/input/fesm2022/input.mjs +7 -4
- package/input/types/input.d.ts +3 -1
- package/input-otp/README.md +33 -9
- package/input-otp/fesm2022/input-otp.mjs +127 -11
- package/input-otp/types/input-otp.d.ts +24 -4
- package/layout-simple/fesm2022/layout-simple.mjs +1 -1
- package/package.json +6 -1
- package/pagination/README.md +21 -12
- package/pagination/fesm2022/pagination.mjs +83 -75
- package/pagination/types/pagination.d.ts +21 -8
- package/phone-input/README.md +16 -0
- package/phone-input/fesm2022/phone-input.mjs +42 -4
- package/phone-input/types/phone-input.d.ts +5 -2
- package/searchable-multiselect/README.md +62 -40
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +97 -36
- package/searchable-multiselect/types/searchable-multiselect.d.ts +23 -6
- package/slider/fesm2022/slider.mjs +15 -5
- package/slider/types/slider.d.ts +6 -2
- package/stepper/README.md +39 -19
- package/stepper/fesm2022/stepper.mjs +71 -17
- package/stepper/types/stepper.d.ts +12 -1
- package/table/README.md +2 -0
- package/table/fesm2022/table.mjs +12 -8
- package/table/types/table.d.ts +7 -2
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "data-table",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^20.3.0 || ^22.0.0",
|
|
6
|
+
"@angular/core": "^20.3.0 || ^22.0.0",
|
|
7
|
+
"@tanstack/angular-table": ">=9.1.2 <10.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"module": "fesm2022/data-table.mjs",
|
|
14
|
+
"typings": "types/data-table.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./types/data-table.d.ts",
|
|
21
|
+
"default": "./fesm2022/data-table.mjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"type": "module"
|
|
25
|
+
}
|
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnInit, TemplateRef } from '@angular/core';
|
|
3
|
+
import * as _tanstack_angular_table from '@tanstack/angular-table';
|
|
4
|
+
import { TableFeatures, RowData, CreatedFilterFn, CreatedSortFn, ColumnDef, SortingState, ColumnFiltersState, ColumnVisibilityState, RowSelectionState, Row, Header, Cell, CellData, SortDirection, Table } from '@tanstack/angular-table';
|
|
5
|
+
import { HlmTableSize } from '@egose/shadcn-theme-ng-tw/table';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Per-column presentation hints, ported from the React `ColumnMeta` augmentation
|
|
9
|
+
* (`hideInTable` / `thumbnail`).
|
|
10
|
+
*
|
|
11
|
+
* - `hideInTable`: hide the column in table layout (still visible in grid layout).
|
|
12
|
+
* - `thumbnail`: render this cell as the grid-card banner instead of a label/value row.
|
|
13
|
+
*
|
|
14
|
+
* Derived from the `columnMeta` type-only slot (single source of truth) so
|
|
15
|
+
* `columnDef.meta` and this type can never drift apart. NOTE: the slot uses an
|
|
16
|
+
* inline literal rather than referencing this alias — a named back-reference
|
|
17
|
+
* makes ng-packagr emit a `data-table` self-import in the bundled
|
|
18
|
+
* declarations, which trips dependency-contract validation.
|
|
19
|
+
*/
|
|
20
|
+
type EgColumnMeta = EgDataTableFeatures extends {
|
|
21
|
+
columnMeta: infer M extends object;
|
|
22
|
+
} ? M : never;
|
|
23
|
+
/**
|
|
24
|
+
* Default feature set for `EgDataTable`.
|
|
25
|
+
*
|
|
26
|
+
* Mirrors the Spartan data-table guide: filtering, visibility, pagination,
|
|
27
|
+
* selection and sorting are opted in, with the built-in `includesString`
|
|
28
|
+
* filter and `alphanumeric` / `text` sort functions registered. Anything a
|
|
29
|
+
* caller does not need can be dropped by passing a custom `features` input.
|
|
30
|
+
*
|
|
31
|
+
* Keep this reference stable (module scope) — `injectTable()` re-evaluates
|
|
32
|
+
* its initializer on every signal read, so recreating features per render
|
|
33
|
+
* would thrash the table instance.
|
|
34
|
+
*/
|
|
35
|
+
declare const defaultEgDataTableFeatures: {
|
|
36
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
37
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
38
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
39
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
40
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
41
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<TableFeatures, RowData>;
|
|
42
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<TableFeatures, RowData>;
|
|
43
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<TableFeatures, RowData>;
|
|
44
|
+
filterFns: {
|
|
45
|
+
includesString: CreatedFilterFn<TableFeatures, RowData>;
|
|
46
|
+
};
|
|
47
|
+
sortFns: {
|
|
48
|
+
alphanumeric: CreatedSortFn<TableFeatures, RowData>;
|
|
49
|
+
text: CreatedSortFn<TableFeatures, RowData>;
|
|
50
|
+
};
|
|
51
|
+
columnMeta: {
|
|
52
|
+
readonly hideInTable?: boolean;
|
|
53
|
+
readonly thumbnail?: boolean;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/** Feature registry type — pass as first generic arg to `ColumnDef` / `Table` / `Row`. */
|
|
57
|
+
type EgDataTableFeatures = typeof defaultEgDataTableFeatures;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Standalone pagination controls with an optional rows-per-page selector.
|
|
61
|
+
*
|
|
62
|
+
* Reads the table from the nearest `[tanStackTable]` directive, so no table
|
|
63
|
+
* input or generics are needed and the same component works with any table.
|
|
64
|
+
* Wrap the usage site: `<div [tanStackTable]="table"><eg-data-table-pagination /></div>`.
|
|
65
|
+
*
|
|
66
|
+
* Page-size changes flow through `table.setPageSize()`: client-side tables
|
|
67
|
+
* re-paginate immediately, while server-driven (`manualPagination`) tables
|
|
68
|
+
* surface the change via their `onPaginationChange` handler (e.g. the
|
|
69
|
+
* `pageSizeChange` output of `EgDataTable`) so the caller can refetch.
|
|
70
|
+
*/
|
|
71
|
+
/** Pager navigation-button content: icons only, text labels only, or both. */
|
|
72
|
+
type EgPaginationNavMode = 'icons' | 'text' | 'both';
|
|
73
|
+
declare class EgDataTablePagination {
|
|
74
|
+
/** Show the `selected of total` status text. Set false when the host renders its own status. */
|
|
75
|
+
readonly showStatus: _angular_core.InputSignal<boolean>;
|
|
76
|
+
/** Show the rows-per-page selector. */
|
|
77
|
+
readonly showPageSize: _angular_core.InputSignal<boolean>;
|
|
78
|
+
/** Page-size options. The table's current size is appended when absent. */
|
|
79
|
+
readonly pageSizes: _angular_core.InputSignal<readonly number[]>;
|
|
80
|
+
/** Navigation-button content: icons only, text labels only, or both. */
|
|
81
|
+
readonly navMode: _angular_core.InputSignal<EgPaginationNavMode>;
|
|
82
|
+
/** Density of buttons, trigger, and meta texts. Type scale of buttons is untouched. */
|
|
83
|
+
readonly size: _angular_core.InputSignal<HlmTableSize>;
|
|
84
|
+
protected readonly _table: _angular_core.Signal<_tanstack_angular_table.AngularTable<_tanstack_angular_table.TableFeatures, _tanstack_angular_table.RowData>>;
|
|
85
|
+
protected readonly _pageCount: _angular_core.Signal<number>;
|
|
86
|
+
protected readonly _pageIndex: _angular_core.Signal<number>;
|
|
87
|
+
protected readonly _pageSize: _angular_core.Signal<number>;
|
|
88
|
+
protected readonly _canPrevious: _angular_core.Signal<boolean>;
|
|
89
|
+
protected readonly _canNext: _angular_core.Signal<boolean>;
|
|
90
|
+
protected readonly _showPager: _angular_core.Signal<boolean>;
|
|
91
|
+
/** Icon-only buttons stay square; labeled buttons size to their text. Merged by `hlmButton` via the `class` binding. */
|
|
92
|
+
protected readonly _navButtonClass: _angular_core.Signal<string>;
|
|
93
|
+
/** First/last buttons stay desktop-only. */
|
|
94
|
+
protected readonly _edgeNavButtonClass: _angular_core.Signal<string>;
|
|
95
|
+
/** Meta-text size per density (status, page indicator, rows-per-page label). */
|
|
96
|
+
protected readonly _metaTextClass: _angular_core.Signal<"tw:text-xs" | "tw:text-base" | "tw:text-sm">;
|
|
97
|
+
protected readonly _pageSizeOptions: _angular_core.Signal<readonly number[]>;
|
|
98
|
+
protected readonly _statusText: _angular_core.Signal<string>;
|
|
99
|
+
protected _onPageSizeChange(value: unknown): void;
|
|
100
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTablePagination, never>;
|
|
101
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgDataTablePagination, "eg-data-table-pagination", never, { "showStatus": { "alias": "showStatus"; "required": false; "isSignal": true; }; "showPageSize": { "alias": "showPageSize"; "required": false; "isSignal": true; }; "pageSizes": { "alias": "pageSizes"; "required": false; "isSignal": true; }; "navMode": { "alias": "navMode"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Server-driven page slice, mirroring the React `PaginatedResponse` contract.
|
|
106
|
+
*
|
|
107
|
+
* - `items` is the current page slice (server already sliced it).
|
|
108
|
+
* - `total` is the total record count across all pages.
|
|
109
|
+
* - `limit` is the server page size, `offset` the zero-based record offset.
|
|
110
|
+
* - `hasPrevious` / `hasNext` drive the pager disabled state together with
|
|
111
|
+
* the table's own `getCanPreviousPage()` / `getCanNextPage()`.
|
|
112
|
+
*/
|
|
113
|
+
interface EgPaginatedResponse<TData> {
|
|
114
|
+
readonly items: readonly TData[];
|
|
115
|
+
readonly total: number;
|
|
116
|
+
readonly limit: number;
|
|
117
|
+
readonly offset: number;
|
|
118
|
+
readonly hasPrevious: boolean;
|
|
119
|
+
readonly hasNext: boolean;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Presentation mode of `EgDataTable`. Two-way bindable via `layout`. */
|
|
123
|
+
type EgDataTableLayout = 'table' | 'grid';
|
|
124
|
+
/**
|
|
125
|
+
* Generic data table with TanStack-powered sorting, filtering, pagination,
|
|
126
|
+
* selection, column visibility, plus a React-parity grid layout.
|
|
127
|
+
*
|
|
128
|
+
* The caller passes `columns` (and optionally `gridColumns`) — everything else
|
|
129
|
+
* is owned internally with change notifications via outputs:
|
|
130
|
+
*
|
|
131
|
+
* - Client mode: pass `data` as an array. Pagination/sorting/filtering run in-browser.
|
|
132
|
+
* `filterRows` can pre-filter the array before the built-in pipeline.
|
|
133
|
+
* - Server mode: pass `data` as a page slice (`{items,total,limit,offset,hasPrevious,hasNext}`)
|
|
134
|
+
* with `manualPagination` set. The slice renders as-is — sorting/filtering
|
|
135
|
+
* are not applied client-side. Page, sort and filter interactions emit
|
|
136
|
+
* `pageChange` / `pageSizeChange` / `sortingChange` / `filterChange`
|
|
137
|
+
* (`columnFiltersChange`) so the caller can fetch the next slice.
|
|
138
|
+
* - Selection: set `enableSelection` to auto-prepend a checkbox column;
|
|
139
|
+
* selected rows are emitted via `selectionChange` (array of `TData`).
|
|
140
|
+
* - Grid mode: pass `gridColumns` to enable the layout toggle. Columns with
|
|
141
|
+
* `meta: { hideInTable: true }` are table-hidden; `meta: { thumbnail: true }`
|
|
142
|
+
* renders as the card banner.
|
|
143
|
+
*/
|
|
144
|
+
declare class EgDataTable<TData extends RowData> implements OnInit {
|
|
145
|
+
/** Column definitions for table layout (required). */
|
|
146
|
+
readonly columns: _angular_core.InputSignal<ColumnDef<{
|
|
147
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
148
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
149
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
150
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
151
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
152
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
153
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
154
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
155
|
+
filterFns: {
|
|
156
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
157
|
+
};
|
|
158
|
+
sortFns: {
|
|
159
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
160
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
161
|
+
};
|
|
162
|
+
columnMeta: {
|
|
163
|
+
readonly hideInTable?: boolean;
|
|
164
|
+
readonly thumbnail?: boolean;
|
|
165
|
+
};
|
|
166
|
+
}, TData>[]>;
|
|
167
|
+
/** Column definitions for grid layout; falls back to `columns` when omitted. */
|
|
168
|
+
readonly gridColumns: _angular_core.InputSignal<ColumnDef<{
|
|
169
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
170
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
171
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
172
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
173
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
174
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
175
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
176
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
177
|
+
filterFns: {
|
|
178
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
179
|
+
};
|
|
180
|
+
sortFns: {
|
|
181
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
182
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
183
|
+
};
|
|
184
|
+
columnMeta: {
|
|
185
|
+
readonly hideInTable?: boolean;
|
|
186
|
+
readonly thumbnail?: boolean;
|
|
187
|
+
};
|
|
188
|
+
}, TData>[] | undefined>;
|
|
189
|
+
/** Client rows, or a server page slice when `manualPagination` is set (`null` while loading). */
|
|
190
|
+
readonly data: _angular_core.InputSignal<EgPaginatedResponse<TData> | readonly TData[] | null>;
|
|
191
|
+
/**
|
|
192
|
+
* Pure stable identity callback, e.g. `(record) => record.id`. Return a unique
|
|
193
|
+
* string per entity, independent of position, and keep the callback reference stable.
|
|
194
|
+
* Selection survives refreshes only for IDs still in the supplied rows (after
|
|
195
|
+
* `filterRows`); server selection is limited to the loaded slice. Without this
|
|
196
|
+
* callback, IDs are positional and replacing the rows clears selection.
|
|
197
|
+
* Changing the callback clears selection. Update data immutably.
|
|
198
|
+
*/
|
|
199
|
+
readonly getRowId: _angular_core.InputSignal<((row: TData) => string) | undefined>;
|
|
200
|
+
/** When true, `data` is a server page slice and the table uses TanStack `manualPagination`. Sorting and filtering are then display-only: the slice is shown as-is while `sortingChange` / `filterChange` (`columnFiltersChange`) notify the caller to refetch. */
|
|
201
|
+
readonly manualPagination: _angular_core.InputSignal<boolean>;
|
|
202
|
+
/** TanStack feature registry. Defaults to filtering + visibility + pagination + selection + sorting. */
|
|
203
|
+
readonly features: _angular_core.InputSignal<{
|
|
204
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
205
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
206
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
207
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
208
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
209
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
210
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
211
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
212
|
+
filterFns: {
|
|
213
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
214
|
+
};
|
|
215
|
+
sortFns: {
|
|
216
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
217
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
218
|
+
};
|
|
219
|
+
columnMeta: {
|
|
220
|
+
readonly hideInTable?: boolean;
|
|
221
|
+
readonly thumbnail?: boolean;
|
|
222
|
+
};
|
|
223
|
+
}>;
|
|
224
|
+
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
225
|
+
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
226
|
+
/** When true, a checkbox column is auto-prepended and `selectionChange` emits the selected rows. */
|
|
227
|
+
readonly enableSelection: _angular_core.InputSignal<boolean>;
|
|
228
|
+
readonly hideFooter: _angular_core.InputSignal<boolean>;
|
|
229
|
+
/** Density of toolbar, table, and pagination chrome. Type scale is untouched. */
|
|
230
|
+
readonly size: _angular_core.InputSignal<HlmTableSize>;
|
|
231
|
+
/** Presentation mode. Two-way bindable: `[(layout)]`. Grid requires `gridColumns`. */
|
|
232
|
+
readonly layout: _angular_core.ModelSignal<EgDataTableLayout>;
|
|
233
|
+
/** Show the table/grid toggle (only rendered when `gridColumns` is set). */
|
|
234
|
+
readonly showLayoutToggle: _angular_core.InputSignal<boolean>;
|
|
235
|
+
/** Show the toolbar (filter input, plus the column-visibility dropdown when `showColumnToggle` is set). */
|
|
236
|
+
readonly showToolbar: _angular_core.InputSignal<boolean>;
|
|
237
|
+
/** Column id the toolbar filter input writes to (e.g. `'email'`). Empty means client-side filtering is skipped and keystrokes only emit `filterChange` (server-side pattern). */
|
|
238
|
+
readonly filterColumnId: _angular_core.InputSignal<string>;
|
|
239
|
+
readonly filterPlaceholder: _angular_core.InputSignal<string>;
|
|
240
|
+
/** Show the column-visibility dropdown inside the toolbar. Off by default; opt in per table. */
|
|
241
|
+
readonly showColumnToggle: _angular_core.InputSignal<boolean>;
|
|
242
|
+
/** Custom right-side toolbar content (e.g. action buttons) as a template. Renders the toolbar row even when `showToolbar` is false; built-ins stay on the left. */
|
|
243
|
+
readonly toolbarActions: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
244
|
+
/** Default client-side page size. Changing it later resets the pager to the new size. */
|
|
245
|
+
readonly defaultPageSize: _angular_core.InputSignal<number>;
|
|
246
|
+
/** Caller-provided frontend filter: receives all client rows, returns the kept rows. Runs before built-in filtering/sorting/pagination; ignored in server mode. Must be pure. */
|
|
247
|
+
readonly filterRows: _angular_core.InputSignal<((rows: readonly TData[]) => readonly TData[]) | null>;
|
|
248
|
+
/** Seeds the sorting state once at creation. Later changes are ignored — use `sortingChange` to stay in sync. */
|
|
249
|
+
readonly initialSorting: _angular_core.InputSignal<SortingState>;
|
|
250
|
+
/** Seeds the column-filter state once at creation. Later changes are ignored. */
|
|
251
|
+
readonly initialColumnFilters: _angular_core.InputSignal<ColumnFiltersState>;
|
|
252
|
+
/** Seeds the column-visibility state once at creation. Later changes are ignored. */
|
|
253
|
+
readonly initialColumnVisibility: _angular_core.InputSignal<ColumnVisibilityState>;
|
|
254
|
+
/** Seeds selection once for current rows: keys come from `getRowId`, or positional indices without it. Missing IDs are discarded. Later changes are ignored. */
|
|
255
|
+
readonly initialRowSelection: _angular_core.InputSignal<RowSelectionState>;
|
|
256
|
+
/** Show the rows-per-page selector in the footer pager. */
|
|
257
|
+
readonly showPageSize: _angular_core.InputSignal<boolean>;
|
|
258
|
+
/** Page-size options for the footer selector. The current size is appended when absent. */
|
|
259
|
+
readonly pageSizes: _angular_core.InputSignal<readonly number[]>;
|
|
260
|
+
/** Footer navigation-button content: icons only, text labels only, or both. */
|
|
261
|
+
readonly navMode: _angular_core.InputSignal<EgPaginationNavMode>;
|
|
262
|
+
readonly userClass: _angular_core.InputSignal<string>;
|
|
263
|
+
/** Emits on init and when selected row identities/order or object references change. Includes rows hidden by built-in filters/client pagination, but never rows absent from `data`/`filterRows`. */
|
|
264
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<readonly TData[]>;
|
|
265
|
+
/** Emits the target page index on pager navigation (primary hook for server fetching). */
|
|
266
|
+
readonly pageChange: _angular_core.OutputEmitterRef<number>;
|
|
267
|
+
readonly pageSizeChange: _angular_core.OutputEmitterRef<number>;
|
|
268
|
+
/** Emits the row's data when a row (table) or card (grid) is clicked. Clicks from nested interactive elements (buttons, links, inputs, checkboxes, selects) are ignored. */
|
|
269
|
+
readonly rowClick: _angular_core.OutputEmitterRef<TData>;
|
|
270
|
+
readonly sortingChange: _angular_core.OutputEmitterRef<SortingState>;
|
|
271
|
+
readonly columnFiltersChange: _angular_core.OutputEmitterRef<ColumnFiltersState>;
|
|
272
|
+
/** Emits the toolbar filter string whenever it changes. Empty when cleared or unset. */
|
|
273
|
+
readonly filterChange: _angular_core.OutputEmitterRef<string>;
|
|
274
|
+
readonly columnVisibilityChange: _angular_core.OutputEmitterRef<ColumnVisibilityState>;
|
|
275
|
+
protected readonly _containerClass: _angular_core.Signal<string>;
|
|
276
|
+
/** Inline TH sort-button footprint per density. Merged by `hlmButton` via the `class` binding. */
|
|
277
|
+
protected readonly _sortButtonClass: _angular_core.Signal<string>;
|
|
278
|
+
private readonly _sorting;
|
|
279
|
+
private readonly _columnFilters;
|
|
280
|
+
private readonly _columnVisibility;
|
|
281
|
+
private readonly _clientPageIndex;
|
|
282
|
+
private readonly _clientPageSize;
|
|
283
|
+
private readonly _isServer;
|
|
284
|
+
/** The server page slice when in server mode; `null` for client data, misuse shapes, or `null` while loading. */
|
|
285
|
+
private readonly _page;
|
|
286
|
+
private readonly _items;
|
|
287
|
+
private readonly _tableItems;
|
|
288
|
+
private readonly _rowSelection;
|
|
289
|
+
private _keepCurrentSelection;
|
|
290
|
+
private readonly _serverPageCount;
|
|
291
|
+
private readonly _serverPageIndex;
|
|
292
|
+
private readonly _paginationState;
|
|
293
|
+
private readonly _selectionHelper;
|
|
294
|
+
/** Caller columns + auto-injected selection column + layout filtering. */
|
|
295
|
+
protected readonly _finalColumns: _angular_core.Signal<ColumnDef<{
|
|
296
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
297
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
298
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
299
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
300
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
301
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
302
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
303
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
304
|
+
filterFns: {
|
|
305
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
306
|
+
};
|
|
307
|
+
sortFns: {
|
|
308
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
309
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
310
|
+
};
|
|
311
|
+
columnMeta: {
|
|
312
|
+
readonly hideInTable?: boolean;
|
|
313
|
+
readonly thumbnail?: boolean;
|
|
314
|
+
};
|
|
315
|
+
}, TData>[]>;
|
|
316
|
+
protected readonly _table: _tanstack_angular_table.AngularTable<{
|
|
317
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
318
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
319
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
320
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
321
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
322
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
323
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
324
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
325
|
+
filterFns: {
|
|
326
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
327
|
+
};
|
|
328
|
+
sortFns: {
|
|
329
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
330
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
331
|
+
};
|
|
332
|
+
columnMeta: {
|
|
333
|
+
readonly hideInTable?: boolean;
|
|
334
|
+
readonly thumbnail?: boolean;
|
|
335
|
+
};
|
|
336
|
+
}, TData>;
|
|
337
|
+
private readonly _selectedRows;
|
|
338
|
+
private readonly _emitSelection;
|
|
339
|
+
/**
|
|
340
|
+
* Seeds internal state from the `initial*` inputs. Runs in `ngOnInit` (after
|
|
341
|
+
* first bindings, before first render) exactly once, so inline-literal
|
|
342
|
+
* bindings (new references every change detection) cannot clobber user
|
|
343
|
+
* interaction afterwards. Values are copied to avoid aliasing caller data.
|
|
344
|
+
*/
|
|
345
|
+
ngOnInit(): void;
|
|
346
|
+
protected readonly _hasGrid: _angular_core.Signal<boolean>;
|
|
347
|
+
protected readonly _effectiveLayout: _angular_core.Signal<EgDataTableLayout>;
|
|
348
|
+
protected readonly _showLayoutToggle: _angular_core.Signal<boolean>;
|
|
349
|
+
protected readonly _visibleColumnCount: _angular_core.Signal<number>;
|
|
350
|
+
protected readonly _statusText: _angular_core.Signal<string>;
|
|
351
|
+
protected _onLayoutToggle(value: unknown): void;
|
|
352
|
+
protected _onFilterInput(event: Event): void;
|
|
353
|
+
/**
|
|
354
|
+
* Row/card click handler. Ignores clicks originating from nested interactive
|
|
355
|
+
* elements (selection checkboxes, action buttons, links, inputs) so those
|
|
356
|
+
* controls keep working without also firing `rowClick`.
|
|
357
|
+
*/
|
|
358
|
+
protected _onRowClick(event: MouseEvent, row: Row<EgDataTableFeatures, TData>): void;
|
|
359
|
+
/** Show the inline TH sort button only for sortable plain-string headers (component headers own their UI). */
|
|
360
|
+
protected _showHeaderSortButton(header: Header<EgDataTableFeatures, TData, unknown>): boolean;
|
|
361
|
+
protected _toggleHeaderSorting(header: Header<EgDataTableFeatures, TData, unknown>): void;
|
|
362
|
+
protected _selectionCell(row: Row<EgDataTableFeatures, TData>): Cell<EgDataTableFeatures, TData, CellData> | undefined;
|
|
363
|
+
protected _thumbnailCell(row: Row<EgDataTableFeatures, TData>): Cell<EgDataTableFeatures, TData, CellData> | undefined;
|
|
364
|
+
protected _contentCells(row: Row<EgDataTableFeatures, TData>): Cell<EgDataTableFeatures, TData, CellData>[];
|
|
365
|
+
protected _cellLabel(cell: Cell<EgDataTableFeatures, TData, CellData>): string;
|
|
366
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTable<any>, never>;
|
|
367
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgDataTable<any>, "eg-data-table", never, { "columns": { "alias": "columns"; "required": true; "isSignal": true; }; "gridColumns": { "alias": "gridColumns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "getRowId": { "alias": "getRowId"; "required": false; "isSignal": true; }; "manualPagination": { "alias": "manualPagination"; "required": false; "isSignal": true; }; "features": { "alias": "features"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "enableSelection": { "alias": "enableSelection"; "required": false; "isSignal": true; }; "hideFooter": { "alias": "hideFooter"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "showLayoutToggle": { "alias": "showLayoutToggle"; "required": false; "isSignal": true; }; "showToolbar": { "alias": "showToolbar"; "required": false; "isSignal": true; }; "filterColumnId": { "alias": "filterColumnId"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "showColumnToggle": { "alias": "showColumnToggle"; "required": false; "isSignal": true; }; "toolbarActions": { "alias": "toolbarActions"; "required": false; "isSignal": true; }; "defaultPageSize": { "alias": "defaultPageSize"; "required": false; "isSignal": true; }; "filterRows": { "alias": "filterRows"; "required": false; "isSignal": true; }; "initialSorting": { "alias": "initialSorting"; "required": false; "isSignal": true; }; "initialColumnFilters": { "alias": "initialColumnFilters"; "required": false; "isSignal": true; }; "initialColumnVisibility": { "alias": "initialColumnVisibility"; "required": false; "isSignal": true; }; "initialRowSelection": { "alias": "initialRowSelection"; "required": false; "isSignal": true; }; "showPageSize": { "alias": "showPageSize"; "required": false; "isSignal": true; }; "pageSizes": { "alias": "pageSizes"; "required": false; "isSignal": true; }; "navMode": { "alias": "navMode"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "layout": "layoutChange"; "selectionChange": "selectionChange"; "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; "rowClick": "rowClick"; "sortingChange": "sortingChange"; "columnFiltersChange": "columnFiltersChange"; "filterChange": "filterChange"; "columnVisibilityChange": "columnVisibilityChange"; }, never, never, true, never>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Minimal column surface `EgDataTableColumnHeader` needs.
|
|
372
|
+
*
|
|
373
|
+
* A real TanStack `Column` always satisfies this (its methods only use
|
|
374
|
+
* primitive params/returns), while the structural type keeps this component
|
|
375
|
+
* generic over any `TData`/`TValue` without variance friction when wiring
|
|
376
|
+
* `flexRenderComponent(..., { inputs: { column, title } })`.
|
|
377
|
+
*/
|
|
378
|
+
interface EgSortableColumn {
|
|
379
|
+
readonly id: string;
|
|
380
|
+
getCanSort(): boolean;
|
|
381
|
+
getIsSorted(): false | SortDirection;
|
|
382
|
+
toggleSorting(desc?: boolean): void;
|
|
383
|
+
toggleVisibility(value?: boolean): void;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Sortable + hideable column header.
|
|
387
|
+
*
|
|
388
|
+
* Render via `flexRenderComponent(EgDataTableColumnHeader, { inputs: { column, title } })`
|
|
389
|
+
* so the extra `title` input flows alongside the flex-render `column` context.
|
|
390
|
+
* Non-sortable columns render a plain label.
|
|
391
|
+
*/
|
|
392
|
+
declare class EgDataTableColumnHeader {
|
|
393
|
+
readonly column: _angular_core.InputSignal<EgSortableColumn>;
|
|
394
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
395
|
+
/** Density of the trigger button. */
|
|
396
|
+
readonly size: _angular_core.InputSignal<HlmTableSize>;
|
|
397
|
+
protected readonly _sorted: _angular_core.Signal<false | SortDirection>;
|
|
398
|
+
/** Height per density. Merged by `hlmButton`. */
|
|
399
|
+
protected readonly _buttonClass: _angular_core.Signal<string>;
|
|
400
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTableColumnHeader, never>;
|
|
401
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgDataTableColumnHeader, "eg-data-table-column-header", never, { "column": { "alias": "column"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Column-visibility toggle.
|
|
406
|
+
*
|
|
407
|
+
* Reads the table from the nearest `[tanStackTable]` directive — no table
|
|
408
|
+
* input or generics needed. Only columns with an `accessorFn` that can hide
|
|
409
|
+
* are listed (display columns like `select` / `actions` stay fixed).
|
|
410
|
+
*/
|
|
411
|
+
declare class EgDataTableViewOptions {
|
|
412
|
+
/** Density of the toggle button. */
|
|
413
|
+
readonly size: _angular_core.InputSignal<HlmTableSize>;
|
|
414
|
+
protected readonly _table: _angular_core.Signal<_tanstack_angular_table.AngularTable<_tanstack_angular_table.TableFeatures, _tanstack_angular_table.RowData>>;
|
|
415
|
+
/** Height per density; hidden below `lg` like the pager edge buttons. Merged by `hlmButton`. */
|
|
416
|
+
protected readonly _buttonClass: _angular_core.Signal<string>;
|
|
417
|
+
protected readonly _hidableColumns: _angular_core.Signal<_tanstack_angular_table.Column<_tanstack_angular_table.TableFeatures, _tanstack_angular_table.RowData, unknown>[]>;
|
|
418
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTableViewOptions, never>;
|
|
419
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgDataTableViewOptions, "eg-data-table-view-options", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Header selection checkbox: toggles all page rows.
|
|
424
|
+
*
|
|
425
|
+
* Generic over `TData` so the same component works with any table; the table
|
|
426
|
+
* instance is passed explicitly (no DI needed inside column definitions).
|
|
427
|
+
* `HlmCheckbox.checked` accepts `'indeterminate'`, so the tri-state is derived
|
|
428
|
+
* via `computed` instead of a separate input.
|
|
429
|
+
*/
|
|
430
|
+
declare class EgTableHeadSelection<TData extends RowData> {
|
|
431
|
+
readonly table: _angular_core.InputSignal<Table<{
|
|
432
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
433
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
434
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
435
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
436
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
437
|
+
filteredRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
438
|
+
paginatedRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
439
|
+
sortedRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
440
|
+
filterFns: {
|
|
441
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
442
|
+
};
|
|
443
|
+
sortFns: {
|
|
444
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
445
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
446
|
+
};
|
|
447
|
+
columnMeta: {
|
|
448
|
+
readonly hideInTable?: boolean;
|
|
449
|
+
readonly thumbnail?: boolean;
|
|
450
|
+
};
|
|
451
|
+
}, TData>>;
|
|
452
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
453
|
+
protected readonly _checked: _angular_core.Signal<boolean | "indeterminate">;
|
|
454
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgTableHeadSelection<any>, never>;
|
|
455
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgTableHeadSelection<any>, "eg-table-head-selection", never, { "table": { "alias": "table"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Row selection checkbox: toggles a single row.
|
|
459
|
+
*/
|
|
460
|
+
declare class EgTableRowSelection<TData extends RowData> {
|
|
461
|
+
readonly row: _angular_core.InputSignal<Row<{
|
|
462
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
463
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
464
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
465
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
466
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
467
|
+
filteredRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
468
|
+
paginatedRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
469
|
+
sortedRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
470
|
+
filterFns: {
|
|
471
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
472
|
+
};
|
|
473
|
+
sortFns: {
|
|
474
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
475
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
476
|
+
};
|
|
477
|
+
columnMeta: {
|
|
478
|
+
readonly hideInTable?: boolean;
|
|
479
|
+
readonly thumbnail?: boolean;
|
|
480
|
+
};
|
|
481
|
+
}, TData>>;
|
|
482
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
483
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgTableRowSelection<any>, never>;
|
|
484
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgTableRowSelection<any>, "eg-table-row-selection", never, { "row": { "alias": "row"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
declare const EgDataTableImports: readonly [typeof EgDataTable, typeof EgDataTableColumnHeader, typeof EgDataTablePagination, typeof EgDataTableViewOptions, typeof EgTableHeadSelection, typeof EgTableRowSelection];
|
|
488
|
+
declare class EgDataTableModule {
|
|
489
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTableModule, never>;
|
|
490
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<EgDataTableModule, never, [typeof EgDataTable, typeof EgDataTableColumnHeader, typeof EgDataTablePagination, typeof EgDataTableViewOptions, typeof EgTableHeadSelection, typeof EgTableRowSelection], [typeof EgDataTable, typeof EgDataTableColumnHeader, typeof EgDataTablePagination, typeof EgDataTableViewOptions, typeof EgTableHeadSelection, typeof EgTableRowSelection]>;
|
|
491
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<EgDataTableModule>;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export { EgDataTable, EgDataTableColumnHeader, EgDataTableImports, EgDataTableModule, EgDataTablePagination, EgDataTableViewOptions, EgTableHeadSelection, EgTableRowSelection, defaultEgDataTableFeatures };
|
|
495
|
+
export type { EgColumnMeta, EgDataTableFeatures, EgDataTableLayout, EgPaginatedResponse, EgPaginationNavMode, EgSortableColumn };
|
package/date-picker/README.md
CHANGED
|
@@ -135,6 +135,38 @@ Real selectors (from source):
|
|
|
135
135
|
|
|
136
136
|
## API reference
|
|
137
137
|
|
|
138
|
+
### User commits, invalid drafts, and programmatic writes
|
|
139
|
+
|
|
140
|
+
The single, range and multi text inputs commit on **blur or Enter**. Both parsed and transformed values
|
|
141
|
+
must have a finite `getTime` through the configured Spartan date adapter and satisfy inclusive whole-day
|
|
142
|
+
`min`/`max` bounds (`startOfDay(min)` through `endOfDay(max)`). Provide matching parsing, formatting and
|
|
143
|
+
pure transformation callbacks when using a custom adapter/date type. A transformed range must be ordered;
|
|
144
|
+
custom transforms may sort endpoints. The default range parser still treats one date as a same-day range,
|
|
145
|
+
but an explicitly unparseable second endpoint is rejected.
|
|
146
|
+
|
|
147
|
+
For multi selection, `maxSelection` caps the raw and transformed array counts. `minSelection` is the
|
|
148
|
+
calendar's **deselection floor**: reductions below it are rejected, while growth from empty is allowed.
|
|
149
|
+
Supply unique dates. When the calendar proposes resetting a full selection to one new date, that reset
|
|
150
|
+
must also satisfy the floor. Rejected calendar commits restore the previous selection without user emissions.
|
|
151
|
+
|
|
152
|
+
On rejection the committed value stays unchanged, no `dateChange`/CVA `onChange` fires, and the input
|
|
153
|
+
preserves editable text across blur, Enter and refocus. `inputInvalid()` exposes local rejection state;
|
|
154
|
+
the native input receives `aria-invalid="true"` and invalid styling, combined with `forceInvalid`.
|
|
155
|
+
The interaction touches the form control but does not install an Angular validator or overwrite its
|
|
156
|
+
errors: form validators continue to see the last committed value. If unresolved drafts should block
|
|
157
|
+
submission, include `inputInvalid()` in that decision. Use `ariaDescribedby` to associate explanatory text.
|
|
158
|
+
|
|
159
|
+
A successful text/calendar commit, explicit clear, or external value write clears the local rejection.
|
|
160
|
+
Empty text and the clear button bypass transforms and the selection floor, emitting `null` (single/range)
|
|
161
|
+
or `[]` (multi); whitespace is passed to the parser. Enter keeps edit formatting for a subsequent blur;
|
|
162
|
+
blur restores display formatting. Disabled/readonly text inputs do not commit or clear.
|
|
163
|
+
|
|
164
|
+
`updateDate(value)` returns a boolean indicating whether a user commit was accepted. Programmatic CVA
|
|
165
|
+
`writeValue` applies configured transforms without enforcing user constraints or emitting; it replaces
|
|
166
|
+
rejected drafts, including repeated same-value/null writes. `[date]` remains a direct, untransformed
|
|
167
|
+
standalone input. `reset()` is an explicit programmatic clear and emits. Month/year retains its existing
|
|
168
|
+
brain-input lifecycle; this constraint/draft contract applies to single, range and multi pickers.
|
|
169
|
+
|
|
138
170
|
### `HlmDatePicker` — `hlm-date-picker`
|
|
139
171
|
|
|
140
172
|
Single-date picker. Generic `<T>` (usually `Date`). Implements `BrnDatePickerBase<T>` + `ControlValueAccessor`, hosts `BrnFieldControl`.
|
|
@@ -230,15 +262,15 @@ Outputs/methods mirror `HlmDatePicker` (`dateChange: T | null`, `updateDate`, `o
|
|
|
230
262
|
|
|
231
263
|
`HlmDatePickerInput<T>`, `HlmDateMultiInput<T>`, `HlmDateRangeInput<T>`, `HlmMonthYearInput<T>` extend `BrnDateInput` (inheriting `placeholder`, `inputId`, disabled/invalid wiring, clear-button and calendar-button behavior) and add:
|
|
232
264
|
|
|
233
|
-
| Input | Type | Default | Notes
|
|
234
|
-
| -------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------- |
|
|
235
|
-
| `parseDate` | `(value: string) => T \| null` (or `T[] \| null` / `[T,T] \| null` per variant) | from matching `provideHlm*Config` | Return `null` for invalid text;
|
|
236
|
-
| `formatInputDate` / `formatInputDates` | `(date) => string` | from config | Edit format shown while focused.
|
|
237
|
-
| `ariaLabel` / `ariaDescribedby` | `string` | — | Accessible labelling for the inner `<input>`.
|
|
238
|
-
| `name` | `string \| undefined` | — | Native `name` forwarded to the inner `<input>`.
|
|
239
|
-
| `readonly` | `boolean` | `false` | Native `readonly` forwarded to the inner `<input>`.
|
|
240
|
-
| `class` | `ClassValue` | `''` | Extra classes on the host group container.
|
|
241
|
-
| `inputClass` | `ClassValue` | `''` | Extra classes on the inner `<input>` (e.g. text size).
|
|
265
|
+
| Input | Type | Default | Notes |
|
|
266
|
+
| -------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
267
|
+
| `parseDate` | `(value: string) => T \| null` (or `T[] \| null` / `[T,T] \| null` per variant) | from matching `provideHlm*Config` | Return `null` for invalid text; single/range/multi preserve the committed value and rejected text. |
|
|
268
|
+
| `formatInputDate` / `formatInputDates` | `(date) => string` | from config | Edit format shown while focused. |
|
|
269
|
+
| `ariaLabel` / `ariaDescribedby` | `string` | — | Accessible labelling for the inner `<input>`. |
|
|
270
|
+
| `name` | `string \| undefined` | — | Native `name` forwarded to the inner `<input>`. |
|
|
271
|
+
| `readonly` | `boolean` | `false` | Native `readonly` forwarded to the inner `<input>`. |
|
|
272
|
+
| `class` | `ClassValue` | `''` | Extra classes on the host group container. |
|
|
273
|
+
| `inputClass` | `ClassValue` | `''` | Extra classes on the inner `<input>` (e.g. text size). |
|
|
242
274
|
|
|
243
275
|
### `HlmDatePickerTrigger` — `hlm-date-picker-trigger`
|
|
244
276
|
|