@genesislcap/grid-pro 14.48.0 → 14.49.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 +141 -5
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +10 -5
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +26 -6
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/dts/utils/array.d.ts +9 -0
- package/dist/dts/utils/array.d.ts.map +1 -0
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +20 -4
- package/dist/esm/grid-pro.js +81 -43
- package/dist/esm/utils/array.js +27 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/grid-pro.api.json +293 -7
- package/dist/grid-pro.d.ts +44 -10
- package/docs/api/grid-pro.converttokebabcase.md +13 -0
- package/docs/api/grid-pro.gridpro.agattributes.md +1 -1
- package/docs/api/grid-pro.gridpro.agpropertiesmap.md +1 -1
- package/docs/api/grid-pro.gridpro.applytemplatedefinitions.md +3 -2
- package/docs/api/grid-pro.gridpro.getsavedcolumnstate.md +21 -0
- package/docs/api/grid-pro.gridpro.gridprogenesisdatasource.md +11 -0
- package/docs/api/grid-pro.gridpro.md +5 -3
- package/docs/api/grid-pro.gridprogenesisdatasource.md +2 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.refreshrows.md +17 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.rowdatamapper.md +13 -0
- package/docs/api/grid-pro.md +2 -0
- package/docs/api/grid-pro.mergeanddedupcoldefwithcolumnstate.md +31 -0
- package/docs/api-report.md +15 -3
- package/package.json +7 -7
|
@@ -263,6 +263,26 @@
|
|
|
263
263
|
"kind": "javascript-module",
|
|
264
264
|
"path": "src/grid-pro.ts",
|
|
265
265
|
"declarations": [
|
|
266
|
+
{
|
|
267
|
+
"kind": "function",
|
|
268
|
+
"name": "convertToKebabCase",
|
|
269
|
+
"parameters": [
|
|
270
|
+
{
|
|
271
|
+
"name": "value",
|
|
272
|
+
"type": {
|
|
273
|
+
"text": "string"
|
|
274
|
+
},
|
|
275
|
+
"description": "The value to convert to Kebab case."
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"description": "Convert string values from 'camelCase' to 'kebab-case'",
|
|
279
|
+
"return": {
|
|
280
|
+
"type": {
|
|
281
|
+
"text": ""
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"privacy": "public"
|
|
285
|
+
},
|
|
266
286
|
{
|
|
267
287
|
"kind": "class",
|
|
268
288
|
"description": "The Grid Pro element.",
|
|
@@ -429,15 +449,18 @@
|
|
|
429
449
|
{
|
|
430
450
|
"kind": "field",
|
|
431
451
|
"name": "agAttributes",
|
|
432
|
-
"privacy": "protected",
|
|
433
452
|
"type": {
|
|
434
|
-
"text": "
|
|
453
|
+
"text": "Record<string, string>"
|
|
435
454
|
},
|
|
455
|
+
"privacy": "protected",
|
|
436
456
|
"default": "{}"
|
|
437
457
|
},
|
|
438
458
|
{
|
|
439
459
|
"kind": "field",
|
|
440
460
|
"name": "agPropertiesMap",
|
|
461
|
+
"type": {
|
|
462
|
+
"text": "Record<string, string>"
|
|
463
|
+
},
|
|
441
464
|
"privacy": "protected"
|
|
442
465
|
},
|
|
443
466
|
{
|
|
@@ -493,7 +516,7 @@
|
|
|
493
516
|
},
|
|
494
517
|
{
|
|
495
518
|
"kind": "method",
|
|
496
|
-
"name": "
|
|
519
|
+
"name": "saveColumnState",
|
|
497
520
|
"privacy": "private",
|
|
498
521
|
"return": {
|
|
499
522
|
"type": {
|
|
@@ -503,7 +526,18 @@
|
|
|
503
526
|
},
|
|
504
527
|
{
|
|
505
528
|
"kind": "method",
|
|
506
|
-
"name": "
|
|
529
|
+
"name": "getSavedColumnState",
|
|
530
|
+
"return": {
|
|
531
|
+
"type": {
|
|
532
|
+
"text": "ColumnState[]"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"description": "Gets the saved grid ColumnState[] from local storage",
|
|
536
|
+
"privacy": "public"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"kind": "method",
|
|
540
|
+
"name": "restoreColumnState",
|
|
507
541
|
"privacy": "private",
|
|
508
542
|
"return": {
|
|
509
543
|
"type": {
|
|
@@ -519,6 +553,14 @@
|
|
|
519
553
|
},
|
|
520
554
|
"privacy": "public"
|
|
521
555
|
},
|
|
556
|
+
{
|
|
557
|
+
"kind": "field",
|
|
558
|
+
"name": "gridProGenesisDatasource",
|
|
559
|
+
"type": {
|
|
560
|
+
"text": "GridProGenesisDatasource"
|
|
561
|
+
},
|
|
562
|
+
"readonly": true
|
|
563
|
+
},
|
|
522
564
|
{
|
|
523
565
|
"kind": "method",
|
|
524
566
|
"name": "enableFlashingRows",
|
|
@@ -530,10 +572,13 @@
|
|
|
530
572
|
"parameters": [
|
|
531
573
|
{
|
|
532
574
|
"name": "columnDefs",
|
|
533
|
-
"default": "[]",
|
|
534
575
|
"type": {
|
|
535
576
|
"text": "ColDef[]"
|
|
536
577
|
}
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "deferredColumnDefs",
|
|
581
|
+
"default": "false"
|
|
537
582
|
}
|
|
538
583
|
]
|
|
539
584
|
},
|
|
@@ -711,6 +756,14 @@
|
|
|
711
756
|
}
|
|
712
757
|
],
|
|
713
758
|
"exports": [
|
|
759
|
+
{
|
|
760
|
+
"kind": "js",
|
|
761
|
+
"name": "convertToKebabCase",
|
|
762
|
+
"declaration": {
|
|
763
|
+
"name": "convertToKebabCase",
|
|
764
|
+
"module": "src/grid-pro.ts"
|
|
765
|
+
}
|
|
766
|
+
},
|
|
714
767
|
{
|
|
715
768
|
"kind": "js",
|
|
716
769
|
"name": "GridPro",
|
|
@@ -3259,6 +3312,14 @@
|
|
|
3259
3312
|
},
|
|
3260
3313
|
"default": "false"
|
|
3261
3314
|
},
|
|
3315
|
+
{
|
|
3316
|
+
"kind": "field",
|
|
3317
|
+
"name": "rowDataMapper",
|
|
3318
|
+
"type": {
|
|
3319
|
+
"text": "Function"
|
|
3320
|
+
},
|
|
3321
|
+
"description": "Allows grid data updates to be processed via and external function before applying in grid"
|
|
3322
|
+
},
|
|
3262
3323
|
{
|
|
3263
3324
|
"kind": "field",
|
|
3264
3325
|
"name": "dataSub",
|
|
@@ -3405,6 +3466,11 @@
|
|
|
3405
3466
|
"description": "Restarts the datasource, uses `deinit` and `init` in sequence.",
|
|
3406
3467
|
"privacy": "public"
|
|
3407
3468
|
},
|
|
3469
|
+
{
|
|
3470
|
+
"kind": "method",
|
|
3471
|
+
"name": "refreshRows",
|
|
3472
|
+
"description": "Force the grid to redispatch the current rows"
|
|
3473
|
+
},
|
|
3408
3474
|
{
|
|
3409
3475
|
"kind": "method",
|
|
3410
3476
|
"name": "clearRowData",
|
|
@@ -3498,6 +3564,19 @@
|
|
|
3498
3564
|
}
|
|
3499
3565
|
]
|
|
3500
3566
|
},
|
|
3567
|
+
{
|
|
3568
|
+
"kind": "method",
|
|
3569
|
+
"name": "mapTransaction",
|
|
3570
|
+
"privacy": "private",
|
|
3571
|
+
"parameters": [
|
|
3572
|
+
{
|
|
3573
|
+
"name": "transaction",
|
|
3574
|
+
"type": {
|
|
3575
|
+
"text": "RowDataTransaction"
|
|
3576
|
+
}
|
|
3577
|
+
}
|
|
3578
|
+
]
|
|
3579
|
+
},
|
|
3501
3580
|
{
|
|
3502
3581
|
"kind": "method",
|
|
3503
3582
|
"name": "handleStreamInserts",
|
|
@@ -3771,11 +3850,68 @@
|
|
|
3771
3850
|
"declarations": [],
|
|
3772
3851
|
"exports": []
|
|
3773
3852
|
},
|
|
3853
|
+
{
|
|
3854
|
+
"kind": "javascript-module",
|
|
3855
|
+
"path": "src/utils/array.ts",
|
|
3856
|
+
"declarations": [
|
|
3857
|
+
{
|
|
3858
|
+
"kind": "function",
|
|
3859
|
+
"name": "mergeAndDedupColDefWithColumnState",
|
|
3860
|
+
"return": {
|
|
3861
|
+
"type": {
|
|
3862
|
+
"text": "ColDef[]"
|
|
3863
|
+
}
|
|
3864
|
+
},
|
|
3865
|
+
"parameters": [
|
|
3866
|
+
{
|
|
3867
|
+
"name": "colDefs",
|
|
3868
|
+
"type": {
|
|
3869
|
+
"text": "ColDef[]"
|
|
3870
|
+
}
|
|
3871
|
+
},
|
|
3872
|
+
{
|
|
3873
|
+
"name": "columnStates",
|
|
3874
|
+
"type": {
|
|
3875
|
+
"text": "ColumnState[]"
|
|
3876
|
+
}
|
|
3877
|
+
},
|
|
3878
|
+
{
|
|
3879
|
+
"name": "arr1Field",
|
|
3880
|
+
"default": "'field'"
|
|
3881
|
+
},
|
|
3882
|
+
{
|
|
3883
|
+
"name": "arr2Field",
|
|
3884
|
+
"default": "'colId'"
|
|
3885
|
+
}
|
|
3886
|
+
],
|
|
3887
|
+
"description": "Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.",
|
|
3888
|
+
"privacy": "public"
|
|
3889
|
+
}
|
|
3890
|
+
],
|
|
3891
|
+
"exports": [
|
|
3892
|
+
{
|
|
3893
|
+
"kind": "js",
|
|
3894
|
+
"name": "mergeAndDedupColDefWithColumnState",
|
|
3895
|
+
"declaration": {
|
|
3896
|
+
"name": "mergeAndDedupColDefWithColumnState",
|
|
3897
|
+
"module": "src/utils/array.ts"
|
|
3898
|
+
}
|
|
3899
|
+
}
|
|
3900
|
+
]
|
|
3901
|
+
},
|
|
3774
3902
|
{
|
|
3775
3903
|
"kind": "javascript-module",
|
|
3776
3904
|
"path": "src/utils/index.ts",
|
|
3777
3905
|
"declarations": [],
|
|
3778
3906
|
"exports": [
|
|
3907
|
+
{
|
|
3908
|
+
"kind": "js",
|
|
3909
|
+
"name": "*",
|
|
3910
|
+
"declaration": {
|
|
3911
|
+
"name": "*",
|
|
3912
|
+
"package": "./array"
|
|
3913
|
+
}
|
|
3914
|
+
},
|
|
3779
3915
|
{
|
|
3780
3916
|
"kind": "js",
|
|
3781
3917
|
"name": "*",
|
|
@@ -46,11 +46,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
46
46
|
readonly classList: DOMTokenList;
|
|
47
47
|
className: string;
|
|
48
48
|
readonly clientHeight: number;
|
|
49
|
-
readonly clientLeft: number;
|
|
50
|
-
* Initializes the datasource.
|
|
51
|
-
* @public
|
|
52
|
-
* @remarks This method is called automatically when the element is connected to the DOM.
|
|
53
|
-
*/
|
|
49
|
+
readonly clientLeft: number;
|
|
54
50
|
readonly clientTop: number;
|
|
55
51
|
readonly clientWidth: number;
|
|
56
52
|
id: string;
|
|
@@ -360,6 +356,10 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
360
356
|
*/
|
|
361
357
|
rowIdAttr: any;
|
|
362
358
|
restartOnReconnection: boolean;
|
|
359
|
+
/**
|
|
360
|
+
* Allows grid data updates to be processed via and external function before applying in grid
|
|
361
|
+
*/
|
|
362
|
+
rowDataMapper: Function;
|
|
363
363
|
private dataSub;
|
|
364
364
|
private updateSub;
|
|
365
365
|
private connectionSub;
|
|
@@ -398,6 +398,10 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
398
398
|
* @public
|
|
399
399
|
*/
|
|
400
400
|
restart(): void;
|
|
401
|
+
/**
|
|
402
|
+
* Force the grid to redispatch the current rows
|
|
403
|
+
*/
|
|
404
|
+
refreshRows(): void;
|
|
401
405
|
/**
|
|
402
406
|
* Sends a DATA_LOGOFF when the resource is an active stream
|
|
403
407
|
* @remarks Will only happen for streaming DATASERER resources.
|
|
@@ -412,6 +416,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
412
416
|
private handleStreamResult;
|
|
413
417
|
private applyRequestServerData;
|
|
414
418
|
private applyDataserverData;
|
|
419
|
+
private mapTransaction;
|
|
415
420
|
private handleStreamInserts;
|
|
416
421
|
private handleStreamDeletes;
|
|
417
422
|
private handleStreamUpdates;
|
|
@@ -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":"AAAA,OAAO,EAAU,WAAW,EAAsB,MAAM,yBAAyB,CAAC;AAClF,OAAO,EACL,OAAO,EAEP,UAAU,EAYX,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;;;;;;wCA6D7D;;;;;OAKG
|
|
1
|
+
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAAsB,MAAM,yBAAyB,CAAC;AAClF,OAAO,EACL,OAAO,EAEP,UAAU,EAYX,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;;;;;;wCA6D7D;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjDL;;;;GAIG;AACH,qBAGa,wBAAyB,SAAQ,6BAAiC;IACpE,OAAO,EAAG,OAAO,CAAC;IACf,UAAU,EAAG,UAAU,CAAC;IAExB,mBAAmB,EAAE,WAAW,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAalD,MAAM,EAAE,MAAM,CAAC;IACgC,UAAU,UAAS;IACvC,OAAO,EAAE,MAAM,CAAmC;IAClD,OAAO,EAAE,MAAM,CAAoC;IAC3C,eAAe,EAAE,MAAM,CACf;IACI,UAAU,UAAS;IACvC,OAAO,EAAE,MAAM,CAAC;IACrC,OAAO,EAAE,GAAG,CAAC;IACa,YAAY,EAAE,MAAM,CAAC;IAC3D,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAK3B,OAAO,UAAS;IAE3C;;;;;OAKG;IAC4B,SAAS,MAAC;IAEwB,qBAAqB,UAAS;IAE/F;;OAEG;IACS,aAAa,EAAE,QAAQ,CAAC;IAEpC,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,aAAa,CAAe;IAEpC,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,6BAA6B,CAAQ;IAC7C,OAAO,CAAC,mBAAmB,CAAS;IAEpC,OAAO,CAAC,IAAI,CAA+B;IAC3C,OAAO,CAAC,aAAa,CAAqB;IAE1C,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,mBAAmB,CAAkC;IAC7D,OAAO,CAAC,MAAM,CAAwE;IAEtF,iBAAiB;IAuBjB,oBAAoB;IASX,SAAS,IAAI,IAAI;IAO1B,OAAO,KAAK,MAAM,GAEjB;IAGD,OAAO,KAAK,KAAK,GAIhB;IAED;;;;OAIG;IACG,IAAI;IAyCV;;;OAGG;IACH,MAAM;IAIN;;;;OAIG;IACH,KAAK;IA6BL;;;OAGG;IACH,OAAO;IAKP;;OAEG;IACH,WAAW;IAIX;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,aAAa;YAYP,gBAAgB;IAiD9B,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;IA2C9B,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,eAAe;IA6CvB,OAAO,CAAC,aAAa;IAMd,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;CAItC"}
|
package/dist/dts/grid-pro.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import { Grid, ColumnApi, GridApi, GridOptions, ColDef } from '@ag-grid-community/core';
|
|
1
|
+
import { Grid, ColumnApi, GridApi, GridOptions, ColDef, ColumnState } from '@ag-grid-community/core';
|
|
2
2
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
3
|
+
import { GridProGenesisDatasource } from './grid-pro-genesis-datasource';
|
|
3
4
|
import { GridComponents } from './grid-pro.types';
|
|
5
|
+
/**
|
|
6
|
+
* Convert string values from 'camelCase' to 'kebab-case'
|
|
7
|
+
* @param value - The value to convert to Kebab case.
|
|
8
|
+
* @returns The Kebab case result.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare const convertToKebabCase: (value: string) => string;
|
|
4
12
|
declare const GridPro_base: (new (...args: any[]) => {
|
|
5
13
|
"__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
|
|
6
14
|
cloneNode(deep?: boolean): Node;
|
|
@@ -246,6 +254,10 @@ declare const GridPro_base: (new (...args: any[]) => {
|
|
|
246
254
|
ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
247
255
|
ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
248
256
|
ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
257
|
+
/**
|
|
258
|
+
* Grid Pro default configuration.
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
249
261
|
ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
250
262
|
ondurationchange: (this: GlobalEventHandlers, ev: Event) => any;
|
|
251
263
|
onemptied: (this: GlobalEventHandlers, ev: Event) => any;
|
|
@@ -363,8 +375,8 @@ export declare class GridPro extends GridPro_base {
|
|
|
363
375
|
gridComponents: {
|
|
364
376
|
[componentName: string]: any;
|
|
365
377
|
};
|
|
366
|
-
protected agAttributes:
|
|
367
|
-
protected agPropertiesMap:
|
|
378
|
+
protected agAttributes: Record<string, string>;
|
|
379
|
+
protected agPropertiesMap: Record<string, string>;
|
|
368
380
|
protected agGridOptions: GridOptions;
|
|
369
381
|
protected initialised: boolean;
|
|
370
382
|
private rehydrationAttempted;
|
|
@@ -384,15 +396,23 @@ export declare class GridPro extends GridPro_base {
|
|
|
384
396
|
* @internal
|
|
385
397
|
*/
|
|
386
398
|
private removeConfigWidthsToAutosize;
|
|
387
|
-
private
|
|
388
|
-
|
|
399
|
+
private saveColumnState;
|
|
400
|
+
/**
|
|
401
|
+
* Gets the saved grid ColumnState[] from local storage
|
|
402
|
+
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
403
|
+
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
404
|
+
* @public
|
|
405
|
+
*/
|
|
406
|
+
getSavedColumnState(): ColumnState[];
|
|
407
|
+
private restoreColumnState;
|
|
389
408
|
/**
|
|
390
409
|
* @public
|
|
391
410
|
*/
|
|
392
411
|
get gridOptions(): GridOptions;
|
|
412
|
+
get gridProGenesisDatasource(): GridProGenesisDatasource;
|
|
393
413
|
set gridOptions(options: GridOptions);
|
|
394
414
|
private enableFlashingRows;
|
|
395
|
-
applyTemplateDefinitions(columnDefs
|
|
415
|
+
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
|
|
396
416
|
get observedAttributes(): string[];
|
|
397
417
|
agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
|
|
398
418
|
globalEventListener(eventType: any, event: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,IAAI,EACJ,SAAS,EACT,OAAO,EAEP,WAAW,EACX,MAAM,
|
|
1
|
+
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColDef, ColumnState } from '@ag-grid-community/core';
|
|
2
|
+
/**
|
|
3
|
+
* Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
|
|
4
|
+
* @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
|
|
5
|
+
* @privateRemarks For restoring saved `ColumnState` but also keep custom renderers and other `ColDef` properties.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
|
|
9
|
+
//# sourceMappingURL=array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/utils/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,EAAE,WAAW,EAAE,EAC3B,SAAS,SAAU,EACnB,SAAS,SAAU,GAClB,MAAM,EAAE,CAuBV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
@@ -164,6 +164,12 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
164
164
|
this.deinit();
|
|
165
165
|
this.init();
|
|
166
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Force the grid to redispatch the current rows
|
|
169
|
+
*/
|
|
170
|
+
refreshRows() {
|
|
171
|
+
this.updateRowData(Array.from(this.rows.values()));
|
|
172
|
+
}
|
|
167
173
|
/**
|
|
168
174
|
* Sends a DATA_LOGOFF when the resource is an active stream
|
|
169
175
|
* @remarks Will only happen for streaming DATASERER resources.
|
|
@@ -186,7 +192,8 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
186
192
|
if (agColumnDefs) {
|
|
187
193
|
this.agGrid.gridApi.setColumnDefs(agColumnDefs);
|
|
188
194
|
}
|
|
189
|
-
this.
|
|
195
|
+
const data = this.rowDataMapper ? this.rowDataMapper(rowData) : rowData;
|
|
196
|
+
this.agGrid.gridApi.setRowData(data);
|
|
190
197
|
this.requiresFullRowDataAndColDefs = false;
|
|
191
198
|
}
|
|
192
199
|
loadResourceData(withFullInit = true) {
|
|
@@ -295,7 +302,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
295
302
|
this.handleStreamInserts(rowsToInsert);
|
|
296
303
|
this.handleStreamDeletes(rowsToDelete);
|
|
297
304
|
this.handleStreamUpdates(rowsToUpdate);
|
|
298
|
-
this.agGrid.gridApi.applyTransaction(this.agTransaction);
|
|
305
|
+
this.agGrid.gridApi.applyTransaction(this.mapTransaction(this.agTransaction));
|
|
299
306
|
}
|
|
300
307
|
applyDataserverData(dataServerResult) {
|
|
301
308
|
var _a;
|
|
@@ -311,7 +318,13 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
311
318
|
this.handleStreamInserts(dataServerResult.inserts);
|
|
312
319
|
this.handleStreamDeletes(dataServerResult.deletes);
|
|
313
320
|
this.handleStreamUpdates(dataServerResult.updates);
|
|
314
|
-
this.agGrid.gridApi.applyTransaction(this.agTransaction);
|
|
321
|
+
this.agGrid.gridApi.applyTransaction(this.mapTransaction(this.agTransaction));
|
|
322
|
+
}
|
|
323
|
+
mapTransaction(transaction) {
|
|
324
|
+
if (!this.rowDataMapper) {
|
|
325
|
+
return transaction;
|
|
326
|
+
}
|
|
327
|
+
return Object.assign(Object.assign({}, transaction), { add: this.rowDataMapper(transaction.add, this.rows), update: this.rowDataMapper(transaction.update, this.rows), remove: this.rowDataMapper(transaction.remove, this.rows) });
|
|
315
328
|
}
|
|
316
329
|
handleStreamInserts(insertedRows) {
|
|
317
330
|
insertedRows === null || insertedRows === void 0 ? void 0 : insertedRows.forEach((insertData) => {
|
|
@@ -371,7 +384,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
371
384
|
}
|
|
372
385
|
return Object.assign(Object.assign({ field: field.name }, cellConfigs), templateColDef);
|
|
373
386
|
});
|
|
374
|
-
const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData);
|
|
387
|
+
const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData, true);
|
|
375
388
|
return colDefsMergedWithTemplateDefs;
|
|
376
389
|
}
|
|
377
390
|
buildCriteria() {
|
|
@@ -437,6 +450,9 @@ __decorate([
|
|
|
437
450
|
__decorate([
|
|
438
451
|
attr({ mode: 'boolean', attribute: 'restart-on-reconnection' })
|
|
439
452
|
], GridProGenesisDatasource.prototype, "restartOnReconnection", void 0);
|
|
453
|
+
__decorate([
|
|
454
|
+
observable
|
|
455
|
+
], GridProGenesisDatasource.prototype, "rowDataMapper", void 0);
|
|
440
456
|
GridProGenesisDatasource = __decorate([
|
|
441
457
|
customElement({
|
|
442
458
|
name: 'grid-pro-genesis-datasource',
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -16,12 +16,19 @@ import { DEBOUNCED_RESIZE_TIME } from './grid-pro.definitions';
|
|
|
16
16
|
import { foundationGridProStyles as styles } from './grid-pro.styles';
|
|
17
17
|
import { gridProTemplate as template } from './grid-pro.template';
|
|
18
18
|
import { AgGridTheme, GridProRendererTypes, agThemeFontsId, agThemeTokenMapClassname, } from './grid-pro.types';
|
|
19
|
+
import { mergeAndDedupColDefWithColumnState } from './utils';
|
|
19
20
|
GridProGenesisDatasource;
|
|
20
21
|
GridProGenesisDatasourceNext;
|
|
21
22
|
GridProCell;
|
|
22
23
|
GridColumn;
|
|
23
24
|
ModuleRegistry.registerModules([CsvExportModule, ClientSideRowModelModule]);
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Convert string values from 'camelCase' to 'kebab-case'
|
|
27
|
+
* @param value - The value to convert to Kebab case.
|
|
28
|
+
* @returns The Kebab case result.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export const convertToKebabCase = (value) => value.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
|
25
32
|
/**
|
|
26
33
|
* The Grid Pro element.
|
|
27
34
|
* @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
@@ -62,7 +69,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
62
69
|
this.agAttributes = {};
|
|
63
70
|
this.agPropertiesMap = ComponentUtil.ALL_PROPERTIES.reduce((map, property) => {
|
|
64
71
|
map[property.toLowerCase()] = property;
|
|
65
|
-
map[
|
|
72
|
+
map[convertToKebabCase(property)] = property;
|
|
66
73
|
return map;
|
|
67
74
|
}, {});
|
|
68
75
|
}
|
|
@@ -134,28 +141,45 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
134
141
|
removeConfigWidthsToAutosize(colState) {
|
|
135
142
|
return colState.map((col) => (Object.assign(Object.assign({}, col), { width: null })));
|
|
136
143
|
}
|
|
137
|
-
|
|
144
|
+
saveColumnState() {
|
|
138
145
|
if (this.rehydrationAttempted && this.statePersistanceEnabled()) {
|
|
139
146
|
const existingOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions') || '{}');
|
|
140
|
-
let colState = this.
|
|
147
|
+
let colState = this.columnApi.getColumnState();
|
|
141
148
|
colState = this.gridAutosizingEnabled
|
|
142
149
|
? this.removeConfigWidthsToAutosize(colState)
|
|
143
150
|
: colState;
|
|
151
|
+
if (colState.length === 0)
|
|
152
|
+
return;
|
|
144
153
|
existingOptions[this.persistColumnStateKey] = JSON.stringify(colState);
|
|
145
154
|
this.session.setLocalStorageItem('gridOptions', JSON.stringify(existingOptions));
|
|
146
155
|
}
|
|
147
156
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Gets the saved grid ColumnState[] from local storage
|
|
159
|
+
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
160
|
+
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
|
+
getSavedColumnState() {
|
|
164
|
+
const localStorageGridOptions = this.session.getLocalStorageItem('gridOptions');
|
|
165
|
+
if (this.statePersistanceEnabled() && localStorageGridOptions) {
|
|
166
|
+
const allGridOptions = JSON.parse(localStorageGridOptions);
|
|
152
167
|
if (this.persistColumnStateKey in allGridOptions) {
|
|
153
|
-
this.
|
|
154
|
-
state: JSON.parse(allGridOptions[this.persistColumnStateKey]),
|
|
155
|
-
applyOrder: true,
|
|
156
|
-
});
|
|
168
|
+
return JSON.parse(allGridOptions[this.persistColumnStateKey]);
|
|
157
169
|
}
|
|
158
170
|
}
|
|
171
|
+
return [];
|
|
172
|
+
}
|
|
173
|
+
restoreColumnState() {
|
|
174
|
+
var _a;
|
|
175
|
+
this.rehydrationAttempted = true;
|
|
176
|
+
const colState = this.getSavedColumnState();
|
|
177
|
+
if (colState && colState.length > 0) {
|
|
178
|
+
(_a = this.columnApi) === null || _a === void 0 ? void 0 : _a.applyColumnState({
|
|
179
|
+
state: colState,
|
|
180
|
+
applyOrder: true,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
159
183
|
}
|
|
160
184
|
/**
|
|
161
185
|
* @public
|
|
@@ -163,13 +187,15 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
163
187
|
get gridOptions() {
|
|
164
188
|
return this.agGridOptions;
|
|
165
189
|
}
|
|
190
|
+
get gridProGenesisDatasource() {
|
|
191
|
+
return this.querySelector('grid-pro-genesis-datasource');
|
|
192
|
+
}
|
|
166
193
|
set gridOptions(options) {
|
|
167
194
|
const globalEventListener = this.globalEventListener.bind(this);
|
|
168
195
|
const gridOnChangeCallback = () => {
|
|
169
|
-
this.
|
|
196
|
+
this.saveColumnState.bind(this)();
|
|
170
197
|
this.debouncedColumnAutosize.bind(this)();
|
|
171
198
|
};
|
|
172
|
-
const rehydrateTableConfig = this.rehydrateTableConfig.bind(this);
|
|
173
199
|
Array.from(this.attributes).forEach((attribute) => {
|
|
174
200
|
const attrName = this.agPropertiesMap[attribute.name];
|
|
175
201
|
if (!attrName)
|
|
@@ -181,7 +207,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
181
207
|
filter: true,
|
|
182
208
|
resizable: true,
|
|
183
209
|
sortable: true,
|
|
184
|
-
},
|
|
210
|
+
}, components: this.combineAllGridComponents(components), suppressDragLeaveHidesColumns: true }, this.eventsAndCallbacks), { onGridReady: (params) => {
|
|
185
211
|
var _a, _b;
|
|
186
212
|
this.gridApi = (_a = options.api) !== null && _a !== void 0 ? _a : params.api;
|
|
187
213
|
this.columnApi = (_b = options.columnApi) !== null && _b !== void 0 ? _b : params.columnApi;
|
|
@@ -192,11 +218,14 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
192
218
|
params,
|
|
193
219
|
gridId: this.id,
|
|
194
220
|
});
|
|
195
|
-
|
|
221
|
+
this.restoreColumnState.bind(this)();
|
|
196
222
|
this.debouncedColumnAutosize.bind(this)();
|
|
197
223
|
}, onFirstDataRendered: () => {
|
|
198
|
-
this.enableFlashingRows.bind(this);
|
|
224
|
+
this.enableFlashingRows.bind(this)();
|
|
199
225
|
}, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback }), rest);
|
|
226
|
+
if (!this.gridProGenesisDatasource) {
|
|
227
|
+
derivedOptions.columnDefs = this.applyTemplateDefinitions(columnDefs);
|
|
228
|
+
}
|
|
200
229
|
this.agGridOptions = Object.assign(Object.assign({}, this.agGridOptions), ComponentUtil.copyAttributesToGridOptions(derivedOptions, this.agAttributes));
|
|
201
230
|
const gridParams = {
|
|
202
231
|
globalEventListener: globalEventListener,
|
|
@@ -226,40 +255,49 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
226
255
|
});
|
|
227
256
|
}
|
|
228
257
|
}
|
|
229
|
-
applyTemplateDefinitions(columnDefs =
|
|
258
|
+
applyTemplateDefinitions(columnDefs, deferredColumnDefs = false) {
|
|
259
|
+
const columnDefinitions = columnDefs || [];
|
|
230
260
|
const agColumnNodes = this.querySelectorAll(this.columnComponentName);
|
|
231
261
|
const overrides = Array.from(agColumnNodes).map((x) => { var _a; return (_a = x.definition) === null || _a === void 0 ? void 0 : _a.field; });
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
262
|
+
let colDefsToReturn = [];
|
|
263
|
+
if (agColumnNodes.length === 0) {
|
|
264
|
+
colDefsToReturn = columnDefinitions;
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
colDefsToReturn = [
|
|
268
|
+
...columnDefinitions.filter((g) => !overrides.includes(g.field)),
|
|
269
|
+
...Array.from(agColumnNodes).map((x) => {
|
|
270
|
+
var _a;
|
|
271
|
+
if (this.enableCellFlashing && x.definition.enableCellChangeFlash === undefined) {
|
|
272
|
+
x.definition.enableCellChangeFlash = true;
|
|
273
|
+
}
|
|
274
|
+
// Applies the default valueformatter for given data type, if unspecified in user colDefs
|
|
275
|
+
// Skip if autoCellRendererByType is disabled
|
|
276
|
+
if (!this.autoCellRendererByType || x.definition.valueFormatter) {
|
|
277
|
+
return x.definition;
|
|
278
|
+
}
|
|
279
|
+
const typeValueFormatter = (_a = columnDefinitions.find((colDef) => x.definition.field === colDef.field)) === null || _a === void 0 ? void 0 : _a.valueFormatter;
|
|
280
|
+
if (typeValueFormatter) {
|
|
281
|
+
x.definition.valueFormatter = typeValueFormatter;
|
|
282
|
+
}
|
|
244
283
|
return x.definition;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
return mergedColumnDefs;
|
|
284
|
+
}),
|
|
285
|
+
];
|
|
286
|
+
}
|
|
287
|
+
if (this.gridProGenesisDatasource && deferredColumnDefs) {
|
|
288
|
+
const savedColumnState = this.getSavedColumnState();
|
|
289
|
+
return mergeAndDedupColDefWithColumnState(colDefsToReturn, savedColumnState);
|
|
290
|
+
}
|
|
291
|
+
return colDefsToReturn;
|
|
254
292
|
}
|
|
255
293
|
get observedAttributes() {
|
|
256
|
-
// allow properties to be supplied either lowercased or
|
|
294
|
+
// allow properties to be supplied either lowercased or kebab-cased
|
|
257
295
|
// this allows the user to either supply (for example) enableSorting or enabled-sorting
|
|
258
296
|
// properties lowercased
|
|
259
297
|
const lowerCasedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => property.toLowerCase());
|
|
260
|
-
// properties
|
|
261
|
-
const
|
|
262
|
-
return lowerCasedPropertyNames.concat(
|
|
298
|
+
// properties kebab-cased
|
|
299
|
+
const kebabCasePropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => convertToKebabCase(property));
|
|
300
|
+
return lowerCasedPropertyNames.concat(kebabCasePropertyNames);
|
|
263
301
|
}
|
|
264
302
|
agAttributeChangedCallback(attName, oldValue, newValue) {
|
|
265
303
|
if (oldValue === newValue) {
|