@ngstarter-ui/components 22.2.4 → 22.2.6
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/ai/component-registry.json +89 -13
- package/content-editor/BLOCK_FORMAT.md +38 -0
- package/data-view/API.md +262 -0
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs +67 -44
- package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-button.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs → ngstarter-ui-components-content-editor-attachment-block-Dvrxn-PJ.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs.map → ngstarter-ui-components-content-editor-attachment-block-Dvrxn-PJ.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs → ngstarter-ui-components-content-editor-callout-block-hBA6Xogj.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs.map → ngstarter-ui-components-content-editor-callout-block-hBA6Xogj.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs → ngstarter-ui-components-content-editor-code-block.component-BaaymubZ.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs.map → ngstarter-ui-components-content-editor-code-block.component-BaaymubZ.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs → ngstarter-ui-components-content-editor-embed-block-BWAtix_P.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs.map → ngstarter-ui-components-content-editor-embed-block-BWAtix_P.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs → ngstarter-ui-components-content-editor-gallery-block-C8mgrc2q.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs.map → ngstarter-ui-components-content-editor-gallery-block-C8mgrc2q.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs → ngstarter-ui-components-content-editor-grid-block-B0AfTFLQ.mjs} +6 -6
- package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs.map → ngstarter-ui-components-content-editor-grid-block-B0AfTFLQ.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs → ngstarter-ui-components-content-editor-heading-block.component-B0ZuUcQn.mjs} +8 -5
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-B0ZuUcQn.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs → ngstarter-ui-components-content-editor-image-block.component-ZCS4hvUg.mjs} +4 -4
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-ZCS4hvUg.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs → ngstarter-ui-components-content-editor-list-block.component-Ct-ARQ12.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs.map → ngstarter-ui-components-content-editor-list-block.component-Ct-ARQ12.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs → ngstarter-ui-components-content-editor-nested-blocks-B22kRf9a.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs.map → ngstarter-ui-components-content-editor-nested-blocks-B22kRf9a.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-B_6Olt0R.mjs} +93 -41
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-B_6Olt0R.mjs.map +1 -0
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-BiBe4KAy.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-BiBe4KAy.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs → ngstarter-ui-components-content-editor-quote-block.component-BuCyqiE2.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-BuCyqiE2.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs → ngstarter-ui-components-content-editor-table-block.component-Ck5GsDJM.mjs} +4 -4
- package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs.map → ngstarter-ui-components-content-editor-table-block.component-Ck5GsDJM.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs → ngstarter-ui-components-content-editor-toggle-block-_hXAyzUb.mjs} +3 -3
- package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs.map → ngstarter-ui-components-content-editor-toggle-block-_hXAyzUb.mjs.map} +1 -1
- package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs → ngstarter-ui-components-content-editor-video-block.component-bDo8XvID.mjs} +2 -2
- package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs.map → ngstarter-ui-components-content-editor-video-block.component-bDo8XvID.mjs.map} +1 -1
- package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-core.mjs +114 -3
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-country-select.mjs +5 -17
- package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-currency-select.mjs +6 -18
- package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-data-view.mjs +1011 -90
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs +3 -4
- package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-datepicker.mjs +45 -19
- package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-form-builder.mjs +5 -5
- package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-image-designer.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-menu.mjs +244 -29
- package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-option.mjs +36 -31
- package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-phone-input.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-select.mjs +157 -105
- package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-sort.mjs +9 -2
- package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-table.mjs +10 -0
- package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs +6 -13
- package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_common.scss +2 -1
- package/styles/_tokens.scss +32 -1
- package/styles/themes/default.scss +1 -1
- package/types/ngstarter-ui-components-autocomplete.d.ts +6 -1
- package/types/ngstarter-ui-components-content-editor.d.ts +6 -1
- package/types/ngstarter-ui-components-core.d.ts +24 -3
- package/types/ngstarter-ui-components-country-select.d.ts +0 -2
- package/types/ngstarter-ui-components-currency-select.d.ts +0 -2
- package/types/ngstarter-ui-components-data-view.d.ts +204 -11
- package/types/ngstarter-ui-components-datepicker.d.ts +3 -1
- package/types/ngstarter-ui-components-menu.d.ts +44 -5
- package/types/ngstarter-ui-components-option.d.ts +11 -3
- package/types/ngstarter-ui-components-select.d.ts +12 -7
- package/types/ngstarter-ui-components-sort.d.ts +1 -0
- package/types/ngstarter-ui-components-table.d.ts +2 -0
- package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs.map +0 -1
- package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import * as _ngstarter_ui_components_data_view from '@ngstarter-ui/components/data-view';
|
|
1
2
|
import * as _angular_core from '@angular/core';
|
|
2
3
|
import { InjectionToken, TemplateRef, OnInit, AfterViewInit, Injector, EnvironmentProviders } from '@angular/core';
|
|
3
4
|
import { TableDataSource, Table } from '@ngstarter-ui/components/table';
|
|
4
5
|
import { CheckboxChange } from '@ngstarter-ui/components/checkbox';
|
|
5
|
-
import { SelectionModel } from '@angular/cdk/collections';
|
|
6
6
|
import { Paginator, PageEvent } from '@ngstarter-ui/components/paginator';
|
|
7
7
|
import { Sort, SortDirective, SortDirection } from '@ngstarter-ui/components/sort';
|
|
8
8
|
|
|
@@ -11,13 +11,22 @@ interface DataViewInterface<T = any> {
|
|
|
11
11
|
}
|
|
12
12
|
interface DataViewAPI<T = any> {
|
|
13
13
|
search(value: string): void;
|
|
14
|
-
selectAll(): void;
|
|
14
|
+
selectAll(scope?: DataViewSelectionScope): void;
|
|
15
15
|
unselectAll(): void;
|
|
16
16
|
selectOne(row: T): void;
|
|
17
17
|
isSelected(row: T): boolean;
|
|
18
18
|
hasSelected(): boolean;
|
|
19
19
|
refresh(): void;
|
|
20
20
|
getSnapshot(): DataViewState[];
|
|
21
|
+
getSelection(): DataViewSelectionState<T>;
|
|
22
|
+
setColumnFilter(field: string, filter: DataViewColumnFilter | null): void;
|
|
23
|
+
clearFilters(): void;
|
|
24
|
+
getState(): DataViewViewState;
|
|
25
|
+
setState(state: DataViewViewState): void;
|
|
26
|
+
saveView(name: string, id?: string): DataViewSavedView;
|
|
27
|
+
applyView(id: string | null): void;
|
|
28
|
+
renameView(id: string, name: string): void;
|
|
29
|
+
deleteView(id: string): void;
|
|
21
30
|
}
|
|
22
31
|
type DataViewColumnWidth = string | number;
|
|
23
32
|
interface DataViewColumnDef {
|
|
@@ -34,13 +43,26 @@ interface DataViewColumnDef {
|
|
|
34
43
|
sortable?: boolean;
|
|
35
44
|
resizable?: boolean;
|
|
36
45
|
withColumnSettings?: boolean;
|
|
46
|
+
filter?: DataViewColumnFilterConfig;
|
|
37
47
|
minWidth?: string | number;
|
|
38
48
|
maxWidth?: string | number;
|
|
39
49
|
params?: {
|
|
40
50
|
[prop: string]: any;
|
|
41
51
|
};
|
|
42
52
|
}
|
|
43
|
-
type
|
|
53
|
+
type DataViewRowId = string | number;
|
|
54
|
+
type DataViewSelectionScope = 'page' | 'filtered' | 'all';
|
|
55
|
+
interface DataViewSelectionState<T = unknown> {
|
|
56
|
+
scope: DataViewSelectionScope;
|
|
57
|
+
allMatching: boolean;
|
|
58
|
+
rowIds: DataViewRowId[];
|
|
59
|
+
excludedRowIds: DataViewRowId[];
|
|
60
|
+
/** Known selected records; a server-wide selection is represented by query + exclusions. */
|
|
61
|
+
rows: T[];
|
|
62
|
+
search: string;
|
|
63
|
+
columnFilters: DataViewFilterModel;
|
|
64
|
+
}
|
|
65
|
+
type DataViewRowSelectionEventSource = 'checkbox' | 'row' | 'keyboard';
|
|
44
66
|
interface DataViewRowSelectionEvent<T> {
|
|
45
67
|
source: DataViewRowSelectionEventSource;
|
|
46
68
|
checkboxChange?: CheckboxChange;
|
|
@@ -70,11 +92,16 @@ interface DataViewGetRowsParams {
|
|
|
70
92
|
sort: 'asc' | 'desc' | '';
|
|
71
93
|
}[];
|
|
72
94
|
filterModel: string;
|
|
95
|
+
columnFilters: DataViewFilterModel;
|
|
96
|
+
/** Aborted when a newer query replaces this one or the view is destroyed. */
|
|
97
|
+
signal: AbortSignal;
|
|
73
98
|
successCallback(rowsThisBlock: any[], lastRow?: number): void;
|
|
74
|
-
failCallback(): void;
|
|
99
|
+
failCallback(error?: unknown): void;
|
|
75
100
|
}
|
|
76
101
|
interface DataViewDatasource {
|
|
77
|
-
getItems(params: DataViewGetRowsParams): void
|
|
102
|
+
getItems(params: DataViewGetRowsParams): void | (() => void) | {
|
|
103
|
+
unsubscribe(): void;
|
|
104
|
+
};
|
|
78
105
|
}
|
|
79
106
|
type DataViewPinAlign = 'start' | 'end' | undefined;
|
|
80
107
|
interface DataViewState {
|
|
@@ -85,6 +112,73 @@ interface DataViewState {
|
|
|
85
112
|
pinAlign?: DataViewPinAlign;
|
|
86
113
|
}
|
|
87
114
|
declare const DATA_VIEW: InjectionToken<DataViewInterface<any>>;
|
|
115
|
+
type DataViewColumnFilter = {
|
|
116
|
+
type: 'text';
|
|
117
|
+
operator: 'contains' | 'equals' | 'startsWith' | 'endsWith' | 'notContains';
|
|
118
|
+
value: string;
|
|
119
|
+
} | {
|
|
120
|
+
type: 'number';
|
|
121
|
+
operator: 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'between';
|
|
122
|
+
value?: number;
|
|
123
|
+
to?: number;
|
|
124
|
+
} | {
|
|
125
|
+
type: 'date';
|
|
126
|
+
from?: string;
|
|
127
|
+
to?: string;
|
|
128
|
+
} | {
|
|
129
|
+
type: 'enum';
|
|
130
|
+
values: (string | number)[];
|
|
131
|
+
} | {
|
|
132
|
+
type: 'boolean';
|
|
133
|
+
value: boolean;
|
|
134
|
+
};
|
|
135
|
+
type DataViewFilterModel = Record<string, DataViewColumnFilter>;
|
|
136
|
+
interface DataViewColumnFilterConfig {
|
|
137
|
+
type: DataViewColumnFilter['type'];
|
|
138
|
+
options?: readonly {
|
|
139
|
+
label: string;
|
|
140
|
+
value: string | number;
|
|
141
|
+
}[];
|
|
142
|
+
}
|
|
143
|
+
interface DataViewViewState {
|
|
144
|
+
version: 1;
|
|
145
|
+
columns: DataViewState[];
|
|
146
|
+
sort: {
|
|
147
|
+
active: string;
|
|
148
|
+
direction: 'asc' | 'desc' | '';
|
|
149
|
+
};
|
|
150
|
+
search: string;
|
|
151
|
+
columnFilters: DataViewFilterModel;
|
|
152
|
+
pageSize: number;
|
|
153
|
+
}
|
|
154
|
+
interface DataViewSavedView {
|
|
155
|
+
id: string;
|
|
156
|
+
name: string;
|
|
157
|
+
state: DataViewViewState;
|
|
158
|
+
}
|
|
159
|
+
interface DataViewViewStorage {
|
|
160
|
+
getItem(key: string): string | null;
|
|
161
|
+
setItem(key: string, value: string): void;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** Selection retains IDs across immutable reloads and can represent unloaded server records. */
|
|
165
|
+
declare class DataViewSelection<T> {
|
|
166
|
+
private key;
|
|
167
|
+
private records;
|
|
168
|
+
readonly excluded: Set<unknown>;
|
|
169
|
+
allMatching: boolean;
|
|
170
|
+
constructor(key: (row: T) => unknown);
|
|
171
|
+
get selected(): T[];
|
|
172
|
+
get keys(): unknown[];
|
|
173
|
+
hasValue(): boolean;
|
|
174
|
+
isSelected(row: T): boolean;
|
|
175
|
+
select(...rows: T[]): void;
|
|
176
|
+
selectRows(rows: readonly T[]): void;
|
|
177
|
+
deselect(...rows: T[]): void;
|
|
178
|
+
clear(): void;
|
|
179
|
+
selectMatching(rows: T[]): void;
|
|
180
|
+
reconcile(rows: T[], dropMissing: boolean): boolean;
|
|
181
|
+
}
|
|
88
182
|
|
|
89
183
|
declare class DataViewEmptyFilterResultsDirective {
|
|
90
184
|
readonly templateRef: TemplateRef<any>;
|
|
@@ -109,6 +203,17 @@ declare class DataViewActionBar {
|
|
|
109
203
|
}
|
|
110
204
|
|
|
111
205
|
declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T> {
|
|
206
|
+
protected readonly gridId: string;
|
|
207
|
+
ariaLabel: _angular_core.InputSignal<string>;
|
|
208
|
+
readonly rowActivated: _angular_core.OutputEmitterRef<T>;
|
|
209
|
+
protected activeCell: _angular_core.WritableSignal<{
|
|
210
|
+
row: number;
|
|
211
|
+
column: number;
|
|
212
|
+
}>;
|
|
213
|
+
private _selectionAnchor;
|
|
214
|
+
protected logicalColumns: _angular_core.Signal<string[]>;
|
|
215
|
+
protected activeCellId: _angular_core.Signal<string | null>;
|
|
216
|
+
protected ariaRowCount: _angular_core.Signal<number>;
|
|
112
217
|
private _cdr;
|
|
113
218
|
private _destroyRef;
|
|
114
219
|
private _platformId;
|
|
@@ -120,12 +225,39 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
120
225
|
private _isDestroyed;
|
|
121
226
|
private _requestId;
|
|
122
227
|
private _lastRequestKey;
|
|
228
|
+
private _lastDatasource;
|
|
229
|
+
private _lastRowModelType;
|
|
230
|
+
private _pendingRequestCleanup;
|
|
123
231
|
private _refreshTrigger;
|
|
124
232
|
private _serverSideRowCount;
|
|
233
|
+
private _serverCountKnown;
|
|
125
234
|
private _manualOrder;
|
|
126
235
|
private _manualVisibility;
|
|
127
236
|
private _hasDataOnServer;
|
|
128
237
|
private _internalLoading;
|
|
238
|
+
readonly error: _angular_core.WritableSignal<string | null>;
|
|
239
|
+
readonly refreshing: _angular_core.Signal<boolean>;
|
|
240
|
+
readonly loadStatus: _angular_core.Signal<"error" | "refreshing" | "loading" | "ready" | "idle">;
|
|
241
|
+
readonly loadError: _angular_core.OutputEmitterRef<unknown>;
|
|
242
|
+
protected blockingLoading: _angular_core.Signal<boolean>;
|
|
243
|
+
sortState: _angular_core.ModelSignal<Sort>;
|
|
244
|
+
columnFilters: _angular_core.ModelSignal<DataViewFilterModel>;
|
|
245
|
+
withSavedViews: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
246
|
+
savedViews: _angular_core.ModelSignal<DataViewSavedView[]>;
|
|
247
|
+
viewStorageKey: _angular_core.InputSignal<string | null>;
|
|
248
|
+
private _activeViewId;
|
|
249
|
+
readonly activeViewId: _angular_core.Signal<string | null>;
|
|
250
|
+
readonly viewStorageError: _angular_core.WritableSignal<string | null>;
|
|
251
|
+
readonly stateChanged: _angular_core.OutputEmitterRef<DataViewViewState>;
|
|
252
|
+
readonly viewApplied: _angular_core.OutputEmitterRef<DataViewSavedView | null>;
|
|
253
|
+
private _initialFullState;
|
|
254
|
+
private _storageReady;
|
|
255
|
+
protected dirtyView: _angular_core.Signal<boolean>;
|
|
256
|
+
protected normalizedFilters: _angular_core.Signal<DataViewFilterModel>;
|
|
257
|
+
protected activeFilters: _angular_core.Signal<{
|
|
258
|
+
field: string;
|
|
259
|
+
label: string;
|
|
260
|
+
}[]>;
|
|
129
261
|
protected _isFiltering: _angular_core.WritableSignal<boolean>;
|
|
130
262
|
protected _isSorting: _angular_core.WritableSignal<boolean>;
|
|
131
263
|
private _emptyDataRef;
|
|
@@ -166,6 +298,8 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
166
298
|
withColumnSettings: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
167
299
|
embedded: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
168
300
|
rowSelection: _angular_core.InputSignal<"single" | "multiple">;
|
|
301
|
+
getRowId: _angular_core.InputSignal<((row: T) => DataViewRowId) | null>;
|
|
302
|
+
selectionScope: _angular_core.InputSignal<DataViewSelectionScope>;
|
|
169
303
|
allowSingleRowSelectionByClick: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
170
304
|
selectionWidth: _angular_core.InputSignalWithTransform<number, any>;
|
|
171
305
|
minColumnWidth: _angular_core.InputSignalWithTransform<number, any>;
|
|
@@ -202,6 +336,7 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
202
336
|
sortable?: boolean;
|
|
203
337
|
resizable?: boolean;
|
|
204
338
|
withColumnSettings?: boolean;
|
|
339
|
+
filter?: _ngstarter_ui_components_data_view.DataViewColumnFilterConfig;
|
|
205
340
|
minWidth?: string | number;
|
|
206
341
|
maxWidth?: string | number;
|
|
207
342
|
params?: {
|
|
@@ -223,6 +358,7 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
223
358
|
sortable?: boolean;
|
|
224
359
|
resizable?: boolean;
|
|
225
360
|
withColumnSettings?: boolean;
|
|
361
|
+
filter?: _ngstarter_ui_components_data_view.DataViewColumnFilterConfig;
|
|
226
362
|
minWidth?: string | number;
|
|
227
363
|
maxWidth?: string | number;
|
|
228
364
|
params?: {
|
|
@@ -243,6 +379,7 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
243
379
|
sortable?: boolean;
|
|
244
380
|
resizable?: boolean;
|
|
245
381
|
withColumnSettings?: boolean;
|
|
382
|
+
filter?: _ngstarter_ui_components_data_view.DataViewColumnFilterConfig;
|
|
246
383
|
minWidth?: string | number;
|
|
247
384
|
maxWidth?: string | number;
|
|
248
385
|
params?: {
|
|
@@ -263,6 +400,7 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
263
400
|
sortable?: boolean;
|
|
264
401
|
resizable?: boolean;
|
|
265
402
|
withColumnSettings?: boolean;
|
|
403
|
+
filter?: _ngstarter_ui_components_data_view.DataViewColumnFilterConfig;
|
|
266
404
|
minWidth?: string | number;
|
|
267
405
|
maxWidth?: string | number;
|
|
268
406
|
params?: {
|
|
@@ -290,6 +428,7 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
290
428
|
}>;
|
|
291
429
|
protected visibleRows: _angular_core.Signal<{
|
|
292
430
|
item: T;
|
|
431
|
+
key: DataViewRowId | T;
|
|
293
432
|
index: number;
|
|
294
433
|
top: number;
|
|
295
434
|
isLast: boolean;
|
|
@@ -305,7 +444,7 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
305
444
|
cellRenderers: _angular_core.InputSignal<DataViewCellRendererDef[]>;
|
|
306
445
|
loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
307
446
|
hoverRows: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
308
|
-
search: _angular_core.
|
|
447
|
+
search: _angular_core.ModelSignal<string>;
|
|
309
448
|
private _debouncedSearch;
|
|
310
449
|
private _debounceSearchEffect;
|
|
311
450
|
emptyIcon: _angular_core.InputSignal<string>;
|
|
@@ -316,11 +455,16 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
316
455
|
protected _isLoading: _angular_core.Signal<boolean>;
|
|
317
456
|
protected shouldRenderGrid: _angular_core.Signal<boolean>;
|
|
318
457
|
protected injector: Injector;
|
|
319
|
-
protected selection:
|
|
458
|
+
protected selection: DataViewSelection<T>;
|
|
459
|
+
private _selectionTick;
|
|
460
|
+
private _selectedScope;
|
|
461
|
+
private _selectedSearch;
|
|
462
|
+
private _selectedFilters;
|
|
320
463
|
protected cellRenderersMap: Map<string, any>;
|
|
321
464
|
protected loadingCellRenderers: _angular_core.WritableSignal<boolean>;
|
|
322
465
|
readonly rowSelectionChanged: _angular_core.OutputEmitterRef<DataViewRowSelectionEvent<T>>;
|
|
323
466
|
readonly selectionChanged: _angular_core.OutputEmitterRef<T[]>;
|
|
467
|
+
readonly selectionStateChanged: _angular_core.OutputEmitterRef<DataViewSelectionState<T>>;
|
|
324
468
|
readonly allRowsSelectionChanged: _angular_core.OutputEmitterRef<boolean>;
|
|
325
469
|
readonly sortChange: _angular_core.OutputEmitterRef<Sort>;
|
|
326
470
|
readonly loadEnd: _angular_core.OutputEmitterRef<void>;
|
|
@@ -349,11 +493,15 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
349
493
|
hasCellRenderer(cellRenderer: string): boolean;
|
|
350
494
|
getCellRenderer(cellRenderer: string): any;
|
|
351
495
|
isAllSelected(): boolean;
|
|
496
|
+
protected isPartiallySelected(): boolean;
|
|
352
497
|
toggleAllRows(): void;
|
|
353
498
|
rowSelectionToggle(event: CheckboxChange, row: T): void;
|
|
354
499
|
protected selectRowByClick(event: MouseEvent, row: T): void;
|
|
355
500
|
private _isInteractiveRowClick;
|
|
356
501
|
onPageChange(event: PageEvent): void;
|
|
502
|
+
private resetScroll;
|
|
503
|
+
private cancelPendingRequest;
|
|
504
|
+
private beginRowModel;
|
|
357
505
|
protected sortColumn(col: DataViewColumnDef, direction: SortDirection): void;
|
|
358
506
|
getSnapshot(): DataViewState[];
|
|
359
507
|
applyState(state: DataViewState[]): void;
|
|
@@ -364,13 +512,45 @@ declare class DataView<T> implements OnInit, AfterViewInit, DataViewInterface<T>
|
|
|
364
512
|
protected resetColumns(): void;
|
|
365
513
|
protected openColumnSettingsDialog(): void;
|
|
366
514
|
protected onSortChange(event: Sort): void;
|
|
367
|
-
|
|
515
|
+
private selectionRows;
|
|
516
|
+
selectAll(scope?: DataViewSelectionScope): void;
|
|
368
517
|
unselectAll(): void;
|
|
369
518
|
selectOne(row: T): void;
|
|
370
519
|
isSelected(row: T): boolean;
|
|
371
520
|
hasSelected(): boolean;
|
|
521
|
+
getSelection(): DataViewSelectionState<T>;
|
|
522
|
+
private emitSelection;
|
|
523
|
+
getState(): DataViewViewState;
|
|
524
|
+
setState(value: DataViewViewState): void;
|
|
525
|
+
private validateViewName;
|
|
526
|
+
saveView(name: string, id?: string): DataViewSavedView;
|
|
527
|
+
applyView(id: string | null): void;
|
|
528
|
+
renameView(id: string, name: string): void;
|
|
529
|
+
deleteView(id: string): void;
|
|
530
|
+
protected updateCurrentView(): void;
|
|
531
|
+
protected openSavedViewDialog(rename?: boolean): void;
|
|
532
|
+
private viewStorage;
|
|
533
|
+
protected headerId(field: string): string;
|
|
534
|
+
protected cellId(row: number, field: string): string;
|
|
535
|
+
protected columnIndex(field: string): number;
|
|
536
|
+
protected rowOwnedCells(row: number): string;
|
|
537
|
+
protected headerOwnedCells(): string;
|
|
538
|
+
protected globalRowIndex(row: number): number;
|
|
539
|
+
protected isActiveCell(row: number, field: string): boolean;
|
|
540
|
+
protected activateCell(event: MouseEvent, row: number, field: string): void;
|
|
541
|
+
protected onGridKeydown(event: KeyboardEvent): void;
|
|
542
|
+
private pageRows;
|
|
543
|
+
private selectKeyboardRange;
|
|
544
|
+
private revealActiveCell;
|
|
545
|
+
protected columnPixelWidth(col: DataViewColumnDef): number;
|
|
546
|
+
protected columnMinWidth(col: DataViewColumnDef): number;
|
|
547
|
+
protected columnMaxWidth(col: DataViewColumnDef): number;
|
|
548
|
+
protected resizeColumnWithKeyboard(event: KeyboardEvent, col: DataViewColumnDef): void;
|
|
549
|
+
setColumnFilter(field: string, filter: DataViewColumnFilter | null): void;
|
|
550
|
+
clearFilters(): void;
|
|
551
|
+
protected openColumnFilter(column: DataViewColumnDef): void;
|
|
372
552
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataView<any>, never>;
|
|
373
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataView<any>, "ngs-data-view", ["ngsDataView"], { "paginator": { "alias": "paginator"; "required": false; "isSignal": true; }; "columnDefs": { "alias": "columnDefs"; "required": false; "isSignal": true; }; "defaultColDef": { "alias": "defaultColDef"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "datasource": { "alias": "datasource"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "headerHeight": { "alias": "headerHeight"; "required": false; "isSignal": true; }; "bufferRows": { "alias": "bufferRows"; "required": false; "isSignal": true; }; "withSelection": { "alias": "withSelection"; "required": false; "isSignal": true; }; "highlightHeader": { "alias": "highlightHeader"; "required": false; "isSignal": true; }; "rowModelType": { "alias": "rowModelType"; "required": false; "isSignal": true; }; "autoHeight": { "alias": "autoHeight"; "required": false; "isSignal": true; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; "isSignal": true; }; "withPagination": { "alias": "withPagination"; "required": false; "isSignal": true; }; "bodyScroll": { "alias": "bodyScroll"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; "isSignal": true; }; "paginatorAriaLabel": { "alias": "paginatorAriaLabel"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; "snapshot": { "alias": "snapshot"; "required": false; "isSignal": true; }; "withColumnSettings": { "alias": "withColumnSettings"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "allowSingleRowSelectionByClick": { "alias": "allowSingleRowSelectionByClick"; "required": false; "isSignal": true; }; "selectionWidth": { "alias": "selectionWidth"; "required": false; "isSignal": true; }; "minColumnWidth": { "alias": "minColumnWidth"; "required": false; "isSignal": true; }; "cellRenderers": { "alias": "cellRenderers"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "hoverRows": { "alias": "hoverRows"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "emptyIcon": { "alias": "emptyIcon"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "emptyFilterResultsIcon": { "alias": "emptyFilterResultsIcon"; "required": false; "isSignal": true; }; "emptyFilterResultsText": { "alias": "emptyFilterResultsText"; "required": false; "isSignal": true; }; }, { "pageSize": "pageSizeChange"; "pageIndex": "pageIndexChange"; "rowSelectionChanged": "rowSelectionChanged"; "selectionChanged": "selectionChanged"; "allRowsSelectionChanged": "allRowsSelectionChanged"; "sortChange": "sortChange"; "loadEnd": "loadEnd"; "refreshEnd": "refreshEnd"; }, ["_emptyDataRef", "_emptyFilterResults", "_actionBarRef", "_actionBarComp"], never, true, never>;
|
|
553
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataView<any>, "ngs-data-view", ["ngsDataView"], { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "sortState": { "alias": "sortState"; "required": false; "isSignal": true; }; "columnFilters": { "alias": "columnFilters"; "required": false; "isSignal": true; }; "withSavedViews": { "alias": "withSavedViews"; "required": false; "isSignal": true; }; "savedViews": { "alias": "savedViews"; "required": false; "isSignal": true; }; "viewStorageKey": { "alias": "viewStorageKey"; "required": false; "isSignal": true; }; "paginator": { "alias": "paginator"; "required": false; "isSignal": true; }; "columnDefs": { "alias": "columnDefs"; "required": false; "isSignal": true; }; "defaultColDef": { "alias": "defaultColDef"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "datasource": { "alias": "datasource"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "headerHeight": { "alias": "headerHeight"; "required": false; "isSignal": true; }; "bufferRows": { "alias": "bufferRows"; "required": false; "isSignal": true; }; "withSelection": { "alias": "withSelection"; "required": false; "isSignal": true; }; "highlightHeader": { "alias": "highlightHeader"; "required": false; "isSignal": true; }; "rowModelType": { "alias": "rowModelType"; "required": false; "isSignal": true; }; "autoHeight": { "alias": "autoHeight"; "required": false; "isSignal": true; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; "isSignal": true; }; "withPagination": { "alias": "withPagination"; "required": false; "isSignal": true; }; "bodyScroll": { "alias": "bodyScroll"; "required": false; "isSignal": true; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; "isSignal": true; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; "isSignal": true; }; "paginatorAriaLabel": { "alias": "paginatorAriaLabel"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; "snapshot": { "alias": "snapshot"; "required": false; "isSignal": true; }; "withColumnSettings": { "alias": "withColumnSettings"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; "isSignal": true; }; "getRowId": { "alias": "getRowId"; "required": false; "isSignal": true; }; "selectionScope": { "alias": "selectionScope"; "required": false; "isSignal": true; }; "allowSingleRowSelectionByClick": { "alias": "allowSingleRowSelectionByClick"; "required": false; "isSignal": true; }; "selectionWidth": { "alias": "selectionWidth"; "required": false; "isSignal": true; }; "minColumnWidth": { "alias": "minColumnWidth"; "required": false; "isSignal": true; }; "cellRenderers": { "alias": "cellRenderers"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "hoverRows": { "alias": "hoverRows"; "required": false; "isSignal": true; }; "search": { "alias": "search"; "required": false; "isSignal": true; }; "emptyIcon": { "alias": "emptyIcon"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "emptyFilterResultsIcon": { "alias": "emptyFilterResultsIcon"; "required": false; "isSignal": true; }; "emptyFilterResultsText": { "alias": "emptyFilterResultsText"; "required": false; "isSignal": true; }; }, { "rowActivated": "rowActivated"; "loadError": "loadError"; "sortState": "sortStateChange"; "columnFilters": "columnFiltersChange"; "savedViews": "savedViewsChange"; "stateChanged": "stateChanged"; "viewApplied": "viewApplied"; "pageSize": "pageSizeChange"; "pageIndex": "pageIndexChange"; "search": "searchChange"; "rowSelectionChanged": "rowSelectionChanged"; "selectionChanged": "selectionChanged"; "selectionStateChanged": "selectionStateChanged"; "allRowsSelectionChanged": "allRowsSelectionChanged"; "sortChange": "sortChange"; "loadEnd": "loadEnd"; "refreshEnd": "refreshEnd"; }, ["_emptyDataRef", "_emptyFilterResults", "_actionBarRef", "_actionBarComp"], never, true, never>;
|
|
374
554
|
}
|
|
375
555
|
|
|
376
556
|
declare class DataViewEmptyDataDirective {
|
|
@@ -397,9 +577,22 @@ interface DataViewConfig {
|
|
|
397
577
|
minColumnWidth?: number;
|
|
398
578
|
defaultColDef?: Partial<DataViewColumnDef>;
|
|
399
579
|
autoHeight?: boolean;
|
|
580
|
+
withSavedViews?: boolean;
|
|
581
|
+
viewStorage?: DataViewViewStorage;
|
|
400
582
|
}
|
|
401
583
|
declare const DATA_VIEW_CONFIG: InjectionToken<DataViewConfig>;
|
|
402
584
|
declare function provideDataView(config: DataViewConfig): EnvironmentProviders;
|
|
403
585
|
|
|
404
|
-
|
|
405
|
-
|
|
586
|
+
declare function dataViewDateKey(value: unknown): string | undefined;
|
|
587
|
+
/** Empty filters are removed; malformed values are rejected before reaching a datasource. */
|
|
588
|
+
declare function normalizeDataViewFilter(filter: DataViewColumnFilter): DataViewColumnFilter | null;
|
|
589
|
+
declare function matchesDataViewFilter(value: unknown, filter: DataViewColumnFilter): boolean;
|
|
590
|
+
declare function normalizeDataViewFilters(filters: DataViewFilterModel): DataViewFilterModel;
|
|
591
|
+
declare function dataViewFilterLabel(filter: DataViewColumnFilter): string;
|
|
592
|
+
|
|
593
|
+
/** Validates persisted state, removes stale fields and appends newly added columns. */
|
|
594
|
+
declare function normalizeDataViewState(value: unknown, columns: readonly DataViewColumnDef[]): DataViewViewState;
|
|
595
|
+
declare function normalizeDataViewSavedViews(value: unknown, columns: readonly DataViewColumnDef[]): DataViewSavedView[];
|
|
596
|
+
|
|
597
|
+
export { DATA_VIEW, DATA_VIEW_CONFIG, DataView, DataViewActionBar, DataViewActionBarDirective, DataViewEmptyDataDirective, DataViewEmptyFilterResultsDirective, cellRenderer, dataViewDateKey, dataViewFilterLabel, matchesDataViewFilter, normalizeDataViewFilter, normalizeDataViewFilters, normalizeDataViewSavedViews, normalizeDataViewState, provideDataView };
|
|
598
|
+
export type { DataViewAPI, DataViewActionBarAPI, DataViewCellRenderer, DataViewCellRendererDef, DataViewColumnDef, DataViewColumnFilter, DataViewColumnFilterConfig, DataViewColumnWidth, DataViewConfig, DataViewDatasource, DataViewFilterModel, DataViewGetRowsParams, DataViewInterface, DataViewPinAlign, DataViewRowId, DataViewRowModelType, DataViewRowSelectionEvent, DataViewRowSelectionEventSource, DataViewSavedView, DataViewSelectionScope, DataViewSelectionState, DataViewState, DataViewViewState, DataViewViewStorage };
|
|
@@ -145,6 +145,8 @@ declare class DateRangeInput<D> implements OnDestroy, OnInit, FormFieldControl<D
|
|
|
145
145
|
private _formField;
|
|
146
146
|
readonly rangePicker: _angular_core.InputSignal<DateRangePicker<D>>;
|
|
147
147
|
readonly separator: _angular_core.InputSignal<string>;
|
|
148
|
+
/** Calendar range shared by typed inputs and picker selection. */
|
|
149
|
+
readonly range: _angular_core.ModelSignal<DateRange<D> | null>;
|
|
148
150
|
readonly ngControl: NgControl | null;
|
|
149
151
|
_startInput: _angular_core.Signal<StartDate<any> | undefined>;
|
|
150
152
|
_endInput: _angular_core.Signal<EndDate<any> | undefined>;
|
|
@@ -175,7 +177,7 @@ declare class DateRangeInput<D> implements OnDestroy, OnInit, FormFieldControl<D
|
|
|
175
177
|
getConnectedOverlayOrigin(): ElementRef;
|
|
176
178
|
focus(): void;
|
|
177
179
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DateRangeInput<any>, never>;
|
|
178
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateRangeInput<any>, "ngs-date-range-input", ["ngsDateRangeInput"], { "rangePicker": { "alias": "rangePicker"; "required": true; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; }, {}, ["_startInput", "_endInput"], ["input[ngsStartDate]", "input[ngsEndDate]"], true, never>;
|
|
180
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateRangeInput<any>, "ngs-date-range-input", ["ngsDateRangeInput"], { "rangePicker": { "alias": "rangePicker"; "required": true; "isSignal": true; }; "separator": { "alias": "separator"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; }, { "range": "rangeChange"; }, ["_startInput", "_endInput"], ["input[ngsStartDate]", "input[ngsEndDate]"], true, never>;
|
|
179
181
|
}
|
|
180
182
|
|
|
181
183
|
declare class DatepickerToggleIcon {
|
|
@@ -36,8 +36,10 @@ declare class MenuTrigger implements OnDestroy {
|
|
|
36
36
|
_handleMouseLeave(): void;
|
|
37
37
|
_clearCloseTimeout(): void;
|
|
38
38
|
_handleClick(event: MouseEvent): void;
|
|
39
|
+
_handleKeydown(event: KeyboardEvent): void;
|
|
39
40
|
toggleMenu(): void;
|
|
40
|
-
|
|
41
|
+
private themeCleanup;
|
|
42
|
+
openMenu(focus?: 'first' | 'last' | null): void;
|
|
41
43
|
closeMenu(reason: MenuCloseReason, force?: boolean): void;
|
|
42
44
|
private _setIsMenuOpen;
|
|
43
45
|
private _getPanelClasses;
|
|
@@ -50,7 +52,7 @@ declare class MenuTrigger implements OnDestroy {
|
|
|
50
52
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<MenuTrigger, "[ngsMenuTriggerFor]", ["ngsMenuTrigger"], { "menu": { "alias": "ngsMenuTriggerFor"; "required": false; "isSignal": true; }; "menuData": { "alias": "ngsMenuTriggerData"; "required": false; "isSignal": true; }; "menuDisabled": { "alias": "ngsMenuDisabled"; "required": false; "isSignal": true; }; "xPosition": { "alias": "xPosition"; "required": false; "isSignal": true; }; "yPosition": { "alias": "yPosition"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "ngsMenuTriggerRestoreFocus"; "required": false; "isSignal": true; }; }, { "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; }, never, never, true, never>;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
declare class MenuItem implements OnInit {
|
|
55
|
+
declare class MenuItem implements OnInit, OnDestroy {
|
|
54
56
|
private _injector;
|
|
55
57
|
protected _menuTrigger: MenuTrigger | null;
|
|
56
58
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -58,10 +60,22 @@ declare class MenuItem implements OnInit {
|
|
|
58
60
|
selected: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
59
61
|
readonly _triggered: _angular_core.OutputEmitterRef<void>;
|
|
60
62
|
private _elementRef;
|
|
61
|
-
|
|
63
|
+
protected _menu: Menu | null;
|
|
64
|
+
/** Adapt signal-based inputs to the CDK FocusableOption contract. */
|
|
65
|
+
readonly _navigationItem: {
|
|
66
|
+
item: MenuItem;
|
|
67
|
+
disabled: boolean;
|
|
68
|
+
getLabel(): string;
|
|
69
|
+
focus(): void;
|
|
70
|
+
};
|
|
71
|
+
get element(): HTMLElement;
|
|
62
72
|
get label(): string;
|
|
63
73
|
focus(): void;
|
|
64
74
|
ngOnInit(): void;
|
|
75
|
+
ngOnDestroy(): void;
|
|
76
|
+
_handleFocus(): void;
|
|
77
|
+
_handleKeydown(event: KeyboardEvent): void;
|
|
78
|
+
_openSubmenu(): boolean;
|
|
65
79
|
_handleClick(event: MouseEvent): void;
|
|
66
80
|
_handleMouseEnter(): void;
|
|
67
81
|
protected readonly _isHighlighted: _angular_core.WritableSignal<boolean>;
|
|
@@ -76,6 +90,21 @@ declare class MenuContent {
|
|
|
76
90
|
}
|
|
77
91
|
|
|
78
92
|
declare class Menu implements OnDestroy {
|
|
93
|
+
private static _nextId;
|
|
94
|
+
readonly id: string;
|
|
95
|
+
private readonly _panel;
|
|
96
|
+
private readonly _registeredItems;
|
|
97
|
+
private readonly _navigationItems;
|
|
98
|
+
private readonly _keyManager;
|
|
99
|
+
private readonly _direction;
|
|
100
|
+
private readonly _panelOpen;
|
|
101
|
+
private _pendingFocus;
|
|
102
|
+
private _keyboardNavigation;
|
|
103
|
+
private _panelTrigger;
|
|
104
|
+
private _parentPanel;
|
|
105
|
+
private _panelClose;
|
|
106
|
+
/** Optional scope whose tokens should follow this detached overlay. */
|
|
107
|
+
readonly themeSource: _angular_core.InputSignal<HTMLElement | null>;
|
|
79
108
|
readonly role: _angular_core.InputSignal<"menu" | "menubar">;
|
|
80
109
|
readonly classList: _angular_core.InputSignal<string>;
|
|
81
110
|
readonly xPosition: _angular_core.InputSignal<"before" | "after">;
|
|
@@ -90,6 +119,7 @@ declare class Menu implements OnDestroy {
|
|
|
90
119
|
readonly items: _angular_core.Signal<readonly MenuItem[]>;
|
|
91
120
|
protected readonly _isNested: _angular_core.WritableSignal<boolean>;
|
|
92
121
|
protected readonly _context: _angular_core.WritableSignal<any>;
|
|
122
|
+
readonly context: _angular_core.Signal<any>;
|
|
93
123
|
private _parentMenu;
|
|
94
124
|
private _parentMenuTrigger;
|
|
95
125
|
private _itemSubscription;
|
|
@@ -97,13 +127,21 @@ declare class Menu implements OnDestroy {
|
|
|
97
127
|
constructor();
|
|
98
128
|
ngOnDestroy(): void;
|
|
99
129
|
close(reason: MenuCloseReason): void;
|
|
130
|
+
_registerItem(item: MenuItem): void;
|
|
131
|
+
_unregisterItem(item: MenuItem): void;
|
|
132
|
+
_isItemActive(item: MenuItem): boolean;
|
|
133
|
+
_setActiveItem(item: MenuItem): void;
|
|
134
|
+
_focusPanel(edge: 'first' | 'last'): void;
|
|
135
|
+
_openPanel(trigger: HTMLElement, parent: Menu | null, focus: 'first' | 'last' | null, close: (reason: MenuCloseReason) => void): void;
|
|
136
|
+
_closePanel(reason: MenuCloseReason): void;
|
|
137
|
+
protected _handleKeydown(event: KeyboardEvent): void;
|
|
100
138
|
_setPanelClasses(classes: string[]): void;
|
|
101
139
|
_setContext(context: any): void;
|
|
102
140
|
_triggerOpened(trigger: any): void;
|
|
103
141
|
_triggerClosed(trigger: any): void;
|
|
104
142
|
hasOpenChild(): boolean;
|
|
105
143
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Menu, never>;
|
|
106
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Menu, "ngs-menu", ["ngsMenu"], { "role": { "alias": "role"; "required": false; "isSignal": true; }; "classList": { "alias": "classList"; "required": false; "isSignal": true; }; "xPosition": { "alias": "xPosition"; "required": false; "isSignal": true; }; "yPosition": { "alias": "yPosition"; "required": false; "isSignal": true; }; "pushIntoViewport": { "alias": "pushIntoViewport"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, ["content", "items"], ["ngs-menu-header,[ngs-menu-header]", "*", "ngs-menu-footer,[ngs-menu-footer]"], true, never>;
|
|
144
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Menu, "ngs-menu", ["ngsMenu"], { "themeSource": { "alias": "themeSource"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "classList": { "alias": "classList"; "required": false; "isSignal": true; }; "xPosition": { "alias": "xPosition"; "required": false; "isSignal": true; }; "yPosition": { "alias": "yPosition"; "required": false; "isSignal": true; }; "pushIntoViewport": { "alias": "pushIntoViewport"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, ["content", "items"], ["ngs-menu-header,[ngs-menu-header]", "*", "ngs-menu-footer,[ngs-menu-footer]"], true, never>;
|
|
107
145
|
}
|
|
108
146
|
|
|
109
147
|
declare class MenuDivider {
|
|
@@ -130,7 +168,7 @@ declare class ContextMenuTrigger implements OnDestroy {
|
|
|
130
168
|
private _closingSubscription;
|
|
131
169
|
readonly menuOpen: _angular_core.WritableSignal<boolean>;
|
|
132
170
|
ngOnDestroy(): void;
|
|
133
|
-
openMenu(x: number, y: number): void;
|
|
171
|
+
openMenu(x: number, y: number, focus?: 'first' | null): void;
|
|
134
172
|
closeMenu(reason: MenuCloseReason): void;
|
|
135
173
|
private _setIsMenuOpen;
|
|
136
174
|
private _getPanelClasses;
|
|
@@ -139,6 +177,7 @@ declare class ContextMenuTrigger implements OnDestroy {
|
|
|
139
177
|
private _getPositionStrategy;
|
|
140
178
|
private _menuClosingActions;
|
|
141
179
|
_handleContextMenu(event: MouseEvent): void;
|
|
180
|
+
_handleKeydown(event: KeyboardEvent): void;
|
|
142
181
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContextMenuTrigger, never>;
|
|
143
182
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ContextMenuTrigger, "[ngsContextMenuTriggerFor]", ["ngsContextMenuTrigger"], { "menu": { "alias": "ngsContextMenuTriggerFor"; "required": false; "isSignal": true; }; "menuData": { "alias": "ngsContextMenuTriggerData"; "required": false; "isSignal": true; }; }, { "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; }, never, never, true, never>;
|
|
144
183
|
}
|
|
@@ -2,7 +2,11 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, Signal, ElementRef, OutputEmitterRef, WritableSignal, AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import { Highlightable } from '@angular/cdk/a11y';
|
|
4
4
|
|
|
5
|
-
declare abstract class _Option {
|
|
5
|
+
declare abstract class _Option implements Highlightable {
|
|
6
|
+
abstract id: string;
|
|
7
|
+
abstract setActiveStyles(): void;
|
|
8
|
+
abstract setInactiveStyles(): void;
|
|
9
|
+
abstract getLabel(): string;
|
|
6
10
|
abstract value: Signal<any>;
|
|
7
11
|
abstract data?: Signal<any>;
|
|
8
12
|
abstract elementRef: ElementRef<HTMLElement>;
|
|
@@ -23,7 +27,11 @@ declare const OPTION: InjectionToken<_Option>;
|
|
|
23
27
|
|
|
24
28
|
declare class Option implements AfterViewInit, OnDestroy, _Option, Highlightable {
|
|
25
29
|
elementRef: ElementRef<HTMLElement>;
|
|
30
|
+
private static _nextId;
|
|
31
|
+
protected readonly _id: _angular_core.InputSignal<string>;
|
|
32
|
+
get id(): string;
|
|
26
33
|
private _parent;
|
|
34
|
+
private _group;
|
|
27
35
|
private _cdr;
|
|
28
36
|
value: _angular_core.InputSignal<any>;
|
|
29
37
|
data: _angular_core.InputSignal<any>;
|
|
@@ -47,9 +55,9 @@ declare class Option implements AfterViewInit, OnDestroy, _Option, Highlightable
|
|
|
47
55
|
setInactiveStyles(): void;
|
|
48
56
|
_onClick(event: MouseEvent): void;
|
|
49
57
|
get viewValue(): string;
|
|
50
|
-
getLabel
|
|
58
|
+
getLabel(): string;
|
|
51
59
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Option, never>;
|
|
52
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Option, "ngs-option", ["ngsOption"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabledSignal": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectedInput": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "onSelectionChange": "onSelectionChange"; }, never, ["*"], true, never>;
|
|
60
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Option, "ngs-option", ["ngsOption"], { "_id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabledSignal": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectedInput": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "onSelectionChange": "onSelectionChange"; }, never, ["*"], true, never>;
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
declare class Optgroup {
|
|
@@ -120,6 +120,7 @@ declare class SelectChange {
|
|
|
120
120
|
}
|
|
121
121
|
declare class Select implements ControlValueAccessor, OnDestroy, AfterContentInit, DoCheck, FormFieldControl<any>, _Select, _OptionParent {
|
|
122
122
|
private _elementRef;
|
|
123
|
+
private _injector;
|
|
123
124
|
private _cdr;
|
|
124
125
|
private _destroy;
|
|
125
126
|
private _formField;
|
|
@@ -156,6 +157,9 @@ declare class Select implements ControlValueAccessor, OnDestroy, AfterContentIni
|
|
|
156
157
|
private projectedOptions;
|
|
157
158
|
private dataSourceOptions;
|
|
158
159
|
options: _angular_core.Signal<_Option[]>;
|
|
160
|
+
private readonly _keyManager;
|
|
161
|
+
private readonly _keyboardNavigation;
|
|
162
|
+
protected readonly activeOptionId: _angular_core.Signal<string | null>;
|
|
159
163
|
optionGroups: _angular_core.Signal<readonly Optgroup[]>;
|
|
160
164
|
customTrigger: _angular_core.Signal<readonly SelectTrigger[]>;
|
|
161
165
|
filterTrigger: _angular_core.Signal<readonly FilterTrigger[]>;
|
|
@@ -168,6 +172,7 @@ declare class Select implements ControlValueAccessor, OnDestroy, AfterContentIni
|
|
|
168
172
|
private readonly _overlayWidth;
|
|
169
173
|
get overlayWidth(): string | number;
|
|
170
174
|
panelOpen: _angular_core.WritableSignal<boolean>;
|
|
175
|
+
private _initialActiveEdge;
|
|
171
176
|
_panelPosition: _angular_core.WritableSignal<"top" | "bottom">;
|
|
172
177
|
private _selectionModel;
|
|
173
178
|
private _selectionChanges;
|
|
@@ -213,8 +218,9 @@ declare class Select implements ControlValueAccessor, OnDestroy, AfterContentIni
|
|
|
213
218
|
ngOnDestroy(): void;
|
|
214
219
|
ngDoCheck(): void;
|
|
215
220
|
private updateErrorState;
|
|
216
|
-
|
|
217
|
-
|
|
221
|
+
_handleClick(event: MouseEvent): void;
|
|
222
|
+
toggle(origin?: 'keyboard' | 'mouse'): void;
|
|
223
|
+
open(edge?: 'first' | 'last', origin?: 'keyboard' | 'mouse'): void;
|
|
218
224
|
private _updateOverlayWidth;
|
|
219
225
|
close(): void;
|
|
220
226
|
clear(event?: MouseEvent): void;
|
|
@@ -227,6 +233,10 @@ declare class Select implements ControlValueAccessor, OnDestroy, AfterContentIni
|
|
|
227
233
|
setDisabledState(isDisabled: boolean): void;
|
|
228
234
|
focus(): void;
|
|
229
235
|
_handleKeydown(event: KeyboardEvent): void;
|
|
236
|
+
private _activateInitialOption;
|
|
237
|
+
private _scrollToActiveOption;
|
|
238
|
+
protected _onPanelFocus(event: FocusEvent): void;
|
|
239
|
+
private _syncSearchAria;
|
|
230
240
|
_onOptionClick(option: _Option): void;
|
|
231
241
|
protected onAsyncSearchInput(value: string): void;
|
|
232
242
|
protected onAsyncContentScroll(event: Event): void;
|
|
@@ -236,11 +246,6 @@ declare class Select implements ControlValueAccessor, OnDestroy, AfterContentIni
|
|
|
236
246
|
private _selectAsyncMultipleOption;
|
|
237
247
|
private _propagateChanges;
|
|
238
248
|
private _setSelectionByValue;
|
|
239
|
-
private _scrollToSelectedOption;
|
|
240
|
-
private _scrollToAsyncOptionValue;
|
|
241
|
-
private _scrollOptionElementIntoContainer;
|
|
242
|
-
private _setScrollTop;
|
|
243
|
-
private _getOptionIndex;
|
|
244
249
|
private _getOptionData;
|
|
245
250
|
private _selectValue;
|
|
246
251
|
private _loadFirstPage;
|
|
@@ -226,6 +226,8 @@ declare class TableDataSource<T> extends DataSource<T> {
|
|
|
226
226
|
* @param data
|
|
227
227
|
* @private
|
|
228
228
|
*/
|
|
229
|
+
/** Call after mutating a row in place; assigning data also invalidates the cache. */
|
|
230
|
+
invalidateFilterCache(row?: T): void;
|
|
229
231
|
private _getQuickFilterString;
|
|
230
232
|
constructor(initialData?: T[]);
|
|
231
233
|
/**
|