@genesislcap/grid-pro 14.26.7 → 14.26.8-alpha-692a398.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 +115 -4
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +22 -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 +1 -1
- package/dist/esm/grid-pro.js +80 -43
- package/dist/esm/utils/array.js +27 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/grid-pro.api.json +230 -6
- package/dist/grid-pro.d.ts +30 -5
- 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 +2 -1
- 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.md +2 -0
- package/docs/api/grid-pro.mergeanddedupcoldefwithcolumnstate.md +31 -0
- package/docs/api-report.md +13 -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",
|
|
@@ -534,6 +576,10 @@
|
|
|
534
576
|
"type": {
|
|
535
577
|
"text": "ColDef[]"
|
|
536
578
|
}
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "deferredColumnDefs",
|
|
582
|
+
"default": "false"
|
|
537
583
|
}
|
|
538
584
|
]
|
|
539
585
|
},
|
|
@@ -885,6 +931,14 @@
|
|
|
885
931
|
}
|
|
886
932
|
],
|
|
887
933
|
"exports": [
|
|
934
|
+
{
|
|
935
|
+
"kind": "js",
|
|
936
|
+
"name": "convertToKebabCase",
|
|
937
|
+
"declaration": {
|
|
938
|
+
"name": "convertToKebabCase",
|
|
939
|
+
"module": "src/grid-pro.ts"
|
|
940
|
+
}
|
|
941
|
+
},
|
|
888
942
|
{
|
|
889
943
|
"kind": "js",
|
|
890
944
|
"name": "GridPro",
|
|
@@ -5173,11 +5227,68 @@
|
|
|
5173
5227
|
"declarations": [],
|
|
5174
5228
|
"exports": []
|
|
5175
5229
|
},
|
|
5230
|
+
{
|
|
5231
|
+
"kind": "javascript-module",
|
|
5232
|
+
"path": "src/utils/array.ts",
|
|
5233
|
+
"declarations": [
|
|
5234
|
+
{
|
|
5235
|
+
"kind": "function",
|
|
5236
|
+
"name": "mergeAndDedupColDefWithColumnState",
|
|
5237
|
+
"return": {
|
|
5238
|
+
"type": {
|
|
5239
|
+
"text": "ColDef[]"
|
|
5240
|
+
}
|
|
5241
|
+
},
|
|
5242
|
+
"parameters": [
|
|
5243
|
+
{
|
|
5244
|
+
"name": "colDefs",
|
|
5245
|
+
"type": {
|
|
5246
|
+
"text": "ColDef[]"
|
|
5247
|
+
}
|
|
5248
|
+
},
|
|
5249
|
+
{
|
|
5250
|
+
"name": "columnStates",
|
|
5251
|
+
"type": {
|
|
5252
|
+
"text": "ColumnState[]"
|
|
5253
|
+
}
|
|
5254
|
+
},
|
|
5255
|
+
{
|
|
5256
|
+
"name": "arr1Field",
|
|
5257
|
+
"default": "'field'"
|
|
5258
|
+
},
|
|
5259
|
+
{
|
|
5260
|
+
"name": "arr2Field",
|
|
5261
|
+
"default": "'colId'"
|
|
5262
|
+
}
|
|
5263
|
+
],
|
|
5264
|
+
"description": "Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.",
|
|
5265
|
+
"privacy": "public"
|
|
5266
|
+
}
|
|
5267
|
+
],
|
|
5268
|
+
"exports": [
|
|
5269
|
+
{
|
|
5270
|
+
"kind": "js",
|
|
5271
|
+
"name": "mergeAndDedupColDefWithColumnState",
|
|
5272
|
+
"declaration": {
|
|
5273
|
+
"name": "mergeAndDedupColDefWithColumnState",
|
|
5274
|
+
"module": "src/utils/array.ts"
|
|
5275
|
+
}
|
|
5276
|
+
}
|
|
5277
|
+
]
|
|
5278
|
+
},
|
|
5176
5279
|
{
|
|
5177
5280
|
"kind": "javascript-module",
|
|
5178
5281
|
"path": "src/utils/index.ts",
|
|
5179
5282
|
"declarations": [],
|
|
5180
5283
|
"exports": [
|
|
5284
|
+
{
|
|
5285
|
+
"kind": "js",
|
|
5286
|
+
"name": "*",
|
|
5287
|
+
"declaration": {
|
|
5288
|
+
"name": "*",
|
|
5289
|
+
"package": "./array"
|
|
5290
|
+
}
|
|
5291
|
+
},
|
|
5181
5292
|
{
|
|
5182
5293
|
"kind": "js",
|
|
5183
5294
|
"name": "*",
|
|
@@ -1 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;IAkCJ;;;OAGG;IACH,MAAM;IAIN;;;;OAIG;IACH,KAAK;IA8BL;;;OAGG;IACH,OAAO;IAKP,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,aAAa;YAUP,gBAAgB;IAiD9B,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,kBAAkB;IAY1B,OAAO,CAAC,sBAAsB;IAmC9B,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,eAAe;IA6CvB,OAAO,CAAC,aAAa;IAMrB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IASjD,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;
|
|
@@ -363,8 +371,8 @@ export declare class GridPro extends GridPro_base {
|
|
|
363
371
|
gridComponents: {
|
|
364
372
|
[componentName: string]: any;
|
|
365
373
|
};
|
|
366
|
-
protected agAttributes:
|
|
367
|
-
protected agPropertiesMap:
|
|
374
|
+
protected agAttributes: Record<string, string>;
|
|
375
|
+
protected agPropertiesMap: Record<string, string>;
|
|
368
376
|
protected agGridOptions: GridOptions;
|
|
369
377
|
protected initialised: boolean;
|
|
370
378
|
private rehydrationAttempted;
|
|
@@ -384,15 +392,23 @@ export declare class GridPro extends GridPro_base {
|
|
|
384
392
|
* @internal
|
|
385
393
|
*/
|
|
386
394
|
private removeConfigWidthsToAutosize;
|
|
387
|
-
private
|
|
388
|
-
|
|
395
|
+
private saveColumnState;
|
|
396
|
+
/**
|
|
397
|
+
* Gets the saved grid ColumnState[] from local storage
|
|
398
|
+
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
399
|
+
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
400
|
+
* @public
|
|
401
|
+
*/
|
|
402
|
+
getSavedColumnState(): ColumnState[];
|
|
403
|
+
private restoreColumnState;
|
|
389
404
|
/**
|
|
390
405
|
* @public
|
|
391
406
|
*/
|
|
392
407
|
get gridOptions(): GridOptions;
|
|
408
|
+
get gridProGenesisDatasource(): GridProGenesisDatasource;
|
|
393
409
|
set gridOptions(options: GridOptions);
|
|
394
410
|
private enableFlashingRows;
|
|
395
|
-
applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
|
|
411
|
+
applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
|
|
396
412
|
get observedAttributes(): string[];
|
|
397
413
|
agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
|
|
398
414
|
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":"AACA,OAAO,EACL,IAAI,EACJ,SAAS,EACT,OAAO,EAEP,WAAW,EACX,MAAM,EAIN,WAAW,EACZ,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAO/D,OAAO,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAKL,cAAc,EACf,MAAM,kBAAkB,CAAC;AAU1B;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,UAAW,MAAM,WACS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAM1D;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,YAAiC;IAChD,SAAS,EAAG,SAAS,CAAC;IACtB,OAAO,EAAG,OAAO,CAAC;IACrB,OAAO,CAAC,OAAO,CAAU;IAIlC,sBAAsB,EAAE,OAAO,CAAS;IACwB,mBAAmB,EAAE,OAAO,CACpF;IACmB,kBAAkB,EAAE,OAAO,CAAS;IAE/D;;OAEG;IAC2D,kBAAkB,EAAE,OAAO,C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EAAE,WAAW,EA6EnC;IAED,OAAO,CAAC,kBAAkB;IAiB1B,wBAAwB,CAAC,UAAU,GAAE,MAAM,EAAO,EAAE,kBAAkB,UAAQ;IAyC9E,IAAI,kBAAkB,aAerB;IAED,0BAA0B,CAAC,OAAO,KAAA,EAAE,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAqBtD,mBAAmB,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA;IAiBpC,OAAO,CAAC,eAAe,CAAa;IAEpC,OAAO,CAAC,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"}
|
|
@@ -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"}
|
|
@@ -326,7 +326,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
326
326
|
}
|
|
327
327
|
return Object.assign(Object.assign({ field: field.name }, cellConfigs), templateColDef);
|
|
328
328
|
});
|
|
329
|
-
const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData);
|
|
329
|
+
const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData, true);
|
|
330
330
|
return colDefsMergedWithTemplateDefs;
|
|
331
331
|
}
|
|
332
332
|
buildCriteria() {
|
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,48 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
226
255
|
});
|
|
227
256
|
}
|
|
228
257
|
}
|
|
229
|
-
applyTemplateDefinitions(columnDefs = []) {
|
|
258
|
+
applyTemplateDefinitions(columnDefs = [], deferredColumnDefs = false) {
|
|
230
259
|
const agColumnNodes = this.querySelectorAll(this.columnComponentName);
|
|
231
260
|
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
|
-
|
|
261
|
+
let colDefsToReturn = [];
|
|
262
|
+
if (agColumnNodes.length === 0) {
|
|
263
|
+
colDefsToReturn = columnDefs;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
colDefsToReturn = [
|
|
267
|
+
...(columnDefs ? columnDefs.filter((g) => !overrides.includes(g.field)) : []),
|
|
268
|
+
...Array.from(agColumnNodes).map((x) => {
|
|
269
|
+
var _a;
|
|
270
|
+
if (this.enableCellFlashing && x.definition.enableCellChangeFlash === undefined) {
|
|
271
|
+
x.definition.enableCellChangeFlash = true;
|
|
272
|
+
}
|
|
273
|
+
// Applies the default valueformatter for given data type, if unspecified in user colDefs
|
|
274
|
+
// Skip if autoCellRendererByType is disabled
|
|
275
|
+
if (!this.autoCellRendererByType || x.definition.valueFormatter) {
|
|
276
|
+
return x.definition;
|
|
277
|
+
}
|
|
278
|
+
const typeValueFormatter = (_a = columnDefs === null || columnDefs === void 0 ? void 0 : columnDefs.find((colDef) => x.definition.field === colDef.field)) === null || _a === void 0 ? void 0 : _a.valueFormatter;
|
|
279
|
+
if (typeValueFormatter) {
|
|
280
|
+
x.definition.valueFormatter = typeValueFormatter;
|
|
281
|
+
}
|
|
244
282
|
return x.definition;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
return mergedColumnDefs;
|
|
283
|
+
}),
|
|
284
|
+
];
|
|
285
|
+
}
|
|
286
|
+
if (this.gridProGenesisDatasource && deferredColumnDefs) {
|
|
287
|
+
const savedColumnState = this.getSavedColumnState();
|
|
288
|
+
return mergeAndDedupColDefWithColumnState(colDefsToReturn, savedColumnState);
|
|
289
|
+
}
|
|
290
|
+
return colDefsToReturn;
|
|
254
291
|
}
|
|
255
292
|
get observedAttributes() {
|
|
256
|
-
// allow properties to be supplied either lowercased or
|
|
293
|
+
// allow properties to be supplied either lowercased or kebab-cased
|
|
257
294
|
// this allows the user to either supply (for example) enableSorting or enabled-sorting
|
|
258
295
|
// properties lowercased
|
|
259
296
|
const lowerCasedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => property.toLowerCase());
|
|
260
|
-
// properties
|
|
261
|
-
const
|
|
262
|
-
return lowerCasedPropertyNames.concat(
|
|
297
|
+
// properties kebab-cased
|
|
298
|
+
const kebabCasePropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => convertToKebabCase(property));
|
|
299
|
+
return lowerCasedPropertyNames.concat(kebabCasePropertyNames);
|
|
263
300
|
}
|
|
264
301
|
agAttributeChangedCallback(attName, oldValue, newValue) {
|
|
265
302
|
if (oldValue === newValue) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
|
|
3
|
+
* @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
|
|
4
|
+
* @privateRemarks For restoring saved `ColumnState` but also keep custom renderers and other `ColDef` properties.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export function mergeAndDedupColDefWithColumnState(colDefs, columnStates, arr1Field = 'field', arr2Field = 'colId') {
|
|
8
|
+
const merged = {};
|
|
9
|
+
const deduplicated = [];
|
|
10
|
+
columnStates.forEach((state) => {
|
|
11
|
+
const matchingColDef = colDefs.find((item) => item[arr1Field] === state[arr2Field]);
|
|
12
|
+
if (matchingColDef) {
|
|
13
|
+
const colDefStateMerge = Object.assign(Object.assign({}, matchingColDef), state);
|
|
14
|
+
delete colDefStateMerge.colId;
|
|
15
|
+
merged[matchingColDef[arr1Field]] = colDefStateMerge;
|
|
16
|
+
deduplicated.push(colDefStateMerge);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
colDefs.forEach((def) => {
|
|
20
|
+
if (!merged.hasOwnProperty(def[arr1Field])) {
|
|
21
|
+
const newObj = Object.assign({}, def);
|
|
22
|
+
merged[def[arr1Field]] = newObj;
|
|
23
|
+
deduplicated.push(newObj);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return deduplicated;
|
|
27
|
+
}
|
package/dist/esm/utils/index.js
CHANGED
package/dist/grid-pro.api.json
CHANGED
|
@@ -3035,6 +3035,29 @@
|
|
|
3035
3035
|
"endIndex": 6
|
|
3036
3036
|
}
|
|
3037
3037
|
},
|
|
3038
|
+
{
|
|
3039
|
+
"kind": "Variable",
|
|
3040
|
+
"canonicalReference": "@genesislcap/grid-pro!convertToKebabCase:var",
|
|
3041
|
+
"docComment": "/**\n * Convert string values from 'camelCase' to 'kebab-case'\n *\n * @param value - The value to convert to Kebab case.\n *\n * @returns The Kebab case result.\n *\n * @public\n */\n",
|
|
3042
|
+
"excerptTokens": [
|
|
3043
|
+
{
|
|
3044
|
+
"kind": "Content",
|
|
3045
|
+
"text": "convertToKebabCase: "
|
|
3046
|
+
},
|
|
3047
|
+
{
|
|
3048
|
+
"kind": "Content",
|
|
3049
|
+
"text": "(value: string) => string"
|
|
3050
|
+
}
|
|
3051
|
+
],
|
|
3052
|
+
"fileUrlPath": "src/grid-pro.ts",
|
|
3053
|
+
"isReadonly": true,
|
|
3054
|
+
"releaseTag": "Public",
|
|
3055
|
+
"name": "convertToKebabCase",
|
|
3056
|
+
"variableTypeTokenRange": {
|
|
3057
|
+
"startIndex": 1,
|
|
3058
|
+
"endIndex": 2
|
|
3059
|
+
}
|
|
3060
|
+
},
|
|
3038
3061
|
{
|
|
3039
3062
|
"kind": "Function",
|
|
3040
3063
|
"canonicalReference": "@genesislcap/grid-pro!dateTimeValueFormatter:function(1)",
|
|
@@ -4848,9 +4871,14 @@
|
|
|
4848
4871
|
"kind": "Content",
|
|
4849
4872
|
"text": "protected agAttributes: "
|
|
4850
4873
|
},
|
|
4874
|
+
{
|
|
4875
|
+
"kind": "Reference",
|
|
4876
|
+
"text": "Record",
|
|
4877
|
+
"canonicalReference": "!Record:type"
|
|
4878
|
+
},
|
|
4851
4879
|
{
|
|
4852
4880
|
"kind": "Content",
|
|
4853
|
-
"text": "
|
|
4881
|
+
"text": "<string, string>"
|
|
4854
4882
|
},
|
|
4855
4883
|
{
|
|
4856
4884
|
"kind": "Content",
|
|
@@ -4863,7 +4891,7 @@
|
|
|
4863
4891
|
"name": "agAttributes",
|
|
4864
4892
|
"propertyTypeTokenRange": {
|
|
4865
4893
|
"startIndex": 1,
|
|
4866
|
-
"endIndex":
|
|
4894
|
+
"endIndex": 3
|
|
4867
4895
|
},
|
|
4868
4896
|
"isStatic": false,
|
|
4869
4897
|
"isProtected": true,
|
|
@@ -4940,9 +4968,14 @@
|
|
|
4940
4968
|
"kind": "Content",
|
|
4941
4969
|
"text": "protected agPropertiesMap: "
|
|
4942
4970
|
},
|
|
4971
|
+
{
|
|
4972
|
+
"kind": "Reference",
|
|
4973
|
+
"text": "Record",
|
|
4974
|
+
"canonicalReference": "!Record:type"
|
|
4975
|
+
},
|
|
4943
4976
|
{
|
|
4944
4977
|
"kind": "Content",
|
|
4945
|
-
"text": "
|
|
4978
|
+
"text": "<string, string>"
|
|
4946
4979
|
},
|
|
4947
4980
|
{
|
|
4948
4981
|
"kind": "Content",
|
|
@@ -4955,7 +4988,7 @@
|
|
|
4955
4988
|
"name": "agPropertiesMap",
|
|
4956
4989
|
"propertyTypeTokenRange": {
|
|
4957
4990
|
"startIndex": 1,
|
|
4958
|
-
"endIndex":
|
|
4991
|
+
"endIndex": 3
|
|
4959
4992
|
},
|
|
4960
4993
|
"isStatic": false,
|
|
4961
4994
|
"isProtected": true,
|
|
@@ -4979,6 +5012,14 @@
|
|
|
4979
5012
|
"kind": "Content",
|
|
4980
5013
|
"text": "[]"
|
|
4981
5014
|
},
|
|
5015
|
+
{
|
|
5016
|
+
"kind": "Content",
|
|
5017
|
+
"text": ", deferredColumnDefs?: "
|
|
5018
|
+
},
|
|
5019
|
+
{
|
|
5020
|
+
"kind": "Content",
|
|
5021
|
+
"text": "boolean"
|
|
5022
|
+
},
|
|
4982
5023
|
{
|
|
4983
5024
|
"kind": "Content",
|
|
4984
5025
|
"text": "): "
|
|
@@ -4999,8 +5040,8 @@
|
|
|
4999
5040
|
],
|
|
5000
5041
|
"isStatic": false,
|
|
5001
5042
|
"returnTypeTokenRange": {
|
|
5002
|
-
"startIndex":
|
|
5003
|
-
"endIndex":
|
|
5043
|
+
"startIndex": 6,
|
|
5044
|
+
"endIndex": 8
|
|
5004
5045
|
},
|
|
5005
5046
|
"releaseTag": "Public",
|
|
5006
5047
|
"isProtected": false,
|
|
@@ -5013,6 +5054,14 @@
|
|
|
5013
5054
|
"endIndex": 3
|
|
5014
5055
|
},
|
|
5015
5056
|
"isOptional": true
|
|
5057
|
+
},
|
|
5058
|
+
{
|
|
5059
|
+
"parameterName": "deferredColumnDefs",
|
|
5060
|
+
"parameterTypeTokenRange": {
|
|
5061
|
+
"startIndex": 4,
|
|
5062
|
+
"endIndex": 5
|
|
5063
|
+
},
|
|
5064
|
+
"isOptional": true
|
|
5016
5065
|
}
|
|
5017
5066
|
],
|
|
5018
5067
|
"isOptional": false,
|
|
@@ -5342,6 +5391,42 @@
|
|
|
5342
5391
|
"isProtected": false,
|
|
5343
5392
|
"isAbstract": false
|
|
5344
5393
|
},
|
|
5394
|
+
{
|
|
5395
|
+
"kind": "Method",
|
|
5396
|
+
"canonicalReference": "@genesislcap/grid-pro!GridPro#getSavedColumnState:member(1)",
|
|
5397
|
+
"docComment": "/**\n * Gets the saved grid ColumnState[] from local storage\n *\n * @remarks\n *\n * This is used to restore the grid state when the grid is rehydrated\n *\n * @public\n */\n",
|
|
5398
|
+
"excerptTokens": [
|
|
5399
|
+
{
|
|
5400
|
+
"kind": "Content",
|
|
5401
|
+
"text": "getSavedColumnState(): "
|
|
5402
|
+
},
|
|
5403
|
+
{
|
|
5404
|
+
"kind": "Reference",
|
|
5405
|
+
"text": "ColumnState",
|
|
5406
|
+
"canonicalReference": "@ag-grid-community/core!ColumnState:interface"
|
|
5407
|
+
},
|
|
5408
|
+
{
|
|
5409
|
+
"kind": "Content",
|
|
5410
|
+
"text": "[]"
|
|
5411
|
+
},
|
|
5412
|
+
{
|
|
5413
|
+
"kind": "Content",
|
|
5414
|
+
"text": ";"
|
|
5415
|
+
}
|
|
5416
|
+
],
|
|
5417
|
+
"isStatic": false,
|
|
5418
|
+
"returnTypeTokenRange": {
|
|
5419
|
+
"startIndex": 1,
|
|
5420
|
+
"endIndex": 3
|
|
5421
|
+
},
|
|
5422
|
+
"releaseTag": "Public",
|
|
5423
|
+
"isProtected": false,
|
|
5424
|
+
"overloadIndex": 1,
|
|
5425
|
+
"parameters": [],
|
|
5426
|
+
"isOptional": false,
|
|
5427
|
+
"isAbstract": false,
|
|
5428
|
+
"name": "getSavedColumnState"
|
|
5429
|
+
},
|
|
5345
5430
|
{
|
|
5346
5431
|
"kind": "Method",
|
|
5347
5432
|
"canonicalReference": "@genesislcap/grid-pro!GridPro#globalEventListener:member(1)",
|
|
@@ -5567,6 +5652,37 @@
|
|
|
5567
5652
|
"isProtected": false,
|
|
5568
5653
|
"isAbstract": false
|
|
5569
5654
|
},
|
|
5655
|
+
{
|
|
5656
|
+
"kind": "Property",
|
|
5657
|
+
"canonicalReference": "@genesislcap/grid-pro!GridPro#gridProGenesisDatasource:member",
|
|
5658
|
+
"docComment": "",
|
|
5659
|
+
"excerptTokens": [
|
|
5660
|
+
{
|
|
5661
|
+
"kind": "Content",
|
|
5662
|
+
"text": "get gridProGenesisDatasource(): "
|
|
5663
|
+
},
|
|
5664
|
+
{
|
|
5665
|
+
"kind": "Reference",
|
|
5666
|
+
"text": "GridProGenesisDatasource",
|
|
5667
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource:class"
|
|
5668
|
+
},
|
|
5669
|
+
{
|
|
5670
|
+
"kind": "Content",
|
|
5671
|
+
"text": ";"
|
|
5672
|
+
}
|
|
5673
|
+
],
|
|
5674
|
+
"isReadonly": true,
|
|
5675
|
+
"isOptional": false,
|
|
5676
|
+
"releaseTag": "Public",
|
|
5677
|
+
"name": "gridProGenesisDatasource",
|
|
5678
|
+
"propertyTypeTokenRange": {
|
|
5679
|
+
"startIndex": 1,
|
|
5680
|
+
"endIndex": 2
|
|
5681
|
+
},
|
|
5682
|
+
"isStatic": false,
|
|
5683
|
+
"isProtected": false,
|
|
5684
|
+
"isAbstract": false
|
|
5685
|
+
},
|
|
5570
5686
|
{
|
|
5571
5687
|
"kind": "Property",
|
|
5572
5688
|
"canonicalReference": "@genesislcap/grid-pro!GridPro#gridSlot:member",
|
|
@@ -7503,6 +7619,114 @@
|
|
|
7503
7619
|
"endIndex": 3
|
|
7504
7620
|
}
|
|
7505
7621
|
},
|
|
7622
|
+
{
|
|
7623
|
+
"kind": "Function",
|
|
7624
|
+
"canonicalReference": "@genesislcap/grid-pro!mergeAndDedupColDefWithColumnState:function(1)",
|
|
7625
|
+
"docComment": "/**\n * Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.\n *\n * @remarks\n *\n * ColDef uses `field` and ColumnState uses `colId` to identify columns.\n *\n * @public\n */\n",
|
|
7626
|
+
"excerptTokens": [
|
|
7627
|
+
{
|
|
7628
|
+
"kind": "Content",
|
|
7629
|
+
"text": "export declare function mergeAndDedupColDefWithColumnState(colDefs: "
|
|
7630
|
+
},
|
|
7631
|
+
{
|
|
7632
|
+
"kind": "Reference",
|
|
7633
|
+
"text": "ColDef",
|
|
7634
|
+
"canonicalReference": "@ag-grid-community/core!ColDef:interface"
|
|
7635
|
+
},
|
|
7636
|
+
{
|
|
7637
|
+
"kind": "Content",
|
|
7638
|
+
"text": "[]"
|
|
7639
|
+
},
|
|
7640
|
+
{
|
|
7641
|
+
"kind": "Content",
|
|
7642
|
+
"text": ", columnStates: "
|
|
7643
|
+
},
|
|
7644
|
+
{
|
|
7645
|
+
"kind": "Reference",
|
|
7646
|
+
"text": "ColumnState",
|
|
7647
|
+
"canonicalReference": "@ag-grid-community/core!ColumnState:interface"
|
|
7648
|
+
},
|
|
7649
|
+
{
|
|
7650
|
+
"kind": "Content",
|
|
7651
|
+
"text": "[]"
|
|
7652
|
+
},
|
|
7653
|
+
{
|
|
7654
|
+
"kind": "Content",
|
|
7655
|
+
"text": ", arr1Field?: "
|
|
7656
|
+
},
|
|
7657
|
+
{
|
|
7658
|
+
"kind": "Content",
|
|
7659
|
+
"text": "string"
|
|
7660
|
+
},
|
|
7661
|
+
{
|
|
7662
|
+
"kind": "Content",
|
|
7663
|
+
"text": ", arr2Field?: "
|
|
7664
|
+
},
|
|
7665
|
+
{
|
|
7666
|
+
"kind": "Content",
|
|
7667
|
+
"text": "string"
|
|
7668
|
+
},
|
|
7669
|
+
{
|
|
7670
|
+
"kind": "Content",
|
|
7671
|
+
"text": "): "
|
|
7672
|
+
},
|
|
7673
|
+
{
|
|
7674
|
+
"kind": "Reference",
|
|
7675
|
+
"text": "ColDef",
|
|
7676
|
+
"canonicalReference": "@ag-grid-community/core!ColDef:interface"
|
|
7677
|
+
},
|
|
7678
|
+
{
|
|
7679
|
+
"kind": "Content",
|
|
7680
|
+
"text": "[]"
|
|
7681
|
+
},
|
|
7682
|
+
{
|
|
7683
|
+
"kind": "Content",
|
|
7684
|
+
"text": ";"
|
|
7685
|
+
}
|
|
7686
|
+
],
|
|
7687
|
+
"fileUrlPath": "src/utils/array.ts",
|
|
7688
|
+
"returnTypeTokenRange": {
|
|
7689
|
+
"startIndex": 11,
|
|
7690
|
+
"endIndex": 13
|
|
7691
|
+
},
|
|
7692
|
+
"releaseTag": "Public",
|
|
7693
|
+
"overloadIndex": 1,
|
|
7694
|
+
"parameters": [
|
|
7695
|
+
{
|
|
7696
|
+
"parameterName": "colDefs",
|
|
7697
|
+
"parameterTypeTokenRange": {
|
|
7698
|
+
"startIndex": 1,
|
|
7699
|
+
"endIndex": 3
|
|
7700
|
+
},
|
|
7701
|
+
"isOptional": false
|
|
7702
|
+
},
|
|
7703
|
+
{
|
|
7704
|
+
"parameterName": "columnStates",
|
|
7705
|
+
"parameterTypeTokenRange": {
|
|
7706
|
+
"startIndex": 4,
|
|
7707
|
+
"endIndex": 6
|
|
7708
|
+
},
|
|
7709
|
+
"isOptional": false
|
|
7710
|
+
},
|
|
7711
|
+
{
|
|
7712
|
+
"parameterName": "arr1Field",
|
|
7713
|
+
"parameterTypeTokenRange": {
|
|
7714
|
+
"startIndex": 7,
|
|
7715
|
+
"endIndex": 8
|
|
7716
|
+
},
|
|
7717
|
+
"isOptional": true
|
|
7718
|
+
},
|
|
7719
|
+
{
|
|
7720
|
+
"parameterName": "arr2Field",
|
|
7721
|
+
"parameterTypeTokenRange": {
|
|
7722
|
+
"startIndex": 9,
|
|
7723
|
+
"endIndex": 10
|
|
7724
|
+
},
|
|
7725
|
+
"isOptional": true
|
|
7726
|
+
}
|
|
7727
|
+
],
|
|
7728
|
+
"name": "mergeAndDedupColDefWithColumnState"
|
|
7729
|
+
},
|
|
7506
7730
|
{
|
|
7507
7731
|
"kind": "Class",
|
|
7508
7732
|
"canonicalReference": "@genesislcap/grid-pro!SelectRenderer:class",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { Binding } from '@microsoft/fast-element';
|
|
|
9
9
|
import { CaptureType } from '@microsoft/fast-element';
|
|
10
10
|
import { ColDef } from '@ag-grid-community/core';
|
|
11
11
|
import { ColumnApi } from '@ag-grid-community/core';
|
|
12
|
+
import { ColumnState } from '@ag-grid-community/core';
|
|
12
13
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
13
14
|
import type { Container } from '@microsoft/fast-foundation';
|
|
14
15
|
import { Controller } from '@microsoft/fast-element';
|
|
@@ -397,6 +398,14 @@ export declare const CellTemplate: ViewTemplate<GridProCell, any>;
|
|
|
397
398
|
*/
|
|
398
399
|
export declare const ColumnTemplate: ViewTemplate<GridColumn, any>;
|
|
399
400
|
|
|
401
|
+
/**
|
|
402
|
+
* Convert string values from 'camelCase' to 'kebab-case'
|
|
403
|
+
* @param value - The value to convert to Kebab case.
|
|
404
|
+
* @returns The Kebab case result.
|
|
405
|
+
* @public
|
|
406
|
+
*/
|
|
407
|
+
export declare const convertToKebabCase: (value: string) => string;
|
|
408
|
+
|
|
400
409
|
/**
|
|
401
410
|
* Returns a formatted date time value from the Grid Pro cell value.
|
|
402
411
|
* @param param - A ValueFormatterParams object.
|
|
@@ -819,8 +828,8 @@ export declare class GridPro extends GridPro_base {
|
|
|
819
828
|
gridComponents: {
|
|
820
829
|
[componentName: string]: any;
|
|
821
830
|
};
|
|
822
|
-
protected agAttributes:
|
|
823
|
-
protected agPropertiesMap:
|
|
831
|
+
protected agAttributes: Record<string, string>;
|
|
832
|
+
protected agPropertiesMap: Record<string, string>;
|
|
824
833
|
protected agGridOptions: GridOptions;
|
|
825
834
|
protected initialised: boolean;
|
|
826
835
|
private rehydrationAttempted;
|
|
@@ -840,15 +849,23 @@ export declare class GridPro extends GridPro_base {
|
|
|
840
849
|
* @internal
|
|
841
850
|
*/
|
|
842
851
|
private removeConfigWidthsToAutosize;
|
|
843
|
-
private
|
|
844
|
-
|
|
852
|
+
private saveColumnState;
|
|
853
|
+
/**
|
|
854
|
+
* Gets the saved grid ColumnState[] from local storage
|
|
855
|
+
* @remarks This is used to restore the grid state when the grid is rehydrated
|
|
856
|
+
* @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
|
|
857
|
+
* @public
|
|
858
|
+
*/
|
|
859
|
+
getSavedColumnState(): ColumnState[];
|
|
860
|
+
private restoreColumnState;
|
|
845
861
|
/**
|
|
846
862
|
* @public
|
|
847
863
|
*/
|
|
848
864
|
get gridOptions(): GridOptions;
|
|
865
|
+
get gridProGenesisDatasource(): GridProGenesisDatasource;
|
|
849
866
|
set gridOptions(options: GridOptions);
|
|
850
867
|
private enableFlashingRows;
|
|
851
|
-
applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
|
|
868
|
+
applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
|
|
852
869
|
get observedAttributes(): string[];
|
|
853
870
|
agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
|
|
854
871
|
globalEventListener(eventType: any, event: any): void;
|
|
@@ -1986,6 +2003,14 @@ export declare const gridProTemplate: ViewTemplate;
|
|
|
1986
2003
|
*/
|
|
1987
2004
|
export declare const logger: Logger;
|
|
1988
2005
|
|
|
2006
|
+
/**
|
|
2007
|
+
* Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
|
|
2008
|
+
* @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
|
|
2009
|
+
* @privateRemarks For restoring saved `ColumnState` but also keep custom renderers and other `ColDef` properties.
|
|
2010
|
+
* @public
|
|
2011
|
+
*/
|
|
2012
|
+
export declare function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
|
|
2013
|
+
|
|
1989
2014
|
declare interface SelectCellRendererParams extends ICellRendererParams {
|
|
1990
2015
|
accessor: string;
|
|
1991
2016
|
defaultValue?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [convertToKebabCase](./grid-pro.converttokebabcase.md)
|
|
4
|
+
|
|
5
|
+
## convertToKebabCase variable
|
|
6
|
+
|
|
7
|
+
Convert string values from 'camelCase' to 'kebab-case'
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
convertToKebabCase: (value: string) => string
|
|
13
|
+
```
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
**Signature:**
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
|
|
10
|
+
applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
@@ -15,6 +15,7 @@ applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
|
|
|
15
15
|
| Parameter | Type | Description |
|
|
16
16
|
| --- | --- | --- |
|
|
17
17
|
| columnDefs | ColDef\[\] | _(Optional)_ |
|
|
18
|
+
| deferredColumnDefs | boolean | _(Optional)_ |
|
|
18
19
|
|
|
19
20
|
**Returns:**
|
|
20
21
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [GridPro](./grid-pro.gridpro.md) > [getSavedColumnState](./grid-pro.gridpro.getsavedcolumnstate.md)
|
|
4
|
+
|
|
5
|
+
## GridPro.getSavedColumnState() method
|
|
6
|
+
|
|
7
|
+
Gets the saved grid ColumnState\[\] from local storage
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
getSavedColumnState(): ColumnState[];
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
ColumnState\[\]
|
|
17
|
+
|
|
18
|
+
## Remarks
|
|
19
|
+
|
|
20
|
+
This is used to restore the grid state when the grid is rehydrated
|
|
21
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [GridPro](./grid-pro.gridpro.md) > [gridProGenesisDatasource](./grid-pro.gridpro.gridprogenesisdatasource.md)
|
|
4
|
+
|
|
5
|
+
## GridPro.gridProGenesisDatasource property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
get gridProGenesisDatasource(): GridProGenesisDatasource;
|
|
11
|
+
```
|
|
@@ -27,10 +27,10 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
27
27
|
|
|
28
28
|
| Property | Modifiers | Type | Description |
|
|
29
29
|
| --- | --- | --- | --- |
|
|
30
|
-
| [agAttributes](./grid-pro.gridpro.agattributes.md) | <code>protected</code> |
|
|
30
|
+
| [agAttributes](./grid-pro.gridpro.agattributes.md) | <code>protected</code> | Record<string, string> | |
|
|
31
31
|
| [agGrid](./grid-pro.gridpro.aggrid.md) | | Grid | |
|
|
32
32
|
| [agGridOptions](./grid-pro.gridpro.aggridoptions.md) | <code>protected</code> | GridOptions | |
|
|
33
|
-
| [agPropertiesMap](./grid-pro.gridpro.agpropertiesmap.md) | <code>protected</code> |
|
|
33
|
+
| [agPropertiesMap](./grid-pro.gridpro.agpropertiesmap.md) | <code>protected</code> | Record<string, string> | |
|
|
34
34
|
| [autoCellRendererByType](./grid-pro.gridpro.autocellrendererbytype.md) | | boolean | |
|
|
35
35
|
| [classNames](./grid-pro.gridpro.classnames.md) | | string | |
|
|
36
36
|
| [columnApi](./grid-pro.gridpro.columnapi.md) | | ColumnApi | |
|
|
@@ -43,6 +43,7 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
43
43
|
| [gridComponents](./grid-pro.gridpro.gridcomponents.md) | | { \[componentName: string\]: any; } | |
|
|
44
44
|
| [gridFontFace](./grid-pro.gridpro.gridfontface.md) | | string | |
|
|
45
45
|
| [gridOptions](./grid-pro.gridpro.gridoptions.md) | | GridOptions | |
|
|
46
|
+
| [gridProGenesisDatasource](./grid-pro.gridpro.gridprogenesisdatasource.md) | <code>readonly</code> | [GridProGenesisDatasource](./grid-pro.gridprogenesisdatasource.md) | |
|
|
46
47
|
| [gridSlot](./grid-pro.gridpro.gridslot.md) | | HTMLSlotElement | |
|
|
47
48
|
| [headerHeight](./grid-pro.gridpro.headerheight.md) | | number | |
|
|
48
49
|
| [initialised](./grid-pro.gridpro.initialised.md) | <code>protected</code> | boolean | |
|
|
@@ -57,10 +58,11 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
57
58
|
| Method | Modifiers | Description |
|
|
58
59
|
| --- | --- | --- |
|
|
59
60
|
| [agAttributeChangedCallback(attName, oldValue, newValue)](./grid-pro.gridpro.agattributechangedcallback.md) | | |
|
|
60
|
-
| [applyTemplateDefinitions(columnDefs)](./grid-pro.gridpro.applytemplatedefinitions.md) | | |
|
|
61
|
+
| [applyTemplateDefinitions(columnDefs, deferredColumnDefs)](./grid-pro.gridpro.applytemplatedefinitions.md) | | |
|
|
61
62
|
| [combineAllGridComponents(gridOptionsComponents)](./grid-pro.gridpro.combineallgridcomponents.md) | | |
|
|
62
63
|
| [connectedCallback()](./grid-pro.gridpro.connectedcallback.md) | | |
|
|
63
64
|
| [disconnectedCallback()](./grid-pro.gridpro.disconnectedcallback.md) | | |
|
|
65
|
+
| [getSavedColumnState()](./grid-pro.gridpro.getsavedcolumnstate.md) | | Gets the saved grid ColumnState\[\] from local storage |
|
|
64
66
|
| [globalEventListener(eventType, event)](./grid-pro.gridpro.globaleventlistener.md) | | |
|
|
65
67
|
| [statePersistanceEnabled()](./grid-pro.gridpro.statepersistanceenabled.md) | | |
|
|
66
68
|
| [themeChanged(oldValue, newValue)](./grid-pro.gridpro.themechanged.md) | | |
|
package/docs/api/grid-pro.md
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
| [dateTimeValueFormatter({ value })](./grid-pro.datetimevalueformatter.md) | Returns a formatted date time value from the Grid Pro cell value. |
|
|
35
35
|
| [dateValueFormatter({ value })](./grid-pro.datevalueformatter.md) | Returns a formatted date value from the Grid Pro cell value. |
|
|
36
36
|
| [gridProColumns(itemsBinding, includeRenderers)](./grid-pro.gridprocolumns.md) | A directive that renders a set of grid-pro-column elements from a given input binding |
|
|
37
|
+
| [mergeAndDedupColDefWithColumnState(colDefs, columnStates, arr1Field, arr2Field)](./grid-pro.mergeanddedupcoldefwithcolumnstate.md) | Merges two arrays, one of <code>ColDef</code> and one of <code>ColumnState</code>, and deduplicates them. |
|
|
37
38
|
|
|
38
39
|
## Variables
|
|
39
40
|
|
|
@@ -58,6 +59,7 @@
|
|
|
58
59
|
| [agThemeTokenMapCSS](./grid-pro.agthemetokenmapcss.md) | Generates the CSS for a given GridPro theme name and token map |
|
|
59
60
|
| [CellTemplate](./grid-pro.celltemplate.md) | The Grid Pro Cell Template. |
|
|
60
61
|
| [ColumnTemplate](./grid-pro.columntemplate.md) | The Grid Pro Column Template. |
|
|
62
|
+
| [convertToKebabCase](./grid-pro.converttokebabcase.md) | Convert string values from 'camelCase' to 'kebab-case' |
|
|
61
63
|
| [defaultAgGridFontFace](./grid-pro.defaultaggridfontface.md) | The default font face for Grid Pro (agGridAlpine). |
|
|
62
64
|
| [defaultGridProConfig](./grid-pro.defaultgridproconfig.md) | Grid Pro default configuration. |
|
|
63
65
|
| [foundationAgBooleanRenderer](./grid-pro.foundationagbooleanrenderer.md) | A function that returns a Foundation Boolean Renderer registration for configuring the component with a DesignSystem. |
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [mergeAndDedupColDefWithColumnState](./grid-pro.mergeanddedupcoldefwithcolumnstate.md)
|
|
4
|
+
|
|
5
|
+
## mergeAndDedupColDefWithColumnState() function
|
|
6
|
+
|
|
7
|
+
Merges two arrays, one of `ColDef` and one of `ColumnState`<!-- -->, and deduplicates them.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| colDefs | ColDef\[\] | |
|
|
20
|
+
| columnStates | ColumnState\[\] | |
|
|
21
|
+
| arr1Field | string | _(Optional)_ |
|
|
22
|
+
| arr2Field | string | _(Optional)_ |
|
|
23
|
+
|
|
24
|
+
**Returns:**
|
|
25
|
+
|
|
26
|
+
ColDef\[\]
|
|
27
|
+
|
|
28
|
+
## Remarks
|
|
29
|
+
|
|
30
|
+
ColDef uses `field` and ColumnState uses `colId` to identify columns.
|
|
31
|
+
|
package/docs/api-report.md
CHANGED
|
@@ -15,6 +15,7 @@ import { Binding } from '@microsoft/fast-element';
|
|
|
15
15
|
import { CaptureType } from '@microsoft/fast-element';
|
|
16
16
|
import { ColDef } from '@ag-grid-community/core';
|
|
17
17
|
import { ColumnApi } from '@ag-grid-community/core';
|
|
18
|
+
import { ColumnState } from '@ag-grid-community/core';
|
|
18
19
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
19
20
|
import type { Container } from '@microsoft/fast-foundation';
|
|
20
21
|
import { Controller } from '@microsoft/fast-element';
|
|
@@ -320,6 +321,9 @@ export const CellTemplate: ViewTemplate<GridProCell, any>;
|
|
|
320
321
|
// @public
|
|
321
322
|
export const ColumnTemplate: ViewTemplate<GridColumn, any>;
|
|
322
323
|
|
|
324
|
+
// @public
|
|
325
|
+
export const convertToKebabCase: (value: string) => string;
|
|
326
|
+
|
|
323
327
|
// @public
|
|
324
328
|
export function dateTimeValueFormatter({ value }: ValueFormatterParams): any;
|
|
325
329
|
|
|
@@ -545,15 +549,15 @@ export class GridPro extends GridPro_base {
|
|
|
545
549
|
// (undocumented)
|
|
546
550
|
agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
|
|
547
551
|
// (undocumented)
|
|
548
|
-
protected agAttributes:
|
|
552
|
+
protected agAttributes: Record<string, string>;
|
|
549
553
|
// (undocumented)
|
|
550
554
|
agGrid: Grid;
|
|
551
555
|
// (undocumented)
|
|
552
556
|
protected agGridOptions: GridOptions;
|
|
553
557
|
// (undocumented)
|
|
554
|
-
protected agPropertiesMap:
|
|
558
|
+
protected agPropertiesMap: Record<string, string>;
|
|
555
559
|
// (undocumented)
|
|
556
|
-
applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
|
|
560
|
+
applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
|
|
557
561
|
// (undocumented)
|
|
558
562
|
autoCellRendererByType: boolean;
|
|
559
563
|
// (undocumented)
|
|
@@ -573,6 +577,7 @@ export class GridPro extends GridPro_base {
|
|
|
573
577
|
enabledRowFlashing: boolean;
|
|
574
578
|
// (undocumented)
|
|
575
579
|
eventsAndCallbacks: any;
|
|
580
|
+
getSavedColumnState(): ColumnState[];
|
|
576
581
|
// (undocumented)
|
|
577
582
|
globalEventListener(eventType: any, event: any): void;
|
|
578
583
|
// (undocumented)
|
|
@@ -588,6 +593,8 @@ export class GridPro extends GridPro_base {
|
|
|
588
593
|
get gridOptions(): GridOptions;
|
|
589
594
|
set gridOptions(options: GridOptions);
|
|
590
595
|
// (undocumented)
|
|
596
|
+
get gridProGenesisDatasource(): GridProGenesisDatasource;
|
|
597
|
+
// (undocumented)
|
|
591
598
|
gridSlot: HTMLSlotElement;
|
|
592
599
|
// (undocumented)
|
|
593
600
|
headerHeight: number;
|
|
@@ -753,6 +760,9 @@ export const gridProTemplate: ViewTemplate;
|
|
|
753
760
|
// @public
|
|
754
761
|
export const logger: Logger;
|
|
755
762
|
|
|
763
|
+
// @public
|
|
764
|
+
export function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
|
|
765
|
+
|
|
756
766
|
// @public
|
|
757
767
|
export class SelectRenderer extends FoundationElement implements ICellRendererComp {
|
|
758
768
|
// (undocumented)
|
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.26.
|
|
4
|
+
"version": "14.26.8-alpha-692a398.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"serve": "genx serve"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@genesislcap/foundation-testing": "
|
|
25
|
-
"@genesislcap/genx": "
|
|
24
|
+
"@genesislcap/foundation-testing": "14.26.8-alpha-692a398.0",
|
|
25
|
+
"@genesislcap/genx": "14.26.8-alpha-692a398.0",
|
|
26
26
|
"@playwright/test": "^1.18.1",
|
|
27
27
|
"bulma": "^0.9.3",
|
|
28
28
|
"c8": "^7.11.0",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"watchlist": "^0.3.1"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@genesislcap/foundation-comms": "
|
|
42
|
-
"@genesislcap/foundation-ui": "
|
|
43
|
-
"@genesislcap/foundation-utils": "
|
|
41
|
+
"@genesislcap/foundation-comms": "14.26.8-alpha-692a398.0",
|
|
42
|
+
"@genesislcap/foundation-ui": "14.26.8-alpha-692a398.0",
|
|
43
|
+
"@genesislcap/foundation-utils": "14.26.8-alpha-692a398.0",
|
|
44
44
|
"@microsoft/fast-colors": "^5.1.4",
|
|
45
45
|
"@microsoft/fast-components": "^2.21.3",
|
|
46
46
|
"@microsoft/fast-element": "^1.7.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
68
|
"customElements": "dist/custom-elements.json",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "af81f305950dfd60a07aa021261f865c16721be9"
|
|
70
70
|
}
|