@genesislcap/grid-pro 14.49.0 → 14.50.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.
@@ -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": "object"
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": "serialiseStoreTableConfig",
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": "rehydrateTableConfig",
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",
@@ -3797,11 +3850,68 @@
3797
3850
  "declarations": [],
3798
3851
  "exports": []
3799
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
+ },
3800
3902
  {
3801
3903
  "kind": "javascript-module",
3802
3904
  "path": "src/utils/index.ts",
3803
3905
  "declarations": [],
3804
3906
  "exports": [
3907
+ {
3908
+ "kind": "js",
3909
+ "name": "*",
3910
+ "declaration": {
3911
+ "name": "*",
3912
+ "package": "./array"
3913
+ }
3914
+ },
3805
3915
  {
3806
3916
  "kind": "js",
3807
3917
  "name": "*",
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjDL;;;;GAIG;AACH,qBAGa,wBAAyB,SAAQ,6BAAiC;IACpE,OAAO,EAAG,OAAO,CAAC;IACf,UAAU,EAAG,UAAU,CAAC;IAExB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AAO,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"}
@@ -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: any;
367
- protected agPropertiesMap: any;
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 serialiseStoreTableConfig;
388
- private rehydrateTableConfig;
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?: ColDef[]): ColDef<any>[];
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,EAKP,MAAM,yBAAyB,CAAC;A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AAK,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,2 +1,3 @@
1
+ export * from './array';
1
2
  export * from './logger';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -384,7 +384,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
384
384
  }
385
385
  return Object.assign(Object.assign({ field: field.name }, cellConfigs), templateColDef);
386
386
  });
387
- const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData);
387
+ const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData, true);
388
388
  return colDefsMergedWithTemplateDefs;
389
389
  }
