@genesislcap/grid-pro 14.24.2-alpha-1a5d656.0 → 14.24.2

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,26 +263,6 @@
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
- },
286
266
  {
287
267
  "kind": "class",
288
268
  "description": "The Grid Pro element.",
@@ -449,18 +429,15 @@
449
429
  {
450
430
  "kind": "field",
451
431
  "name": "agAttributes",
432
+ "privacy": "protected",
452
433
  "type": {
453
- "text": "Record<string, string>"
434
+ "text": "object"
454
435
  },
455
- "privacy": "protected",
456
436
  "default": "{}"
457
437
  },
458
438
  {
459
439
  "kind": "field",
460
440
  "name": "agPropertiesMap",
461
- "type": {
462
- "text": "Record<string, string>"
463
- },
464
441
  "privacy": "protected"
465
442
  },
466
443
  {
@@ -516,7 +493,7 @@
516
493
  },
517
494
  {
518
495
  "kind": "method",
519
- "name": "saveColumnState",
496
+ "name": "serialiseStoreTableConfig",
520
497
  "privacy": "private",
521
498
  "return": {
522
499
  "type": {
@@ -526,18 +503,7 @@
526
503
  },
527
504
  {
528
505
  "kind": "method",
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",
506
+ "name": "rehydrateTableConfig",
541
507
  "privacy": "private",
542
508
  "return": {
543
509
  "type": {
@@ -553,14 +519,6 @@
553
519
  },
554
520
  "privacy": "public"
555
521
  },
556
- {
557
- "kind": "field",
558
- "name": "gridProGenesisDatasource",
559
- "type": {
560
- "text": "GridProGenesisDatasource"
561
- },
562
- "readonly": true
563
- },
564
522
  {
565
523
  "kind": "method",
566
524
  "name": "enableFlashingRows",
@@ -576,10 +534,6 @@
576
534
  "type": {
577
535
  "text": "ColDef[]"
578
536
  }
579
- },
580
- {
581
- "name": "deferredColumnDefs",
582
- "default": "false"
583
537
  }
584
538
  ]
585
539
  },
@@ -931,14 +885,6 @@
931
885
  }
932
886
  ],
