@reforgium/data-grid 3.2.3 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +97 -4
- package/README.md +198 -168
- package/fesm2022/{reforgium-data-grid-grid-overlay-scroll.feature-DQp-sU6c.mjs → reforgium-data-grid-grid-overlay-scroll.feature-XfJnWjT5.mjs} +41 -6
- package/fesm2022/reforgium-data-grid-paginator.mjs +69 -32
- package/fesm2022/{reforgium-data-grid-reforgium-data-grid-DUpCJ9P0.mjs → reforgium-data-grid-reforgium-data-grid-YzRaXPVK.mjs} +500 -92
- package/fesm2022/reforgium-data-grid-ui.mjs +72 -72
- package/fesm2022/reforgium-data-grid.mjs +1 -1
- package/package.json +2 -3
- package/types/reforgium-data-grid-paginator.d.ts +3 -1
- package/types/reforgium-data-grid.d.ts +152 -25
|
@@ -87,6 +87,18 @@ declare class DataGridHeaderTemplateDirective {
|
|
|
87
87
|
* Used for identifying data properties in rows.
|
|
88
88
|
*/
|
|
89
89
|
type DataKey<Data> = (keyof Data & string) | string;
|
|
90
|
+
/**
|
|
91
|
+
* Explicit backend-only field name for a sort that is not a property of the displayed row.
|
|
92
|
+
*
|
|
93
|
+
* This branded string is assignable to legacy `DataKey<T>` contracts, allowing gradual migration
|
|
94
|
+
* before a future major release narrows `DataKey<T>` to real row properties.
|
|
95
|
+
*/
|
|
96
|
+
declare const gridBackendSortFieldBrand: unique symbol;
|
|
97
|
+
type GridBackendSortField = string & {
|
|
98
|
+
readonly [gridBackendSortFieldBrand]: 'GridBackendSortField';
|
|
99
|
+
};
|
|
100
|
+
/** Marks a backend-only sort field explicitly at the call site. */
|
|
101
|
+
declare const gridBackendSortField: (field: string) => GridBackendSortField;
|
|
90
102
|
/**
|
|
91
103
|
* Function type that resolves a value of type `Return` from an argument of type `Arg`.
|
|
92
104
|
* Often used to transform row data or extract specific properties.
|
|
@@ -183,15 +195,15 @@ type _DefaultGridColumn<Data extends AnyDict = AnyDict> = BaseGridColumn<Data> &
|
|
|
183
195
|
* Column definition using a custom value renderer function.
|
|
184
196
|
*
|
|
185
197
|
* Allows custom logic for transforming row data into display values.
|
|
186
|
-
*
|
|
198
|
+
* Row identity is controlled by the grid-level `rowKey`, not this column.
|
|
187
199
|
*
|
|
188
200
|
* @template Data - Type of data objects displayed in the grid rows
|
|
189
201
|
*/
|
|
190
202
|
type _ValuedGridColumn<Data extends AnyDict = AnyDict> = BaseGridColumn<Data> & {
|
|
191
203
|
/**
|
|
192
|
-
*
|
|
204
|
+
* @deprecated Not consumed by the renderer. Use grid-level `rowKey` for row identity.
|
|
193
205
|
*/
|
|
194
|
-
track
|
|
206
|
+
track?: (row: Data) => string;
|
|
195
207
|
/**
|
|
196
208
|
* Function that resolves cell display value from row data.
|
|
197
209
|
*/
|
|
@@ -202,15 +214,15 @@ type _ValuedGridColumn<Data extends AnyDict = AnyDict> = BaseGridColumn<Data> &
|
|
|
202
214
|
*
|
|
203
215
|
* Provides maximum flexibility by allowing custom HTML templates
|
|
204
216
|
* with full access to row data, column config, and cell context.
|
|
205
|
-
*
|
|
217
|
+
* Row identity is controlled by the grid-level `rowKey`, not this column.
|
|
206
218
|
*
|
|
207
219
|
* @template Data - Type of data objects displayed in the grid rows
|
|
208
220
|
*/
|
|
209
221
|
type _TemplatedGridColumn<Data extends AnyDict = AnyDict> = BaseGridColumn<Data> & {
|
|
210
222
|
/**
|
|
211
|
-
*
|
|
223
|
+
* @deprecated Not consumed by the renderer. Use grid-level `rowKey` for row identity.
|
|
212
224
|
*/
|
|
213
|
-
track
|
|
225
|
+
track?: (row: Data) => string;
|
|
214
226
|
/**
|
|
215
227
|
* Angular TemplateRef for rendering cell content.
|
|
216
228
|
*/
|
|
@@ -393,6 +405,7 @@ type DeclarativeColumnDef<Data extends AnyDict = AnyDict> = {
|
|
|
393
405
|
defaultValue?: AnyType;
|
|
394
406
|
value?: GridCellRenderer<Data>;
|
|
395
407
|
transformer?: GridCellTransformer<Data>;
|
|
408
|
+
/** @deprecated Not consumed by the renderer. Use grid-level rowKey for row identity. */
|
|
396
409
|
track?: (row: Data) => string;
|
|
397
410
|
tooltip?: GridColumnTooltip<Data>;
|
|
398
411
|
};
|
|
@@ -449,6 +462,7 @@ declare class DataGridDeclarativeColumn<Data extends AnyDict = AnyDict> {
|
|
|
449
462
|
defaultValue: _angular_core.InputSignal<any>;
|
|
450
463
|
value: _angular_core.InputSignal<GridCellRenderer<Data> | undefined>;
|
|
451
464
|
transformer: _angular_core.InputSignal<GridCellTransformer<Data> | undefined>;
|
|
465
|
+
/** @deprecated Not consumed by the renderer. Use the grid-level rowKey input. */
|
|
452
466
|
track: _angular_core.InputSignal<((row: Data) => string) | undefined>;
|
|
453
467
|
tooltip: _angular_core.InputSignal<GridColumnTooltip<Data> | undefined>;
|
|
454
468
|
private headerTplRef;
|
|
@@ -597,6 +611,19 @@ type GridSortItem<Data = AnyDict> = {
|
|
|
597
611
|
type GridMultiSortEvent<Data = AnyDict> = {
|
|
598
612
|
sort: ReadonlyArray<GridSortItem<Data>>;
|
|
599
613
|
};
|
|
614
|
+
/** Source operation that failed outside a source-owned error signal. */
|
|
615
|
+
type GridSourceRequestOperation = 'page' | 'page-size' | 'sort' | 'multi-sort' | 'prefetch';
|
|
616
|
+
/**
|
|
617
|
+
* Error emitted by the grid when a source request fails and the source does not expose error state.
|
|
618
|
+
*/
|
|
619
|
+
type GridSourceRequestErrorEvent<Data extends AnyDict = AnyDict> = {
|
|
620
|
+
operation: GridSourceRequestOperation;
|
|
621
|
+
error: unknown;
|
|
622
|
+
page?: number;
|
|
623
|
+
pageSize?: number;
|
|
624
|
+
sort?: GridSortItem<Data> | null;
|
|
625
|
+
sorts?: ReadonlyArray<GridSortItem<Data>>;
|
|
626
|
+
};
|
|
600
627
|
/**
|
|
601
628
|
* Event emitted when row selection changes in the data grid.
|
|
602
629
|
*
|
|
@@ -606,7 +633,7 @@ type GridMultiSortEvent<Data = AnyDict> = {
|
|
|
606
633
|
* @template Data - Type of data objects in the grid
|
|
607
634
|
*/
|
|
608
635
|
type GridSelectEvent<Data extends AnyDict = AnyDict> = {
|
|
609
|
-
selected:
|
|
636
|
+
selected: GridSelectionValue<Data>[];
|
|
610
637
|
};
|
|
611
638
|
/**
|
|
612
639
|
* Event emitted when a row is clicked in the data grid.
|
|
@@ -745,6 +772,21 @@ type GridPinnedRows<Data extends AnyDict = AnyDict> = GridPinnedRow<Data>[];
|
|
|
745
772
|
*
|
|
746
773
|
* @template Data - Type of data objects displayed in the grid rows
|
|
747
774
|
*/
|
|
775
|
+
type GridPageResult<Data extends AnyDict = AnyDict> = {
|
|
776
|
+
/** Page identity returned by the loader. */
|
|
777
|
+
page: number;
|
|
778
|
+
/** Items belonging to the returned page only. */
|
|
779
|
+
items: ReadonlyArray<Data>;
|
|
780
|
+
/** Effective page size used for the request. */
|
|
781
|
+
pageSize?: number;
|
|
782
|
+
/** Total dataset size when known. */
|
|
783
|
+
totalElements?: number;
|
|
784
|
+
};
|
|
785
|
+
/** Optional request context passed to a stateless page loader. */
|
|
786
|
+
type GridPageRequestOptions = {
|
|
787
|
+
/** Aborted when the grid invalidates or supersedes the request. */
|
|
788
|
+
signal?: AbortSignal;
|
|
789
|
+
};
|
|
748
790
|
interface GridPagedDataSource<Data extends AnyDict = AnyDict> {
|
|
749
791
|
/** Current page payload. */
|
|
750
792
|
items: Signal<Data[]>;
|
|
@@ -777,16 +819,30 @@ interface GridPagedDataSource<Data extends AnyDict = AnyDict> {
|
|
|
777
819
|
* `version` will leave the grid with a stale row count.
|
|
778
820
|
*/
|
|
779
821
|
version?: Signal<number>;
|
|
822
|
+
/**
|
|
823
|
+
* Declares that this source's dataset never changes while the source instance is assigned.
|
|
824
|
+
* Immutable sources may omit `version`; replace the source instance for a new dataset.
|
|
825
|
+
*/
|
|
826
|
+
immutable?: boolean;
|
|
780
827
|
/** Current source-side sort state. */
|
|
781
828
|
sort?: ReadonlyArray<GridSortItem<Data>>;
|
|
782
829
|
/**
|
|
783
830
|
* Optional prefetch strategy for infinity mode page buffering.
|
|
784
831
|
* - `sequential` (default) is safest for latest-wins sources such as `PagedQueryStore`
|
|
785
|
-
* - `parallel` warms nearby pages faster when the source
|
|
832
|
+
* - `parallel` warms nearby pages faster when the source exposes explicit page results through `loadPage(...)`
|
|
786
833
|
*/
|
|
787
834
|
prefetchMode?: 'sequential' | 'parallel';
|
|
788
|
-
/**
|
|
789
|
-
|
|
835
|
+
/**
|
|
836
|
+
* Load a page without mutating shared source state.
|
|
837
|
+
*
|
|
838
|
+
* The returned page identity and items allow the grid to safely buffer parallel responses.
|
|
839
|
+
*/
|
|
840
|
+
loadPage?: (page: number, options?: GridPageRequestOptions) => Promise<GridPageResult<Data>>;
|
|
841
|
+
/**
|
|
842
|
+
* Load a specific page by mutating the source state.
|
|
843
|
+
* @deprecated Prefer `loadPage` for stateless page loading; retained as a compatibility fallback.
|
|
844
|
+
*/
|
|
845
|
+
updatePage?: (page: number) => Promise<unknown>;
|
|
790
846
|
/** Update page size and load the first page. */
|
|
791
847
|
updatePageSize?: (size: number) => Promise<unknown>;
|
|
792
848
|
/** Update single-column sort and refresh the source. */
|
|
@@ -803,6 +859,28 @@ interface GridPagedDataSource<Data extends AnyDict = AnyDict> {
|
|
|
803
859
|
* @template Data - Type of data objects displayed in the grid rows
|
|
804
860
|
*/
|
|
805
861
|
type GridSelection<Data extends AnyDict = AnyDict> = _Selectless | _Selectfull<Data>;
|
|
862
|
+
/** A non-null row field value that can participate in selection state. */
|
|
863
|
+
type GridSelectionValue<Data extends AnyDict = AnyDict> = string | Exclude<Data[keyof Data], null | undefined>;
|
|
864
|
+
/**
|
|
865
|
+
* Determines whether a data refresh may discard keys that are not currently loaded.
|
|
866
|
+
*
|
|
867
|
+
* `preserve-unloaded` is the default and keeps selections across source pages.
|
|
868
|
+
* `loaded-only` is available for datasets where a loaded page is the complete selection scope.
|
|
869
|
+
*/
|
|
870
|
+
type GridSelectionPolicy = 'loaded-only' | 'preserve-unloaded';
|
|
871
|
+
/**
|
|
872
|
+
* Key-correlated selection configuration for consumers that want strict selection value checking
|
|
873
|
+
* without narrowing the legacy `GridSelection<T>` compatibility type.
|
|
874
|
+
*/
|
|
875
|
+
type GridSelectionByKey<Data extends AnyDict, Key extends keyof Data & string> = {
|
|
876
|
+
mode: 'none';
|
|
877
|
+
} | {
|
|
878
|
+
mode: 'single' | 'multi';
|
|
879
|
+
key: Key;
|
|
880
|
+
defaultSelectedKeys?: ReadonlyArray<Exclude<Data[Key], null | undefined>>;
|
|
881
|
+
/** @deprecated Use `defaultSelectedKeys`. */
|
|
882
|
+
defaultSelected?: ReadonlyArray<Exclude<Data[Key], null | undefined>>;
|
|
883
|
+
};
|
|
806
884
|
/**
|
|
807
885
|
* Selection configuration when row selection is disabled.
|
|
808
886
|
*
|
|
@@ -829,9 +907,13 @@ type _Selectfull<Data extends AnyDict> = {
|
|
|
829
907
|
*/
|
|
830
908
|
key: DataKey<Data>;
|
|
831
909
|
/**
|
|
832
|
-
* Optional array of initially selected row
|
|
910
|
+
* Optional array of initially selected row values.
|
|
911
|
+
*
|
|
912
|
+
* @deprecated Use `defaultSelectedKeys`; this legacy property historically accepted values despite its incorrect type.
|
|
833
913
|
*/
|
|
834
|
-
defaultSelected?:
|
|
914
|
+
defaultSelected?: GridSelectionValue<Data>[];
|
|
915
|
+
/** Optional array of initially selected row values for uncontrolled selection. */
|
|
916
|
+
defaultSelectedKeys?: ReadonlyArray<GridSelectionValue<Data>>;
|
|
835
917
|
};
|
|
836
918
|
/**
|
|
837
919
|
* Configuration for a single pinned row in the data grid.
|
|
@@ -850,6 +932,10 @@ type GridPinnedRow<Data extends AnyDict = AnyDict> = {
|
|
|
850
932
|
* Relative display order when multiple rows are pinned at the same position.
|
|
851
933
|
*/
|
|
852
934
|
order?: number;
|
|
935
|
+
/**
|
|
936
|
+
* Stable identity inside its top or bottom region. Falls back to the regional index when omitted.
|
|
937
|
+
*/
|
|
938
|
+
id?: string | number;
|
|
853
939
|
/**
|
|
854
940
|
* Static data or function returning data for the row.
|
|
855
941
|
*/
|
|
@@ -1223,7 +1309,7 @@ declare class Selector<Data extends AnyDict> {
|
|
|
1223
1309
|
* defined in the selection configuration.
|
|
1224
1310
|
* Defaults to an empty array.
|
|
1225
1311
|
*/
|
|
1226
|
-
selectedKeys: _angular_core.WritableSignal<
|
|
1312
|
+
selectedKeys: _angular_core.WritableSignal<GridSelectionValue<Data>[]>;
|
|
1227
1313
|
private selectedKeySet;
|
|
1228
1314
|
/**
|
|
1229
1315
|
* Computed signal indicating the overall selection state of all rows.
|
|
@@ -1258,7 +1344,7 @@ declare class Selector<Data extends AnyDict> {
|
|
|
1258
1344
|
* @returns The updated array of selected keys.
|
|
1259
1345
|
* @throws {Error} If selection mode is not `'multi'`.
|
|
1260
1346
|
*/
|
|
1261
|
-
selectAll():
|
|
1347
|
+
selectAll(): GridSelectionValue<Data>[];
|
|
1262
1348
|
/**
|
|
1263
1349
|
* Selects or deselects a specific row.
|
|
1264
1350
|
*
|
|
@@ -1271,7 +1357,7 @@ declare class Selector<Data extends AnyDict> {
|
|
|
1271
1357
|
* @returns The updated array of selected keys after the operation.
|
|
1272
1358
|
* @throws {Error} If selection mode is `'none'`.
|
|
1273
1359
|
*/
|
|
1274
|
-
select(row: Data): (
|
|
1360
|
+
select(row: Data): (GridSelectionValue<Data> | (Data[DataKey<Data>] & {}))[];
|
|
1275
1361
|
}
|
|
1276
1362
|
|
|
1277
1363
|
type TooltipState = {
|
|
@@ -1333,7 +1419,8 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1333
1419
|
/**
|
|
1334
1420
|
* Pagination mode: 'none', 'pagination', or 'infinity'.
|
|
1335
1421
|
*
|
|
1336
|
-
* -
|
|
1422
|
+
* -
|
|
1423
|
+
one` - No pagination, all data is rendered
|
|
1337
1424
|
* - `pagination` - Classic page-based pagination with fixed page size
|
|
1338
1425
|
* - `infinity` - Infinite scroll mode, loads more data as user scrolls
|
|
1339
1426
|
*/
|
|
@@ -1382,6 +1469,10 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1382
1469
|
* When selection is enabled, a `key` must be provided to identify rows.
|
|
1383
1470
|
*/
|
|
1384
1471
|
selection: _angular_core.InputSignal<GridSelection>;
|
|
1472
|
+
/** Controlled selection values. When set, the consumer owns selection state. */
|
|
1473
|
+
selectedKeys: _angular_core.InputSignal<readonly GridSelectionValue<Data>[] | undefined>;
|
|
1474
|
+
/** Selection reconciliation policy. Defaults to preserving keys across source pages. */
|
|
1475
|
+
selectionPolicy: _angular_core.InputSignal<GridSelectionPolicy>;
|
|
1385
1476
|
/**
|
|
1386
1477
|
* Number of items per page.
|
|
1387
1478
|
*
|
|
@@ -1399,7 +1490,8 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1399
1490
|
/**
|
|
1400
1491
|
* Grid height configuration.
|
|
1401
1492
|
*
|
|
1402
|
-
* -
|
|
1493
|
+
* -
|
|
1494
|
+
umber` - Fixed height in pixels
|
|
1403
1495
|
* - `'full'` - Fill container height (100%), can be managed by host component style
|
|
1404
1496
|
* - `'default'` - Height by CSS var (--re-data-grid-height)
|
|
1405
1497
|
*/
|
|
@@ -1481,6 +1573,8 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1481
1573
|
* ```
|
|
1482
1574
|
*/
|
|
1483
1575
|
pageChange: _angular_core.OutputEmitterRef<GridPageChangeEvent>;
|
|
1576
|
+
/** Emitted for a failed source request when the source has no error signal. */
|
|
1577
|
+
sourceError: _angular_core.OutputEmitterRef<GridSourceRequestErrorEvent<Data>>;
|
|
1484
1578
|
/**
|
|
1485
1579
|
* Event emitted when sort order changes.
|
|
1486
1580
|
*
|
|
@@ -1503,6 +1597,8 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1503
1597
|
* Contains an array of currently selected row keys.
|
|
1504
1598
|
*/
|
|
1505
1599
|
selectChange: _angular_core.OutputEmitterRef<GridSelectEvent<Data>>;
|
|
1600
|
+
/** Emits proposed controlled selection values after user interaction. */
|
|
1601
|
+
selectedKeysChange: _angular_core.OutputEmitterRef<readonly GridSelectionValue<Data>[]>;
|
|
1506
1602
|
/**
|
|
1507
1603
|
* Event emitted when a row is clicked.
|
|
1508
1604
|
*
|
|
@@ -1592,6 +1688,10 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1592
1688
|
protected stickyRowTpl: Signal<DataGridStickyRowDirective<any> | undefined>;
|
|
1593
1689
|
protected rowTpl: Signal<DataGridRowDirective<any> | undefined>;
|
|
1594
1690
|
protected renderSlots: _angular_core.WritableSignal<number[]>;
|
|
1691
|
+
protected renderSlotEntries: Signal<{
|
|
1692
|
+
slot: number;
|
|
1693
|
+
key: string | number;
|
|
1694
|
+
}[]>;
|
|
1595
1695
|
protected renderCount: number;
|
|
1596
1696
|
private lastStartIndex;
|
|
1597
1697
|
private lastEndIndex;
|
|
@@ -1600,8 +1700,10 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1600
1700
|
private tooltipEl;
|
|
1601
1701
|
protected tooltipState: _angular_core.WritableSignal<TooltipState>;
|
|
1602
1702
|
protected activeTooltipCellId: _angular_core.WritableSignal<string | null>;
|
|
1703
|
+
private readonly ariaInstanceId;
|
|
1603
1704
|
protected readonly tooltipId: string;
|
|
1604
1705
|
protected readonly expanderRegionId: string;
|
|
1706
|
+
private readonly warnedPinnedIds;
|
|
1605
1707
|
protected stickyRowIndex: _angular_core.WritableSignal<number | null>;
|
|
1606
1708
|
protected stickyRowTopPx: _angular_core.WritableSignal<number>;
|
|
1607
1709
|
protected stickyRowData: Signal<Data | null>;
|
|
@@ -1611,6 +1713,7 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1611
1713
|
protected expanderMap: _angular_core.WritableSignal<Map<DataKey<Data>, boolean>>;
|
|
1612
1714
|
protected declarativeColumns: Signal<DeclarativeColumnsResult<Data>>;
|
|
1613
1715
|
protected sourceColumns: Signal<GridColumn<Data>[]>;
|
|
1716
|
+
private resolvedHeaderTemplates;
|
|
1614
1717
|
private slotsFeature;
|
|
1615
1718
|
protected extendedColumns: Signal<GridColumn<Data>[]>;
|
|
1616
1719
|
/**
|
|
@@ -1618,7 +1721,9 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1618
1721
|
*/
|
|
1619
1722
|
styleHeight: Signal<string>;
|
|
1620
1723
|
protected resolvedLoading: Signal<boolean>;
|
|
1724
|
+
protected resolvedBlockingLoading: Signal<boolean>;
|
|
1621
1725
|
protected totalRowCount: Signal<number>;
|
|
1726
|
+
protected renderRowCount: Signal<number>;
|
|
1622
1727
|
protected selectionRows: Signal<Data[]>;
|
|
1623
1728
|
protected ariaColCount: Signal<number>;
|
|
1624
1729
|
protected ariaHeaderRowCount: Signal<number>;
|
|
@@ -1638,6 +1743,14 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1638
1743
|
selectAllLoaded(): void;
|
|
1639
1744
|
/** Resets sorting state and emits sort events. */
|
|
1640
1745
|
resetSort(): void;
|
|
1746
|
+
/** Clears the grid-owned source page buffer and invalidates in-flight page results. */
|
|
1747
|
+
resetSourceBuffer(): void;
|
|
1748
|
+
/** Requests a page through the source contract or legacy pageChange output. */
|
|
1749
|
+
requestPage(page: number): void;
|
|
1750
|
+
/** Changes the page size and restarts from page zero through the shared request path. */
|
|
1751
|
+
requestPageSize(pageSize: number): void;
|
|
1752
|
+
/** Retries the current source page, or an explicitly supplied page. */
|
|
1753
|
+
retryPage(page?: number): void;
|
|
1641
1754
|
/** Sets a single-column sorting state and emits sort events. */
|
|
1642
1755
|
setSort(sort: GridSortEvent<Data>): void;
|
|
1643
1756
|
/** Sets multi-column sorting state and emits sort events. */
|
|
@@ -1654,6 +1767,7 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1654
1767
|
*/
|
|
1655
1768
|
protected onSort(col: GridColumn<Data>): void;
|
|
1656
1769
|
protected onColumnResizeStart(event: MouseEvent, col: GridColumn<Data>): void;
|
|
1770
|
+
protected onColumnResizeKeydown(event: Event, col: GridColumn<Data>): void;
|
|
1657
1771
|
/**
|
|
1658
1772
|
* Handles cell click events.
|
|
1659
1773
|
*
|
|
@@ -1673,6 +1787,8 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1673
1787
|
protected onCellContext(row: Data, col: GridColumn<Data>, index: number, event: MouseEvent): void;
|
|
1674
1788
|
protected onCellDoubleClick(row: Data, col: GridColumn<Data>, index: number, event: MouseEvent): void;
|
|
1675
1789
|
protected onRowClick(row: Data, index: number, event: Event): void;
|
|
1790
|
+
protected onRowKeydown(index: number, event: Event): void;
|
|
1791
|
+
private focusVirtualRow;
|
|
1676
1792
|
protected onRowContext(row: Data, index: number, event: MouseEvent): void;
|
|
1677
1793
|
protected onRowDoubleClick(row: Data, index: number, event: MouseEvent): void;
|
|
1678
1794
|
protected isExpandable(column: GridColumn<Data>): boolean;
|
|
@@ -1704,12 +1820,12 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1704
1820
|
* to track thumb position and update scroll position accordingly.
|
|
1705
1821
|
* Automatically cleans up listeners when dragging ends.
|
|
1706
1822
|
*
|
|
1707
|
-
* @param e -
|
|
1823
|
+
* @param e - Pointer down event from a scrollbar thumb element
|
|
1708
1824
|
*/
|
|
1709
|
-
protected onThumbDown(e:
|
|
1825
|
+
protected onThumbDown(e: PointerEvent): void;
|
|
1710
1826
|
protected showScrollbar(): void;
|
|
1711
1827
|
protected hideScrollbarSoon(delay?: number): void;
|
|
1712
|
-
protected trackPinnedRow: (row: GridPinnedRow) =>
|
|
1828
|
+
protected trackPinnedRow: (row: GridPinnedRow, region: "top" | "bottom", index: number) => string | number;
|
|
1713
1829
|
protected isDisabledRow(row: Data, index: number): boolean;
|
|
1714
1830
|
protected cellClass(col: GridColumn<Data>, row: Data): string | undefined;
|
|
1715
1831
|
protected resolveRowClass(row: Data, index: number): string | undefined;
|
|
@@ -1719,9 +1835,14 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1719
1835
|
protected showTooltip(event: MouseEvent, row: Data, col: GridColumn<Data>, index: number): void;
|
|
1720
1836
|
protected hideTooltip(): void;
|
|
1721
1837
|
protected onTooltipEnter(event: MouseEvent, row: Data, col: GridColumn<Data>, index: number, cellId: string): void;
|
|
1838
|
+
protected onTooltipFocus(event: FocusEvent, row: Data, col: GridColumn<Data>, index: number, cellId: string): void;
|
|
1722
1839
|
protected isStickyRowIndex(index: number): boolean;
|
|
1723
1840
|
protected resolveRowTemplate(row: Data, index: number): TemplateRef<AnyType> | null;
|
|
1724
|
-
protected rowAt(index: number): Data | null;
|
|
1841
|
+
protected rowAt(index: number): Data | null; /**
|
|
1842
|
+
* Keys virtual row views by record identity rather than by recyclable slot.
|
|
1843
|
+
* Without a rowKey, the absolute index still prevents a replaced row from inheriting slot state.
|
|
1844
|
+
*/
|
|
1845
|
+
protected trackVirtualRow(slot: number, startIndex: number, row?: Data | null): string | number;
|
|
1725
1846
|
protected shouldRenderLoadingRow(index: number, topGap: {
|
|
1726
1847
|
start: number;
|
|
1727
1848
|
count: number;
|
|
@@ -1744,8 +1865,12 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1744
1865
|
protected ariaSortLabel(col: GridColumn<Data>): string;
|
|
1745
1866
|
protected ariaExpandLabel(col: GridColumn<Data>): string;
|
|
1746
1867
|
protected ariaResizeLabel(col: GridColumn<Data>): string;
|
|
1868
|
+
protected ariaResizeMin(col: GridColumn<Data>): number;
|
|
1869
|
+
protected ariaResizeMax(col: GridColumn<Data>): number | null;
|
|
1870
|
+
protected ariaResizeValue(col: GridColumn<Data>): number;
|
|
1747
1871
|
protected ariaHeaderGroupColIndex(group: NormalizedHeader): number | null;
|
|
1748
1872
|
protected cellAriaId(colKey: string, rowIndex: number, isPinned: boolean): string;
|
|
1873
|
+
protected pinnedCellAriaId(colKey: string, row: GridPinnedRow, region: 'top' | 'bottom', index: number): string;
|
|
1749
1874
|
protected isTooltipTarget(cellId: string): boolean;
|
|
1750
1875
|
protected resolveHeaderGroupTitle(group: GridHeaderGroup<Data>): string;
|
|
1751
1876
|
protected resolveHeaderGroupTitle(group: {
|
|
@@ -1753,7 +1878,9 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1753
1878
|
}): string;
|
|
1754
1879
|
private readResolvedHeaderText;
|
|
1755
1880
|
private activePageSize;
|
|
1756
|
-
private
|
|
1881
|
+
private warnDuplicatePinnedIds;
|
|
1882
|
+
private emitSelectionChange;
|
|
1883
|
+
private handlePageRequest;
|
|
1757
1884
|
private initVm;
|
|
1758
1885
|
private initSelector;
|
|
1759
1886
|
private initRefs;
|
|
@@ -1777,9 +1904,9 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1777
1904
|
private updateStickyRow;
|
|
1778
1905
|
private updateStickyFromScroll;
|
|
1779
1906
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGrid<any>, never>;
|
|
1780
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataGrid<any>, "re-data-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "source": { "alias": "source"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "pinnedRows": { "alias": "pinnedRows"; "required": false; "isSignal": true; }; "isRowSticky": { "alias": "isRowSticky"; "required": false; "isSignal": true; }; "isRowDisabled": { "alias": "isRowDisabled"; "required": false; "isSignal": true; }; "getRowClass": { "alias": "getRowClass"; "required": false; "isSignal": true; }; "getRowTemplate": { "alias": "getRowTemplate"; "required": false; "isSignal": true; }; "hasIndexColumn": { "alias": "hasIndexColumn"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "virtualBuffer": { "alias": "virtualBuffer"; "required": false; "isSignal": true; }; "lockVerticalScroll": { "alias": "lockVerticalScroll"; "required": false; "isSignal": true; }; "headerGroups": { "alias": "headerGroups"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingMode": { "alias": "loadingMode"; "required": false; "isSignal": true; }; "deferContent": { "alias": "deferContent"; "required": false; "isSignal": true; }; "deferHeader": { "alias": "deferHeader"; "required": false; "isSignal": true; }; "deferPinned": { "alias": "deferPinned"; "required": false; "isSignal": true; }; "deferCells": { "alias": "deferCells"; "required": false; "isSignal": true; }; "deferIcons": { "alias": "deferIcons"; "required": false; "isSignal": true; }; "deferTooltip": { "alias": "deferTooltip"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "pageStartFromZero": { "alias": "pageStartFromZero"; "required": false; "isSignal": true; }; "sortMode": { "alias": "sortMode"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; "sortChange": "sortChange"; "multiSortChange": "multiSortChange"; "selectChange": "selectChange"; "rowClick": "rowClick"; "rowContext": "rowContext"; "rowDoubleClick": "rowDoubleClick"; "cellClick": "cellClick"; "cellContext": "cellContext"; "cellDoubleClick": "cellDoubleClick"; "columnResizeEnd": "columnResizeEnd"; }, ["cellTypedSlotRefs", "cellDataSlotRefs", "declarativeColumnRefs", "headerSlotRefs", "emptySlotRefs", "loadingSlotRefs", "sortIcSlotRefs", "expanderIcSlotRefs", "stickyRowSlotRefs", "rowSlotRefs"], never, true, never>;
|
|
1907
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataGrid<any>, "re-data-grid", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "source": { "alias": "source"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "pinnedRows": { "alias": "pinnedRows"; "required": false; "isSignal": true; }; "isRowSticky": { "alias": "isRowSticky"; "required": false; "isSignal": true; }; "isRowDisabled": { "alias": "isRowDisabled"; "required": false; "isSignal": true; }; "getRowClass": { "alias": "getRowClass"; "required": false; "isSignal": true; }; "getRowTemplate": { "alias": "getRowTemplate"; "required": false; "isSignal": true; }; "hasIndexColumn": { "alias": "hasIndexColumn"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "selectedKeys": { "alias": "selectedKeys"; "required": false; "isSignal": true; }; "selectionPolicy": { "alias": "selectionPolicy"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "rowHeight": { "alias": "rowHeight"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "virtualBuffer": { "alias": "virtualBuffer"; "required": false; "isSignal": true; }; "lockVerticalScroll": { "alias": "lockVerticalScroll"; "required": false; "isSignal": true; }; "headerGroups": { "alias": "headerGroups"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingMode": { "alias": "loadingMode"; "required": false; "isSignal": true; }; "deferContent": { "alias": "deferContent"; "required": false; "isSignal": true; }; "deferHeader": { "alias": "deferHeader"; "required": false; "isSignal": true; }; "deferPinned": { "alias": "deferPinned"; "required": false; "isSignal": true; }; "deferCells": { "alias": "deferCells"; "required": false; "isSignal": true; }; "deferIcons": { "alias": "deferIcons"; "required": false; "isSignal": true; }; "deferTooltip": { "alias": "deferTooltip"; "required": false; "isSignal": true; }; "rowKey": { "alias": "rowKey"; "required": false; "isSignal": true; }; "pageStartFromZero": { "alias": "pageStartFromZero"; "required": false; "isSignal": true; }; "sortMode": { "alias": "sortMode"; "required": false; "isSignal": true; }; }, { "pageChange": "pageChange"; "sourceError": "sourceError"; "sortChange": "sortChange"; "multiSortChange": "multiSortChange"; "selectChange": "selectChange"; "selectedKeysChange": "selectedKeysChange"; "rowClick": "rowClick"; "rowContext": "rowContext"; "rowDoubleClick": "rowDoubleClick"; "cellClick": "cellClick"; "cellContext": "cellContext"; "cellDoubleClick": "cellDoubleClick"; "columnResizeEnd": "columnResizeEnd"; }, ["cellTypedSlotRefs", "cellDataSlotRefs", "declarativeColumnRefs", "headerSlotRefs", "emptySlotRefs", "loadingSlotRefs", "sortIcSlotRefs", "expanderIcSlotRefs", "stickyRowSlotRefs", "rowSlotRefs"], never, true, never>;
|
|
1781
1908
|
}
|
|
1782
1909
|
|
|
1783
|
-
export { DATA_GRID_CONFIG, DATA_GRID_HEADER_TEXT_RESOLVER, DATA_GRID_TYPE_RENDERERS, DATA_GRID_TYPE_TRANSFORMERS, DEFAULT_DATA_GRID_DEFAULTS, DataGrid, DataGridCellEmptyDirective, DataGridCellLoadingDirective, DataGridCellTemplateDirective, DataGridDeclarativeCellDirective, DataGridDeclarativeColumn, DataGridDeclarativeHeaderDirective, DataGridExpanderIconDirective, DataGridHeaderTemplateDirective, DataGridRowDirective, DataGridSortIconDirective, DataGridStickyRowDirective, DataGridTypeCellTemplateDirective, provideDataGridDefaults, provideDataGridHeaderTextResolver, provideDataGridHeaderTextResolverWithParent, provideDataGridTypeRenderers, provideDataGridTypeTransformers };
|
|
1784
|
-
export type { BaseGridColumn, DataGridConfigProvider, DataGridHeaderTextContext, DataGridHeaderTextResolver, DataGridRowTemplateContext, DataGridStickyRowTemplateContext, DataGridTypeRenderers, DataGridTypeTransformers, DeclarativeColumnDef, GridBuiltInCellType, GridCellAlign, GridCellClickEvent, GridCellContextEvent, GridCellDoubleClickEvent, GridCellRenderer, GridCellRendererType, GridCellTransformer, GridCellTransformerContext, GridCellValueContext, GridColumn, GridColumnResizeEndEvent, GridColumnTooltip, GridColumns, GridHeaderGroup, GridMultiSortEvent, GridPageChangeEvent, GridPagedDataSource, GridPaginationMode, GridPinnedPosition, GridPinnedRow, GridPinnedRows, GridRowClickEvent, GridRowContextEvent, GridRowDoubleClickEvent, GridSelectEvent, GridSelectMode, GridSelection, GridSortEvent, GridSortItem, GridSortMode, GridSortOrder, GridStickySide, GridTooltipContext, HeaderTemplateData, KeyResolver, RenderTemplateData };
|
|
1910
|
+
export { DATA_GRID_CONFIG, DATA_GRID_HEADER_TEXT_RESOLVER, DATA_GRID_TYPE_RENDERERS, DATA_GRID_TYPE_TRANSFORMERS, DEFAULT_DATA_GRID_DEFAULTS, DataGrid, DataGridCellEmptyDirective, DataGridCellLoadingDirective, DataGridCellTemplateDirective, DataGridDeclarativeCellDirective, DataGridDeclarativeColumn, DataGridDeclarativeHeaderDirective, DataGridExpanderIconDirective, DataGridHeaderTemplateDirective, DataGridRowDirective, DataGridSortIconDirective, DataGridStickyRowDirective, DataGridTypeCellTemplateDirective, gridBackendSortField, provideDataGridDefaults, provideDataGridHeaderTextResolver, provideDataGridHeaderTextResolverWithParent, provideDataGridTypeRenderers, provideDataGridTypeTransformers };
|
|
1911
|
+
export type { BaseGridColumn, DataGridConfigProvider, DataGridHeaderTextContext, DataGridHeaderTextResolver, DataGridRowTemplateContext, DataGridStickyRowTemplateContext, DataGridTypeRenderers, DataGridTypeTransformers, DeclarativeColumnDef, GridBackendSortField, GridBuiltInCellType, GridCellAlign, GridCellClickEvent, GridCellContextEvent, GridCellDoubleClickEvent, GridCellRenderer, GridCellRendererType, GridCellTransformer, GridCellTransformerContext, GridCellValueContext, GridColumn, GridColumnResizeEndEvent, GridColumnTooltip, GridColumns, GridHeaderGroup, GridMultiSortEvent, GridPageChangeEvent, GridPageRequestOptions, GridPageResult, GridPagedDataSource, GridPaginationMode, GridPinnedPosition, GridPinnedRow, GridPinnedRows, GridRowClickEvent, GridRowContextEvent, GridRowDoubleClickEvent, GridSelectEvent, GridSelectMode, GridSelection, GridSelectionByKey, GridSelectionPolicy, GridSelectionValue, GridSortEvent, GridSortItem, GridSortMode, GridSortOrder, GridSourceRequestErrorEvent, GridSourceRequestOperation, GridStickySide, GridTooltipContext, HeaderTemplateData, KeyResolver, RenderTemplateData };
|
|
1785
1912
|
//# sourceMappingURL=reforgium-data-grid.d.ts.map
|