@genesislcap/grid-pro 15.30.0 → 15.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +5837 -5435
- package/dist/dts/datasource/base.datasource.d.ts +69 -8
- package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/base.types.d.ts +10 -0
- package/dist/dts/datasource/base.types.d.ts.map +1 -1
- package/dist/dts/datasource/dataserver-result.filter.d.ts +17 -0
- package/dist/dts/datasource/dataserver-result.filter.d.ts.map +1 -0
- package/dist/dts/datasource/delivered-block.ledger.d.ts +37 -0
- package/dist/dts/datasource/delivered-block.ledger.d.ts.map +1 -0
- package/dist/dts/datasource/infinite.datasource.d.ts +65 -1
- package/dist/dts/datasource/infinite.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/infinite.resource.d.ts +136 -6
- package/dist/dts/datasource/infinite.resource.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.datasource.d.ts +8 -4
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-base.d.ts +23 -0
- package/dist/dts/datasource/server-side.resource-base.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts +28 -0
- package/dist/dts/datasource/server-side.resource-dataserver.d.ts.map +1 -1
- package/dist/dts/datasource/server-side.resource-reqrep.d.ts +1 -1
- package/dist/dts/datasource/server-side.resource-reqrep.d.ts.map +1 -1
- package/dist/dts/grid-pro-beta.d.ts +6 -0
- package/dist/dts/grid-pro-beta.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts +4 -0
- package/dist/dts/grid-pro-genesis-datasource/datasource-events.types.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/react.d.ts +2 -2
- package/dist/esm/datasource/base.datasource.js +182 -27
- package/dist/esm/datasource/dataserver-result.filter.js +28 -0
- package/dist/esm/datasource/delivered-block.ledger.js +52 -0
- package/dist/esm/datasource/infinite.datasource.js +131 -20
- package/dist/esm/datasource/infinite.resource.js +221 -16
- package/dist/esm/datasource/server-side.datasource.js +80 -29
- package/dist/esm/datasource/server-side.resource-base.js +39 -0
- package/dist/esm/datasource/server-side.resource-dataserver.js +110 -23
- package/dist/esm/datasource/server-side.resource-reqrep.js +25 -3
- package/dist/esm/grid-pro-beta.js +20 -2
- package/dist/esm/grid-pro.js +4 -1
- package/dist/grid-pro.api.json +35 -35
- package/dist/grid-pro.d.ts +290 -18
- package/dist/react.cjs +11 -11
- package/dist/react.mjs +11 -11
- package/package.json +13 -13
package/dist/esm/grid-pro.js
CHANGED
|
@@ -414,7 +414,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
414
414
|
handleDataChanged(event) {
|
|
415
415
|
var _a, _b, _c;
|
|
416
416
|
const { changes } = event.detail;
|
|
417
|
-
|
|
417
|
+
// Every datasource emits this for consumers, but row transactions are a client-side row
|
|
418
|
+
// model API: the server-side datasource drives the grid through apply-server-side-transaction,
|
|
419
|
+
// and applyTransaction on that model is a no-op that logs an AG Grid warning per event.
|
|
420
|
+
if (!this.gridApi || this.isServerSide)
|
|
418
421
|
return;
|
|
419
422
|
if (((_a = changes.add) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
420
423
|
if (this.asyncAdd) {
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -5757,7 +5757,7 @@
|
|
|
5757
5757
|
},
|
|
5758
5758
|
{
|
|
5759
5759
|
"kind": "Content",
|
|
5760
|
-
"text": "{\n add?: any[];\n remove?: any[];\n update?: any[];\n insertIndex?: number;\n }"
|
|
5760
|
+
"text": "{\n add?: any[];\n remove?: any[];\n update?: any[];\n addIndex?: number;\n insertIndex?: number;\n }"
|
|
5761
5761
|
},
|
|
5762
5762
|
{
|
|
5763
5763
|
"kind": "Content",
|
|
@@ -18679,6 +18679,37 @@
|
|
|
18679
18679
|
"isProtected": false,
|
|
18680
18680
|
"isAbstract": false
|
|
18681
18681
|
},
|
|
18682
|
+
{
|
|
18683
|
+
"kind": "Property",
|
|
18684
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProBaseDatasource#serializer:member",
|
|
18685
|
+
"docComment": "",
|
|
18686
|
+
"excerptTokens": [
|
|
18687
|
+
{
|
|
18688
|
+
"kind": "Content",
|
|
18689
|
+
"text": "serializer: "
|
|
18690
|
+
},
|
|
18691
|
+
{
|
|
18692
|
+
"kind": "Reference",
|
|
18693
|
+
"text": "JSONSerializer",
|
|
18694
|
+
"canonicalReference": "@genesislcap/foundation-utils!JSONSerializer:interface"
|
|
18695
|
+
},
|
|
18696
|
+
{
|
|
18697
|
+
"kind": "Content",
|
|
18698
|
+
"text": ";"
|
|
18699
|
+
}
|
|
18700
|
+
],
|
|
18701
|
+
"isReadonly": false,
|
|
18702
|
+
"isOptional": false,
|
|
18703
|
+
"releaseTag": "Public",
|
|
18704
|
+
"name": "serializer",
|
|
18705
|
+
"propertyTypeTokenRange": {
|
|
18706
|
+
"startIndex": 1,
|
|
18707
|
+
"endIndex": 2
|
|
18708
|
+
},
|
|
18709
|
+
"isStatic": false,
|
|
18710
|
+
"isProtected": false,
|
|
18711
|
+
"isAbstract": false
|
|
18712
|
+
},
|
|
18682
18713
|
{
|
|
18683
18714
|
"kind": "Method",
|
|
18684
18715
|
"canonicalReference": "@genesislcap/grid-pro!GridProBaseDatasource#setDisconnected:member(1)",
|
|
@@ -24634,7 +24665,7 @@
|
|
|
24634
24665
|
{
|
|
24635
24666
|
"kind": "Class",
|
|
24636
24667
|
"canonicalReference": "@genesislcap/grid-pro!GridProInfiniteDatasource:class",
|
|
24637
|
-
"docComment": "/**\n * A Genesis Datasource element for AG Grid's Infinite Row Model.\n *\n * @remarks\n *\n * The Infinite Row Model is part of AG Grid Community (free) and provides: - Lazy loading of data as user scrolls - Server-side sorting and filtering - Simple infinite scroll without grouping/aggregation - Live updates for DATASERVER resources: the DATA_LOGON stream the grid pages over pushes every change, so no flag or second subscription is needed\n *\n * REQUEST_SERVER resources are read on demand only - a change on the server shows up when the grid re-reads (scroll, filter/sort change, or an explicit refresh), not live. The exception is a write made through this session: a commit ACK for an event listed in `pollTriggerEvents` re-reads the loaded blocks, so entity-management CRUD is reflected immediately.\n *\n * Like the other datasources, consumer options passed as `deferredGridOptions` (including via entity-management's `gridOptions` with `datasource-type=\"infinite\"`) are merged over this element's defaults in `init()`.\n *\n * Use this instead of Server-Side Row Model when you don't need Enterprise features like row grouping, aggregation, or pivoting.\n *\n * @fires\n *\n * base-datasource-error - Fired when a datasource error is reported. detail: `BaseDatasourceErrorEventDetail`\n *\n * @fires\n *\n * datasource-error - Fired when a datasource error occurs (for grid integration). detail: `DatasourceErrorEventDetail`\n *\n * @fires\n *\n * base-datasource-connected - Fired when error state is cleared after connection succeeds\n *\n * @fires\n *\n * datasource-initialize - Fired to hand off infinite row model grid options. detail: `InitializeEventDetail`\n *\n * @fires\n *\n * datasource-init - Fired when the infinite grid model should initialize data\n *\n * @fires\n *\n * datasource-schema-updated - Fired when column metadata or defs are updated. detail: `SchemaUpdatedEventDetail`\n *\n * @fires\n *\n * set-infinite-datasource - Fired to attach or clear the infinite row model datasource. detail: `SetInfiniteDatasourceEventDetail`\n *\n * @fires\n *\n * refresh-infinite-cache - Fired to request an infinite row model refresh; `purge` drops the block cache and re-reads. detail: `RefreshInfiniteCacheEventDetail`\n *\n * @fires\n *\n * add-grid-css-class - Fired to add a CSS class on the grid host (hover sort indicators). detail: `GridCssClassEventDetail`\n *\n * @fires\n *\n * remove-grid-css-class - Fired to remove that CSS class from the grid host. detail: `GridCssClassEventDetail`\n *\n * @fires\n *\n * cache-filter-config - Fired to persist filter configuration for the grid\n *\n * @fires\n *\n * datasource-data-cleared - Fired when
|
|
24668
|
+
"docComment": "/**\n * A Genesis Datasource element for AG Grid's Infinite Row Model.\n *\n * @remarks\n *\n * The Infinite Row Model is part of AG Grid Community (free) and provides: - Lazy loading of data as user scrolls - Server-side sorting and filtering - Simple infinite scroll without grouping/aggregation - Live updates for DATASERVER resources: the DATA_LOGON stream the grid pages over pushes every change, so no flag or second subscription is needed\n *\n * REQUEST_SERVER resources are read on demand only - a change on the server shows up when the grid re-reads (scroll, filter/sort change, or an explicit refresh), not live. The exception is a write made through this session: a commit ACK for an event listed in `pollTriggerEvents` re-reads the loaded blocks, so entity-management CRUD is reflected immediately.\n *\n * Like the other datasources, consumer options passed as `deferredGridOptions` (including via entity-management's `gridOptions` with `datasource-type=\"infinite\"`) are merged over this element's defaults in `init()`.\n *\n * Use this instead of Server-Side Row Model when you don't need Enterprise features like row grouping, aggregation, or pivoting.\n *\n * @fires\n *\n * base-datasource-error - Fired when a datasource error is reported. detail: `BaseDatasourceErrorEventDetail`\n *\n * @fires\n *\n * datasource-error - Fired when a datasource error occurs (for grid integration). detail: `DatasourceErrorEventDetail`\n *\n * @fires\n *\n * base-datasource-connected - Fired when error state is cleared after connection succeeds\n *\n * @fires\n *\n * datasource-initialize - Fired to hand off infinite row model grid options. detail: `InitializeEventDetail`\n *\n * @fires\n *\n * datasource-init - Fired when the infinite grid model should initialize data\n *\n * @fires\n *\n * datasource-schema-updated - Fired when column metadata or defs are updated. detail: `SchemaUpdatedEventDetail`\n *\n * @fires\n *\n * datasource-data-changed - Fired when rows are delivered to the grid, a DATASERVER push changes them, or a re-read no longer returns them; `add` are rows the grid did not hold before, `update` are held rows whose content changed, `remove` carries the row id. detail: `DataChangedEventDetail`\n *\n * @fires\n *\n * set-infinite-datasource - Fired to attach or clear the infinite row model datasource. detail: `SetInfiniteDatasourceEventDetail`\n *\n * @fires\n *\n * refresh-infinite-cache - Fired to request an infinite row model refresh; `purge` drops the block cache and re-reads. detail: `RefreshInfiniteCacheEventDetail`\n *\n * @fires\n *\n * add-grid-css-class - Fired to add a CSS class on the grid host (hover sort indicators). detail: `GridCssClassEventDetail`\n *\n * @fires\n *\n * remove-grid-css-class - Fired to remove that CSS class from the grid host. detail: `GridCssClassEventDetail`\n *\n * @fires\n *\n * cache-filter-config - Fired to persist filter configuration for the grid\n *\n * @fires\n *\n * datasource-data-cleared - Fired when the grid drops every row it held (reload, filter or sort change, destroy); `includeSchema` says whether the columns went too. detail: `DataClearedEventDetail`\n *\n * @fires\n *\n * datasource-loading-finished - Fired when the first block comes back with rows\n *\n * @fires\n *\n * datasource-no-data-available - Fired when the first block comes back empty\n *\n * @fires\n *\n * datasource-filters-restored - Fired when persisted filters are reapplied\n *\n * @see\n *\n * https://www.ag-grid.com/javascript-data-grid/infinite-scrolling/\n *\n * @beta\n */\n",
|
|
24638
24669
|
"excerptTokens": [
|
|
24639
24670
|
{
|
|
24640
24671
|
"kind": "Content",
|
|
@@ -25476,7 +25507,7 @@
|
|
|
25476
25507
|
{
|
|
25477
25508
|
"kind": "Class",
|
|
25478
25509
|
"canonicalReference": "@genesislcap/grid-pro!GridProServerSideDatasource:class",
|
|
25479
|
-
"docComment": "/**\n * A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.\n *\n * @remarks\n *\n * Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.\n *\n * **Supported resources**: DATASERVER resources, and REQUEST_SERVER (req/rep) resources that declare `criteriaOnlyRequest`. A req/rep resource without it reports a `resource-type` error and no datasource is attached to the grid.\n *\n * **Custom Sort Indicators**: This datasource automatically applies custom sort indicators that are always visible (instead of only on hover). Sortable columns will show a subtle sort icon even when not sorted, and active sort indicators will be more prominent. The custom styling uses AG Grid's native icon font for consistency with the grid theme.\n *\n * @fires\n *\n * base-datasource-error - Fired when a datasource error is reported. detail: `BaseDatasourceErrorEventDetail`\n *\n * @fires\n *\n * datasource-error - Fired when a datasource error occurs (for grid integration). detail: `DatasourceErrorEventDetail`\n *\n * @fires\n *\n * base-datasource-connected - Fired when error state is cleared after connection succeeds\n *\n * @fires\n *\n * datasource-loading-finished - Fired when pending stream transactions are flushed with no row changes\n *\n * @fires\n *\n * datasource-no-data-available - Fired when loading finishes with an empty row set\n *\n * @fires\n *\n * datasource-data-changed - Fired when
|
|
25510
|
+
"docComment": "/**\n * A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.\n *\n * @remarks\n *\n * Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.\n *\n * **Supported resources**: DATASERVER resources, and REQUEST_SERVER (req/rep) resources that declare `criteriaOnlyRequest`. A req/rep resource without it reports a `resource-type` error and no datasource is attached to the grid.\n *\n * **Custom Sort Indicators**: This datasource automatically applies custom sort indicators that are always visible (instead of only on hover). Sortable columns will show a subtle sort icon even when not sorted, and active sort indicators will be more prominent. The custom styling uses AG Grid's native icon font for consistency with the grid theme.\n *\n * @fires\n *\n * base-datasource-error - Fired when a datasource error is reported. detail: `BaseDatasourceErrorEventDetail`\n *\n * @fires\n *\n * datasource-error - Fired when a datasource error occurs (for grid integration). detail: `DatasourceErrorEventDetail`\n *\n * @fires\n *\n * base-datasource-connected - Fired when error state is cleared after connection succeeds\n *\n * @fires\n *\n * datasource-loading-finished - Fired when pending stream transactions are flushed with no row changes\n *\n * @fires\n *\n * datasource-no-data-available - Fired when loading finishes with an empty row set\n *\n * @fires\n *\n * datasource-data-changed - Fired when rows are delivered to the grid, a live stream pushes a change, a poll detects one, or a re-read no longer returns a row; `add` are rows the grid did not hold before, `update` are held rows whose content changed, `remove` carries the row id. detail: `DataChangedEventDetail`\n *\n * @fires\n *\n * cache-filter-config - Fired to persist filter configuration for the grid\n *\n * @fires\n *\n * refresh-server-side - Fired to request a server-side refresh. detail: `RefreshServerSideEventDetail`\n *\n * @fires\n *\n * set-server-side-datasource - Fired to attach or clear the server-side row model datasource\n *\n * @fires\n *\n * datasource-loading-started - Fired when a server-side load cycle starts\n *\n * @fires\n *\n * add-grid-css-class - Fired to add a CSS class on the grid host (e.g. server-side styling). detail: `GridCssClassEventDetail`\n *\n * @fires\n *\n * remove-grid-css-class - Fired to remove a CSS class from the grid host. detail: `GridCssClassEventDetail`\n *\n * @fires\n *\n * datasource-initialize - Fired to hand off server-side grid options. detail: `InitializeEventDetail`\n *\n * @fires\n *\n * datasource-init - Fired when the server-side grid model should initialize data\n *\n * @fires\n *\n * datasource-schema-updated - Fired when column metadata or defs are updated. detail: `SchemaUpdatedEventDetail`\n *\n * @fires\n *\n * datasource-filters-restored - Fired when persisted filters are reapplied\n *\n * @fires\n *\n * datasource-data-cleared - Fired when the grid drops every row it held (reload, filter or sort change, destroy); `includeSchema` says whether the columns went too. detail: `DataClearedEventDetail`\n *\n * @fires\n *\n * apply-server-side-transaction - Fired to apply a server-side row transaction\n *\n * @fires\n *\n * datasource-ready - Fired when the host grid is ready to start loading data\n *\n * @beta\n */\n",
|
|
25480
25511
|
"excerptTokens": [
|
|
25481
25512
|
{
|
|
25482
25513
|
"kind": "Content",
|
|
@@ -26003,37 +26034,6 @@
|
|
|
26003
26034
|
"isOptional": false,
|
|
26004
26035
|
"isAbstract": false,
|
|
26005
26036
|
"name": "restart"
|
|
26006
|
-
},
|
|
26007
|
-
{
|
|
26008
|
-
"kind": "Property",
|
|
26009
|
-
"canonicalReference": "@genesislcap/grid-pro!GridProServerSideDatasource#serializer:member",
|
|
26010
|
-
"docComment": "",
|
|
26011
|
-
"excerptTokens": [
|
|
26012
|
-
{
|
|
26013
|
-
"kind": "Content",
|
|
26014
|
-
"text": "serializer: "
|
|
26015
|
-
},
|
|
26016
|
-
{
|
|
26017
|
-
"kind": "Reference",
|
|
26018
|
-
"text": "JSONSerializer",
|
|
26019
|
-
"canonicalReference": "@genesislcap/foundation-utils!JSONSerializer:interface"
|
|
26020
|
-
},
|
|
26021
|
-
{
|
|
26022
|
-
"kind": "Content",
|
|
26023
|
-
"text": ";"
|
|
26024
|
-
}
|
|
26025
|
-
],
|
|
26026
|
-
"isReadonly": false,
|
|
26027
|
-
"isOptional": false,
|
|
26028
|
-
"releaseTag": "Beta",
|
|
26029
|
-
"name": "serializer",
|
|
26030
|
-
"propertyTypeTokenRange": {
|
|
26031
|
-
"startIndex": 1,
|
|
26032
|
-
"endIndex": 2
|
|
26033
|
-
},
|
|
26034
|
-
"isStatic": false,
|
|
26035
|
-
"isProtected": false,
|
|
26036
|
-
"isAbstract": false
|
|
26037
26037
|
}
|
|
26038
26038
|
],
|
|
26039
26039
|
"extendsTokenRange": {
|
|
@@ -35704,7 +35704,7 @@
|
|
|
35704
35704
|
},
|
|
35705
35705
|
{
|
|
35706
35706
|
"kind": "Content",
|
|
35707
|
-
"text": "<void>;\n errorHandlerFunc?: (message: string, type: string) => void;\n onNoDataAvailableFunc?: () => void;\n onDataAvailableFunc?: () => void;\n resourceName: string;\n resourceParams?: "
|
|
35707
|
+
"text": "<void>;\n errorHandlerFunc?: (message: string, type: string) => void;\n onNoDataAvailableFunc?: () => void;\n onDataAvailableFunc?: () => void;\n onRowsDeliveredFunc?: (rows: any[]) => void;\n onRowsWithdrawnFunc?: (rowIds: string[]) => void;\n resourceName: string;\n resourceParams?: "
|
|
35708
35708
|
},
|
|
35709
35709
|
{
|
|
35710
35710
|
"kind": "Reference",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -1430,8 +1430,12 @@ export declare const csvExportParams: CsvExportParams;
|
|
|
1430
1430
|
export declare interface DataChangedEventDetail {
|
|
1431
1431
|
changes: {
|
|
1432
1432
|
add?: any[];
|
|
1433
|
+
/** Row-id-only objects (`{ [rowId]: id }`) for the rows that left the grid. */
|
|
1433
1434
|
remove?: any[];
|
|
1434
1435
|
update?: any[];
|
|
1436
|
+
/** Where `add` rows were inserted, as AG Grid's `RowDataTransaction.addIndex`. */
|
|
1437
|
+
addIndex?: number;
|
|
1438
|
+
/** @deprecated Never populated; the emitted field is `addIndex`. */
|
|
1435
1439
|
insertIndex?: number;
|
|
1436
1440
|
};
|
|
1437
1441
|
}
|
|
@@ -2562,7 +2566,12 @@ export declare class GenesisGridDatasourceElement extends GenesisGridDatasourceE
|
|
|
2562
2566
|
protected criteriaFromFilters: Map<string, string>;
|
|
2563
2567
|
protected update: BehaviorSubject<Map<string, string>>;
|
|
2564
2568
|
protected datasourceOptions(): DatasourceOptions;
|
|
2565
|
-
|
|
2569
|
+
/**
|
|
2570
|
+
* The criteria the resource should be read with: the `criteria` attribute plus anything added
|
|
2571
|
+
* through `setFilter()`.
|
|
2572
|
+
* @internal
|
|
2573
|
+
*/
|
|
2574
|
+
protected buildCriteria(): string;
|
|
2566
2575
|
setFilter(fieldName: string, newFilter: string): void;
|
|
2567
2576
|
removeFilter(fieldName: string): void;
|
|
2568
2577
|
get isRequestServer(): boolean;
|
|
@@ -2623,12 +2632,7 @@ declare const GenesisGridDatasourceElement_base: new () => {
|
|
|
2623
2632
|
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2624
2633
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2625
2634
|
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2626
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options
|
|
2627
|
-
/**
|
|
2628
|
-
* Optional parameter that allows you to select a subset of fields from the query if the client is not interested in receiving all of them.
|
|
2629
|
-
* @remarks DATASERVER only.
|
|
2630
|
-
*/
|
|
2631
|
-
?: boolean | EventListenerOptions): void;
|
|
2635
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2632
2636
|
readonly attributes: NamedNodeMap;
|
|
2633
2637
|
get classList(): DOMTokenList;
|
|
2634
2638
|
set classList(value: string): any;
|
|
@@ -2693,7 +2697,15 @@ declare const GenesisGridDatasourceElement_base: new () => {
|
|
|
2693
2697
|
removeAttribute(qualifiedName: string): void;
|
|
2694
2698
|
removeAttributeNS(namespace: string | null, localName: string): void;
|
|
2695
2699
|
removeAttributeNode(attr: Attr): Attr;
|
|
2696
|
-
requestFullscreen(options
|
|
2700
|
+
requestFullscreen(options
|
|
2701
|
+
/**
|
|
2702
|
+
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
2703
|
+
* @internal
|
|
2704
|
+
*/
|
|
2705
|
+
? /**
|
|
2706
|
+
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
2707
|
+
* @internal
|
|
2708
|
+
*/: FullscreenOptions): Promise<void>;
|
|
2697
2709
|
requestPointerLock(options?: PointerLockOptions): Promise<void>;
|
|
2698
2710
|
scroll(options?: ScrollToOptions): void;
|
|
2699
2711
|
scroll(x: number, y: number): void;
|
|
@@ -2967,6 +2979,15 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
2967
2979
|
private rowId;
|
|
2968
2980
|
private baseCriteria;
|
|
2969
2981
|
private isRequestServer;
|
|
2982
|
+
/**
|
|
2983
|
+
* The `order-by` attribute, used when the grid itself is unsorted.
|
|
2984
|
+
* @remarks DATASERVER takes the name of an index on the query; REQUEST_SERVER takes a column
|
|
2985
|
+
* with the direction inline.
|
|
2986
|
+
* @internal
|
|
2987
|
+
*/
|
|
2988
|
+
private defaultOrderBy?;
|
|
2989
|
+
/** The `reverse` attribute, applied alongside `defaultOrderBy` on DATASERVER. @internal */
|
|
2990
|
+
private defaultReverse;
|
|
2970
2991
|
private createSnapshotFunc;
|
|
2971
2992
|
private createDataserverStreamFunc;
|
|
2972
2993
|
private getMoreRowsFunc;
|
|
@@ -2974,17 +2995,69 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
2974
2995
|
* Called when an unsolicited batch changes which rows exist or their order (an INSERT or a
|
|
2975
2996
|
* DELETE). The cache cannot be patched in place for those - a created row arrives at the end
|
|
2976
2997
|
* rather than in sort position, and a delete below the delivered watermark is skipped to keep
|
|
2977
|
-
* slice offsets stable - so the rows have to be re-read.
|
|
2998
|
+
* slice offsets stable - so the rows have to be re-read. Receives the pushed change so the
|
|
2999
|
+
* host can report it before the re-read.
|
|
2978
3000
|
* @internal
|
|
2979
3001
|
*/
|
|
2980
3002
|
private onRowsInvalidatedFunc?;
|
|
2981
3003
|
/**
|
|
2982
3004
|
* Called when an unsolicited batch only modified rows already held. The cache is patched in
|
|
2983
|
-
* place, so the grid just needs to re-render its blocks.
|
|
3005
|
+
* place, so the grid just needs to re-render its blocks. Receives the pushed change so the
|
|
3006
|
+
* host can report it.
|
|
2984
3007
|
* @internal
|
|
2985
3008
|
*/
|
|
2986
3009
|
private onRowsUpdatedFunc?;
|
|
3010
|
+
/**
|
|
3011
|
+
* Called with the rows just handed to AG Grid for a block, on either transport. This is the
|
|
3012
|
+
* only point at which rows leave the datasource, so it is where the host learns which rows
|
|
3013
|
+
* the grid holds (a re-read after a refresh delivers the same rows again).
|
|
3014
|
+
* @internal
|
|
3015
|
+
*/
|
|
3016
|
+
private onRowsDeliveredFunc?;
|
|
3017
|
+
/**
|
|
3018
|
+
* Called with the ids of rows a re-read of a block no longer returned: they left the grid
|
|
3019
|
+
* (deleted on the server, or moved into a block that reports them again).
|
|
3020
|
+
* @internal
|
|
3021
|
+
*/
|
|
3022
|
+
private onRowsWithdrawnFunc?;
|
|
3023
|
+
/**
|
|
3024
|
+
* Called when a filter or sort change drops every row the grid held, on either transport, so
|
|
3025
|
+
* the host forgets them too. AG Grid purges its own cache on those changes.
|
|
3026
|
+
* @internal
|
|
3027
|
+
*/
|
|
3028
|
+
private onRowCacheResetFunc?;
|
|
3029
|
+
/**
|
|
3030
|
+
* Called when the first block comes back with no rows, and when it comes back with rows, so
|
|
3031
|
+
* the host can raise the same no-data / loading-finished events the server-side model does.
|
|
3032
|
+
* @internal
|
|
3033
|
+
*/
|
|
3034
|
+
private onNoDataAvailableFunc?;
|
|
3035
|
+
/** @internal */
|
|
3036
|
+
private onDataAvailableFunc?;
|
|
2987
3037
|
private errorHandlerFunc;
|
|
3038
|
+
/** Which rows each delivered block carried, for withdrawal and eviction reporting. @internal */
|
|
3039
|
+
private ledger;
|
|
3040
|
+
/**
|
|
3041
|
+
* Bumped whenever the rows this datasource was reading for are dropped (a teardown, or a
|
|
3042
|
+
* filter/sort change). A REQUEST_SERVER reply that resolves for an earlier generation was read
|
|
3043
|
+
* for a cache the grid no longer has.
|
|
3044
|
+
* @remarks Deliberately a generation rather than a "destroyed" flag: AG Grid calls `destroy()`
|
|
3045
|
+
* on the datasource bean it then keeps using (`InfiniteRowModel.start()` re-applies the
|
|
3046
|
+
* `datasource` grid option, and `setDatasource` destroys the previous one first), so a sticky
|
|
3047
|
+
* flag would disable the instance the grid is still driving.
|
|
3048
|
+
* @internal
|
|
3049
|
+
*/
|
|
3050
|
+
private loadGeneration;
|
|
3051
|
+
/**
|
|
3052
|
+
* Set once the host has dropped this instance for a replacement (a criteria change, a resource
|
|
3053
|
+
* change, teardown). AG Grid keeps calling the bean it was given until the new one is attached,
|
|
3054
|
+
* and its purge re-requests blocks immediately, so without this the replaced instance keeps
|
|
3055
|
+
* reading with its captured criteria and reporting those rows to the host as delivered.
|
|
3056
|
+
* @remarks Distinct from `destroy()`, which AG Grid itself calls on a bean it then keeps using;
|
|
3057
|
+
* only the host calls `detach()`, and only when it will never use this instance again.
|
|
3058
|
+
* @internal
|
|
3059
|
+
*/
|
|
3060
|
+
private detached;
|
|
2988
3061
|
/**
|
|
2989
3062
|
* Max time a DATASERVER block may stay pending before the safety valve resolves it with the
|
|
2990
3063
|
* rows accumulated so far.
|
|
@@ -3007,11 +3080,20 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
3007
3080
|
private dataserverStreamSubscription;
|
|
3008
3081
|
private sourceRef;
|
|
3009
3082
|
/**
|
|
3010
|
-
* Identifies the CRITERIA_MATCH/ORDER_BY the current
|
|
3011
|
-
*
|
|
3083
|
+
* Identifies the CRITERIA_MATCH/ORDER_BY the current rows were read with. A change means AG
|
|
3084
|
+
* Grid has dropped every block (it purges on filter/sort changes): on DATASERVER the
|
|
3085
|
+
* subscription has to be re-opened, as those are DATA_LOGON parameters, and on both transports
|
|
3086
|
+
* the host is told its held rows are gone.
|
|
3012
3087
|
* @internal
|
|
3013
3088
|
*/
|
|
3014
3089
|
private subscriptionKey;
|
|
3090
|
+
/**
|
|
3091
|
+
* Identifies the CRITERIA_MATCH/ORDER_BY the rows the host currently holds were read with.
|
|
3092
|
+
* Unlike `subscriptionKey` this survives a subscription teardown, so a filter or sort change
|
|
3093
|
+
* is still recognised as one when a live push tore the subscription down first.
|
|
3094
|
+
* @internal
|
|
3095
|
+
*/
|
|
3096
|
+
private rowCacheKey;
|
|
3015
3097
|
/**
|
|
3016
3098
|
* Session-cumulative row cache, keyed by row id. A Map preserves insertion order, so the
|
|
3017
3099
|
* cache can be sliced by block range; Genesis splits batches across messages and later
|
|
@@ -3046,8 +3128,11 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
3046
3128
|
createSnapshotFunc: (params?: any) => Promise<RequestServerResult | FilteredDataServerResult>;
|
|
3047
3129
|
createDataserverStreamFunc?: (params?: any) => SocketObservable<FilteredDataServerResult>;
|
|
3048
3130
|
getMoreRowsFunc?: (sourceRef: string) => Promise<unknown>;
|
|
3049
|
-
onRowsInvalidatedFunc?: () => void;
|
|
3050
|
-
onRowsUpdatedFunc?: () => void;
|
|
3131
|
+
onRowsInvalidatedFunc?: (change: FilteredDataServerResult) => void;
|
|
3132
|
+
onRowsUpdatedFunc?: (change: FilteredDataServerResult) => void;
|
|
3133
|
+
onRowsDeliveredFunc?: (rows: any[]) => void;
|
|
3134
|
+
onRowsWithdrawnFunc?: (rowIds: string[]) => void;
|
|
3135
|
+
onRowCacheResetFunc?: () => void;
|
|
3051
3136
|
errorHandlerFunc: (message: string, type: string) => void;
|
|
3052
3137
|
resourceName: string;
|
|
3053
3138
|
resourceParams: any;
|
|
@@ -3057,6 +3142,10 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
3057
3142
|
rowId: string;
|
|
3058
3143
|
baseCriteria?: string;
|
|
3059
3144
|
isRequestServer: boolean;
|
|
3145
|
+
defaultOrderBy?: string;
|
|
3146
|
+
defaultReverse?: boolean;
|
|
3147
|
+
onNoDataAvailableFunc?: () => void;
|
|
3148
|
+
onDataAvailableFunc?: () => void;
|
|
3060
3149
|
});
|
|
3061
3150
|
/**
|
|
3062
3151
|
* Builds request parameters for REQUEST_SERVER resources.
|
|
@@ -3090,6 +3179,23 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
3090
3179
|
* outstanding at once, and each settles as soon as the cache covers its range.
|
|
3091
3180
|
* @internal
|
|
3092
3181
|
*/
|
|
3182
|
+
/**
|
|
3183
|
+
* Notes the CRITERIA_MATCH/ORDER_BY a block is being read with. A change means AG Grid has
|
|
3184
|
+
* purged its cache and restarted from block 0: on DATASERVER the subscription is re-opened
|
|
3185
|
+
* (those are DATA_LOGON parameters), and on both transports the host is told the rows it held
|
|
3186
|
+
* are gone, so the rows read under the new filter or sort are reported as new.
|
|
3187
|
+
* @internal
|
|
3188
|
+
*/
|
|
3189
|
+
/**
|
|
3190
|
+
* The sort a block is read with: the grid's own sort model when the user has sorted, and the
|
|
3191
|
+
* `order-by` / `reverse` attributes otherwise.
|
|
3192
|
+
* @remarks Without the fallback those attributes reached the comms datasource but were then
|
|
3193
|
+
* dropped, because the logon builder removes ORDER_BY and REVERSE whenever the grid is
|
|
3194
|
+
* unsorted. Sorting from the grid still wins, as it is the more specific instruction.
|
|
3195
|
+
* @internal
|
|
3196
|
+
*/
|
|
3197
|
+
private resolveSortConfig;
|
|
3198
|
+
private noteRequestKey;
|
|
3093
3199
|
private getDataserverRows;
|
|
3094
3200
|
/**
|
|
3095
3201
|
* Keeps pulling batches while blocks are still waiting.
|
|
@@ -3138,6 +3244,19 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
3138
3244
|
* @internal
|
|
3139
3245
|
*/
|
|
3140
3246
|
private settleBlock;
|
|
3247
|
+
/**
|
|
3248
|
+
* Raises the no-data / data-available hooks for the first block, as the server-side resource
|
|
3249
|
+
* does. Later blocks say nothing: the question is whether the resource has any rows at all,
|
|
3250
|
+
* and the answer cannot change once the first block has been served.
|
|
3251
|
+
* @internal
|
|
3252
|
+
*/
|
|
3253
|
+
private notifyDataAvailability;
|
|
3254
|
+
/**
|
|
3255
|
+
* Reports rows handed to the grid for a block, then the rows a re-read of that block no longer
|
|
3256
|
+
* carries and the rows whose block the grid evicted.
|
|
3257
|
+
* @internal
|
|
3258
|
+
*/
|
|
3259
|
+
private deliverRows;
|
|
3141
3260
|
/**
|
|
3142
3261
|
* Warns when the view filled up before the data ran out.
|
|
3143
3262
|
* @remarks The server stops sending at MAX_VIEW rows and reports MORE_ROWS false, which is
|
|
@@ -3163,7 +3282,23 @@ declare class GenesisInfiniteDatasource implements IDatasource {
|
|
|
3163
3282
|
* @internal
|
|
3164
3283
|
*/
|
|
3165
3284
|
private teardownDataserverSubscription;
|
|
3285
|
+
/**
|
|
3286
|
+
* Drops the subscription and the cached rows.
|
|
3287
|
+
* @remarks AG Grid calls this on the bean it then keeps using (`InfiniteRowModel.start()`
|
|
3288
|
+
* re-applies the `datasource` grid option, and `setDatasource` destroys the previous one
|
|
3289
|
+
* first), and it can land while a block request is in flight. So it must leave the datasource
|
|
3290
|
+
* able to serve that reply and the next `getRows`: it drops the subscription, not the instance.
|
|
3291
|
+
*/
|
|
3166
3292
|
destroy?(): void;
|
|
3293
|
+
/**
|
|
3294
|
+
* Drops this instance for good: the host is replacing it, so it must stop serving the grid and
|
|
3295
|
+
* stop reporting rows, even though AG Grid still holds it as its `datasource` until the
|
|
3296
|
+
* replacement is attached.
|
|
3297
|
+
* @remarks Deliberately separate from `destroy()`, which AG Grid calls on a bean it then keeps
|
|
3298
|
+
* using (`InfiniteRowModel.start()` re-applies the `datasource` grid option, and `setDatasource`
|
|
3299
|
+
* destroys the previous one first).
|
|
3300
|
+
*/
|
|
3301
|
+
detach(): void;
|
|
3167
3302
|
}
|
|
3168
3303
|
|
|
3169
3304
|
/**
|
|
@@ -4243,19 +4378,71 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
4243
4378
|
}) & typeof FoundationElement;
|
|
4244
4379
|
|
|
4245
4380
|
export declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
4381
|
+
serializer: JSONSerializer;
|
|
4246
4382
|
protected dataSubWasLoggedOff: boolean;
|
|
4247
4383
|
keepColDefsOnClearRowData: boolean;
|
|
4248
4384
|
rowData: Map<string, any>;
|
|
4249
4385
|
protected transactionData: TransactionData;
|
|
4386
|
+
/** So rows without a row id are warned about once per element, not once per block. @internal */
|
|
4387
|
+
private missingRowIdWarned;
|
|
4250
4388
|
protected connectionSub: Subscription | undefined;
|
|
4251
4389
|
protected subscribeToConnection(): void;
|
|
4252
4390
|
protected unsubscribeFromConnection(): void;
|
|
4253
4391
|
protected generateColumnDefsFromMetadata(fieldsMetadata: FieldMetadata[], getFilterParamsByFieldType: (field: FieldMetadata) => ColDef['filterParams'] | any, getFilterByFieldType: (type: FieldTypeEnum) => string): ColDef[];
|
|
4254
4392
|
protected handleStreamInserts(insertedRows: any[], addIndex?: number): void;
|
|
4393
|
+
/**
|
|
4394
|
+
* Resolves the id of the held row a stream row refers to.
|
|
4395
|
+
* @remarks Under a custom `row-id` a DATASERVER push may carry only the default id
|
|
4396
|
+
* (`ROW_REF`), so the held row with that default id supplies the custom one. Returns
|
|
4397
|
+
* `undefined` when neither id is present - callers skip the row rather than matching
|
|
4398
|
+
* `undefined === undefined` against the first held row.
|
|
4399
|
+
* @internal
|
|
4400
|
+
*/
|
|
4401
|
+
protected resolveRowId(row: any): string | undefined;
|
|
4255
4402
|
protected handleStreamDeletes(deletedRows: any[]): void;
|
|
4256
4403
|
protected handleStreamUpdates(updatedRows: any[]): void;
|
|
4257
4404
|
protected applyAllTransactions(): void;
|
|
4258
4405
|
private applyMappedTransaction;
|
|
4406
|
+
/**
|
|
4407
|
+
* Reports rows a block-based row model (server-side, infinite) has just handed to the grid.
|
|
4408
|
+
* Rows not held before are reported as `add`; rows already held (a block re-read after a
|
|
4409
|
+
* refresh, or a req/rep re-read after a commit or poll) are reported as `update` only when
|
|
4410
|
+
* their content changed, so a plain re-read is silent.
|
|
4411
|
+
* @remarks `rowData` holds the rows delivered since the last cache reset: the resource reports
|
|
4412
|
+
* rows a re-read no longer returned (`reportWithdrawnRows`), and `clearRowData` empties it when
|
|
4413
|
+
* the grid drops its cache. Block eviction is not mirrored - see `DeliveredBlockLedger` - so
|
|
4414
|
+
* this is a superset of what the grid holds.
|
|
4415
|
+
* @internal
|
|
4416
|
+
*/
|
|
4417
|
+
protected reportDeliveredRows(rows: any[]): void;
|
|
4418
|
+
/**
|
|
4419
|
+
* Reports rows a block re-read no longer returned: they left the grid (deleted on the server,
|
|
4420
|
+
* or moved into a block that reports them again). Rows already reported removed - a DATASERVER
|
|
4421
|
+
* push, say - are skipped.
|
|
4422
|
+
* @internal
|
|
4423
|
+
*/
|
|
4424
|
+
protected reportWithdrawnRows(rowIds: string[]): void;
|
|
4425
|
+
/**
|
|
4426
|
+
* Starts a fresh transaction and returns it, so a caller can keep working on the object it
|
|
4427
|
+
* built even if a consumer's `datasource-data-changed` handler resets the element meanwhile.
|
|
4428
|
+
* @internal
|
|
4429
|
+
*/
|
|
4430
|
+
protected resetTransaction(): TransactionData & {
|
|
4431
|
+
add: any[];
|
|
4432
|
+
remove: any[];
|
|
4433
|
+
update: any[];
|
|
4434
|
+
};
|
|
4435
|
+
/**
|
|
4436
|
+
* Whether two versions of a row differ in content. Identity and a key-order-insensitive
|
|
4437
|
+
* field comparison come first, so a re-read of unchanged rows costs no serialization; nested
|
|
4438
|
+
* values fall back to the serializer.
|
|
4439
|
+
* @internal
|
|
4440
|
+
*/
|
|
4441
|
+
protected hasRowContentChanged(known: any, row: any): boolean;
|
|
4442
|
+
/** Emits `datasource-data-changed` for `transaction` when it is non-empty. @internal */
|
|
4443
|
+
protected emitTransaction(transaction: TransactionData | undefined): void;
|
|
4444
|
+
/** @internal */
|
|
4445
|
+
private warnMissingRowIdOnce;
|
|
4259
4446
|
/**
|
|
4260
4447
|
* Builds the index map used for server-side sorting from the resource's metadata.
|
|
4261
4448
|
* @remarks Real DATASERVER indexes keep their names; when the resource also (or only) reports
|
|
@@ -4511,6 +4698,12 @@ export declare class GridProBeta extends GridProBeta_base {
|
|
|
4511
4698
|
* @internal
|
|
4512
4699
|
*/
|
|
4513
4700
|
private handleDataChanged;
|
|
4701
|
+
/**
|
|
4702
|
+
* Whether the live grid runs AG Grid's client-side row model (the default when the datasource
|
|
4703
|
+
* set no `rowModelType`).
|
|
4704
|
+
* @internal
|
|
4705
|
+
*/
|
|
4706
|
+
private get isClientSideRowModel();
|
|
4514
4707
|
private flashAddedCells;
|
|
4515
4708
|
/**
|
|
4516
4709
|
* Handles schema updates from datasource
|
|
@@ -6431,12 +6624,15 @@ export declare const gridProGenesisDatasourceEventNames: {
|
|
|
6431
6624
|
* @fires datasource-initialize - Fired to hand off infinite row model grid options. detail: `InitializeEventDetail`
|
|
6432
6625
|
* @fires datasource-init - Fired when the infinite grid model should initialize data
|
|
6433
6626
|
* @fires datasource-schema-updated - Fired when column metadata or defs are updated. detail: `SchemaUpdatedEventDetail`
|
|
6627
|
+
* @fires datasource-data-changed - Fired when rows are delivered to the grid, a DATASERVER push changes them, or a re-read no longer returns them; `add` are rows the grid did not hold before, `update` are held rows whose content changed, `remove` carries the row id. detail: `DataChangedEventDetail`
|
|
6434
6628
|
* @fires set-infinite-datasource - Fired to attach or clear the infinite row model datasource. detail: `SetInfiniteDatasourceEventDetail`
|
|
6435
6629
|
* @fires refresh-infinite-cache - Fired to request an infinite row model refresh; `purge` drops the block cache and re-reads. detail: `RefreshInfiniteCacheEventDetail`
|
|
6436
6630
|
* @fires add-grid-css-class - Fired to add a CSS class on the grid host (hover sort indicators). detail: `GridCssClassEventDetail`
|
|
6437
6631
|
* @fires remove-grid-css-class - Fired to remove that CSS class from the grid host. detail: `GridCssClassEventDetail`
|
|
6438
6632
|
* @fires cache-filter-config - Fired to persist filter configuration for the grid
|
|
6439
|
-
* @fires datasource-data-cleared - Fired when
|
|
6633
|
+
* @fires datasource-data-cleared - Fired when the grid drops every row it held (reload, filter or sort change, destroy); `includeSchema` says whether the columns went too. detail: `DataClearedEventDetail`
|
|
6634
|
+
* @fires datasource-loading-finished - Fired when the first block comes back with rows
|
|
6635
|
+
* @fires datasource-no-data-available - Fired when the first block comes back empty
|
|
6440
6636
|
* @fires datasource-filters-restored - Fired when persisted filters are reapplied
|
|
6441
6637
|
*/
|
|
6442
6638
|
export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource_base {
|
|
@@ -6452,6 +6648,19 @@ export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource
|
|
|
6452
6648
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
6453
6649
|
connectedCallback(): void;
|
|
6454
6650
|
disconnectedCallback(): void;
|
|
6651
|
+
/** Unsubscribes the `setFilter()` listener. @internal */
|
|
6652
|
+
private filterSub;
|
|
6653
|
+
/**
|
|
6654
|
+
* Reloads when `setFilter()` or `removeFilter()` changes the criteria.
|
|
6655
|
+
* @remarks The criteria a block is read with is captured when the resource is built, so a
|
|
6656
|
+
* filter added later reaches nothing until the rows are re-read. The `criteria` attribute
|
|
6657
|
+
* already reloads through `criteriaChanged`; this gives the programmatic API the same
|
|
6658
|
+
* behaviour instead of silently doing nothing.
|
|
6659
|
+
* @internal
|
|
6660
|
+
*/
|
|
6661
|
+
private subscribeToFilterChanges;
|
|
6662
|
+
/** @internal */
|
|
6663
|
+
private unsubscribeFromFilterChanges;
|
|
6455
6664
|
deepClone(): Node;
|
|
6456
6665
|
/**
|
|
6457
6666
|
* Resets the grid data while keeping columnDefs and reloads data.
|
|
@@ -6462,10 +6671,58 @@ export declare class GridProInfiniteDatasource extends GridProInfiniteDatasource
|
|
|
6462
6671
|
init(): Promise<void>;
|
|
6463
6672
|
/** @internal */
|
|
6464
6673
|
private clearReadyListener;
|
|
6674
|
+
/**
|
|
6675
|
+
* Whether the infinite row model can drive this resource.
|
|
6676
|
+
* @remarks It pages a req/rep by sending CRITERIA_MATCH, ORDER_BY and OFFSET in DETAILS, which
|
|
6677
|
+
* a request reply only accepts when it is declared `criteriaOnlyRequest`
|
|
6678
|
+
* (`CRITERIA_ONLY_REQUEST` in its metadata). Without it the server expects its inputs in
|
|
6679
|
+
* `REQUEST` instead and rejects every block, which on this row model surfaces as a grid that
|
|
6680
|
+
* simply never fills. Report it once, up front, as the server-side model does.
|
|
6681
|
+
* @returns `true` when the infinite model can be used, `false` after reporting a
|
|
6682
|
+
* `resource-type` error.
|
|
6683
|
+
* @internal
|
|
6684
|
+
*/
|
|
6685
|
+
private isInfiniteSupportedForResource;
|
|
6465
6686
|
/** @internal */
|
|
6466
6687
|
private onDatasourceReady;
|
|
6688
|
+
/**
|
|
6689
|
+
* A pushed INSERT/DELETE changes which rows exist or their order, so the change is reported
|
|
6690
|
+
* and then the rows are re-read (purge).
|
|
6691
|
+
* @internal
|
|
6692
|
+
*/
|
|
6693
|
+
private handleLiveRowsInvalidated;
|
|
6694
|
+
/**
|
|
6695
|
+
* A pushed MODIFY is already patched into the paging cache, so the change is reported and the
|
|
6696
|
+
* grid only needs to re-render its blocks.
|
|
6697
|
+
* @internal
|
|
6698
|
+
*/
|
|
6699
|
+
private handleLiveRowsUpdated;
|
|
6700
|
+
/**
|
|
6701
|
+
* Turns a DATASERVER push into the same transaction the client-side datasource reports:
|
|
6702
|
+
* partial MODIFY rows are merged into the held row, and a remove carries just the row id.
|
|
6703
|
+
* @remarks Unlike the client-side model, a pushed row need not be held here - it may sit
|
|
6704
|
+
* beyond the loaded blocks, in which case the grid will never show it.
|
|
6705
|
+
*
|
|
6706
|
+
* So a pushed INSERT is deliberately not reported: nothing here says where the new row sorts,
|
|
6707
|
+
* and reporting an `add` for a row that lands at position 40,000 of an unscrolled grid would
|
|
6708
|
+
* contradict the event's contract and leave the row held forever, since no block re-read ever
|
|
6709
|
+
* delivers (or withdraws) it. Every INSERT is followed by a purge and re-read, which reports
|
|
6710
|
+
* the row as `add` if and when it actually reaches the grid.
|
|
6711
|
+
*
|
|
6712
|
+
* A MODIFY for a row that is not held is skipped for the same reason; a DELETE is reported by
|
|
6713
|
+
* the id it carries, and one that cannot be resolved to an id is skipped with a warning rather
|
|
6714
|
+
* than matched against the wrong row.
|
|
6715
|
+
* @internal
|
|
6716
|
+
*/
|
|
6717
|
+
private reportLiveChange;
|
|
6467
6718
|
destroy(): Promise<void>;
|
|
6468
6719
|
restart(): Promise<void>;
|
|
6720
|
+
/**
|
|
6721
|
+
* Forgets every held row and tells consumers, as the client-side datasource does: the grid is
|
|
6722
|
+
* dropping its rows (a reload, a filter or sort change, or teardown). `withColumnDefs` also
|
|
6723
|
+
* clears the column definitions.
|
|
6724
|
+
* @internal
|
|
6725
|
+
*/
|
|
6469
6726
|
private clearRowData;
|
|
6470
6727
|
/**
|
|
6471
6728
|
* Honours `pollTriggerEvents` without polling: a commit ACK for one of the listed events
|
|
@@ -6902,7 +7159,7 @@ export declare enum GridProRendererTypes {
|
|
|
6902
7159
|
* @fires base-datasource-connected - Fired when error state is cleared after connection succeeds
|
|
6903
7160
|
* @fires datasource-loading-finished - Fired when pending stream transactions are flushed with no row changes
|
|
6904
7161
|
* @fires datasource-no-data-available - Fired when loading finishes with an empty row set
|
|
6905
|
-
* @fires datasource-data-changed - Fired when
|
|
7162
|
+
* @fires datasource-data-changed - Fired when rows are delivered to the grid, a live stream pushes a change, a poll detects one, or a re-read no longer returns a row; `add` are rows the grid did not hold before, `update` are held rows whose content changed, `remove` carries the row id. detail: `DataChangedEventDetail`
|
|
6906
7163
|
* @fires cache-filter-config - Fired to persist filter configuration for the grid
|
|
6907
7164
|
* @fires refresh-server-side - Fired to request a server-side refresh. detail: `RefreshServerSideEventDetail`
|
|
6908
7165
|
* @fires set-server-side-datasource - Fired to attach or clear the server-side row model datasource
|
|
@@ -6913,12 +7170,11 @@ export declare enum GridProRendererTypes {
|
|
|
6913
7170
|
* @fires datasource-init - Fired when the server-side grid model should initialize data
|
|
6914
7171
|
* @fires datasource-schema-updated - Fired when column metadata or defs are updated. detail: `SchemaUpdatedEventDetail`
|
|
6915
7172
|
* @fires datasource-filters-restored - Fired when persisted filters are reapplied
|
|
6916
|
-
* @fires datasource-data-cleared - Fired when
|
|
7173
|
+
* @fires datasource-data-cleared - Fired when the grid drops every row it held (reload, filter or sort change, destroy); `includeSchema` says whether the columns went too. detail: `DataClearedEventDetail`
|
|
6917
7174
|
* @fires apply-server-side-transaction - Fired to apply a server-side row transaction
|
|
6918
7175
|
* @fires datasource-ready - Fired when the host grid is ready to start loading data
|
|
6919
7176
|
*/
|
|
6920
7177
|
export declare class GridProServerSideDatasource extends GridProServerSideDatasource_base {
|
|
6921
|
-
serializer: JSONSerializer;
|
|
6922
7178
|
pollingDatasource: Datasource;
|
|
6923
7179
|
/**
|
|
6924
7180
|
* Enable live updates for the grid.
|
|
@@ -6955,6 +7211,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
6955
7211
|
private onDatasourceReady;
|
|
6956
7212
|
destroy(): Promise<void>;
|
|
6957
7213
|
restart(): Promise<void>;
|
|
7214
|
+
/**
|
|
7215
|
+
* Forgets every held row and tells consumers, as the client-side datasource does: the grid is
|
|
7216
|
+
* dropping its rows (a reload, a filter or sort change, or teardown). `withColumnDefs` also
|
|
7217
|
+
* clears the column definitions.
|
|
7218
|
+
* @internal
|
|
7219
|
+
*/
|
|
6958
7220
|
private clearRowData;
|
|
6959
7221
|
/**
|
|
6960
7222
|
* Checks whether the resolved resource can be served through the Server-Side Row Model.
|
|
@@ -8877,6 +9139,16 @@ export declare type ServerSideDatasourceOptions = {
|
|
|
8877
9139
|
onNoDataAvailableFunc?: () => void;
|
|
8878
9140
|
/** Called when a server-side load finishes with one or more rows. */
|
|
8879
9141
|
onDataAvailableFunc?: () => void;
|
|
9142
|
+
/**
|
|
9143
|
+
* Called with the rows just handed to AG Grid for a block. This is the only point at which
|
|
9144
|
+
* rows leave the datasource, so it is where the host learns which rows the grid holds.
|
|
9145
|
+
*/
|
|
9146
|
+
onRowsDeliveredFunc?: (rows: any[]) => void;
|
|
9147
|
+
/**
|
|
9148
|
+
* Called with the ids of rows a re-read of a block no longer returned - they left the grid
|
|
9149
|
+
* (deleted on the server, or moved to a block that reports them again).
|
|
9150
|
+
*/
|
|
9151
|
+
onRowsWithdrawnFunc?: (rowIds: string[]) => void;
|
|
8880
9152
|
resourceName: string;
|
|
8881
9153
|
resourceParams?: DataserverParams | RequestParams;
|
|
8882
9154
|
resourceIndexes?: Map<string, string[]>;
|