933
887
  "exports": [
934
- {
935
- "kind": "js",
936
- "name": "convertToKebabCase",
937
- "declaration": {
938
- "name": "convertToKebabCase",
939
- "module": "src/grid-pro.ts"
940
- }
941
- },
942
888
  {
943
889
  "kind": "js",
944
890
  "name": "GridPro",
@@ -5170,68 +5116,11 @@
5170
5116
  "declarations": [],
5171
5117
  "exports": []
5172
5118
  },
5173
- {
5174
- "kind": "javascript-module",
5175
- "path": "src/utils/array.ts",
5176
- "declarations": [
5177
- {
5178
- "kind": "function",
5179
- "name": "mergeAndDeduplicateColDefAndState",
5180
- "return": {
5181
- "type": {
5182
- "text": "T[]"
5183
- }
5184
- },
5185
- "parameters": [
5186
- {
5187
- "name": "arr1",
5188
- "type": {
5189
- "text": "T[]"
5190
- }
5191
- },
5192
- {
5193
- "name": "arr2",
5194
- "type": {
5195
- "text": "T[]"
5196
- }
5197
- },
5198
- {
5199
- "name": "arr1Field",
5200
- "default": "'field'"
5201
- },
5202
- {
5203
- "name": "arr2Field",
5204
- "default": "'colId'"
5205
- }
5206
- ],
5207
- "description": "Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.",
5208
- "privacy": "public"
5209
- }
5210
- ],
5211
- "exports": [
5212
- {
5213
- "kind": "js",
5214
- "name": "mergeAndDeduplicateColDefAndState",
5215
- "declaration": {
5216
- "name": "mergeAndDeduplicateColDefAndState",
5217
- "module": "src/utils/array.ts"
5218
- }
5219
- }
5220
- ]
5221
- },
5222
5119
  {
5223
5120
  "kind": "javascript-module",
5224
5121
  "path": "src/utils/index.ts",
5225
5122
  "declarations": [],
5226
5123
  "exports": [
5227
- {
5228
- "kind": "js",
5229
- "name": "*",
5230
- "declaration": {
5231
- "name": "*",
5232
- "package": "./array"
5233
- }
5234
- },
5235
5124
  {
5236
5125
  "kind": "js",
5237
5126
  "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,EAWX,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;IA0G7D;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7FL;;;;GAIG;AACH,qBAGa,wBAAyB,SAAQ,6BAAiC;IACpE,OAAO,EAAG,OAAO,CAAC;IACf,UAAU,EAAG,UAAU,CAAC;IAExB,mBAAmB,EAAE,WAAW,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACgC,UAAU,UAAS;IACvC,OAAO,EAAE,MAAM,CAAmC;IAClD,OAAO,EAAE,MAAM,CAAoC;IAC/B,UAAU,UAAS;I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Ae;IAC9B,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,aAAa,CAAe;IAEpC,OAAO,CAAC,6BAA6B,CAAQ;IAC7C,OAAO,CAAC,mBAAmB,CAAS;IAEpC,OAAO,CAAC,IAAI,CAA+B;IAC3C,OAAO,CAAC,aAAa,CAAqB;IAE1C,OAAO,CAAC,SAAS,CAAS;IAE1B,OAAO,CAAC,mBAAmB,CAAkC;IAC7D,OAAO,CAAC,MAAM,CAAwE;IAEtF,iBAAiB;IAsBjB,oBAAoB;IAQX,SAAS,IAAI,IAAI;IAO1B,OAAO,KAAK,MAAM,GAEjB;IAID;;;;OAIG;IACH,IAAI;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;IA0CvB,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"}
@@ -1,14 +1,6 @@
1
- import { Grid, ColumnApi, GridApi, GridOptions, ColDef, ColumnState } from '@ag-grid-community/core';
1
+ import { Grid, ColumnApi, GridApi, GridOptions, ColDef } from '@ag-grid-community/core';
2
2
  import { FoundationElement } from '@microsoft/fast-foundation';
3
- import { GridProGenesisDatasource } from './grid-pro-genesis-datasource';
4
3
  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;
12
4
  declare const GridPro_base: (new (...args: any[]) => {
13
5
  "__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
14
6
  cloneNode(deep?: boolean): Node;
@@ -371,8 +363,8 @@ export declare class GridPro extends GridPro_base {
371
363
  gridComponents: {
372
364
  [componentName: string]: any;
373
365
  };
374
- protected agAttributes: Record<string, string>;
375
- protected agPropertiesMap: Record<string, string>;
366
+ protected agAttributes: any;
367
+ protected agPropertiesMap: any;
376
368
  protected agGridOptions: GridOptions;
377
369
  protected initialised: boolean;
378
370
  private rehydrationAttempted;
@@ -392,23 +384,15 @@ export declare class GridPro extends GridPro_base {
392
384
  * @internal
393
385
  */
394
386
  private removeConfigWidthsToAutosize;
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;
387
+ private serialiseStoreTableConfig;
388
+ private rehydrateTableConfig;
404
389
  /**
405
390
  * @public
406
391
  */
407
392
  get gridOptions(): GridOptions;
408
- get gridProGenesisDatasource(): GridProGenesisDatasource;
409
393
  set gridOptions(options: GridOptions);
410
394
  private enableFlashingRows;
411
- applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
395
+ applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
412
396
  get observedAttributes(): string[];
413
397
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
414
398
  globalEventListener(eventType: any, event: any): void;
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AC,UAAU,GAAE,MAAM,EAAO;IAgClD,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"}
@@ -1,3 +1,2 @@
1
- export * from './array';
2
1
  export * from './logger';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,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, true);
329
+ const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData);
330
330
  return colDefsMergedWithTemplateDefs;
331
331
  }
332
332
  buildCriteria() {
@@ -16,19 +16,12 @@ 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 { mergeAndDeduplicateColDefAndState } from './utils';
20
19
  GridProGenesisDatasource;
21
20
  GridProGenesisDatasourceNext;
22
21
  GridProCell;
23
22
  GridColumn;
24
23
  ModuleRegistry.registerModules([CsvExportModule, ClientSideRowModelModule]);
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();
24
+ const hypenateAndLowercase = (property) => property.replace('/([a-z])([A-Z])/g', '$1-$2').toLowerCase();
32
25
  /**
33
26
  * The Grid Pro element.
34
27
  * @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
@@ -69,7 +62,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
69
62
  this.agAttributes = {};
70
63
  this.agPropertiesMap = ComponentUtil.ALL_PROPERTIES.reduce((map, property) => {
71
64
  map[property.toLowerCase()] = property;
72
- map[convertToKebabCase(property)] = property;
65
+ map[hypenateAndLowercase(property)] = property;
73
66
  return map;
74
67
  }, {});
75
68
  }
@@ -141,45 +134,28 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
141
134
  removeConfigWidthsToAutosize(colState) {
142
135
  return colState.map((col) => (Object.assign(Object.assign({}, col), { width: null })));
143
136
  }
144
- saveColumnState() {
137
+ serialiseStoreTableConfig() {
145
138
  if (this.rehydrationAttempted && this.statePersistanceEnabled()) {
146
139
  const existingOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions') || '{}');
147
- let colState = this.columnApi.getColumnState();
140
+ let colState = this.agGridOptions.columnApi.getColumnState();
148
141
  colState = this.gridAutosizingEnabled
149
142
  ? this.removeConfigWidthsToAutosize(colState)
150
143
  : colState;
151
- if (colState.length === 0)
152
- return;
153
144
  existingOptions[this.persistColumnStateKey] = JSON.stringify(colState);
154
145
  this.session.setLocalStorageItem('gridOptions', JSON.stringify(existingOptions));
155
146
  }
156
147
  }
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);
148
+ rehydrateTableConfig() {
149
+ this.rehydrationAttempted = true;
150
+ if (this.statePersistanceEnabled() && this.session.getLocalStorageItem('gridOptions')) {
151
+ const allGridOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions'));
167
152
  if (this.persistColumnStateKey in allGridOptions) {
168
- return JSON.parse(allGridOptions[this.persistColumnStateKey]);
153
+ this.agGridOptions.columnApi.applyColumnState({
154
+ state: JSON.parse(allGridOptions[this.persistColumnStateKey]),
155
+ applyOrder: true,
156
+ });
169
157
  }
170
158
  }
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
- }
183
159
  }
184
160
  /**
185
161
  * @public
@@ -187,15 +163,13 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
187
163
  get gridOptions() {
188
164
  return this.agGridOptions;
189
165
  }
190
- get gridProGenesisDatasource() {
191
- return this.querySelector('grid-pro-genesis-datasource');
192
- }
193
166
  set gridOptions(options) {
194
167
  const globalEventListener = this.globalEventListener.bind(this);
195
168
  const gridOnChangeCallback = () => {
196
- this.saveColumnState.bind(this)();
169
+ this.serialiseStoreTableConfig.bind(this)();
197
170
  this.debouncedColumnAutosize.bind(this)();
198
171
  };
172
+ const rehydrateTableConfig = this.rehydrateTableConfig.bind(this);
199
173
  Array.from(this.attributes).forEach((attribute) => {
200
174
  const attrName = this.agPropertiesMap[attribute.name];
201
175
  if (!attrName)
@@ -207,7 +181,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
207
181
  filter: true,
208
182
  resizable: true,
209
183
  sortable: true,
210
- }, components: this.combineAllGridComponents(components), suppressDragLeaveHidesColumns: true }, this.eventsAndCallbacks), { onGridReady: (params) => {
184
+ }, columnDefs: this.applyTemplateDefinitions(columnDefs), components: this.combineAllGridComponents(components), suppressDragLeaveHidesColumns: true }, this.eventsAndCallbacks), { onGridReady: (params) => {
211
185
  var _a, _b;
212
186
  this.gridApi = (_a = options.api) !== null && _a !== void 0 ? _a : params.api;
213
187
  this.columnApi = (_b = options.columnApi) !== null && _b !== void 0 ? _b : params.columnApi;
@@ -218,14 +192,11 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
218
192
  params,
219
193
  gridId: this.id,
220
194
  });
221
- this.restoreColumnState.bind(this)();
195
+ rehydrateTableConfig();
222
196
  this.debouncedColumnAutosize.bind(this)();
223
197
  }, onFirstDataRendered: () => {
224
- this.enableFlashingRows.bind(this)();
198
+ this.enableFlashingRows.bind(this);
225
199
  }, 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
- }
229
200
  this.agGridOptions = Object.assign(Object.assign({}, this.agGridOptions), ComponentUtil.copyAttributesToGridOptions(derivedOptions, this.agAttributes));
230
201
  const gridParams = {
231
202
  globalEventListener: globalEventListener,
@@ -255,48 +226,40 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
255
226
  });
256
227
  }
257
228
  }
258
- applyTemplateDefinitions(columnDefs = [], deferredColumnDefs = false) {
229
+ applyTemplateDefinitions(columnDefs = []) {
259
230
  const agColumnNodes = this.querySelectorAll(this.columnComponentName);
260
231
  const overrides = Array.from(agColumnNodes).map((x) => { var _a; return (_a = x.definition) === null || _a === void 0 ? void 0 : _a.field; });
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
- }
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) {
282
244
  return x.definition;
283
- }),
284
- ];
285
- }
286
- if (this.gridProGenesisDatasource && deferredColumnDefs) {
287
- const savedColumnState = this.getSavedColumnState();
288
- return mergeAndDeduplicateColDefAndState(colDefsToReturn, savedColumnState);
289
- }
290
- return colDefsToReturn;
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;
291
254
  }
292
255
  get observedAttributes() {
293
- // allow properties to be supplied either lowercased or kebab-cased
256
+ // allow properties to be supplied either lowercased or hyphenated
294
257
  // this allows the user to either supply (for example) enableSorting or enabled-sorting
295
258
  // properties lowercased
296
259
  const lowerCasedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => property.toLowerCase());
297
- // properties kebab-cased
298
- const kebabCasePropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => convertToKebabCase(property));
299
- return lowerCasedPropertyNames.concat(kebabCasePropertyNames);
260
+ // properties hyphenated
261
+ const hyphenatedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => hypenateAndLowercase(property));
262
+ return lowerCasedPropertyNames.concat(hyphenatedPropertyNames);
300
263
  }
301
264
  agAttributeChangedCallback(attName, oldValue, newValue) {
302
265
  if (oldValue === newValue) {
@@ -1,2 +1 @@
1
- export * from './array';
2
1
  export * from './logger';
@@ -3035,29 +3035,6 @@
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
- },
3061
3038
  {
3062
3039
  "kind": "Function",
3063
3040
  "canonicalReference": "@genesislcap/grid-pro!dateTimeValueFormatter:function(1)",
@@ -4871,14 +4848,9 @@
4871
4848
  "kind": "Content",
4872
4849
  "text": "protected agAttributes: "
4873
4850
  },
4874
- {
4875
- "kind": "Reference",
4876
- "text": "Record",
4877
- "canonicalReference": "!Record:type"
4878
- },
4879
4851
  {
4880
4852
  "kind": "Content",
4881
- "text": "<string, string>"
4853
+ "text": "any"
4882
4854
  },
4883
4855
  {
4884
4856
  "kind": "Content",
@@ -4891,7 +4863,7 @@
4891
4863
  "name": "agAttributes",
4892
4864
  "propertyTypeTokenRange": {
4893
4865
  "startIndex": 1,
4894
- "endIndex": 3
4866
+ "endIndex": 2
4895
4867
  },
4896
4868
  "isStatic": false,
4897
4869
  "isProtected": true,
@@ -4968,14 +4940,9 @@
4968
4940
  "kind": "Content",
4969
4941
  "text": "protected agPropertiesMap: "
4970
4942
  },
4971
- {
4972
- "kind": "Reference",
4973
- "text": "Record",
4974
- "canonicalReference": "!Record:type"
4975
- },
4976
4943
  {
4977
4944
  "kind": "Content",
4978
- "text": "<string, string>"
4945
+ "text": "any"
4979
4946
  },
4980
4947
  {
4981
4948
  "kind": "Content",
@@ -4988,7 +4955,7 @@
4988
4955
  "name": "agPropertiesMap",
4989
4956
  "propertyTypeTokenRange": {
4990
4957
  "startIndex": 1,
4991
- "endIndex": 3
4958
+ "endIndex": 2
4992
4959
  },
4993
4960
  "isStatic": false,
4994
4961
  "isProtected": true,
@@ -5012,14 +4979,6 @@
5012
4979
  "kind": "Content",
5013
4980
  "text": "[]"
5014
4981
  },
5015
- {
5016
- "kind": "Content",
5017
- "text": ", deferredColumnDefs?: "
5018
- },
5019
- {
5020
- "kind": "Content",
5021
- "text": "boolean"
5022
- },
5023
4982
  {
5024
4983
  "kind": "Content",
5025
4984
  "text": "): "
@@ -5040,8 +4999,8 @@
5040
4999
  ],
5041
5000
  "isStatic": false,
5042
5001
  "returnTypeTokenRange": {
5043
- "startIndex": 6,
5044
- "endIndex": 8
5002
+ "startIndex": 4,
5003
+ "endIndex": 6
5045
5004
  },
5046
5005
  "releaseTag": "Public",
5047
5006
  "isProtected": false,
@@ -5054,14 +5013,6 @@
5054
5013
  "endIndex": 3
5055
5014
  },
5056
5015
  "isOptional": true
5057
- },
5058
- {
5059
- "parameterName": "deferredColumnDefs",
5060
- "parameterTypeTokenRange": {
5061
- "startIndex": 4,
5062
- "endIndex": 5
5063
- },
5064
- "isOptional": true
5065
5016
  }
5066
5017
  ],
5067
5018
  "isOptional": false,
@@ -5391,42 +5342,6 @@
5391
5342
  "isProtected": false,
5392
5343
  "isAbstract": false
5393
5344
  },
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
- },
5430
5345
  {
5431
5346
  "kind": "Method",
5432
5347
  "canonicalReference": "@genesislcap/grid-pro!GridPro#globalEventListener:member(1)",
@@ -5652,37 +5567,6 @@
5652
5567
  "isProtected": false,
5653
5568
  "isAbstract": false
5654
5569
  },
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
- },
5686
5570
  {
5687
5571
  "kind": "Property",
5688
5572
  "canonicalReference": "@genesislcap/grid-pro!GridPro#gridSlot:member",
@@ -7619,125 +7503,6 @@
7619
7503
  "endIndex": 3
7620
7504
  }
7621
7505
  },
7622
- {
7623
- "kind": "Function",
7624
- "canonicalReference": "@genesislcap/grid-pro!mergeAndDeduplicateColDefAndState: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 mergeAndDeduplicateColDefAndState<T extends "
7630
- },
7631
- {
7632
- "kind": "Reference",
7633
- "text": "Record",
7634
- "canonicalReference": "!Record:type"
7635
- },
7636
- {
7637
- "kind": "Content",
7638
- "text": "<string, any>"
7639
- },
7640
- {
7641
- "kind": "Content",
7642
- "text": ">(arr1: "
7643
- },
7644
- {
7645
- "kind": "Content",
7646
- "text": "T[]"
7647
- },
7648
- {
7649
- "kind": "Content",
7650
- "text": ", arr2: "
7651
- },
7652
- {
7653
- "kind": "Content",
7654
- "text": "T[]"
7655
- },
7656
- {
7657
- "kind": "Content",
7658
- "text": ", arr1Field?: "
7659
- },
7660
- {
7661
- "kind": "Content",
7662
- "text": "string"
7663
- },
7664
- {
7665
- "kind": "Content",
7666
- "text": ", arr2Field?: "
7667
- },
7668
- {
7669
- "kind": "Content",
7670
- "text": "string"
7671
- },
7672
- {
7673
- "kind": "Content",
7674
- "text": "): "
7675
- },
7676
- {
7677
- "kind": "Content",
7678
- "text": "T[]"
7679
- },
7680
- {
7681
- "kind": "Content",
7682
- "text": ";"
7683
- }
7684
- ],
7685
- "fileUrlPath": "src/utils/array.ts",
7686
- "returnTypeTokenRange": {
7687
- "startIndex": 12,
7688
- "endIndex": 13
7689
- },
7690
- "releaseTag": "Public",
7691
- "overloadIndex": 1,
7692
- "parameters": [
7693
- {
7694
- "parameterName": "arr1",
7695
- "parameterTypeTokenRange": {
7696
- "startIndex": 4,
7697
- "endIndex": 5
7698
- },
7699
- "isOptional": false
7700
- },
7701
- {
7702
- "parameterName": "arr2",
7703
- "parameterTypeTokenRange": {
7704
- "startIndex": 6,
7705
- "endIndex": 7
7706
- },
7707
- "isOptional": false
7708
- },
7709
- {
7710
- "parameterName": "arr1Field",
7711
- "parameterTypeTokenRange": {
7712
- "startIndex": 8,
7713
- "endIndex": 9
7714
- },
7715
- "isOptional": true
7716
- },
7717
- {
7718
- "parameterName": "arr2Field",
7719
- "parameterTypeTokenRange": {
7720
- "startIndex": 10,
7721
- "endIndex": 11
7722
- },
7723
- "isOptional": true
7724
- }
7725
- ],
7726
- "typeParameters": [
7727
- {
7728
- "typeParameterName": "T",
7729
- "constraintTokenRange": {
7730
- "startIndex": 1,
7731
- "endIndex": 3
7732
- },
7733
- "defaultTypeTokenRange": {
7734
- "startIndex": 0,
7735
- "endIndex": 0
7736
- }
7737
- }
7738
- ],
7739
- "name": "mergeAndDeduplicateColDefAndState"
7740
- },
7741
7506
  {
7742
7507
  "kind": "Class",
7743
7508
  "canonicalReference": "@genesislcap/grid-pro!SelectRenderer:class",
@@ -9,7 +9,6 @@ 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';
13
12
  import { Connect } from '@genesislcap/foundation-comms';
14
13
  import type { Container } from '@microsoft/fast-foundation';
15
14
  import { Controller } from '@microsoft/fast-element';
@@ -398,14 +397,6 @@ export declare const CellTemplate: ViewTemplate<GridProCell, any>;
398
397
  */
399
398
  export declare const ColumnTemplate: ViewTemplate<GridColumn, any>;
400
399
 
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
-
409
400
  /**
410
401
  * Returns a formatted date time value from the Grid Pro cell value.
411
402
  * @param param - A ValueFormatterParams object.
@@ -828,8 +819,8 @@ export declare class GridPro extends GridPro_base {
828
819
  gridComponents: {
829
820
  [componentName: string]: any;
830
821
  };
831
- protected agAttributes: Record<string, string>;
832
- protected agPropertiesMap: Record<string, string>;
822
+ protected agAttributes: any;
823
+ protected agPropertiesMap: any;
833
824
  protected agGridOptions: GridOptions;
834
825
  protected initialised: boolean;
835
826
  private rehydrationAttempted;
@@ -849,23 +840,15 @@ export declare class GridPro extends GridPro_base {
849
840
  * @internal
850
841
  */
851
842
  private removeConfigWidthsToAutosize;
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;
843
+ private serialiseStoreTableConfig;
844
+ private rehydrateTableConfig;
861
845
  /**
862
846
  * @public
863
847
  */
864
848
  get gridOptions(): GridOptions;
865
- get gridProGenesisDatasource(): GridProGenesisDatasource;
866
849
  set gridOptions(options: GridOptions);
867
850
  private enableFlashingRows;
868
- applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
851
+ applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
869
852
  get observedAttributes(): string[];
870
853
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
871
854
  globalEventListener(eventType: any, event: any): void;
@@ -2001,14 +1984,6 @@ export declare const gridProTemplate: ViewTemplate;
2001
1984
  */
2002
1985
  export declare const logger: Logger;
2003
1986
 
2004
- /**
2005
- * Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
2006
- * @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
2007
- * @privateRemarks For restoring saved `ColumnState` but also keep custom renderers and other `ColDef` properties.
2008
- * @public
2009
- */
2010
- export declare function mergeAndDeduplicateColDefAndState<T extends Record<string, any>>(arr1: T[], arr2: T[], arr1Field?: string, arr2Field?: string): T[];
2011
-
2012
1987
  declare interface SelectCellRendererParams extends ICellRendererParams {
2013
1988
  accessor: string;
2014
1989
  defaultValue?: string;
@@ -7,5 +7,5 @@
7
7
  **Signature:**
8
8
 
9
9
  ```typescript
10
- protected agAttributes: Record<string, string>;
10
+ protected agAttributes: any;
11
11
  ```
@@ -7,5 +7,5 @@
7
7
  **Signature:**
8
8
 
9
9
  ```typescript
10
- protected agPropertiesMap: Record<string, string>;
10
+ protected agPropertiesMap: any;
11
11
  ```
@@ -7,7 +7,7 @@
7
7
  **Signature:**
8
8
 
9
9
  ```typescript
10
- applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
10
+ applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
11
11
  ```
12
12
 
13
13
  ## Parameters
@@ -15,7 +15,6 @@ applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): C
15
15
  | Parameter | Type | Description |
16
16
  | --- | --- | --- |
17
17
  | columnDefs | ColDef\[\] | _(Optional)_ |
18
- | deferredColumnDefs | boolean | _(Optional)_ |
19
18
 
20
19
  **Returns:**
21
20
 
@@ -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> | Record&lt;string, string&gt; | |
30
+ | [agAttributes](./grid-pro.gridpro.agattributes.md) | <code>protected</code> | any | |
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> | Record&lt;string, string&gt; | |
33
+ | [agPropertiesMap](./grid-pro.gridpro.agpropertiesmap.md) | <code>protected</code> | any | |
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,7 +43,6 @@ 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) | |
47
46
  | [gridSlot](./grid-pro.gridpro.gridslot.md) | | HTMLSlotElement | |
48
47
  | [headerHeight](./grid-pro.gridpro.headerheight.md) | | number | |
49
48
  | [initialised](./grid-pro.gridpro.initialised.md) | <code>protected</code> | boolean | |
@@ -58,11 +57,10 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
58
57
  | Method | Modifiers | Description |
59
58
  | --- | --- | --- |
60
59
  | [agAttributeChangedCallback(attName, oldValue, newValue)](./grid-pro.gridpro.agattributechangedcallback.md) | | |
61
- | [applyTemplateDefinitions(columnDefs, deferredColumnDefs)](./grid-pro.gridpro.applytemplatedefinitions.md) | | |
60
+ | [applyTemplateDefinitions(columnDefs)](./grid-pro.gridpro.applytemplatedefinitions.md) | | |
62
61
  | [combineAllGridComponents(gridOptionsComponents)](./grid-pro.gridpro.combineallgridcomponents.md) | | |
63
62
  | [connectedCallback()](./grid-pro.gridpro.connectedcallback.md) | | |
64
63
  | [disconnectedCallback()](./grid-pro.gridpro.disconnectedcallback.md) | | |
65
- | [getSavedColumnState()](./grid-pro.gridpro.getsavedcolumnstate.md) | | Gets the saved grid ColumnState\[\] from local storage |
66
64
  | [globalEventListener(eventType, event)](./grid-pro.gridpro.globaleventlistener.md) | | |
67
65
  | [statePersistanceEnabled()](./grid-pro.gridpro.statepersistanceenabled.md) | | |
68
66
  | [themeChanged(oldValue, newValue)](./grid-pro.gridpro.themechanged.md) | | |
@@ -34,7 +34,6 @@
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
- | [mergeAndDeduplicateColDefAndState(arr1, arr2, arr1Field, arr2Field)](./grid-pro.mergeanddeduplicatecoldefandstate.md) | Merges two arrays, one of <code>ColDef</code> and one of <code>ColumnState</code>, and deduplicates them. |
38
37
 
39
38
  ## Variables
40
39
 
@@ -59,7 +58,6 @@
59
58
  | [agThemeTokenMapCSS](./grid-pro.agthemetokenmapcss.md) | Generates the CSS for a given GridPro theme name and token map |
60
59
  | [CellTemplate](./grid-pro.celltemplate.md) | The Grid Pro Cell Template. |
61
60
  | [ColumnTemplate](./grid-pro.columntemplate.md) | The Grid Pro Column Template. |
62
- | [convertToKebabCase](./grid-pro.converttokebabcase.md) | Convert string values from 'camelCase' to 'kebab-case' |
63
61
  | [defaultAgGridFontFace](./grid-pro.defaultaggridfontface.md) | The default font face for Grid Pro (agGridAlpine). |
64
62
  | [defaultGridProConfig](./grid-pro.defaultgridproconfig.md) | Grid Pro default configuration. |
65
63
  | [foundationAgBooleanRenderer](./grid-pro.foundationagbooleanrenderer.md) | A function that returns a Foundation Boolean Renderer registration for configuring the component with a DesignSystem. |
@@ -15,7 +15,6 @@ 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';
19
18
  import { Connect } from '@genesislcap/foundation-comms';
20
19
  import type { Container } from '@microsoft/fast-foundation';
21
20
  import { Controller } from '@microsoft/fast-element';
@@ -321,9 +320,6 @@ export const CellTemplate: ViewTemplate<GridProCell, any>;
321
320
  // @public
322
321
  export const ColumnTemplate: ViewTemplate<GridColumn, any>;
323
322
 
324
- // @public
325
- export const convertToKebabCase: (value: string) => string;
326
-
327
323
  // @public
328
324
  export function dateTimeValueFormatter({ value }: ValueFormatterParams): any;
329
325
 
@@ -549,15 +545,15 @@ export class GridPro extends GridPro_base {
549
545
  // (undocumented)
550
546
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
551
547
  // (undocumented)
552
- protected agAttributes: Record<string, string>;
548
+ protected agAttributes: any;
553
549
  // (undocumented)
554
550
  agGrid: Grid;
555
551
  // (undocumented)
556
552
  protected agGridOptions: GridOptions;
557
553
  // (undocumented)
558
- protected agPropertiesMap: Record<string, string>;
554
+ protected agPropertiesMap: any;
559
555
  // (undocumented)
560
- applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
556
+ applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
561
557
  // (undocumented)
562
558
  autoCellRendererByType: boolean;
563
559
  // (undocumented)
@@ -577,7 +573,6 @@ export class GridPro extends GridPro_base {
577
573
  enabledRowFlashing: boolean;
578
574
  // (undocumented)
579
575
  eventsAndCallbacks: any;
580
- getSavedColumnState(): ColumnState[];
581
576
  // (undocumented)
582
577
  globalEventListener(eventType: any, event: any): void;
583
578
  // (undocumented)
@@ -593,8 +588,6 @@ export class GridPro extends GridPro_base {
593
588
  get gridOptions(): GridOptions;
594
589
  set gridOptions(options: GridOptions);
595
590
  // (undocumented)
596
- get gridProGenesisDatasource(): GridProGenesisDatasource;
597
- // (undocumented)
598
591
  gridSlot: HTMLSlotElement;
599
592
  // (undocumented)
600
593
  headerHeight: number;
@@ -756,9 +749,6 @@ export const gridProTemplate: ViewTemplate;
756
749
  // @public
757
750
  export const logger: Logger;
758
751
 
759
- // @public
760
- export function mergeAndDeduplicateColDefAndState<T extends Record<string, any>>(arr1: T[], arr2: T[], arr1Field?: string, arr2Field?: string): T[];
761
-
762
752
  // @public
763
753
  export class SelectRenderer extends FoundationElement implements ICellRendererComp {
764
754
  // (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.24.2-alpha-1a5d656.0",
4
+ "version": "14.24.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -23,8 +23,8 @@
23
23
  "test": "echo \"Error: no test specified\""
24
24
  },
25
25
  "devDependencies": {
26
- "@genesislcap/foundation-testing": "14.24.2-alpha-1a5d656.0",
27
- "@genesislcap/genx": "14.24.2-alpha-1a5d656.0",
26
+ "@genesislcap/foundation-testing": "^14.24.2",
27
+ "@genesislcap/genx": "^14.24.2",
28
28
  "@playwright/test": "^1.18.1",
29
29
  "bulma": "^0.9.3",
30
30
  "c8": "^7.11.0",
@@ -64,9 +64,9 @@
64
64
  "webpack-merge": "^5.7.3"
65
65
  },
66
66
  "dependencies": {
67
- "@genesislcap/foundation-comms": "14.24.2-alpha-1a5d656.0",
68
- "@genesislcap/foundation-ui": "14.24.2-alpha-1a5d656.0",
69
- "@genesislcap/foundation-utils": "14.24.2-alpha-1a5d656.0",
67
+ "@genesislcap/foundation-comms": "^14.24.2",
68
+ "@genesislcap/foundation-ui": "^14.24.2",
69
+ "@genesislcap/foundation-utils": "^14.24.2",
70
70
  "@microsoft/fast-colors": "^5.1.4",
71
71
  "@microsoft/fast-components": "^2.21.3",
72
72
  "@microsoft/fast-element": "^1.7.0",
@@ -92,5 +92,5 @@
92
92
  "access": "public"
93
93
  },
94
94
  "customElements": "dist/custom-elements.json",
95
- "gitHead": "92229173bfec02c431797fcf9c19ffe09f246754"
95
+ "gitHead": "a4cd30274c02f59472b48654d8e749c2e2b28f1d"
96
96
  }
@@ -1,8 +0,0 @@
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 declare function mergeAndDeduplicateColDefAndState<T extends Record<string, any>>(arr1: T[], arr2: T[], arr1Field?: string, arr2Field?: string): T[];
8
- //# sourceMappingURL=array.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/utils/array.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7E,IAAI,EAAE,CAAC,EAAE,EACT,IAAI,EAAE,CAAC,EAAE,EACT,SAAS,SAAU,EACnB,SAAS,SAAU,GAClB,CAAC,EAAE,CAsBL"}
@@ -1,26 +0,0 @@
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 mergeAndDeduplicateColDefAndState(arr1, arr2, arr1Field = 'field', arr2Field = 'colId') {
8
- const merged = {};
9
- const deduplicated = [];
10
- arr2.forEach((obj) => {
11
- const matchingObj = arr1.find((item) => item[arr1Field] === obj[arr2Field]);
12
- if (matchingObj) {
13
- const newObj = Object.assign(Object.assign({}, matchingObj), { [arr2Field]: obj[arr2Field] });
14
- merged[matchingObj[arr1Field]] = newObj;
15
- deduplicated.push(newObj);
16
- }
17
- });
18
- arr1.forEach((obj) => {
19
- if (!merged.hasOwnProperty(obj[arr1Field])) {
20
- const newObj = Object.assign({}, obj);
21
- merged[obj[arr1Field]] = newObj;
22
- deduplicated.push(newObj);
23
- }
24
- });
25
- return deduplicated;
26
- }
@@ -1,13 +0,0 @@
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
- ```
@@ -1,21 +0,0 @@
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
-
@@ -1,11 +0,0 @@
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
- ```
@@ -1,31 +0,0 @@
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; [mergeAndDeduplicateColDefAndState](./grid-pro.mergeanddeduplicatecoldefandstate.md)
4
-
5
- ## mergeAndDeduplicateColDefAndState() 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 mergeAndDeduplicateColDefAndState<T extends Record<string, any>>(arr1: T[], arr2: T[], arr1Field?: string, arr2Field?: string): T[];
13
- ```
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type | Description |
18
- | --- | --- | --- |
19
- | arr1 | T\[\] | |
20
- | arr2 | T\[\] | |
21
- | arr1Field | string | _(Optional)_ |
22
- | arr2Field | string | _(Optional)_ |
23
-
24
- **Returns:**
25
-
26
- T\[\]
27
-
28
- ## Remarks
29
-
30
- ColDef uses `field` and ColumnState uses `colId` to identify columns.
31
-