@genesislcap/grid-pro 14.20.2-alpha-a84fed585.0 → 14.22.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,26 +263,6 @@
263
263
  "kind": "javascript-module",
264
264
  "path": "src/grid-pro.ts",
265
265
  "declarations": [
266
- {
267
- "kind": "function",
268
- "name": "hyphenateAndLowercase",
269
- "parameters": [
270
- {
271
- "name": "value",
272
- "type": {
273
- "text": "string"
274
- },
275
- "description": "The value to hyphenate and lowercase."
276
- }
277
- ],
278
- "description": "A function to convert string values from 'camelCase' to 'hyphenated-lowercase'.",
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": {
@@ -524,19 +501,9 @@
524
501
  }
525
502
  }
526
503
  },
527
- {
528
- "kind": "field",
529
- "name": "savedColumnState",
530
- "type": {
531
- "text": "ColDef[]"
532
- },
533
- "description": "Gets the saved grid ColDefs from local storage",
534
- "privacy": "public",
535
- "readonly": true
536
- },
537
504
  {
538
505
  "kind": "method",
539
- "name": "restoreColumnState",
506
+ "name": "rehydrateTableConfig",
540
507
  "privacy": "private",
541
508
  "return": {
542
509
  "type": {
@@ -918,14 +885,6 @@
918
885
  }
919
886
  ],
920
887
  "exports": [
921
- {
922
- "kind": "js",
923
- "name": "hyphenateAndLowercase",
924
- "declaration": {
925
- "name": "hyphenateAndLowercase",
926
- "module": "src/grid-pro.ts"
927
- }
928
- },
929
888
  {
930
889
  "kind": "js",
931
890
  "name": "GridPro",
@@ -1,13 +1,6 @@
1
1
  import { Grid, ColumnApi, GridApi, GridOptions, ColDef } from '@ag-grid-community/core';
2
2
  import { FoundationElement } from '@microsoft/fast-foundation';
3
3
  import { GridComponents } from './grid-pro.types';
4
- /**
5
- * A function to convert string values from 'camelCase' to 'hyphenated-lowercase'.
6
- * @param value - The value to hyphenate and lowercase.
7
- * @returns The hyphenated and lowercased result.
8
- * @public
9
- */
10
- export declare const hyphenateAndLowercase: (value: string) => string;
11
4
  declare const GridPro_base: (new (...args: any[]) => {
12
5
  "__#1@#_container": {
13
6
  dragging: boolean;
@@ -90,11 +83,6 @@ declare const GridPro_base: (new (...args: any[]) => {
90
83
  getAttribute(qualifiedName: string): string;
91
84
  getAttributeNS(namespace: string, localName: string): string;
92
85
  getAttributeNames(): string[];
93
- /**
94
- * Because we try and resize the grid to fit using callbacks on events, this will cause
95
- * a stack overflow of calls to resize, so we need to debounce it.
96
- * @internal
97
- */
98
86
  getAttributeNode(qualifiedName: string): Attr;
99
87
  getAttributeNodeNS(namespace: string, localName: string): Attr;
100
88
  getBoundingClientRect(): DOMRect;
@@ -391,8 +379,8 @@ export declare class GridPro extends GridPro_base {
391
379
  gridComponents: {
392
380
  [componentName: string]: any;
393
381
  };
394
- protected agAttributes: Record<string, string>;
395
- protected agPropertiesMap: Record<string, string>;
382
+ protected agAttributes: any;
383
+ protected agPropertiesMap: any;
396
384
  protected agGridOptions: GridOptions;
397
385
  protected initialised: boolean;
398
386
  private rehydrationAttempted;
@@ -412,15 +400,8 @@ export declare class GridPro extends GridPro_base {
412
400
  * @internal
413
401
  */
414
402
  private removeConfigWidthsToAutosize;
415
- private saveColumnState;
416
- /**
417
- * Gets the saved grid ColDefs from local storage
418
- * @remarks This is used to restore the grid state when the grid is rehydrated
419
- * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
420
- * @public
421
- */
422
- get savedColumnState(): ColDef[];
423
- private restoreColumnState;
403
+ private serialiseStoreTableConfig;
404
+ private rehydrateTableConfig;
424
405
  /**
425
406
  * @public
426
407
  */
@@ -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,EAIP,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAc/D,OAAO,EAKL,cAAc,EACf,MAAM,kBAAkB,CAAC;AAS1B;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,UAAW,MAAM,WACM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2IxD;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzIL;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,YAAiC;IAChD,SAAS,EAAG,SAAS,CAAC;IACtB,OAAO,EAAG,OAAO,CAAC;IACrB,OAAO,CAAC,OAAO,CAAU;IAIlC,sBAAsB,EAAE,OAAO,CAAS;IACwB,mBAAmB,EAAE,OAAO,CACpF;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O,CAAC,yBAAyB;IAcjC,OAAO,CAAC,oBAAoB;IAa5B;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EA2EnC;IAED,OAAO,CAAC,kBAAkB;IAiB1B,wBAAwB,CAAC,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"}
@@ -21,13 +21,7 @@ GridProGenesisDatasourceNext;
21
21
  GridProCell;
22
22
  GridColumn;
23
23
  ModuleRegistry.registerModules([CsvExportModule, ClientSideRowModelModule]);
24
- /**
25
- * A function to convert string values from 'camelCase' to 'hyphenated-lowercase'.
26
- * @param value - The value to hyphenate and lowercase.
27
- * @returns The hyphenated and lowercased result.
28
- * @public
29
- */
30
- export const hyphenateAndLowercase = (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();
31
25
  /**
32
26
  * The Grid Pro element.
33
27
  * @remarks Grid Pro is a Web Component wrapper around the AG Grid Community library.
@@ -68,7 +62,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
68
62
  this.agAttributes = {};
69
63
  this.agPropertiesMap = ComponentUtil.ALL_PROPERTIES.reduce((map, property) => {
70
64
  map[property.toLowerCase()] = property;
71
- map[hyphenateAndLowercase(property)] = property;
65
+ map[hypenateAndLowercase(property)] = property;
72
66
  return map;
73
67
  }, {});
74
68
  }
@@ -140,10 +134,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
140
134
  removeConfigWidthsToAutosize(colState) {
141
135
  return colState.map((col) => (Object.assign(Object.assign({}, col), { width: null })));
142
136
  }
143
- saveColumnState() {
137
+ serialiseStoreTableConfig() {
144
138
  if (this.rehydrationAttempted && this.statePersistanceEnabled()) {
145
139
  const existingOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions') || '{}');
146
- let colState = this.gridApi.getColumnDefs();
140
+ let colState = this.agGridOptions.columnApi.getColumnState();
147
141
  colState = this.gridAutosizingEnabled
148
142
  ? this.removeConfigWidthsToAutosize(colState)
149
143
  : colState;
@@ -151,27 +145,17 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
151
145
  this.session.setLocalStorageItem('gridOptions', JSON.stringify(existingOptions));
152
146
  }
153
147
  }
154
- /**
155
- * Gets the saved grid ColDefs from local storage
156
- * @remarks This is used to restore the grid state when the grid is rehydrated
157
- * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
158
- * @public
159
- */
160
- get savedColumnState() {
161
- const localStorageGridOptions = this.session.getLocalStorageItem('gridOptions');
162
- if (this.statePersistanceEnabled() && localStorageGridOptions) {
163
- 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'));
164
152
  if (this.persistColumnStateKey in allGridOptions) {
165
- return JSON.parse(allGridOptions[this.persistColumnStateKey]);
153
+ this.agGridOptions.columnApi.applyColumnState({
154
+ state: JSON.parse(allGridOptions[this.persistColumnStateKey]),
155
+ applyOrder: true,
156
+ });
166
157
  }
167
158
  }
168
- return [];
169
- }
170
- restoreColumnState() {
171
- this.rehydrationAttempted = true;
172
- if (this.savedColumnState.length > 0) {
173
- this.gridApi.setColumnDefs(this.savedColumnState);
174
- }
175
159
  }
176
160
  /**
177
161
  * @public
@@ -182,9 +166,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
182
166
  set gridOptions(options) {
183
167
  const globalEventListener = this.globalEventListener.bind(this);
184
168
  const gridOnChangeCallback = () => {
185
- this.saveColumnState.bind(this)();
169
+ this.serialiseStoreTableConfig.bind(this)();
186
170
  this.debouncedColumnAutosize.bind(this)();
187
171
  };
172
+ const rehydrateTableConfig = this.rehydrateTableConfig.bind(this);
188
173
  Array.from(this.attributes).forEach((attribute) => {
189
174
  const attrName = this.agPropertiesMap[attribute.name];
190
175
  if (!attrName)
@@ -207,10 +192,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
207
192
  params,
208
193
  gridId: this.id,
209
194
  });
210
- this.restoreColumnState.bind(this)();
195
+ rehydrateTableConfig();
211
196
  this.debouncedColumnAutosize.bind(this)();
212
197
  }, onFirstDataRendered: () => {
213
- this.enableFlashingRows.bind(this)();
198
+ this.enableFlashingRows.bind(this);
214
199
  }, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback }), rest);
215
200
  this.agGridOptions = Object.assign(Object.assign({}, this.agGridOptions), ComponentUtil.copyAttributesToGridOptions(derivedOptions, this.agAttributes));
216
201
  const gridParams = {
@@ -273,7 +258,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
273
258
  // properties lowercased
274
259
  const lowerCasedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => property.toLowerCase());
275
260
  // properties hyphenated
276
- const hyphenatedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => hyphenateAndLowercase(property));
261
+ const hyphenatedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => hypenateAndLowercase(property));
277
262
  return lowerCasedPropertyNames.concat(hyphenatedPropertyNames);
278
263
  }
279
264
  agAttributeChangedCallback(attName, oldValue, newValue) {
@@ -4848,14 +4848,9 @@
4848
4848
  "kind": "Content",
4849
4849
  "text": "protected agAttributes: "
4850
4850
  },
4851
- {
4852
- "kind": "Reference",
4853
- "text": "Record",
4854
- "canonicalReference": "!Record:type"
4855
- },
4856
4851
  {
4857
4852
  "kind": "Content",
4858
- "text": "<string, string>"
4853
+ "text": "any"
4859
4854
  },
4860
4855
  {
4861
4856
  "kind": "Content",
@@ -4868,7 +4863,7 @@
4868
4863
  "name": "agAttributes",
4869
4864
  "propertyTypeTokenRange": {
4870
4865
  "startIndex": 1,
4871
- "endIndex": 3
4866
+ "endIndex": 2
4872
4867
  },
4873
4868
  "isStatic": false,
4874
4869
  "isProtected": true,
@@ -4945,14 +4940,9 @@
4945
4940
  "kind": "Content",
4946
4941
  "text": "protected agPropertiesMap: "
4947
4942
  },
4948
- {
4949
- "kind": "Reference",
4950
- "text": "Record",
4951
- "canonicalReference": "!Record:type"
4952
- },
4953
4943
  {
4954
4944
  "kind": "Content",
4955
- "text": "<string, string>"
4945
+ "text": "any"
4956
4946
  },
4957
4947
  {
4958
4948
  "kind": "Content",
@@ -4965,7 +4955,7 @@
4965
4955
  "name": "agPropertiesMap",
4966
4956
  "propertyTypeTokenRange": {
4967
4957
  "startIndex": 1,
4968
- "endIndex": 3
4958
+ "endIndex": 2
4969
4959
  },
4970
4960
  "isStatic": false,
4971
4961
  "isProtected": true,
@@ -5788,41 +5778,6 @@
5788
5778
  "isProtected": false,
5789
5779
  "isAbstract": false
5790
5780
  },
5791
- {
5792
- "kind": "Property",
5793
- "canonicalReference": "@genesislcap/grid-pro!GridPro#savedColumnState:member",
5794
- "docComment": "/**\n * Gets the saved grid ColDefs 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",
5795
- "excerptTokens": [
5796
- {
5797
- "kind": "Content",
5798
- "text": "get savedColumnState(): "
5799
- },
5800
- {
5801
- "kind": "Reference",
5802
- "text": "ColDef",
5803
- "canonicalReference": "@ag-grid-community/core!ColDef:interface"
5804
- },
5805
- {
5806
- "kind": "Content",
5807
- "text": "[]"
5808
- },
5809
- {
5810
- "kind": "Content",
5811
- "text": ";"
5812
- }
5813
- ],
5814
- "isReadonly": true,
5815
- "isOptional": false,
5816
- "releaseTag": "Public",
5817
- "name": "savedColumnState",
5818
- "propertyTypeTokenRange": {
5819
- "startIndex": 1,
5820
- "endIndex": 3
5821
- },
5822
- "isStatic": false,
5823
- "isProtected": false,
5824
- "isAbstract": false
5825
- },
5826
5781
  {
5827
5782
  "kind": "Method",
5828
5783
  "canonicalReference": "@genesislcap/grid-pro!GridPro#statePersistanceEnabled:member(1)",
@@ -7520,29 +7475,6 @@
7520
7475
  "endIndex": 2
7521
7476
  }
7522
7477
  },
7523
- {
7524
- "kind": "Variable",
7525
- "canonicalReference": "@genesislcap/grid-pro!hyphenateAndLowercase:var",
7526
- "docComment": "/**\n * A function to convert string values from 'camelCase' to 'hyphenated-lowercase'.\n *\n * @param value - The value to hyphenate and lowercase.\n *\n * @returns The hyphenated and lowercased result.\n *\n * @public\n */\n",
7527
- "excerptTokens": [
7528
- {
7529
- "kind": "Content",
7530
- "text": "hyphenateAndLowercase: "
7531
- },
7532
- {
7533
- "kind": "Content",
7534
- "text": "(value: string) => string"
7535
- }
7536
- ],
7537
- "fileUrlPath": "src/grid-pro.ts",
7538
- "isReadonly": true,
7539
- "releaseTag": "Public",
7540
- "name": "hyphenateAndLowercase",
7541
- "variableTypeTokenRange": {
7542
- "startIndex": 1,
7543
- "endIndex": 2
7544
- }
7545
- },
7546
7478
  {
7547
7479
  "kind": "Variable",
7548
7480
  "canonicalReference": "@genesislcap/grid-pro!logger:var",
@@ -816,8 +816,8 @@ export declare class GridPro extends GridPro_base {
816
816
  gridComponents: {
817
817
  [componentName: string]: any;
818
818
  };
819
- protected agAttributes: Record<string, string>;
820
- protected agPropertiesMap: Record<string, string>;
819
+ protected agAttributes: any;
820
+ protected agPropertiesMap: any;
821
821
  protected agGridOptions: GridOptions;
822
822
  protected initialised: boolean;
823
823
  private rehydrationAttempted;
@@ -837,15 +837,8 @@ export declare class GridPro extends GridPro_base {
837
837
  * @internal
838
838
  */
839
839
  private removeConfigWidthsToAutosize;
840
- private saveColumnState;
841
- /**
842
- * Gets the saved grid ColDefs from local storage
843
- * @remarks This is used to restore the grid state when the grid is rehydrated
844
- * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
845
- * @public
846
- */
847
- get savedColumnState(): ColDef[];
848
- private restoreColumnState;
840
+ private serialiseStoreTableConfig;
841
+ private rehydrateTableConfig;
849
842
  /**
850
843
  * @public
851
844
  */
@@ -943,11 +936,6 @@ declare const GridPro_base: (new (...args: any[]) => {
943
936
  getAttribute(qualifiedName: string): string;
944
937
  getAttributeNS(namespace: string, localName: string): string;
945
938
  getAttributeNames(): string[];
946
- /**
947
- * Because we try and resize the grid to fit using callbacks on events, this will cause
948
- * a stack overflow of calls to resize, so we need to debounce it.
949
- * @internal
950
- */
951
939
  getAttributeNode(qualifiedName: string): Attr;
952
940
  getAttributeNodeNS(namespace: string, localName: string): Attr;
953
941
  getBoundingClientRect(): DOMRect;
@@ -2030,14 +2018,6 @@ export declare enum GridProRendererTypes {
2030
2018
  */
2031
2019
  export declare const gridProTemplate: ViewTemplate;
2032
2020
 
2033
- /**
2034
- * A function to convert string values from 'camelCase' to 'hyphenated-lowercase'.
2035
- * @param value - The value to hyphenate and lowercase.
2036
- * @returns The hyphenated and lowercased result.
2037
- * @public
2038
- */
2039
- export declare const hyphenateAndLowercase: (value: string) => string;
2040
-
2041
2021
  /**
2042
2022
  * Logger for the grid-pro package
2043
2023
  * @public
@@ -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
  ```
@@ -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 | |
@@ -50,7 +50,6 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
50
50
  | [onlyTemplateColDefs](./grid-pro.gridpro.onlytemplatecoldefs.md) | | boolean | |
51
51
  | [persistColumnStateKey](./grid-pro.gridpro.persistcolumnstatekey.md) | | string | |
52
52
  | [rowHeight](./grid-pro.gridpro.rowheight.md) | | number | |
53
- | [savedColumnState](./grid-pro.gridpro.savedcolumnstate.md) | <code>readonly</code> | ColDef\[\] | Gets the saved grid ColDefs from local storage |
54
53
  | [theme](./grid-pro.gridpro.theme.md) | | string | |
55
54
 
56
55
  ## Methods
@@ -76,7 +76,6 @@
76
76
  | [getTextFieldRendererTemplate](./grid-pro.gettextfieldrenderertemplate.md) | Get a Design System prefixed Text Field template. |
77
77
  | [getTextRendererTemplate](./grid-pro.gettextrenderertemplate.md) | |
78
78
  | [gridProTemplate](./grid-pro.gridprotemplate.md) | The Grid Pro Template. |
79
- | [hyphenateAndLowercase](./grid-pro.hyphenateandlowercase.md) | A function to convert string values from 'camelCase' to 'hyphenated-lowercase'. |
80
79
  | [logger](./grid-pro.logger.md) | Logger for the grid-pro package |
81
80
  | [textFieldRendererStyles](./grid-pro.textfieldrendererstyles.md) | The AG Text Field Renderer Styles. |
82
81
  | [textRendererStyles](./grid-pro.textrendererstyles.md) | |
@@ -542,13 +542,13 @@ export class GridPro extends GridPro_base {
542
542
  // (undocumented)
543
543
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
544
544
  // (undocumented)
545
- protected agAttributes: Record<string, string>;
545
+ protected agAttributes: any;
546
546
  // (undocumented)
547
547
  agGrid: Grid;
548
548
  // (undocumented)
549
549
  protected agGridOptions: GridOptions;
550
550
  // (undocumented)
551
- protected agPropertiesMap: Record<string, string>;
551
+ protected agPropertiesMap: any;
552
552
  // (undocumented)
553
553
  applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
554
554
  // (undocumented)
@@ -598,7 +598,6 @@ export class GridPro extends GridPro_base {
598
598
  persistColumnStateKey: string;
599
599
  // (undocumented)
600
600
  rowHeight: number;
601
- get savedColumnState(): ColDef[];
602
601
  // (undocumented)
603
602
  statePersistanceEnabled(): boolean;
604
603
  // (undocumented)
@@ -744,9 +743,6 @@ export enum GridProRendererTypes {
744
743
  // @public
745
744
  export const gridProTemplate: ViewTemplate;
746
745
 
747
- // @public
748
- export const hyphenateAndLowercase: (value: string) => string;
749
-
750
746
  // @public
751
747
  export const logger: Logger;
752
748
 
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.20.2-alpha-a84fed585.0",
4
+ "version": "14.22.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@custom-elements-manifest/analyzer": "^0.8.2",
33
- "@genesislcap/foundation-testing": "14.20.2-alpha-a84fed585.0",
34
- "@genesislcap/genx": "14.20.2-alpha-a84fed585.0",
33
+ "@genesislcap/foundation-testing": "^14.22.0",
34
+ "@genesislcap/genx": "^14.22.0",
35
35
  "@playwright/test": "^1.18.1",
36
36
  "@rollup/plugin-commonjs": "^21.0.1",
37
37
  "@rollup/plugin-node-resolve": "^13.1.3",
@@ -81,9 +81,9 @@
81
81
  "webpack-merge": "^5.7.3"
82
82
  },
83
83
  "dependencies": {
84
- "@genesislcap/foundation-comms": "14.20.2-alpha-a84fed585.0",
85
- "@genesislcap/foundation-ui": "14.20.2-alpha-a84fed585.0",
86
- "@genesislcap/foundation-utils": "14.20.2-alpha-a84fed585.0",
84
+ "@genesislcap/foundation-comms": "^14.22.0",
85
+ "@genesislcap/foundation-ui": "^14.22.0",
86
+ "@genesislcap/foundation-utils": "^14.22.0",
87
87
  "@microsoft/fast-colors": "^5.1.4",
88
88
  "@microsoft/fast-components": "^2.21.3",
89
89
  "@microsoft/fast-element": "^1.7.0",
@@ -105,5 +105,5 @@
105
105
  "access": "public"
106
106
  },
107
107
  "customElements": "dist/custom-elements.json",
108
- "gitHead": "a6f0d5bc469aa404097742f9bed4fbb078a96cd2"
108
+ "gitHead": "70741ed0685f302744d81d94b5dabfb9645aa3fe"
109
109
  }
@@ -1,18 +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; [savedColumnState](./grid-pro.gridpro.savedcolumnstate.md)
4
-
5
- ## GridPro.savedColumnState property
6
-
7
- Gets the saved grid ColDefs from local storage
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- get savedColumnState(): ColDef[];
13
- ```
14
-
15
- ## Remarks
16
-
17
- This is used to restore the grid state when the grid is rehydrated
18
-
@@ -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; [hyphenateAndLowercase](./grid-pro.hyphenateandlowercase.md)
4
-
5
- ## hyphenateAndLowercase variable
6
-
7
- A function to convert string values from 'camelCase' to 'hyphenated-lowercase'.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- hyphenateAndLowercase: (value: string) => string
13
- ```