390
390
  buildCriteria() {
@@ -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
- const hypenateAndLowercase = (property) => property.replace('/([a-z])([A-Z])/g', '$1-$2').toLowerCase();
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[hypenateAndLowercase(property)] = property;
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
- serialiseStoreTableConfig() {
144
+ saveColumnState() {
138
145
  if (this.rehydrationAttempted && this.statePersistanceEnabled()) {
139
146
  const existingOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions') || '{}');
140
- let colState = this.agGridOptions.columnApi.getColumnState();
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
- rehydrateTableConfig() {
149
- this.rehydrationAttempted = true;
150
- if (this.statePersistanceEnabled() && this.session.getLocalStorageItem('gridOptions')) {
151
- const allGridOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions'));
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.agGridOptions.columnApi.applyColumnState({
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.serialiseStoreTableConfig.bind(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
- }, columnDefs: this.applyTemplateDefinitions(columnDefs), components: this.combineAllGridComponents(components), suppressDragLeaveHidesColumns: true }, this.eventsAndCallbacks), { onGridReady: (params) => {
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
- rehydrateTableConfig();
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
- if (agColumnNodes.length === 0)
233
- return columnDefs;
234
- const mergedColumnDefs = [
235
- ...(columnDefs ? columnDefs.filter((g) => !overrides.includes(g.field)) : []),
236
- ...Array.from(agColumnNodes).map((x) => {
237
- var _a;
238
- if (this.enableCellFlashing && x.definition.enableCellChangeFlash === undefined) {
239
- x.definition.enableCellChangeFlash = true;
240
- }
241
- // Applies the default valueformatter for given data type, if unspecified in user colDefs
242
- // Skip if autoCellRendererByType is disabled
243
- if (!this.autoCellRendererByType || x.definition.valueFormatter) {
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
- 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;
247
- if (typeValueFormatter) {
248
- x.definition.valueFormatter = typeValueFormatter;
249
- }
250
- return x.definition;
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 hyphenated
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 hyphenated
261
- const hyphenatedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => hypenateAndLowercase(property));
262
- return lowerCasedPropertyNames.concat(hyphenatedPropertyNames);
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) {
@@ -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[arr2Field];
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
+ }
@@ -1 +1,2 @@
1
+ export * from './array';
1
2
  export * from './logger';
@@ -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": "any"
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": 2
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": "any"
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": 2
4991
+ "endIndex": 3
4959
4992
  },
4960
4993
  "isStatic": false,
4961
4994
  "isProtected": true,
@@ -4968,7 +5001,7 @@
4968
5001
  "excerptTokens": [
4969
5002
  {
4970
5003
  "kind": "Content",
4971
- "text": "applyTemplateDefinitions(columnDefs?: "
5004
+ "text": "applyTemplateDefinitions(columnDefs: "
4972
5005
  },
4973
5006
  {
4974
5007
  "kind": "Reference",
@@ -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": 4,
5003
- "endIndex": 6
5043
+ "startIndex": 6,
5044
+ "endIndex": 8
5004
5045
  },
5005
5046
  "releaseTag": "Public",
5006
5047
  "isProtected": false,
@@ -5012,6 +5053,14 @@
5012
5053
  "startIndex": 1,
5013
5054
  "endIndex": 3
5014
5055
  },
5056
+ "isOptional": false
5057
+ },
5058
+ {
5059
+ "parameterName": "deferredColumnDefs",
5060
+ "parameterTypeTokenRange": {
5061
+ "startIndex": 4,
5062
+ "endIndex": 5
5063
+ },
5015
5064
  "isOptional": true
5016
5065
  }
5017
5066
  ],
@@ -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",
@@ -7600,6 +7716,114 @@
7600
7716
  "endIndex": 3
7601
7717
  }
7602
7718
  },
7719
+ {
7720
+ "kind": "Function",
7721
+ "canonicalReference": "@genesislcap/grid-pro!mergeAndDedupColDefWithColumnState:function(1)",
7722
+ "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",
7723
+ "excerptTokens": [
7724
+ {
7725
+ "kind": "Content",
7726
+ "text": "export declare function mergeAndDedupColDefWithColumnState(colDefs: "
7727
+ },
7728
+ {
7729
+ "kind": "Reference",
7730
+ "text": "ColDef",
7731
+ "canonicalReference": "@ag-grid-community/core!ColDef:interface"
7732
+ },
7733
+ {
7734
+ "kind": "Content",
7735
+ "text": "[]"
7736
+ },
7737
+ {
7738
+ "kind": "Content",
7739
+ "text": ", columnStates: "
7740
+ },
7741
+ {
7742
+ "kind": "Reference",
7743
+ "text": "ColumnState",
7744
+ "canonicalReference": "@ag-grid-community/core!ColumnState:interface"
7745
+ },
7746
+ {
7747
+ "kind": "Content",
7748
+ "text": "[]"
7749
+ },
7750
+ {
7751
+ "kind": "Content",
7752
+ "text": ", arr1Field?: "
7753
+ },
7754
+ {
7755
+ "kind": "Content",
7756
+ "text": "string"
7757
+ },
7758
+ {
7759
+ "kind": "Content",
7760
+ "text": ", arr2Field?: "
7761
+ },
7762
+ {
7763
+ "kind": "Content",
7764
+ "text": "string"
7765
+ },
7766
+ {
7767
+ "kind": "Content",
7768
+ "text": "): "
7769
+ },
7770
+ {
7771
+ "kind": "Reference",
7772
+ "text": "ColDef",
7773
+ "canonicalReference": "@ag-grid-community/core!ColDef:interface"
7774
+ },
7775
+ {
7776
+ "kind": "Content",
7777
+ "text": "[]"
7778
+ },
7779
+ {
7780
+ "kind": "Content",
7781
+ "text": ";"
7782
+ }
7783
+ ],
7784
+ "fileUrlPath": "src/utils/array.ts",
7785
+ "returnTypeTokenRange": {
7786
+ "startIndex": 11,
7787
+ "endIndex": 13
7788
+ },
7789
+ "releaseTag": "Public",
7790
+ "overloadIndex": 1,
7791
+ "parameters": [
7792
+ {
7793
+ "parameterName": "colDefs",
7794
+ "parameterTypeTokenRange": {
7795
+ "startIndex": 1,
7796
+ "endIndex": 3
7797
+ },
7798
+ "isOptional": false
7799
+ },
7800
+ {
7801
+ "parameterName": "columnStates",
7802
+ "parameterTypeTokenRange": {
7803
+ "startIndex": 4,
7804
+ "endIndex": 6
7805
+ },
7806
+ "isOptional": false
7807
+ },
7808
+ {
7809
+ "parameterName": "arr1Field",
7810
+ "parameterTypeTokenRange": {
7811
+ "startIndex": 7,
7812
+ "endIndex": 8
7813
+ },
7814
+ "isOptional": true
7815
+ },
7816
+ {
7817
+ "parameterName": "arr2Field",
7818
+ "parameterTypeTokenRange": {
7819
+ "startIndex": 9,
7820
+ "endIndex": 10
7821
+ },
7822
+ "isOptional": true
7823
+ }
7824
+ ],
7825
+ "name": "mergeAndDedupColDefWithColumnState"
7826
+ },
7603
7827
  {
7604
7828
  "kind": "Class",
7605
7829
  "canonicalReference": "@genesislcap/grid-pro!SelectRenderer:class",
@@ -3,6 +3,7 @@ import { Binding } from '@microsoft/fast-element';
3
3
  import { CaptureType } from '@microsoft/fast-element';
4
4
  import { ColDef } from '@ag-grid-community/core';
5
5
  import { ColumnApi } from '@ag-grid-community/core';
6
+ import { ColumnState } from '@ag-grid-community/core';
6
7
  import { Connect } from '@genesislcap/foundation-comms';
7
8
  import type { Container } from '@microsoft/fast-foundation';
8
9
  import { Controller } from '@microsoft/fast-element';
@@ -383,6 +384,14 @@ export declare const CellTemplate: ViewTemplate<GridProCell, any>;
383
384
  */
384
385
  export declare const ColumnTemplate: ViewTemplate<GridColumn, any>;
385
386
 
387
+ /**
388
+ * Convert string values from 'camelCase' to 'kebab-case'
389
+ * @param value - The value to convert to Kebab case.
390
+ * @returns The Kebab case result.
391
+ * @public
392
+ */
393
+ export declare const convertToKebabCase: (value: string) => string;
394
+
386
395
  /**
387
396
  * Returns a formatted date time value from the Grid Pro cell value.
388
397
  * @param param - A ValueFormatterParams object.
@@ -805,8 +814,8 @@ export declare class GridPro extends GridPro_base {
805
814
  gridComponents: {
806
815
  [componentName: string]: any;
807
816
  };
808
- protected agAttributes: any;
809
- protected agPropertiesMap: any;
817
+ protected agAttributes: Record<string, string>;
818
+ protected agPropertiesMap: Record<string, string>;
810
819
  protected agGridOptions: GridOptions;
811
820
  protected initialised: boolean;
812
821
  private rehydrationAttempted;
@@ -826,15 +835,23 @@ export declare class GridPro extends GridPro_base {
826
835
  * @internal
827
836
  */
828
837
  private removeConfigWidthsToAutosize;
829
- private serialiseStoreTableConfig;
830
- private rehydrateTableConfig;
838
+ private saveColumnState;
839
+ /**
840
+ * Gets the saved grid ColumnState[] from local storage
841
+ * @remarks This is used to restore the grid state when the grid is rehydrated
842
+ * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
843
+ * @public
844
+ */
845
+ getSavedColumnState(): ColumnState[];
846
+ private restoreColumnState;
831
847
  /**
832
848
  * @public
833
849
  */
834
850
  get gridOptions(): GridOptions;
851
+ get gridProGenesisDatasource(): GridProGenesisDatasource;
835
852
  set gridOptions(options: GridOptions);
836
853
  private enableFlashingRows;
837
- applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
854
+ applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
838
855
  get observedAttributes(): string[];
839
856
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
840
857
  globalEventListener(eventType: any, event: any): void;
@@ -1088,6 +1105,10 @@ declare const GridPro_base: (new (...args: any[]) => {
1088
1105
  ondragleave: (this: GlobalEventHandlers, ev: DragEvent) => any;
1089
1106
  ondragover: (this: GlobalEventHandlers, ev: DragEvent) => any;
1090
1107
  ondragstart: (this: GlobalEventHandlers, ev: DragEvent) => any;
1108
+ /**
1109
+ * Grid Pro default configuration.
1110
+ * @public
1111
+ */
1091
1112
  ondrop: (this: GlobalEventHandlers, ev: DragEvent) => any;
1092
1113
  ondurationchange: (this: GlobalEventHandlers, ev: Event) => any;
1093
1114
  onemptied: (this: GlobalEventHandlers, ev: Event) => any;
@@ -1997,6 +2018,14 @@ export declare const gridProTemplate: ViewTemplate;
1997
2018
  */
1998
2019
  export declare const logger: Logger;
1999
2020
 
2021
+ /**
2022
+ * Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
2023
+ * @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
2024
+ * @privateRemarks For restoring saved `ColumnState` but also keep custom renderers and other `ColDef` properties.
2025
+ * @public
2026
+ */
2027
+ export declare function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
2028
+
2000
2029
  declare interface SelectCellRendererParams extends ICellRendererParams {
2001
2030
  accessor: string;
2002
2031
  defaultValue?: string;
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [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,5 +7,5 @@
7
7
  **Signature:**
8
8
 
9
9
  ```typescript
10
- protected agAttributes: any;
10
+ protected agAttributes: Record<string, string>;
11
11
  ```
@@ -7,5 +7,5 @@
7
7
  **Signature:**
8
8
 
9
9
  ```typescript
10
- protected agPropertiesMap: any;
10
+ protected agPropertiesMap: Record<string, string>;
11
11
  ```
@@ -7,14 +7,15 @@
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
14
14
 
15
15
  | Parameter | Type | Description |
16
16
  | --- | --- | --- |
17
- | columnDefs | ColDef\[\] | _(Optional)_ |
17
+ | columnDefs | ColDef\[\] | |
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) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [GridPro](./grid-pro.gridpro.md) &gt; [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) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [GridPro](./grid-pro.gridpro.md) &gt; [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> | any | |
30
+ | [agAttributes](./grid-pro.gridpro.agattributes.md) | <code>protected</code> | Record&lt;string, string&gt; | |
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> | any | |
33
+ | [agPropertiesMap](./grid-pro.gridpro.agpropertiesmap.md) | <code>protected</code> | Record&lt;string, string&gt; | |
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) | | |
@@ -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) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [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
+
@@ -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';
@@ -303,6 +304,9 @@ export const CellTemplate: ViewTemplate<GridProCell, any>;
303
304
  // @public
304
305
  export const ColumnTemplate: ViewTemplate<GridColumn, any>;
305
306
 
307
+ // @public
308
+ export const convertToKebabCase: (value: string) => string;
309
+
306
310
  // @public
307
311
  export function dateTimeValueFormatter({ value }: ValueFormatterParams): any;
308
312
 
@@ -528,15 +532,15 @@ export class GridPro extends GridPro_base {
528
532
  // (undocumented)
529
533
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
530
534
  // (undocumented)
531
- protected agAttributes: any;
535
+ protected agAttributes: Record<string, string>;
532
536
  // (undocumented)
533
537
  agGrid: Grid;
534
538
  // (undocumented)
535
539
  protected agGridOptions: GridOptions;
536
540
  // (undocumented)
537
- protected agPropertiesMap: any;
541
+ protected agPropertiesMap: Record<string, string>;
538
542
  // (undocumented)
539
- applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
543
+ applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
540
544
  // (undocumented)
541
545
  autoCellRendererByType: boolean;
542
546
  // (undocumented)
@@ -556,6 +560,7 @@ export class GridPro extends GridPro_base {
556
560
  enabledRowFlashing: boolean;
557
561
  // (undocumented)
558
562
  eventsAndCallbacks: any;
563
+ getSavedColumnState(): ColumnState[];
559
564
  // (undocumented)
560
565
  globalEventListener(eventType: any, event: any): void;
561
566
  // (undocumented)
@@ -571,6 +576,8 @@ export class GridPro extends GridPro_base {
571
576
  get gridOptions(): GridOptions;
572
577
  set gridOptions(options: GridOptions);
573
578
  // (undocumented)
579
+ get gridProGenesisDatasource(): GridProGenesisDatasource;
580
+ // (undocumented)
574
581
  gridSlot: HTMLSlotElement;
575
582
  // (undocumented)
576
583
  headerHeight: number;
@@ -741,6 +748,9 @@ export const gridProTemplate: ViewTemplate;
741
748
  // @public
742
749
  export const logger: Logger;
743
750
 
751
+ // @public
752
+ export function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
753
+
744
754
  // @public
745
755
  export class SelectRenderer extends FoundationElement implements ICellRendererComp {
746
756
  // (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.49.0",
4
+ "version": "14.50.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -21,14 +21,14 @@
21
21
  "serve": "genx serve"
22
22
  },
23
23
  "devDependencies": {
24
- "@genesislcap/foundation-testing": "^14.49.0",
25
- "@genesislcap/genx": "^14.49.0",
24
+ "@genesislcap/foundation-testing": "^14.50.0",
25
+ "@genesislcap/genx": "^14.50.0",
26
26
  "bulma": "^0.9.3"
27
27
  },
28
28
  "dependencies": {
29
- "@genesislcap/foundation-comms": "^14.49.0",
30
- "@genesislcap/foundation-ui": "^14.49.0",
31
- "@genesislcap/foundation-utils": "^14.49.0",
29
+ "@genesislcap/foundation-comms": "^14.50.0",
30
+ "@genesislcap/foundation-ui": "^14.50.0",
31
+ "@genesislcap/foundation-utils": "^14.50.0",
32
32
  "@microsoft/fast-colors": "^5.1.4",
33
33
  "@microsoft/fast-components": "^2.21.3",
34
34
  "@microsoft/fast-element": "^1.7.0",
@@ -51,5 +51,5 @@
51
51
  "access": "public"
52
52
  },
53
53
  "customElements": "dist/custom-elements.json",
54
- "gitHead": "4cf55f57fe21d98d254b674fa8876d218e861296"
54
+ "gitHead": "c19d65aecc40c8063f5d90dfd993e4fb00d8b8a7"
55
55
  }