@skyux/data-grid 14.23.0 → 14.24.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { OnInit, TemplateRef, Signal } from '@angular/core';
|
|
3
|
+
import { SkyDataColumnSource, SkyDataSelectionSource, SkyDataSortSource, SkyDataColumnOption } from '@skyux/lists';
|
|
3
4
|
import { GridApi, GridOptions } from 'ag-grid-community';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -39,7 +40,9 @@ interface SkyDataGridSort {
|
|
|
39
40
|
declare class SkyDataGridColumn implements OnInit {
|
|
40
41
|
#private;
|
|
41
42
|
/**
|
|
42
|
-
* Whether the column is hidden.
|
|
43
|
+
* Whether the column is hidden. When the grid's `selectedColumnIds` is set,
|
|
44
|
+
* it determines which columns display instead. In a data manager's column
|
|
45
|
+
* picker, the column starts hidden and users can choose to display it.
|
|
43
46
|
* @default false
|
|
44
47
|
*/
|
|
45
48
|
readonly columnHidden: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -54,6 +57,11 @@ declare class SkyDataGridColumn implements OnInit {
|
|
|
54
57
|
* @default 'text'
|
|
55
58
|
*/
|
|
56
59
|
readonly dataType: _angular_core.InputSignal<"number" | "boolean" | "text" | "date">;
|
|
60
|
+
/**
|
|
61
|
+
* The text to display beneath the column's `headingText` in a data
|
|
62
|
+
* manager's column picker.
|
|
63
|
+
*/
|
|
64
|
+
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
57
65
|
/**
|
|
58
66
|
* The property to retrieve cell information from an entry on the grid `data` array.
|
|
59
67
|
* You must provide either the `columnId` or `field` property for every column,
|
|
@@ -94,7 +102,9 @@ declare class SkyDataGridColumn implements OnInit {
|
|
|
94
102
|
/**
|
|
95
103
|
* Whether the column is locked. The intent is to display locked columns first
|
|
96
104
|
* on the left side of the grid. If set to `true`, then users cannot drag the column
|
|
97
|
-
* to another position or drag other columns before it.
|
|
105
|
+
* to another position or drag other columns before it. In a data manager's
|
|
106
|
+
* column picker, a locked column always displays and is not offered as an
|
|
107
|
+
* option.
|
|
98
108
|
* @default false
|
|
99
109
|
*/
|
|
100
110
|
readonly locked: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
@@ -137,7 +147,7 @@ declare class SkyDataGridColumn implements OnInit {
|
|
|
137
147
|
*/
|
|
138
148
|
protected readonly cellTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
139
149
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkyDataGridColumn, never>;
|
|
140
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkyDataGridColumn, "sky-data-grid-column", never, { "columnHidden": { "alias": "columnHidden"; "required": false; "isSignal": true; }; "columnId": { "alias": "columnId"; "required": false; "isSignal": true; }; "dataType": { "alias": "dataType"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; "isSignal": true; }; "flexWidth": { "alias": "flexWidth"; "required": false; "isSignal": true; }; "headingText": { "alias": "headingText"; "required": true; "isSignal": true; }; "headingHidden": { "alias": "headingHidden"; "required": false; "isSignal": true; }; "helpPopoverTitle": { "alias": "helpPopoverTitle"; "required": false; "isSignal": true; }; "helpPopoverContent": { "alias": "helpPopoverContent"; "required": false; "isSignal": true; }; "locked": { "alias": "locked"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "template": { "alias": "template"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "wrapText": { "alias": "wrapText"; "required": false; "isSignal": true; }; }, {}, ["templateChild"], never, true, never>;
|
|
150
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkyDataGridColumn, "sky-data-grid-column", never, { "columnHidden": { "alias": "columnHidden"; "required": false; "isSignal": true; }; "columnId": { "alias": "columnId"; "required": false; "isSignal": true; }; "dataType": { "alias": "dataType"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; "isSignal": true; }; "flexWidth": { "alias": "flexWidth"; "required": false; "isSignal": true; }; "headingText": { "alias": "headingText"; "required": true; "isSignal": true; }; "headingHidden": { "alias": "headingHidden"; "required": false; "isSignal": true; }; "helpPopoverTitle": { "alias": "helpPopoverTitle"; "required": false; "isSignal": true; }; "helpPopoverContent": { "alias": "helpPopoverContent"; "required": false; "isSignal": true; }; "locked": { "alias": "locked"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "sortable": { "alias": "sortable"; "required": false; "isSignal": true; }; "template": { "alias": "template"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "wrapText": { "alias": "wrapText"; "required": false; "isSignal": true; }; }, {}, ["templateChild"], never, true, never>;
|
|
141
151
|
}
|
|
142
152
|
|
|
143
153
|
/**
|
|
@@ -145,7 +155,7 @@ declare class SkyDataGridColumn implements OnInit {
|
|
|
145
155
|
* Provide the `data` array and one `sky-data-grid-column` for each column to render.
|
|
146
156
|
* @preview
|
|
147
157
|
*/
|
|
148
|
-
declare class SkyDataGrid {
|
|
158
|
+
declare class SkyDataGrid implements SkyDataColumnSource, SkyDataSelectionSource, SkyDataSortSource {
|
|
149
159
|
#private;
|
|
150
160
|
/**
|
|
151
161
|
* Whether the grid sorts the data order when a column header is clicked.
|
|
@@ -256,6 +266,15 @@ declare class SkyDataGrid {
|
|
|
256
266
|
* @default []
|
|
257
267
|
*/
|
|
258
268
|
readonly selectedRowIds: _angular_core.ModelSignal<string[]>;
|
|
269
|
+
/**
|
|
270
|
+
* The IDs of the columns to display, in display order. Columns that are not
|
|
271
|
+
* included are hidden. An ID that does not match a column is ignored until a
|
|
272
|
+
* column with that ID is declared. This is two-way bindable: once set, it
|
|
273
|
+
* emits a new value when the user reorders columns. When `undefined`, every
|
|
274
|
+
* column displays in declaration order except those marked `columnHidden`.
|
|
275
|
+
* Displayed locked columns come first.
|
|
276
|
+
*/
|
|
277
|
+
readonly selectedColumnIds: _angular_core.ModelSignal<string[] | undefined>;
|
|
259
278
|
/**
|
|
260
279
|
* The current sort applied to the grid. This is two-way bindable: it emits a new value
|
|
261
280
|
* whenever the user sorts a column, and you can set it to sort the grid programmatically.
|
|
@@ -264,6 +283,34 @@ declare class SkyDataGrid {
|
|
|
264
283
|
*/
|
|
265
284
|
readonly sort: _angular_core.ModelSignal<SkyDataGridSort | undefined>;
|
|
266
285
|
protected readonly columns: Signal<readonly SkyDataGridColumn[]>;
|
|
286
|
+
/**
|
|
287
|
+
* The columns the grid can display, in declaration order. Read by column
|
|
288
|
+
* picker integrations through `SkyDataColumnSource`.
|
|
289
|
+
* @internal
|
|
290
|
+
*/
|
|
291
|
+
readonly columnOptions: Signal<readonly SkyDataColumnOption[]>;
|
|
292
|
+
/**
|
|
293
|
+
* The widths in pixels of the columns users resized, keyed by column ID.
|
|
294
|
+
* Read by data manager integrations through `SkyDataColumnSource`.
|
|
295
|
+
* @internal
|
|
296
|
+
*/
|
|
297
|
+
readonly columnWidths: Signal<Readonly<Record<string, number>>>;
|
|
298
|
+
/**
|
|
299
|
+
* The IDs of the columns that display, in display order: the
|
|
300
|
+
* `selectedColumnIds` that match a declared column or, when
|
|
301
|
+
* `selectedColumnIds` is `undefined`, every column not marked `columnHidden`.
|
|
302
|
+
* Locked columns come first, as the grid displays them. Read by column
|
|
303
|
+
* picker integrations through `SkyDataColumnSource`.
|
|
304
|
+
* @internal
|
|
305
|
+
*/
|
|
306
|
+
readonly displayedColumnIds: Signal<string[]>;
|
|
307
|
+
/**
|
|
308
|
+
* The selectors of the elements the grid keeps visible at the top of the
|
|
309
|
+
* viewport while the page scrolls. Read by column picker integrations
|
|
310
|
+
* through `SkyDataColumnSource`.
|
|
311
|
+
* @internal
|
|
312
|
+
*/
|
|
313
|
+
readonly viewkeeperClasses: Signal<string[]>;
|
|
267
314
|
protected readonly gridApi: _angular_core.WritableSignal<GridApi<SkyDataGridRowData> | undefined>;
|
|
268
315
|
protected readonly gridOptions: Signal<GridOptions<SkyDataGridRowData> | undefined>;
|
|
269
316
|
protected readonly gridReady: _angular_core.WritableSignal<boolean>;
|
|
@@ -272,9 +319,51 @@ declare class SkyDataGrid {
|
|
|
272
319
|
protected readonly pageItemsCount: _angular_core.WritableSignal<number>;
|
|
273
320
|
protected readonly skyViewkeeper: Signal<string[]>;
|
|
274
321
|
constructor();
|
|
322
|
+
/**
|
|
323
|
+
* Stops the grid from removing the IDs of rows that are not in `data` from
|
|
324
|
+
* `selectedRowIds`. Called by data manager integrations through
|
|
325
|
+
* `SkyDataSelectionSource` when they keep rows that a search or filter hides
|
|
326
|
+
* selected.
|
|
327
|
+
* @internal
|
|
328
|
+
*/
|
|
329
|
+
disableSelectionPruning(): void;
|
|
330
|
+
/**
|
|
331
|
+
* Stops the grid from keeping the `viewkeeperClasses` elements visible
|
|
332
|
+
* itself. Called by column picker integrations through `SkyDataColumnSource`
|
|
333
|
+
* when a container keeps them visible instead.
|
|
334
|
+
* @internal
|
|
335
|
+
*/
|
|
336
|
+
disableViewkeeper(): void;
|
|
337
|
+
/**
|
|
338
|
+
* Sets the columns that display and their order. Called by column picker
|
|
339
|
+
* integrations through `SkyDataColumnSource`.
|
|
340
|
+
* @internal
|
|
341
|
+
*/
|
|
342
|
+
setDisplayedColumnIds(columnIds: readonly string[]): void;
|
|
343
|
+
/**
|
|
344
|
+
* Sets the widths in pixels of columns, keyed by column ID, and starts
|
|
345
|
+
* tracking the widths users give columns. Columns that are not included
|
|
346
|
+
* return to the widths they are declared with or, when declared without
|
|
347
|
+
* one, the widths the grid gave them. Called by data manager
|
|
348
|
+
* integrations through `SkyDataColumnSource`.
|
|
349
|
+
* @internal
|
|
350
|
+
*/
|
|
351
|
+
setColumnWidths(columnWidths: Readonly<Record<string, number>>): void;
|
|
352
|
+
/**
|
|
353
|
+
* Sets the selected rows. Called by data manager integrations through
|
|
354
|
+
* `SkyDataSelectionSource`.
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
setSelectedRowIds(selectedRowIds: readonly string[]): void;
|
|
358
|
+
/**
|
|
359
|
+
* Sets the sort the grid applies. Called by data manager integrations
|
|
360
|
+
* through `SkyDataSortSource`.
|
|
361
|
+
* @internal
|
|
362
|
+
*/
|
|
363
|
+
setSort(sort: SkyDataGridSort | undefined): void;
|
|
275
364
|
protected currentPageChange(page: number): void;
|
|
276
365
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkyDataGrid, never>;
|
|
277
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkyDataGrid, "sky-data-grid", never, { "autoSort": { "alias": "autoSort"; "required": false; "isSignal": true; }; "autoPage": { "alias": "autoPage"; "required": false; "isSignal": true; }; "columnFit": { "alias": "columnFit"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageQueryParam": { "alias": "pageQueryParam"; "required": false; "isSignal": true; }; "rowCount": { "alias": "rowCount"; "required": false; "isSignal": true; }; "stacked": { "alias": "stacked"; "required": false; "isSignal": true; }; "topScrollEnabled": { "alias": "topScrollEnabled"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "selectedRowIds": { "alias": "selectedRowIds"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; "selectedRowIds": "selectedRowIdsChange"; "sort": "sortChange"; }, ["columns"], never, true, never>;
|
|
366
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkyDataGrid, "sky-data-grid", never, { "autoSort": { "alias": "autoSort"; "required": false; "isSignal": true; }; "autoPage": { "alias": "autoPage"; "required": false; "isSignal": true; }; "columnFit": { "alias": "columnFit"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "multiselect": { "alias": "multiselect"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "pageQueryParam": { "alias": "pageQueryParam"; "required": false; "isSignal": true; }; "rowCount": { "alias": "rowCount"; "required": false; "isSignal": true; }; "stacked": { "alias": "stacked"; "required": false; "isSignal": true; }; "topScrollEnabled": { "alias": "topScrollEnabled"; "required": false; "isSignal": true; }; "page": { "alias": "page"; "required": false; "isSignal": true; }; "selectedRowIds": { "alias": "selectedRowIds"; "required": false; "isSignal": true; }; "selectedColumnIds": { "alias": "selectedColumnIds"; "required": false; "isSignal": true; }; "sort": { "alias": "sort"; "required": false; "isSignal": true; }; }, { "page": "pageChange"; "selectedRowIds": "selectedRowIdsChange"; "selectedColumnIds": "selectedColumnIdsChange"; "sort": "sortChange"; }, ["columns"], never, true, never>;
|
|
278
367
|
}
|
|
279
368
|
|
|
280
369
|
export { SkyDataGrid, SkyDataGridColumn };
|