@genesislcap/grid-pro 14.451.3 → 14.451.5-alpha-a976431.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +186 -0
- package/dist/dts/datasource/base.datasource.d.ts +13 -0
- package/dist/dts/datasource/base.datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +42 -0
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +6 -0
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/esm/datasource/base.datasource.js +13 -0
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +86 -0
- package/dist/esm/grid-pro.js +17 -0
- package/dist/grid-pro.api.json +156 -0
- package/dist/grid-pro.d.ts +60 -0
- package/package.json +14 -14
|
@@ -8738,6 +8738,16 @@
|
|
|
8738
8738
|
"privacy": "public",
|
|
8739
8739
|
"default": "false"
|
|
8740
8740
|
},
|
|
8741
|
+
{
|
|
8742
|
+
"kind": "field",
|
|
8743
|
+
"name": "requestVisibleColumnsOnly",
|
|
8744
|
+
"type": {
|
|
8745
|
+
"text": "boolean"
|
|
8746
|
+
},
|
|
8747
|
+
"privacy": "public",
|
|
8748
|
+
"default": "false",
|
|
8749
|
+
"description": "Whether the datasource should request data only for the columns that are currently visible."
|
|
8750
|
+
},
|
|
8741
8751
|
{
|
|
8742
8752
|
"kind": "field",
|
|
8743
8753
|
"name": "rowData",
|
|
@@ -8931,6 +8941,26 @@
|
|
|
8931
8941
|
"kind": "method",
|
|
8932
8942
|
"name": "loadMore"
|
|
8933
8943
|
},
|
|
8944
|
+
{
|
|
8945
|
+
"kind": "method",
|
|
8946
|
+
"name": "setVisibleColumns",
|
|
8947
|
+
"return": {
|
|
8948
|
+
"type": {
|
|
8949
|
+
"text": "void"
|
|
8950
|
+
}
|
|
8951
|
+
},
|
|
8952
|
+
"parameters": [
|
|
8953
|
+
{
|
|
8954
|
+
"name": "visibleFields",
|
|
8955
|
+
"type": {
|
|
8956
|
+
"text": "string[]"
|
|
8957
|
+
},
|
|
8958
|
+
"description": "Field names of the currently visible columns."
|
|
8959
|
+
}
|
|
8960
|
+
],
|
|
8961
|
+
"description": "Notifies the datasource of the field names of the currently visible columns.",
|
|
8962
|
+
"privacy": "public"
|
|
8963
|
+
},
|
|
8934
8964
|
{
|
|
8935
8965
|
"kind": "method",
|
|
8936
8966
|
"name": "restart"
|
|
@@ -10220,6 +10250,32 @@
|
|
|
10220
10250
|
"module": "src/datasource/base.datasource.ts"
|
|
10221
10251
|
}
|
|
10222
10252
|
},
|
|
10253
|
+
{
|
|
10254
|
+
"kind": "field",
|
|
10255
|
+
"name": "requestVisibleColumnsOnly",
|
|
10256
|
+
"type": {
|
|
10257
|
+
"text": "boolean"
|
|
10258
|
+
},
|
|
10259
|
+
"privacy": "public",
|
|
10260
|
+
"default": "false",
|
|
10261
|
+
"description": "When enabled and column definitions are provided, the datasource requests data only for the\ncolumns that are currently visible. The visible set is seeded from the column config (columns\nnot flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data\nis reloaded whenever that set changes.",
|
|
10262
|
+
"inheritedFrom": {
|
|
10263
|
+
"name": "GridProBaseDatasource",
|
|
10264
|
+
"module": "src/datasource/base.datasource.ts"
|
|
10265
|
+
}
|
|
10266
|
+
},
|
|
10267
|
+
{
|
|
10268
|
+
"kind": "field",
|
|
10269
|
+
"name": "_visibleColumns",
|
|
10270
|
+
"type": {
|
|
10271
|
+
"text": "string[] | undefined"
|
|
10272
|
+
},
|
|
10273
|
+
"privacy": "private",
|
|
10274
|
+
"inheritedFrom": {
|
|
10275
|
+
"name": "GridProGenesisDatasource",
|
|
10276
|
+
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
10277
|
+
}
|
|
10278
|
+
},
|
|
10223
10279
|
{
|
|
10224
10280
|
"kind": "field",
|
|
10225
10281
|
"name": "dataSub",
|
|
@@ -10686,6 +10742,30 @@
|
|
|
10686
10742
|
"module": "src/datasource/base.datasource.ts"
|
|
10687
10743
|
}
|
|
10688
10744
|
},
|
|
10745
|
+
{
|
|
10746
|
+
"kind": "method",
|
|
10747
|
+
"name": "setVisibleColumns",
|
|
10748
|
+
"return": {
|
|
10749
|
+
"type": {
|
|
10750
|
+
"text": "void"
|
|
10751
|
+
}
|
|
10752
|
+
},
|
|
10753
|
+
"parameters": [
|
|
10754
|
+
{
|
|
10755
|
+
"name": "visibleFields",
|
|
10756
|
+
"type": {
|
|
10757
|
+
"text": "string[]"
|
|
10758
|
+
},
|
|
10759
|
+
"description": "Field names of the currently visible columns."
|
|
10760
|
+
}
|
|
10761
|
+
],
|
|
10762
|
+
"description": "Updates the set of visible columns and reloads the data when the set changes.",
|
|
10763
|
+
"privacy": "public",
|
|
10764
|
+
"inheritedFrom": {
|
|
10765
|
+
"name": "GridProBaseDatasource",
|
|
10766
|
+
"module": "src/datasource/base.datasource.ts"
|
|
10767
|
+
}
|
|
10768
|
+
},
|
|
10689
10769
|
{
|
|
10690
10770
|
"kind": "method",
|
|
10691
10771
|
"name": "loadMore",
|
|
@@ -11474,6 +11554,19 @@
|
|
|
11474
11554
|
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
11475
11555
|
}
|
|
11476
11556
|
},
|
|
11557
|
+
{
|
|
11558
|
+
"name": "request-visible-columns-only",
|
|
11559
|
+
"type": {
|
|
11560
|
+
"text": "boolean"
|
|
11561
|
+
},
|
|
11562
|
+
"default": "false",
|
|
11563
|
+
"description": "When enabled and column definitions are provided, the datasource requests data only for the\ncolumns that are currently visible. The visible set is seeded from the column config (columns\nnot flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data\nis reloaded whenever that set changes.",
|
|
11564
|
+
"fieldName": "requestVisibleColumnsOnly",
|
|
11565
|
+
"inheritedFrom": {
|
|
11566
|
+
"name": "GridProGenesisDatasource",
|
|
11567
|
+
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
11568
|
+
}
|
|
11569
|
+
},
|
|
11477
11570
|
{
|
|
11478
11571
|
"name": "criteria",
|
|
11479
11572
|
"type": {
|
|
@@ -12259,6 +12352,20 @@
|
|
|
12259
12352
|
"module": "src/datasource/base.datasource.ts"
|
|
12260
12353
|
}
|
|
12261
12354
|
},
|
|
12355
|
+
{
|
|
12356
|
+
"kind": "field",
|
|
12357
|
+
"name": "requestVisibleColumnsOnly",
|
|
12358
|
+
"type": {
|
|
12359
|
+
"text": "boolean"
|
|
12360
|
+
},
|
|
12361
|
+
"privacy": "public",
|
|
12362
|
+
"default": "false",
|
|
12363
|
+
"description": "Whether the datasource should request data only for the columns that are currently visible.",
|
|
12364
|
+
"inheritedFrom": {
|
|
12365
|
+
"name": "GridProBaseDatasource",
|
|
12366
|
+
"module": "src/datasource/base.datasource.ts"
|
|
12367
|
+
}
|
|
12368
|
+
},
|
|
12262
12369
|
{
|
|
12263
12370
|
"kind": "field",
|
|
12264
12371
|
"name": "rowData",
|
|
@@ -12482,6 +12589,30 @@
|
|
|
12482
12589
|
"module": "src/datasource/base.datasource.ts"
|
|
12483
12590
|
}
|
|
12484
12591
|
},
|
|
12592
|
+
{
|
|
12593
|
+
"kind": "method",
|
|
12594
|
+
"name": "setVisibleColumns",
|
|
12595
|
+
"return": {
|
|
12596
|
+
"type": {
|
|
12597
|
+
"text": "void"
|
|
12598
|
+
}
|
|
12599
|
+
},
|
|
12600
|
+
"parameters": [
|
|
12601
|
+
{
|
|
12602
|
+
"name": "visibleFields",
|
|
12603
|
+
"type": {
|
|
12604
|
+
"text": "string[]"
|
|
12605
|
+
},
|
|
12606
|
+
"description": "Field names of the currently visible columns."
|
|
12607
|
+
}
|
|
12608
|
+
],
|
|
12609
|
+
"description": "Notifies the datasource of the field names of the currently visible columns.",
|
|
12610
|
+
"privacy": "public",
|
|
12611
|
+
"inheritedFrom": {
|
|
12612
|
+
"name": "GridProBaseDatasource",
|
|
12613
|
+
"module": "src/datasource/base.datasource.ts"
|
|
12614
|
+
}
|
|
12615
|
+
},
|
|
12485
12616
|
{
|
|
12486
12617
|
"kind": "field",
|
|
12487
12618
|
"name": "_isDisconnected",
|
|
@@ -16156,6 +16287,28 @@
|
|
|
16156
16287
|
"module": "src/datasource/base.datasource.ts"
|
|
16157
16288
|
}
|
|
16158
16289
|
},
|
|
16290
|
+
{
|
|
16291
|
+
"kind": "field",
|
|
16292
|
+
"name": "requestVisibleColumnsOnly",
|
|
16293
|
+
"type": {
|
|
16294
|
+
"text": "boolean"
|
|
16295
|
+
},
|
|
16296
|
+
"privacy": "public",
|
|
16297
|
+
"default": "false",
|
|
16298
|
+
"description": "When enabled and column definitions are provided, the datasource requests data only for the\ncolumns that are currently visible. The visible set is seeded from the column config (columns\nnot flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data\nis reloaded whenever that set changes.",
|
|
16299
|
+
"inheritedFrom": {
|
|
16300
|
+
"name": "GridProBaseDatasource",
|
|
16301
|
+
"module": "src/datasource/base.datasource.ts"
|
|
16302
|
+
}
|
|
16303
|
+
},
|
|
16304
|
+
{
|
|
16305
|
+
"kind": "field",
|
|
16306
|
+
"name": "_visibleColumns",
|
|
16307
|
+
"type": {
|
|
16308
|
+
"text": "string[] | undefined"
|
|
16309
|
+
},
|
|
16310
|
+
"privacy": "private"
|
|
16311
|
+
},
|
|
16159
16312
|
{
|
|
16160
16313
|
"kind": "field",
|
|
16161
16314
|
"name": "dataSub",
|
|
@@ -16555,6 +16708,30 @@
|
|
|
16555
16708
|
"module": "src/datasource/base.datasource.ts"
|
|
16556
16709
|
}
|
|
16557
16710
|
},
|
|
16711
|
+
{
|
|
16712
|
+
"kind": "method",
|
|
16713
|
+
"name": "setVisibleColumns",
|
|
16714
|
+
"return": {
|
|
16715
|
+
"type": {
|
|
16716
|
+
"text": "void"
|
|
16717
|
+
}
|
|
16718
|
+
},
|
|
16719
|
+
"parameters": [
|
|
16720
|
+
{
|
|
16721
|
+
"name": "visibleFields",
|
|
16722
|
+
"type": {
|
|
16723
|
+
"text": "string[]"
|
|
16724
|
+
},
|
|
16725
|
+
"description": "Field names of the currently visible columns."
|
|
16726
|
+
}
|
|
16727
|
+
],
|
|
16728
|
+
"description": "Updates the set of visible columns and reloads the data when the set changes.",
|
|
16729
|
+
"privacy": "public",
|
|
16730
|
+
"inheritedFrom": {
|
|
16731
|
+
"name": "GridProBaseDatasource",
|
|
16732
|
+
"module": "src/datasource/base.datasource.ts"
|
|
16733
|
+
}
|
|
16734
|
+
},
|
|
16558
16735
|
{
|
|
16559
16736
|
"kind": "method",
|
|
16560
16737
|
"name": "loadMore",
|
|
@@ -17508,6 +17685,15 @@
|
|
|
17508
17685
|
"default": "false",
|
|
17509
17686
|
"fieldName": "keepColDefsOnClearRowData"
|
|
17510
17687
|
},
|
|
17688
|
+
{
|
|
17689
|
+
"name": "request-visible-columns-only",
|
|
17690
|
+
"type": {
|
|
17691
|
+
"text": "boolean"
|
|
17692
|
+
},
|
|
17693
|
+
"default": "false",
|
|
17694
|
+
"description": "When enabled and column definitions are provided, the datasource requests data only for the\ncolumns that are currently visible. The visible set is seeded from the column config (columns\nnot flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data\nis reloaded whenever that set changes.",
|
|
17695
|
+
"fieldName": "requestVisibleColumnsOnly"
|
|
17696
|
+
},
|
|
17511
17697
|
{
|
|
17512
17698
|
"name": "criteria",
|
|
17513
17699
|
"type": {
|
|
@@ -547,6 +547,11 @@ interface TransactionData {
|
|
|
547
547
|
export declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
548
548
|
protected dataSubWasLoggedOff: boolean;
|
|
549
549
|
keepColDefsOnClearRowData: boolean;
|
|
550
|
+
/**
|
|
551
|
+
* Whether the datasource should request data only for the columns that are currently visible.
|
|
552
|
+
* @remarks Defaults to false. Concrete datasources that support column-scoped requests override this.
|
|
553
|
+
*/
|
|
554
|
+
requestVisibleColumnsOnly: boolean;
|
|
550
555
|
rowData: Map<string, any>;
|
|
551
556
|
protected transactionData: TransactionData;
|
|
552
557
|
protected connectionSub: Subscription | undefined;
|
|
@@ -568,6 +573,14 @@ export declare class GridProBaseDatasource extends GenesisGridDatasourceElement
|
|
|
568
573
|
private mapTransaction;
|
|
569
574
|
protected pagination: boolean;
|
|
570
575
|
loadMore(): void;
|
|
576
|
+
/**
|
|
577
|
+
* Notifies the datasource of the field names of the currently visible columns.
|
|
578
|
+
* @remarks No-op by default. Datasources that support column-scoped requests override this to
|
|
579
|
+
* narrow the server query and reload data when the visible column set changes.
|
|
580
|
+
* @param visibleFields - Field names of the currently visible columns.
|
|
581
|
+
* @public
|
|
582
|
+
*/
|
|
583
|
+
setVisibleColumns(visibleFields: string[]): void;
|
|
571
584
|
restart(): void;
|
|
572
585
|
reloadResourceData(): void;
|
|
573
586
|
destroy(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/base.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,OAAO,EACP,UAAU,EAGV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,aAAa,EAId,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAUrD,OAAO,EAA4B,KAAK,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC;;;GAGG;AACH,eAAO,MAAM,YAAY,SAAS,CAAC;;;;QAU8B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAoC7D,CAAC;4IAKH,CAAF;wFAGkB,CAAC;+IAKqE,CAAC;2FAKa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAU,EAAE,OAAO,CAAC;IAE9B,QAAQ;IAIR;;;;;;OAMG;IACH,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI;IAEhD,OAAO;IAIP,kBAAkB;IAIlB,OAAO;IAIP,OAAO,CAAC,eAAe,CAAS;IAEhC;;;OAGG;IACI,eAAe,CAAC,YAAY,EAAE,OAAO;IAa5C;;OAEG;IACI,cAAc,IAAI,OAAO;IAIhC;;;OAGG;IACH,SAAS,CAAC,wBAAwB,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,GAAG,CAAC,GAAG,SAAS,GAAG;QAC3E,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,CAAC,EAAE,CAAC,CAAC;KACZ;IAaD;;;;OAIG;IACI,4BAA4B,CAAC,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,GAAG,EAAE;CAiExF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DatasourceOptions } from '@genesislcap/foundation-comms';
|
|
1
2
|
import { GridProBaseDatasource } from '../datasource/base.datasource';
|
|
2
3
|
/**
|
|
3
4
|
* Interface for transaction data
|
|
@@ -405,6 +406,15 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
405
406
|
requestChanged(oldRequest: string, newRequest: string): void;
|
|
406
407
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
407
408
|
keepColDefsOnClearRowData: boolean;
|
|
409
|
+
/**
|
|
410
|
+
* When enabled and column definitions are provided, the datasource requests data only for the
|
|
411
|
+
* columns that are currently visible. The visible set is seeded from the column config (columns
|
|
412
|
+
* not flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data
|
|
413
|
+
* is reloaded whenever that set changes.
|
|
414
|
+
* @remarks DATASERVER only. Defaults to false.
|
|
415
|
+
*/
|
|
416
|
+
requestVisibleColumnsOnly: boolean;
|
|
417
|
+
private _visibleColumns;
|
|
408
418
|
private dataSub;
|
|
409
419
|
private updateSub;
|
|
410
420
|
private requiresFullRowDataAndColDefs;
|
|
@@ -521,6 +531,38 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
521
531
|
* @param deletes - List of records to remove from the grid stream
|
|
522
532
|
*/
|
|
523
533
|
handleStreamDeletes(deletes?: any[]): void;
|
|
534
|
+
/**
|
|
535
|
+
* Extends the base options to constrain the requested fields to the visible columns when
|
|
536
|
+
* `requestVisibleColumnsOnly` is enabled.
|
|
537
|
+
* @remarks DATASERVER only; for other resource types the derived `fields` are ignored.
|
|
538
|
+
* @internal
|
|
539
|
+
*/
|
|
540
|
+
protected datasourceOptions(): DatasourceOptions;
|
|
541
|
+
/**
|
|
542
|
+
* Builds the DATASERVER `FIELDS` string (space-separated) from the visible columns, always
|
|
543
|
+
* including the `rowId` so rows can be tracked.
|
|
544
|
+
* @internal
|
|
545
|
+
*/
|
|
546
|
+
private getRequestedFields;
|
|
547
|
+
/**
|
|
548
|
+
* Returns the field names of the configured columns that are not hidden, used to seed the visible
|
|
549
|
+
* set before the host grid reports runtime visibility.
|
|
550
|
+
* @internal
|
|
551
|
+
*/
|
|
552
|
+
private getConfiguredVisibleColumns;
|
|
553
|
+
/**
|
|
554
|
+
* Updates the set of visible columns and reloads the data when the set changes.
|
|
555
|
+
* @remarks Called by the host grid on column visibility changes when `requestVisibleColumnsOnly`
|
|
556
|
+
* is enabled. DATASERVER only; no-ops for other resource types.
|
|
557
|
+
* @param visibleFields - Field names of the currently visible columns.
|
|
558
|
+
* @public
|
|
559
|
+
*/
|
|
560
|
+
setVisibleColumns(visibleFields: string[]): void;
|
|
561
|
+
/**
|
|
562
|
+
* Compares two column field lists irrespective of order.
|
|
563
|
+
* @internal
|
|
564
|
+
*/
|
|
565
|
+
private columnsChanged;
|
|
524
566
|
loadMore(): void;
|
|
525
567
|
}
|
|
526
568
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EAUlB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,qBAAqB,EAAqB,MAAM,+BAA+B,CAAC;AAqBzF;;GAEG;AACH,UAAU,eAAe;IACvB,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;;;;;;;kBAsBiD,CAAC;;;;;;;;8BAgDnB,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAgClB,CAAC;4IAOnB,CAAC;wFAMW,CAAC;+IAKX,CAAC;2FACoD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAiCV,CAAC;;;;;;;;;;;;;;;;;;;;;;;mBA0ErB,CAAC;;;;;;;;;;;;;6BAkCpB,CAAC;8BAIO,CAAC;kBAGf,CAAC;;oBAC2B,CAAC;;sBAKZ,CAAC;oBAAmE,CAAA;;;;;;;;gDAWjC,CAAC;;;;;;;;;;;;;;;;;;uBAwBD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EA0HrD,CAAZ;yBAA8E,CAAC;UAEnE,GACX;WAES,GAAN;;gBAE6B,GAAG;;;;;;;WAOA,GAAG;YACxB,GAAG;;;;;;;;;;;oBAiCmE,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA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G;IACH,OAAO,CAAC,eAAe;IAiBvB;;;;;;OAMG;IACU,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBhD;;;;;;;OAOG;YACW,gBAAgB;IAwG9B,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,kBAAkB;IAU1B;;;;;;;OAOG;IACH,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,sBAAsB;IAoE9B,OAAO,CAAC,mBAAmB;YA0Bb,eAAe;IAWtB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;IAK5B,gBAAgB,CAAC,WAAW,EAAE,GAAG;IAI1C,OAAO,CAAC,iBAAiB;IAQhB,mBAAmB,CAAC,OAAO,QAAK;IAKhC,mBAAmB,CAAC,OAAO,QAAK;IAKzC;;;OAGG;IACM,mBAAmB,CAAC,OAAO,QAAK;IAKzC;;;;;OAKG;cACgB,iBAAiB,IAAI,iBAAiB;IAazD;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAQnC;;;;;;OAMG;IACM,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE;IAkBlD;;;OAGG;IACH,OAAO,CAAC,cAAc;IASb,QAAQ;CA+BlB"}
|
package/dist/dts/grid-pro.d.ts
CHANGED
|
@@ -759,6 +759,12 @@ export declare class GridPro extends GridPro_base {
|
|
|
759
759
|
* @public
|
|
760
760
|
*/
|
|
761
761
|
get gridProDatasource(): GridProBaseDatasource;
|
|
762
|
+
/**
|
|
763
|
+
* Notifies the datasource of the currently visible columns so it can narrow the server request
|
|
764
|
+
* when `requestVisibleColumnsOnly` is enabled.
|
|
765
|
+
* @internal
|
|
766
|
+
*/
|
|
767
|
+
private notifyDatasourceVisibleColumns;
|
|
762
768
|
set gridOptions(options: GridOptionsConfig);
|
|
763
769
|
private setLocalGridOptions;
|
|
764
770
|
/**
|
|
@@ -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AAC,cAAc;IAStB,OAAO,CAAC,eAAe;CAMxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,EAAE,cAA0B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAM5B,CAAC"}
|
|
@@ -356,6 +356,11 @@ export class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
|
356
356
|
super(...arguments);
|
|
357
357
|
this.dataSubWasLoggedOff = false;
|
|
358
358
|
this.keepColDefsOnClearRowData = false;
|
|
359
|
+
/**
|
|
360
|
+
* Whether the datasource should request data only for the columns that are currently visible.
|
|
361
|
+
* @remarks Defaults to false. Concrete datasources that support column-scoped requests override this.
|
|
362
|
+
*/
|
|
363
|
+
this.requestVisibleColumnsOnly = false;
|
|
359
364
|
this.rowData = new Map();
|
|
360
365
|
this.transactionData = {
|
|
361
366
|
add: [],
|
|
@@ -553,6 +558,14 @@ export class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
|
553
558
|
loadMore() {
|
|
554
559
|
throw new Error('loadMore() method must be implemented by subclass');
|
|
555
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* Notifies the datasource of the field names of the currently visible columns.
|
|
563
|
+
* @remarks No-op by default. Datasources that support column-scoped requests override this to
|
|
564
|
+
* narrow the server query and reload data when the visible column set changes.
|
|
565
|
+
* @param visibleFields - Field names of the currently visible columns.
|
|
566
|
+
* @public
|
|
567
|
+
*/
|
|
568
|
+
setVisibleColumns(visibleFields) { }
|
|
556
569
|
restart() {
|
|
557
570
|
throw new Error('restart() method must be implemented by subclass');
|
|
558
571
|
}
|
|
@@ -48,6 +48,14 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
48
48
|
addIndex: 0,
|
|
49
49
|
};
|
|
50
50
|
this.keepColDefsOnClearRowData = false;
|
|
51
|
+
/**
|
|
52
|
+
* When enabled and column definitions are provided, the datasource requests data only for the
|
|
53
|
+
* columns that are currently visible. The visible set is seeded from the column config (columns
|
|
54
|
+
* not flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data
|
|
55
|
+
* is reloaded whenever that set changes.
|
|
56
|
+
* @remarks DATASERVER only. Defaults to false.
|
|
57
|
+
*/
|
|
58
|
+
this.requestVisibleColumnsOnly = false;
|
|
51
59
|
this.requiresFullRowDataAndColDefs = true;
|
|
52
60
|
this._lastMoreRows = false;
|
|
53
61
|
this._isMoreRowsResult = false;
|
|
@@ -176,6 +184,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
176
184
|
this.connectionSub = undefined;
|
|
177
185
|
}
|
|
178
186
|
this._sourceRef = undefined;
|
|
187
|
+
this._visibleColumns = undefined;
|
|
179
188
|
this.clearRowData();
|
|
180
189
|
this._lastMoreRows = false;
|
|
181
190
|
this._isMoreRowsResult = false;
|
|
@@ -564,6 +573,80 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
564
573
|
super.handleStreamDeletes(deletes);
|
|
565
574
|
this.updateCachedRowArray();
|
|
566
575
|
}
|
|
576
|
+
/**
|
|
577
|
+
* Extends the base options to constrain the requested fields to the visible columns when
|
|
578
|
+
* `requestVisibleColumnsOnly` is enabled.
|
|
579
|
+
* @remarks DATASERVER only; for other resource types the derived `fields` are ignored.
|
|
580
|
+
* @internal
|
|
581
|
+
*/
|
|
582
|
+
datasourceOptions() {
|
|
583
|
+
const options = super.datasourceOptions();
|
|
584
|
+
if (this.requestVisibleColumnsOnly) {
|
|
585
|
+
const fields = this.getRequestedFields();
|
|
586
|
+
if (fields) {
|
|
587
|
+
options.fields = fields;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
return options;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Builds the DATASERVER `FIELDS` string (space-separated) from the visible columns, always
|
|
594
|
+
* including the `rowId` so rows can be tracked.
|
|
595
|
+
* @internal
|
|
596
|
+
*/
|
|
597
|
+
getRequestedFields() {
|
|
598
|
+
var _a;
|
|
599
|
+
const visibleColumns = (_a = this._visibleColumns) !== null && _a !== void 0 ? _a : this.getConfiguredVisibleColumns();
|
|
600
|
+
if (!visibleColumns.length)
|
|
601
|
+
return undefined;
|
|
602
|
+
const fields = visibleColumns.includes(this.rowId)
|
|
603
|
+
? visibleColumns
|
|
604
|
+
: [this.rowId, ...visibleColumns];
|
|
605
|
+
return fields.join(' ');
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Returns the field names of the configured columns that are not hidden, used to seed the visible
|
|
609
|
+
* set before the host grid reports runtime visibility.
|
|
610
|
+
* @internal
|
|
611
|
+
*/
|
|
612
|
+
getConfiguredVisibleColumns() {
|
|
613
|
+
var _a, _b;
|
|
614
|
+
const columnDefs = (_b = (_a = this.deferredGridOptions) === null || _a === void 0 ? void 0 : _a.columnDefs) !== null && _b !== void 0 ? _b : [];
|
|
615
|
+
return columnDefs
|
|
616
|
+
.filter((colDef) => !!colDef.field && !colDef.hide)
|
|
617
|
+
.map((colDef) => colDef.field);
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Updates the set of visible columns and reloads the data when the set changes.
|
|
621
|
+
* @remarks Called by the host grid on column visibility changes when `requestVisibleColumnsOnly`
|
|
622
|
+
* is enabled. DATASERVER only; no-ops for other resource types.
|
|
623
|
+
* @param visibleFields - Field names of the currently visible columns.
|
|
624
|
+
* @public
|
|
625
|
+
*/
|
|
626
|
+
setVisibleColumns(visibleFields) {
|
|
627
|
+
var _a;
|
|
628
|
+
if (!this.requestVisibleColumnsOnly ||
|
|
629
|
+
this.datasource.resourceType !== ResourceType.DATASERVER) {
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
const previous = (_a = this._visibleColumns) !== null && _a !== void 0 ? _a : this.getConfiguredVisibleColumns();
|
|
633
|
+
this._visibleColumns = visibleFields;
|
|
634
|
+
if (!this.datasource.initialized || !this.columnsChanged(previous, visibleFields)) {
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
this.reloadResourceData();
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Compares two column field lists irrespective of order.
|
|
641
|
+
* @internal
|
|
642
|
+
*/
|
|
643
|
+
columnsChanged(previous, next) {
|
|
644
|
+
if (previous.length !== next.length)
|
|
645
|
+
return true;
|
|
646
|
+
const previousSorted = [...previous].sort();
|
|
647
|
+
const nextSorted = [...next].sort();
|
|
648
|
+
return nextSorted.some((field, index) => field !== previousSorted[index]);
|
|
649
|
+
}
|
|
567
650
|
loadMore() {
|
|
568
651
|
switch (this.datasource.resourceType) {
|
|
569
652
|
case ResourceType.DATASERVER:
|
|
@@ -596,6 +679,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
596
679
|
__decorate([
|
|
597
680
|
attr({ mode: 'boolean', attribute: 'keep-col-defs-on-clear-row-data' })
|
|
598
681
|
], GridProGenesisDatasource.prototype, "keepColDefsOnClearRowData", void 0);
|
|
682
|
+
__decorate([
|
|
683
|
+
attr({ mode: 'boolean', attribute: 'request-visible-columns-only' })
|
|
684
|
+
], GridProGenesisDatasource.prototype, "requestVisibleColumnsOnly", void 0);
|
|
599
685
|
GridProGenesisDatasource = __decorate([
|
|
600
686
|
customElement({
|
|
601
687
|
name: 'grid-pro-genesis-datasource',
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -885,6 +885,22 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
885
885
|
this.querySelector('grid-pro-client-side-datasource') ||
|
|
886
886
|
this.querySelector('grid-pro-server-side-datasource'));
|
|
887
887
|
}
|
|
888
|
+
/**
|
|
889
|
+
* Notifies the datasource of the currently visible columns so it can narrow the server request
|
|
890
|
+
* when `requestVisibleColumnsOnly` is enabled.
|
|
891
|
+
* @internal
|
|
892
|
+
*/
|
|
893
|
+
notifyDatasourceVisibleColumns() {
|
|
894
|
+
var _a;
|
|
895
|
+
const datasource = this.gridProDatasource;
|
|
896
|
+
if (!(datasource === null || datasource === void 0 ? void 0 : datasource.requestVisibleColumnsOnly) || !this.columnApi)
|
|
897
|
+
return;
|
|
898
|
+
const visibleFields = ((_a = this.columnApi.getColumns()) !== null && _a !== void 0 ? _a : [])
|
|
899
|
+
.filter((column) => column.isVisible())
|
|
900
|
+
.map((column) => column.getColDef().field)
|
|
901
|
+
.filter((field) => !!field);
|
|
902
|
+
datasource.setVisibleColumns(visibleFields);
|
|
903
|
+
}
|
|
888
904
|
set gridOptions(options) {
|
|
889
905
|
const gridOnChangeCallback = () => {
|
|
890
906
|
if (this.disposed || !this.isConnected)
|
|
@@ -892,6 +908,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
892
908
|
this.debouncedSaveColumnState();
|
|
893
909
|
this.debouncedColumnAutosize();
|
|
894
910
|
this.invalidateColumnWidthCache();
|
|
911
|
+
this.notifyDatasourceVisibleColumns();
|
|
895
912
|
};
|
|
896
913
|
Array.from(this.attributes).forEach((attribute) => {
|
|
897
914
|
const attrName = this.agPropertiesMap[attribute.name];
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -14750,6 +14750,36 @@
|
|
|
14750
14750
|
"isAbstract": false,
|
|
14751
14751
|
"name": "reloadResourceData"
|
|
14752
14752
|
},
|
|
14753
|
+
{
|
|
14754
|
+
"kind": "Property",
|
|
14755
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProBaseDatasource#requestVisibleColumnsOnly:member",
|
|
14756
|
+
"docComment": "/**\n * Whether the datasource should request data only for the columns that are currently visible.\n *\n * @remarks\n *\n * Defaults to false. Concrete datasources that support column-scoped requests override this.\n */\n",
|
|
14757
|
+
"excerptTokens": [
|
|
14758
|
+
{
|
|
14759
|
+
"kind": "Content",
|
|
14760
|
+
"text": "requestVisibleColumnsOnly: "
|
|
14761
|
+
},
|
|
14762
|
+
{
|
|
14763
|
+
"kind": "Content",
|
|
14764
|
+
"text": "boolean"
|
|
14765
|
+
},
|
|
14766
|
+
{
|
|
14767
|
+
"kind": "Content",
|
|
14768
|
+
"text": ";"
|
|
14769
|
+
}
|
|
14770
|
+
],
|
|
14771
|
+
"isReadonly": false,
|
|
14772
|
+
"isOptional": false,
|
|
14773
|
+
"releaseTag": "Public",
|
|
14774
|
+
"name": "requestVisibleColumnsOnly",
|
|
14775
|
+
"propertyTypeTokenRange": {
|
|
14776
|
+
"startIndex": 1,
|
|
14777
|
+
"endIndex": 2
|
|
14778
|
+
},
|
|
14779
|
+
"isStatic": false,
|
|
14780
|
+
"isProtected": false,
|
|
14781
|
+
"isAbstract": false
|
|
14782
|
+
},
|
|
14753
14783
|
{
|
|
14754
14784
|
"kind": "Method",
|
|
14755
14785
|
"canonicalReference": "@genesislcap/grid-pro!GridProBaseDatasource#restart:member(1)",
|
|
@@ -14864,6 +14894,54 @@
|
|
|
14864
14894
|
"isAbstract": false,
|
|
14865
14895
|
"name": "setDisconnected"
|
|
14866
14896
|
},
|
|
14897
|
+
{
|
|
14898
|
+
"kind": "Method",
|
|
14899
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProBaseDatasource#setVisibleColumns:member(1)",
|
|
14900
|
+
"docComment": "/**\n * Notifies the datasource of the field names of the currently visible columns.\n *\n * @remarks\n *\n * No-op by default. Datasources that support column-scoped requests override this to narrow the server query and reload data when the visible column set changes.\n *\n * @param visibleFields - Field names of the currently visible columns.\n *\n * @public\n */\n",
|
|
14901
|
+
"excerptTokens": [
|
|
14902
|
+
{
|
|
14903
|
+
"kind": "Content",
|
|
14904
|
+
"text": "setVisibleColumns(visibleFields: "
|
|
14905
|
+
},
|
|
14906
|
+
{
|
|
14907
|
+
"kind": "Content",
|
|
14908
|
+
"text": "string[]"
|
|
14909
|
+
},
|
|
14910
|
+
{
|
|
14911
|
+
"kind": "Content",
|
|
14912
|
+
"text": "): "
|
|
14913
|
+
},
|
|
14914
|
+
{
|
|
14915
|
+
"kind": "Content",
|
|
14916
|
+
"text": "void"
|
|
14917
|
+
},
|
|
14918
|
+
{
|
|
14919
|
+
"kind": "Content",
|
|
14920
|
+
"text": ";"
|
|
14921
|
+
}
|
|
14922
|
+
],
|
|
14923
|
+
"isStatic": false,
|
|
14924
|
+
"returnTypeTokenRange": {
|
|
14925
|
+
"startIndex": 3,
|
|
14926
|
+
"endIndex": 4
|
|
14927
|
+
},
|
|
14928
|
+
"releaseTag": "Public",
|
|
14929
|
+
"isProtected": false,
|
|
14930
|
+
"overloadIndex": 1,
|
|
14931
|
+
"parameters": [
|
|
14932
|
+
{
|
|
14933
|
+
"parameterName": "visibleFields",
|
|
14934
|
+
"parameterTypeTokenRange": {
|
|
14935
|
+
"startIndex": 1,
|
|
14936
|
+
"endIndex": 2
|
|
14937
|
+
},
|
|
14938
|
+
"isOptional": false
|
|
14939
|
+
}
|
|
14940
|
+
],
|
|
14941
|
+
"isOptional": false,
|
|
14942
|
+
"isAbstract": false,
|
|
14943
|
+
"name": "setVisibleColumns"
|
|
14944
|
+
},
|
|
14867
14945
|
{
|
|
14868
14946
|
"kind": "Method",
|
|
14869
14947
|
"canonicalReference": "@genesislcap/grid-pro!GridProBaseDatasource#subscribeToConnection:member(1)",
|
|
@@ -19958,6 +20036,36 @@
|
|
|
19958
20036
|
"isAbstract": false,
|
|
19959
20037
|
"name": "requestChanged"
|
|
19960
20038
|
},
|
|
20039
|
+
{
|
|
20040
|
+
"kind": "Property",
|
|
20041
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#requestVisibleColumnsOnly:member",
|
|
20042
|
+
"docComment": "/**\n * When enabled and column definitions are provided, the datasource requests data only for the columns that are currently visible. The visible set is seeded from the column config (columns not flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data is reloaded whenever that set changes.\n *\n * @remarks\n *\n * DATASERVER only. Defaults to false.\n */\n",
|
|
20043
|
+
"excerptTokens": [
|
|
20044
|
+
{
|
|
20045
|
+
"kind": "Content",
|
|
20046
|
+
"text": "requestVisibleColumnsOnly: "
|
|
20047
|
+
},
|
|
20048
|
+
{
|
|
20049
|
+
"kind": "Content",
|
|
20050
|
+
"text": "boolean"
|
|
20051
|
+
},
|
|
20052
|
+
{
|
|
20053
|
+
"kind": "Content",
|
|
20054
|
+
"text": ";"
|
|
20055
|
+
}
|
|
20056
|
+
],
|
|
20057
|
+
"isReadonly": false,
|
|
20058
|
+
"isOptional": false,
|
|
20059
|
+
"releaseTag": "Public",
|
|
20060
|
+
"name": "requestVisibleColumnsOnly",
|
|
20061
|
+
"propertyTypeTokenRange": {
|
|
20062
|
+
"startIndex": 1,
|
|
20063
|
+
"endIndex": 2
|
|
20064
|
+
},
|
|
20065
|
+
"isStatic": false,
|
|
20066
|
+
"isProtected": false,
|
|
20067
|
+
"isAbstract": false
|
|
20068
|
+
},
|
|
19961
20069
|
{
|
|
19962
20070
|
"kind": "Method",
|
|
19963
20071
|
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#reset:member(1)",
|
|
@@ -20153,6 +20261,54 @@
|
|
|
20153
20261
|
"isAbstract": false,
|
|
20154
20262
|
"name": "setFilter"
|
|
20155
20263
|
},
|
|
20264
|
+
{
|
|
20265
|
+
"kind": "Method",
|
|
20266
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#setVisibleColumns:member(1)",
|
|
20267
|
+
"docComment": "/**\n * Updates the set of visible columns and reloads the data when the set changes.\n *\n * @remarks\n *\n * Called by the host grid on column visibility changes when `requestVisibleColumnsOnly` is enabled. DATASERVER only; no-ops for other resource types.\n *\n * @param visibleFields - Field names of the currently visible columns.\n *\n * @public\n */\n",
|
|
20268
|
+
"excerptTokens": [
|
|
20269
|
+
{
|
|
20270
|
+
"kind": "Content",
|
|
20271
|
+
"text": "setVisibleColumns(visibleFields: "
|
|
20272
|
+
},
|
|
20273
|
+
{
|
|
20274
|
+
"kind": "Content",
|
|
20275
|
+
"text": "string[]"
|
|
20276
|
+
},
|
|
20277
|
+
{
|
|
20278
|
+
"kind": "Content",
|
|
20279
|
+
"text": "): "
|
|
20280
|
+
},
|
|
20281
|
+
{
|
|
20282
|
+
"kind": "Content",
|
|
20283
|
+
"text": "void"
|
|
20284
|
+
},
|
|
20285
|
+
{
|
|
20286
|
+
"kind": "Content",
|
|
20287
|
+
"text": ";"
|
|
20288
|
+
}
|
|
20289
|
+
],
|
|
20290
|
+
"isStatic": false,
|
|
20291
|
+
"returnTypeTokenRange": {
|
|
20292
|
+
"startIndex": 3,
|
|
20293
|
+
"endIndex": 4
|
|
20294
|
+
},
|
|
20295
|
+
"releaseTag": "Public",
|
|
20296
|
+
"isProtected": false,
|
|
20297
|
+
"overloadIndex": 1,
|
|
20298
|
+
"parameters": [
|
|
20299
|
+
{
|
|
20300
|
+
"parameterName": "visibleFields",
|
|
20301
|
+
"parameterTypeTokenRange": {
|
|
20302
|
+
"startIndex": 1,
|
|
20303
|
+
"endIndex": 2
|
|
20304
|
+
},
|
|
20305
|
+
"isOptional": false
|
|
20306
|
+
}
|
|
20307
|
+
],
|
|
20308
|
+
"isOptional": false,
|
|
20309
|
+
"isAbstract": false,
|
|
20310
|
+
"name": "setVisibleColumns"
|
|
20311
|
+
},
|
|
20156
20312
|
{
|
|
20157
20313
|
"kind": "Property",
|
|
20158
20314
|
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#transactionData:member",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -2454,6 +2454,12 @@ export declare class GridPro extends GridPro_base {
|
|
|
2454
2454
|
* @public
|
|
2455
2455
|
*/
|
|
2456
2456
|
get gridProDatasource(): GridProBaseDatasource;
|
|
2457
|
+
/**
|
|
2458
|
+
* Notifies the datasource of the currently visible columns so it can narrow the server request
|
|
2459
|
+
* when `requestVisibleColumnsOnly` is enabled.
|
|
2460
|
+
* @internal
|
|
2461
|
+
*/
|
|
2462
|
+
private notifyDatasourceVisibleColumns;
|
|
2457
2463
|
set gridOptions(options: GridOptionsConfig);
|
|
2458
2464
|
private setLocalGridOptions;
|
|
2459
2465
|
/**
|
|
@@ -2897,6 +2903,11 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
2897
2903
|
export declare class GridProBaseDatasource extends GenesisGridDatasourceElement {
|
|
2898
2904
|
protected dataSubWasLoggedOff: boolean;
|
|
2899
2905
|
keepColDefsOnClearRowData: boolean;
|
|
2906
|
+
/**
|
|
2907
|
+
* Whether the datasource should request data only for the columns that are currently visible.
|
|
2908
|
+
* @remarks Defaults to false. Concrete datasources that support column-scoped requests override this.
|
|
2909
|
+
*/
|
|
2910
|
+
requestVisibleColumnsOnly: boolean;
|
|
2900
2911
|
rowData: Map<string, any>;
|
|
2901
2912
|
protected transactionData: TransactionData;
|
|
2902
2913
|
protected connectionSub: Subscription | undefined;
|
|
@@ -2918,6 +2929,14 @@ export declare class GridProBaseDatasource extends GenesisGridDatasourceElement
|
|
|
2918
2929
|
private mapTransaction;
|
|
2919
2930
|
protected pagination: boolean;
|
|
2920
2931
|
loadMore(): void;
|
|
2932
|
+
/**
|
|
2933
|
+
* Notifies the datasource of the field names of the currently visible columns.
|
|
2934
|
+
* @remarks No-op by default. Datasources that support column-scoped requests override this to
|
|
2935
|
+
* narrow the server query and reload data when the visible column set changes.
|
|
2936
|
+
* @param visibleFields - Field names of the currently visible columns.
|
|
2937
|
+
* @public
|
|
2938
|
+
*/
|
|
2939
|
+
setVisibleColumns(visibleFields: string[]): void;
|
|
2921
2940
|
restart(): void;
|
|
2922
2941
|
reloadResourceData(): void;
|
|
2923
2942
|
destroy(): void;
|
|
@@ -4372,6 +4391,15 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
4372
4391
|
requestChanged(oldRequest: string, newRequest: string): void;
|
|
4373
4392
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
4374
4393
|
keepColDefsOnClearRowData: boolean;
|
|
4394
|
+
/**
|
|
4395
|
+
* When enabled and column definitions are provided, the datasource requests data only for the
|
|
4396
|
+
* columns that are currently visible. The visible set is seeded from the column config (columns
|
|
4397
|
+
* not flagged with `hide`) and updated by the host grid via `setVisibleColumns`; the data
|
|
4398
|
+
* is reloaded whenever that set changes.
|
|
4399
|
+
* @remarks DATASERVER only. Defaults to false.
|
|
4400
|
+
*/
|
|
4401
|
+
requestVisibleColumnsOnly: boolean;
|
|
4402
|
+
private _visibleColumns;
|
|
4375
4403
|
private dataSub;
|
|
4376
4404
|
private updateSub;
|
|
4377
4405
|
private requiresFullRowDataAndColDefs;
|
|
@@ -4488,6 +4516,38 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
4488
4516
|
* @param deletes - List of records to remove from the grid stream
|
|
4489
4517
|
*/
|
|
4490
4518
|
handleStreamDeletes(deletes?: any[]): void;
|
|
4519
|
+
/**
|
|
4520
|
+
* Extends the base options to constrain the requested fields to the visible columns when
|
|
4521
|
+
* `requestVisibleColumnsOnly` is enabled.
|
|
4522
|
+
* @remarks DATASERVER only; for other resource types the derived `fields` are ignored.
|
|
4523
|
+
* @internal
|
|
4524
|
+
*/
|
|
4525
|
+
protected datasourceOptions(): DatasourceOptions;
|
|
4526
|
+
/**
|
|
4527
|
+
* Builds the DATASERVER `FIELDS` string (space-separated) from the visible columns, always
|
|
4528
|
+
* including the `rowId` so rows can be tracked.
|
|
4529
|
+
* @internal
|
|
4530
|
+
*/
|
|
4531
|
+
private getRequestedFields;
|
|
4532
|
+
/**
|
|
4533
|
+
* Returns the field names of the configured columns that are not hidden, used to seed the visible
|
|
4534
|
+
* set before the host grid reports runtime visibility.
|
|
4535
|
+
* @internal
|
|
4536
|
+
*/
|
|
4537
|
+
private getConfiguredVisibleColumns;
|
|
4538
|
+
/**
|
|
4539
|
+
* Updates the set of visible columns and reloads the data when the set changes.
|
|
4540
|
+
* @remarks Called by the host grid on column visibility changes when `requestVisibleColumnsOnly`
|
|
4541
|
+
* is enabled. DATASERVER only; no-ops for other resource types.
|
|
4542
|
+
* @param visibleFields - Field names of the currently visible columns.
|
|
4543
|
+
* @public
|
|
4544
|
+
*/
|
|
4545
|
+
setVisibleColumns(visibleFields: string[]): void;
|
|
4546
|
+
/**
|
|
4547
|
+
* Compares two column field lists irrespective of order.
|
|
4548
|
+
* @internal
|
|
4549
|
+
*/
|
|
4550
|
+
private columnsChanged;
|
|
4491
4551
|
loadMore(): void;
|
|
4492
4552
|
}
|
|
4493
4553
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/grid-pro",
|
|
3
3
|
"description": "Genesis Foundation AG Grid",
|
|
4
|
-
"version": "14.451.
|
|
4
|
+
"version": "14.451.5-alpha-a976431.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@genesislcap/foundation-testing": "14.451.
|
|
44
|
-
"@genesislcap/genx": "14.451.
|
|
45
|
-
"@genesislcap/rollup-builder": "14.451.
|
|
46
|
-
"@genesislcap/ts-builder": "14.451.
|
|
47
|
-
"@genesislcap/uvu-playwright-builder": "14.451.
|
|
48
|
-
"@genesislcap/vite-builder": "14.451.
|
|
49
|
-
"@genesislcap/webpack-builder": "14.451.
|
|
43
|
+
"@genesislcap/foundation-testing": "14.451.5-alpha-a976431.0",
|
|
44
|
+
"@genesislcap/genx": "14.451.5-alpha-a976431.0",
|
|
45
|
+
"@genesislcap/rollup-builder": "14.451.5-alpha-a976431.0",
|
|
46
|
+
"@genesislcap/ts-builder": "14.451.5-alpha-a976431.0",
|
|
47
|
+
"@genesislcap/uvu-playwright-builder": "14.451.5-alpha-a976431.0",
|
|
48
|
+
"@genesislcap/vite-builder": "14.451.5-alpha-a976431.0",
|
|
49
|
+
"@genesislcap/webpack-builder": "14.451.5-alpha-a976431.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@genesislcap/foundation-comms": "14.451.
|
|
53
|
-
"@genesislcap/foundation-criteria": "14.451.
|
|
54
|
-
"@genesislcap/foundation-logger": "14.451.
|
|
55
|
-
"@genesislcap/foundation-ui": "14.451.
|
|
56
|
-
"@genesislcap/foundation-utils": "14.451.
|
|
52
|
+
"@genesislcap/foundation-comms": "14.451.5-alpha-a976431.0",
|
|
53
|
+
"@genesislcap/foundation-criteria": "14.451.5-alpha-a976431.0",
|
|
54
|
+
"@genesislcap/foundation-logger": "14.451.5-alpha-a976431.0",
|
|
55
|
+
"@genesislcap/foundation-ui": "14.451.5-alpha-a976431.0",
|
|
56
|
+
"@genesislcap/foundation-utils": "14.451.5-alpha-a976431.0",
|
|
57
57
|
"@microsoft/fast-colors": "5.3.1",
|
|
58
58
|
"@microsoft/fast-components": "2.30.6",
|
|
59
59
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"require": "./dist/react.cjs"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "0f9cc6cf02dff9aa9015c442147912ee72074f72"
|
|
95
95
|
}
|