@egose/shadcn-theme-ng 0.5.2 → 0.6.0
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 +12 -11
- package/data-table/README.md +164 -0
- package/data-table/fesm2022/data-table.mjs +677 -0
- package/data-table/package.json +25 -0
- package/data-table/types/data-table.d.ts +483 -0
- package/dropdown-menu/README.md +2 -0
- package/form-checkbox/README.md +22 -22
- package/form-text-input/fesm2022/form-text-input.mjs +1 -1
- package/form-textarea/fesm2022/form-textarea.mjs +1 -1
- package/input/README.md +7 -12
- package/input/fesm2022/input.mjs +7 -4
- package/input/types/input.d.ts +3 -1
- package/layout-simple/fesm2022/layout-simple.mjs +1 -1
- package/package.json +6 -1
- package/phone-input/fesm2022/phone-input.mjs +1 -1
- package/stepper/README.md +75 -52
- package/stepper/fesm2022/stepper.mjs +30 -6
- package/stepper/types/stepper.d.ts +22 -14
- 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,483 @@
|
|
|
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/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
|
+
/** 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. */
|
|
192
|
+
readonly manualPagination: _angular_core.InputSignal<boolean>;
|
|
193
|
+
/** TanStack feature registry. Defaults to filtering + visibility + pagination + selection + sorting. */
|
|
194
|
+
readonly features: _angular_core.InputSignal<{
|
|
195
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
196
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
197
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
198
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
199
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
200
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
201
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
202
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
203
|
+
filterFns: {
|
|
204
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
205
|
+
};
|
|
206
|
+
sortFns: {
|
|
207
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
208
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
209
|
+
};
|
|
210
|
+
columnMeta: {
|
|
211
|
+
readonly hideInTable?: boolean;
|
|
212
|
+
readonly thumbnail?: boolean;
|
|
213
|
+
};
|
|
214
|
+
}>;
|
|
215
|
+
readonly isLoading: _angular_core.InputSignal<boolean>;
|
|
216
|
+
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
217
|
+
/** When true, a checkbox column is auto-prepended and `selectionChange` emits the selected rows. */
|
|
218
|
+
readonly enableSelection: _angular_core.InputSignal<boolean>;
|
|
219
|
+
readonly hideFooter: _angular_core.InputSignal<boolean>;
|
|
220
|
+
/** Density of toolbar, table, and pagination chrome. Type scale is untouched. */
|
|
221
|
+
readonly size: _angular_core.InputSignal<HlmTableSize>;
|
|
222
|
+
/** Presentation mode. Two-way bindable: `[(layout)]`. Grid requires `gridColumns`. */
|
|
223
|
+
readonly layout: _angular_core.ModelSignal<EgDataTableLayout>;
|
|
224
|
+
/** Show the table/grid toggle (only rendered when `gridColumns` is set). */
|
|
225
|
+
readonly showLayoutToggle: _angular_core.InputSignal<boolean>;
|
|
226
|
+
/** Show the toolbar (filter input, plus the column-visibility dropdown when `showColumnToggle` is set). */
|
|
227
|
+
readonly showToolbar: _angular_core.InputSignal<boolean>;
|
|
228
|
+
/** 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). */
|
|
229
|
+
readonly filterColumnId: _angular_core.InputSignal<string>;
|
|
230
|
+
readonly filterPlaceholder: _angular_core.InputSignal<string>;
|
|
231
|
+
/** Show the column-visibility dropdown inside the toolbar. Off by default; opt in per table. */
|
|
232
|
+
readonly showColumnToggle: _angular_core.InputSignal<boolean>;
|
|
233
|
+
/** 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. */
|
|
234
|
+
readonly toolbarActions: _angular_core.InputSignal<TemplateRef<unknown> | undefined>;
|
|
235
|
+
/** Default client-side page size. Changing it later resets the pager to the new size. */
|
|
236
|
+
readonly defaultPageSize: _angular_core.InputSignal<number>;
|
|
237
|
+
/** 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. */
|
|
238
|
+
readonly filterRows: _angular_core.InputSignal<((rows: readonly TData[]) => readonly TData[]) | null>;
|
|
239
|
+
/** Seeds the sorting state once at creation. Later changes are ignored — use `sortingChange` to stay in sync. */
|
|
240
|
+
readonly initialSorting: _angular_core.InputSignal<SortingState>;
|
|
241
|
+
/** Seeds the column-filter state once at creation. Later changes are ignored. */
|
|
242
|
+
readonly initialColumnFilters: _angular_core.InputSignal<ColumnFiltersState>;
|
|
243
|
+
/** Seeds the column-visibility state once at creation. Later changes are ignored. */
|
|
244
|
+
readonly initialColumnVisibility: _angular_core.InputSignal<ColumnVisibilityState>;
|
|
245
|
+
/** Seeds the row-selection state once at creation (keys are row ids). Later changes are ignored. */
|
|
246
|
+
readonly initialRowSelection: _angular_core.InputSignal<RowSelectionState>;
|
|
247
|
+
/** Show the rows-per-page selector in the footer pager. */
|
|
248
|
+
readonly showPageSize: _angular_core.InputSignal<boolean>;
|
|
249
|
+
/** Page-size options for the footer selector. The current size is appended when absent. */
|
|
250
|
+
readonly pageSizes: _angular_core.InputSignal<readonly number[]>;
|
|
251
|
+
/** Footer navigation-button content: icons only, text labels only, or both. */
|
|
252
|
+
readonly navMode: _angular_core.InputSignal<EgPaginationNavMode>;
|
|
253
|
+
readonly userClass: _angular_core.InputSignal<string>;
|
|
254
|
+
/** Emits the selected rows whenever selection changes (requires `enableSelection`). */
|
|
255
|
+
readonly selectionChange: _angular_core.OutputEmitterRef<readonly TData[]>;
|
|
256
|
+
/** Emits the target page index on pager navigation (primary hook for server fetching). */
|
|
257
|
+
readonly pageChange: _angular_core.OutputEmitterRef<number>;
|
|
258
|
+
readonly pageSizeChange: _angular_core.OutputEmitterRef<number>;
|
|
259
|
+
/** 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. */
|
|
260
|
+
readonly rowClick: _angular_core.OutputEmitterRef<TData>;
|
|
261
|
+
readonly sortingChange: _angular_core.OutputEmitterRef<SortingState>;
|
|
262
|
+
readonly columnFiltersChange: _angular_core.OutputEmitterRef<ColumnFiltersState>;
|
|
263
|
+
/** Emits the toolbar filter string whenever it changes. Empty when cleared or unset. */
|
|
264
|
+
readonly filterChange: _angular_core.OutputEmitterRef<string>;
|
|
265
|
+
readonly columnVisibilityChange: _angular_core.OutputEmitterRef<ColumnVisibilityState>;
|
|
266
|
+
protected readonly _containerClass: _angular_core.Signal<string>;
|
|
267
|
+
/** Inline TH sort-button footprint per density. Merged by `hlmButton` via the `class` binding. */
|
|
268
|
+
protected readonly _sortButtonClass: _angular_core.Signal<string>;
|
|
269
|
+
private readonly _sorting;
|
|
270
|
+
private readonly _columnFilters;
|
|
271
|
+
private readonly _columnVisibility;
|
|
272
|
+
private readonly _rowSelection;
|
|
273
|
+
private readonly _clientPageIndex;
|
|
274
|
+
private readonly _clientPageSize;
|
|
275
|
+
private readonly _isServer;
|
|
276
|
+
/** The server page slice when in server mode; `null` for client data, misuse shapes, or `null` while loading. */
|
|
277
|
+
private readonly _page;
|
|
278
|
+
private readonly _items;
|
|
279
|
+
private readonly _serverPageCount;
|
|
280
|
+
private readonly _serverPageIndex;
|
|
281
|
+
private readonly _paginationState;
|
|
282
|
+
private readonly _selectionHelper;
|
|
283
|
+
/** Caller columns + auto-injected selection column + layout filtering. */
|
|
284
|
+
protected readonly _finalColumns: _angular_core.Signal<ColumnDef<{
|
|
285
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
286
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
287
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
288
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
289
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
290
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
291
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
292
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
293
|
+
filterFns: {
|
|
294
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
295
|
+
};
|
|
296
|
+
sortFns: {
|
|
297
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
298
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
299
|
+
};
|
|
300
|
+
columnMeta: {
|
|
301
|
+
readonly hideInTable?: boolean;
|
|
302
|
+
readonly thumbnail?: boolean;
|
|
303
|
+
};
|
|
304
|
+
}, TData>[]>;
|
|
305
|
+
protected readonly _table: _tanstack_angular_table.AngularTable<{
|
|
306
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
307
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
308
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
309
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
310
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
311
|
+
filteredRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
312
|
+
paginatedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
313
|
+
sortedRowModel: (table: _tanstack_angular_table.Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
314
|
+
filterFns: {
|
|
315
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
316
|
+
};
|
|
317
|
+
sortFns: {
|
|
318
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
319
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
320
|
+
};
|
|
321
|
+
columnMeta: {
|
|
322
|
+
readonly hideInTable?: boolean;
|
|
323
|
+
readonly thumbnail?: boolean;
|
|
324
|
+
};
|
|
325
|
+
}, TData>;
|
|
326
|
+
private readonly _emitSelection;
|
|
327
|
+
/**
|
|
328
|
+
* Seeds internal state from the `initial*` inputs. Runs in `ngOnInit` (after
|
|
329
|
+
* first bindings, before first render) exactly once, so inline-literal
|
|
330
|
+
* bindings (new references every change detection) cannot clobber user
|
|
331
|
+
* interaction afterwards. Values are copied to avoid aliasing caller data.
|
|
332
|
+
*/
|
|
333
|
+
ngOnInit(): void;
|
|
334
|
+
protected readonly _hasGrid: _angular_core.Signal<boolean>;
|
|
335
|
+
protected readonly _effectiveLayout: _angular_core.Signal<EgDataTableLayout>;
|
|
336
|
+
protected readonly _showLayoutToggle: _angular_core.Signal<boolean>;
|
|
337
|
+
protected readonly _visibleColumnCount: _angular_core.Signal<number>;
|
|
338
|
+
protected readonly _statusText: _angular_core.Signal<string>;
|
|
339
|
+
protected _onLayoutToggle(value: unknown): void;
|
|
340
|
+
protected _onFilterInput(event: Event): void;
|
|
341
|
+
/**
|
|
342
|
+
* Row/card click handler. Ignores clicks originating from nested interactive
|
|
343
|
+
* elements (selection checkboxes, action buttons, links, inputs) so those
|
|
344
|
+
* controls keep working without also firing `rowClick`.
|
|
345
|
+
*/
|
|
346
|
+
protected _onRowClick(event: MouseEvent, row: Row<EgDataTableFeatures, TData>): void;
|
|
347
|
+
/** Show the inline TH sort button only for sortable plain-string headers (component headers own their UI). */
|
|
348
|
+
protected _showHeaderSortButton(header: Header<EgDataTableFeatures, TData, unknown>): boolean;
|
|
349
|
+
protected _toggleHeaderSorting(header: Header<EgDataTableFeatures, TData, unknown>): void;
|
|
350
|
+
protected _selectionCell(row: Row<EgDataTableFeatures, TData>): Cell<EgDataTableFeatures, TData, CellData> | undefined;
|
|
351
|
+
protected _thumbnailCell(row: Row<EgDataTableFeatures, TData>): Cell<EgDataTableFeatures, TData, CellData> | undefined;
|
|
352
|
+
protected _contentCells(row: Row<EgDataTableFeatures, TData>): Cell<EgDataTableFeatures, TData, CellData>[];
|
|
353
|
+
protected _cellLabel(cell: Cell<EgDataTableFeatures, TData, CellData>): string;
|
|
354
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTable<any>, never>;
|
|
355
|
+
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; }; "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>;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Minimal column surface `EgDataTableColumnHeader` needs.
|
|
360
|
+
*
|
|
361
|
+
* A real TanStack `Column` always satisfies this (its methods only use
|
|
362
|
+
* primitive params/returns), while the structural type keeps this component
|
|
363
|
+
* generic over any `TData`/`TValue` without variance friction when wiring
|
|
364
|
+
* `flexRenderComponent(..., { inputs: { column, title } })`.
|
|
365
|
+
*/
|
|
366
|
+
interface EgSortableColumn {
|
|
367
|
+
readonly id: string;
|
|
368
|
+
getCanSort(): boolean;
|
|
369
|
+
getIsSorted(): false | SortDirection;
|
|
370
|
+
toggleSorting(desc?: boolean): void;
|
|
371
|
+
toggleVisibility(value?: boolean): void;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Sortable + hideable column header.
|
|
375
|
+
*
|
|
376
|
+
* Render via `flexRenderComponent(EgDataTableColumnHeader, { inputs: { column, title } })`
|
|
377
|
+
* so the extra `title` input flows alongside the flex-render `column` context.
|
|
378
|
+
* Non-sortable columns render a plain label.
|
|
379
|
+
*/
|
|
380
|
+
declare class EgDataTableColumnHeader {
|
|
381
|
+
readonly column: _angular_core.InputSignal<EgSortableColumn>;
|
|
382
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
383
|
+
/** Density of the trigger button. */
|
|
384
|
+
readonly size: _angular_core.InputSignal<HlmTableSize>;
|
|
385
|
+
protected readonly _sorted: _angular_core.Signal<false | SortDirection>;
|
|
386
|
+
/** Height per density. Merged by `hlmButton`. */
|
|
387
|
+
protected readonly _buttonClass: _angular_core.Signal<string>;
|
|
388
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTableColumnHeader, never>;
|
|
389
|
+
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>;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Column-visibility toggle.
|
|
394
|
+
*
|
|
395
|
+
* Reads the table from the nearest `[tanStackTable]` directive — no table
|
|
396
|
+
* input or generics needed. Only columns with an `accessorFn` that can hide
|
|
397
|
+
* are listed (display columns like `select` / `actions` stay fixed).
|
|
398
|
+
*/
|
|
399
|
+
declare class EgDataTableViewOptions {
|
|
400
|
+
/** Density of the toggle button. */
|
|
401
|
+
readonly size: _angular_core.InputSignal<HlmTableSize>;
|
|
402
|
+
protected readonly _table: _angular_core.Signal<_tanstack_angular_table.AngularTable<_tanstack_angular_table.TableFeatures, _tanstack_angular_table.RowData>>;
|
|
403
|
+
/** Height per density; hidden below `lg` like the pager edge buttons. Merged by `hlmButton`. */
|
|
404
|
+
protected readonly _buttonClass: _angular_core.Signal<string>;
|
|
405
|
+
protected readonly _hidableColumns: _angular_core.Signal<_tanstack_angular_table.Column<_tanstack_angular_table.TableFeatures, _tanstack_angular_table.RowData, unknown>[]>;
|
|
406
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTableViewOptions, never>;
|
|
407
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgDataTableViewOptions, "eg-data-table-view-options", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Header selection checkbox: toggles all page rows.
|
|
412
|
+
*
|
|
413
|
+
* Generic over `TData` so the same component works with any table; the table
|
|
414
|
+
* instance is passed explicitly (no DI needed inside column definitions).
|
|
415
|
+
* `HlmCheckbox.checked` accepts `'indeterminate'`, so the tri-state is derived
|
|
416
|
+
* via `computed` instead of a separate input.
|
|
417
|
+
*/
|
|
418
|
+
declare class EgTableHeadSelection<TData extends RowData> {
|
|
419
|
+
readonly table: _angular_core.InputSignal<Table<{
|
|
420
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
421
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
422
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
423
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
424
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
425
|
+
filteredRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
426
|
+
paginatedRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
427
|
+
sortedRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
428
|
+
filterFns: {
|
|
429
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
430
|
+
};
|
|
431
|
+
sortFns: {
|
|
432
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
433
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
434
|
+
};
|
|
435
|
+
columnMeta: {
|
|
436
|
+
readonly hideInTable?: boolean;
|
|
437
|
+
readonly thumbnail?: boolean;
|
|
438
|
+
};
|
|
439
|
+
}, TData>>;
|
|
440
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
441
|
+
protected readonly _checked: _angular_core.Signal<boolean | "indeterminate">;
|
|
442
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgTableHeadSelection<any>, never>;
|
|
443
|
+
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>;
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* Row selection checkbox: toggles a single row.
|
|
447
|
+
*/
|
|
448
|
+
declare class EgTableRowSelection<TData extends RowData> {
|
|
449
|
+
readonly row: _angular_core.InputSignal<Row<{
|
|
450
|
+
columnFilteringFeature: _tanstack_angular_table.TableFeature;
|
|
451
|
+
columnVisibilityFeature: _tanstack_angular_table.TableFeature;
|
|
452
|
+
rowPaginationFeature: _tanstack_angular_table.TableFeature;
|
|
453
|
+
rowSelectionFeature: _tanstack_angular_table.TableFeature;
|
|
454
|
+
rowSortingFeature: _tanstack_angular_table.TableFeature;
|
|
455
|
+
filteredRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
456
|
+
paginatedRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
457
|
+
sortedRowModel: (table: Table<_tanstack_angular_table.TableFeatures, RowData>) => () => _tanstack_angular_table.RowModel<_tanstack_angular_table.TableFeatures, RowData>;
|
|
458
|
+
filterFns: {
|
|
459
|
+
includesString: _tanstack_angular_table.CreatedFilterFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
460
|
+
};
|
|
461
|
+
sortFns: {
|
|
462
|
+
alphanumeric: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
463
|
+
text: _tanstack_angular_table.CreatedSortFn<_tanstack_angular_table.TableFeatures, RowData>;
|
|
464
|
+
};
|
|
465
|
+
columnMeta: {
|
|
466
|
+
readonly hideInTable?: boolean;
|
|
467
|
+
readonly thumbnail?: boolean;
|
|
468
|
+
};
|
|
469
|
+
}, TData>>;
|
|
470
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
471
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgTableRowSelection<any>, never>;
|
|
472
|
+
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>;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
declare const EgDataTableImports: readonly [typeof EgDataTable, typeof EgDataTableColumnHeader, typeof EgDataTablePagination, typeof EgDataTableViewOptions, typeof EgTableHeadSelection, typeof EgTableRowSelection];
|
|
476
|
+
declare class EgDataTableModule {
|
|
477
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgDataTableModule, never>;
|
|
478
|
+
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]>;
|
|
479
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<EgDataTableModule>;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export { EgDataTable, EgDataTableColumnHeader, EgDataTableImports, EgDataTableModule, EgDataTablePagination, EgDataTableViewOptions, EgTableHeadSelection, EgTableRowSelection, defaultEgDataTableFeatures };
|
|
483
|
+
export type { EgColumnMeta, EgDataTableFeatures, EgDataTableLayout, EgPaginatedResponse, EgPaginationNavMode, EgSortableColumn };
|
package/dropdown-menu/README.md
CHANGED
|
@@ -136,6 +136,8 @@ Host exposes `data-state`, `data-side`, and animation classes derived from the t
|
|
|
136
136
|
|
|
137
137
|
CDK bindings (via `hostDirectives`): `cdkMenuTriggerFor: hlmDropdownMenuTrigger` (the `ng-template`), `cdkMenuTriggerData: hlmDropdownMenuTriggerData`; outputs `cdkMenuOpened: hlmDropdownMenuOpened`, `cdkMenuClosed: hlmDropdownMenuClosed`.
|
|
138
138
|
|
|
139
|
+
> Do not nest the trigger inside another `hlmDropdownMenu` element. The outer element acts as a parent `CdkMenu`, turning the trigger into a submenu trigger that ignores menu-stack close events — the panel will no longer dismiss on outside clicks. Keep root triggers as siblings of their `ng-template` (see Anatomy above).
|
|
140
|
+
|
|
139
141
|
### `HlmDropdownMenuItem` — `[hlmDropdownMenuItem], hlm-dropdown-menu-item`
|
|
140
142
|
|
|
141
143
|
| Input | Type | Default | Description |
|
package/form-checkbox/README.md
CHANGED
|
@@ -83,29 +83,29 @@ Selector (from source): `eg-form-checkbox` (standalone component).
|
|
|
83
83
|
|
|
84
84
|
### `EgFormCheckbox` — `eg-form-checkbox`
|
|
85
85
|
|
|
86
|
-
| Input | Type | Default | Description
|
|
87
|
-
| --------------- | --------------------- | ------- |
|
|
88
|
-
| `controlName` | `string` | `''` | `formControlName` key inside the parent `FormGroup`. **Required.**
|
|
89
|
-
| `label` | `string` | `''` | Label text next to the checkbox.
|
|
90
|
-
| `error` | `string \| undefined` | — | Error text shown when the control is invalid + touched/dirty/submitted (via `EgFormField` switching).
|
|
91
|
-
| `autoError` | `boolean` | `true` | Auto-resolve the message from the control's `ValidationErrors` when `error` is unset. Explicit `error` always wins; `error=""` counts as unset. Global wording via `provideEgFormErrorMessages`.
|
|
92
|
-
| `hint` | `string \| undefined` | — | Hint text shown when there is no error to display.
|
|
93
|
-
| `controlId` | `string \| undefined` | — | Explicit control id (first priority for `effectiveId`).
|
|
94
|
-
| `id` | `string \| undefined` | — | Fallback id (second priority).
|
|
95
|
-
| `name` | `string \| undefined` | — | Checkbox `name` attribute (defaults to `controlName`).
|
|
96
|
-
| `checked` | `boolean` | `false` | Initial checked state passed to `hlm-checkbox`.
|
|
86
|
+
| Input | Type | Default | Description |
|
|
87
|
+
| --------------- | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
88
|
+
| `controlName` | `string` | `''` | `formControlName` key inside the parent `FormGroup`. **Required.** |
|
|
89
|
+
| `label` | `string` | `''` | Label text next to the checkbox. |
|
|
90
|
+
| `error` | `string \| undefined` | — | Error text shown when the control is invalid + touched/dirty/submitted (via `EgFormField` switching). |
|
|
91
|
+
| `autoError` | `boolean` | `true` | Auto-resolve the message from the control's `ValidationErrors` when `error` is unset. Explicit `error` always wins; `error=""` counts as unset. Global wording via `provideEgFormErrorMessages`. |
|
|
92
|
+
| `hint` | `string \| undefined` | — | Hint text shown when there is no error to display. |
|
|
93
|
+
| `controlId` | `string \| undefined` | — | Explicit control id (first priority for `effectiveId`). |
|
|
94
|
+
| `id` | `string \| undefined` | — | Fallback id (second priority). |
|
|
95
|
+
| `name` | `string \| undefined` | — | Checkbox `name` attribute (defaults to `controlName`). |
|
|
96
|
+
| `checked` | `boolean` | `false` | Initial checked state passed to `hlm-checkbox`. |
|
|
97
97
|
| `required` | `boolean` | `false` | Shows a red `*` and sets checkbox `required` (boolean-coerced, so bare `required` works). Presentation only — it does not validate by itself; add `Validators.requiredTrue` to the `FormControl` or the control is never invalid and no error is shown. |
|
|
98
|
-
| `disabled` | `boolean` | `false` | Locks interaction via checkbox `wrapperDisabled` (does not write to the form control).
|
|
99
|
-
| `class` | `ClassValue` | `''` | Extra host classes.
|
|
100
|
-
| `checkboxClass` | `string` | `''` | Extra classes for `hlm-checkbox`.
|
|
101
|
-
| `labelClass` | `string` | `''` | Extra classes for the label.
|
|
102
|
-
| `errorClass` | `string` | `''` | Extra classes for `hlm-error`.
|
|
103
|
-
| `hintClass` | `string` | `''` | Extra classes for `hlm-hint`.
|
|
104
|
-
|
|
105
|
-
| Member | Description
|
|
106
|
-
| -------------------- |
|
|
107
|
-
| `effectiveId` | `controlId() \|\| id() \|\| generated` — wired to checkbox `id` and label `for`.
|
|
108
|
-
| `errorId` / `hintId` | `effectiveId + '-error' / '-hint'` for `aria-describedby`.
|
|
98
|
+
| `disabled` | `boolean` | `false` | Locks interaction via checkbox `wrapperDisabled` (does not write to the form control). |
|
|
99
|
+
| `class` | `ClassValue` | `''` | Extra host classes. |
|
|
100
|
+
| `checkboxClass` | `string` | `''` | Extra classes for `hlm-checkbox`. |
|
|
101
|
+
| `labelClass` | `string` | `''` | Extra classes for the label. |
|
|
102
|
+
| `errorClass` | `string` | `''` | Extra classes for `hlm-error`. |
|
|
103
|
+
| `hintClass` | `string` | `''` | Extra classes for `hlm-hint`. |
|
|
104
|
+
|
|
105
|
+
| Member | Description |
|
|
106
|
+
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
107
|
+
| `effectiveId` | `controlId() \|\| id() \|\| generated` — wired to checkbox `id` and label `for`. |
|
|
108
|
+
| `errorId` / `hintId` | `effectiveId + '-error' / '-hint'` for `aria-describedby`. |
|
|
109
109
|
| `describedBy()` | Returns `errorId` when `error()` is set and the control is invalid + dirty/touched/submitted, else `hintId` when `hint()` is set, else `null`. |
|
|
110
110
|
|
|
111
111
|
Requires a `[formGroup]` ancestor: the component injects `FormGroupDirective` and provides
|