@genesislcap/grid-pro 14.23.1-alpha-bf28a25.0 → 14.24.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": "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": {
@@ -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": "convertToKebabCase",
924
- "declaration": {
925
- "name": "convertToKebabCase",
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
- * Convert string values from 'camelCase' to 'kebab-case'
6
- * @param value - The value to convert to Kebab case.
7
- * @returns The Kebab case result.
8
- * @public
9
- */
10
- export declare const convertToKebabCase: (value: string) => string;
11
4
  declare const GridPro_base: (new (...args: any[]) => {
12
5
  "__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
13
6
  cloneNode(deep?: boolean): Node;
@@ -87,12 +80,7 @@ declare const GridPro_base: (new (...args: any[]) => {
87
80
  getElementsByTagNameNS(namespace: string, localName: string): HTMLCollectionOf<Element>;
88
81
  hasAttribute(qualifiedName: string): boolean;
89
82
  hasAttributeNS(namespace: string, localName: string): boolean;
90
- hasAttributes(): boolean; /**
91
- * Gets the saved grid ColDefs from local storage
92
- * @remarks This is used to restore the grid state when the grid is rehydrated
93
- * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
94
- * @public
95
- */
83
+ hasAttributes(): boolean;
96
84
  hasPointerCapture(pointerId: number): boolean;
97
85
  insertAdjacentElement(where: InsertPosition, element: Element): Element;
98
86
  insertAdjacentHTML(position: InsertPosition, text: string): void;
@@ -375,8 +363,8 @@ export declare class GridPro extends GridPro_base {
375
363
  gridComponents: {
376
364
  [componentName: string]: any;
377
365
  };
378
- protected agAttributes: Record<string, string>;
379
- protected agPropertiesMap: Record<string, string>;
366
+ protected agAttributes: any;
367
+ protected agPropertiesMap: any;
380
368
  protected agGridOptions: GridOptions;
381
369
  protected initialised: boolean;
382
370
  private rehydrationAttempted;
@@ -396,15 +384,8 @@ export declare class GridPro extends GridPro_base {
396
384
  * @internal
397
385
  */
398
386
  private removeConfigWidthsToAutosize;
399
- private saveColumnState;
400
- /**
401
- * Gets the saved grid ColDefs 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
- get savedColumnState(): ColDef[];
407
- private restoreColumnState;
387
+ private serialiseStoreTableConfig;
388
+ private rehydrateTableConfig;
408
389
  /**
409
390
  * @public
410
391
  */
@@ -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,kBAAkB,UAAW,MAAM,WACS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAmLxD;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlLL;;;;;GAKG;AACH,q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AwB,CAAC,qBAAqB,EAAE,cAAc,GAAG,cAAc;IAc/E,uBAAuB,IAAI,OAAO;IAOlC;;;;OAIG;IACH,OAAO,CAAC,uBAAuB;IAW/B;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAIpC,OAAO,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
- * Convert string values from 'camelCase' to 'kebab-case'
26
- * @param value - The value to convert to Kebab case.
27
- * @returns The Kebab case result.
28
- * @public
29
- */
30
- 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();
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[convertToKebabCase(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 = {
@@ -268,13 +253,13 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
268
253
  return mergedColumnDefs;
269
254
  }
270
255
  get observedAttributes() {
271
- // allow properties to be supplied either lowercased or kebab-cased
256
+ // allow properties to be supplied either lowercased or hyphenated
272
257
  // this allows the user to either supply (for example) enableSorting or enabled-sorting
273
258
  // properties lowercased
274
259
  const lowerCasedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => property.toLowerCase());
275
- // properties kebab-cased
276
- const kebabCasePropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => convertToKebabCase(property));
277
- return lowerCasedPropertyNames.concat(kebabCasePropertyNames);
260
+ // properties hyphenated
261
+ const hyphenatedPropertyNames = ComponentUtil.ALL_PROPERTIES.map((property) => hypenateAndLowercase(property));
262
+ return lowerCasedPropertyNames.concat(hyphenatedPropertyNames);
278
263
  }
279
264
  agAttributeChangedCallback(attName, oldValue, newValue) {
280
265
  if (oldValue === newValue) {
@@ -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,
@@ -5811,41 +5778,6 @@
5811
5778
  "isProtected": false,
5812
5779
  "isAbstract": false
5813
5780
  },
5814
- {
5815
- "kind": "Property",
5816
- "canonicalReference": "@genesislcap/grid-pro!GridPro#savedColumnState:member",
5817
- "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",
5818
- "excerptTokens": [
5819
- {
5820
- "kind": "Content",
5821
- "text": "get savedColumnState(): "
5822
- },
5823
- {
5824
- "kind": "Reference",
5825
- "text": "ColDef",
5826
- "canonicalReference": "@ag-grid-community/core!ColDef:interface"
5827
- },
5828
- {
5829
- "kind": "Content",
5830
- "text": "[]"
5831
- },
5832
- {
5833
- "kind": "Content",
5834
- "text": ";"
5835
- }
5836
- ],
5837
- "isReadonly": true,
5838
- "isOptional": false,
5839
- "releaseTag": "Public",
5840
- "name": "savedColumnState",
5841
- "propertyTypeTokenRange": {
5842
- "startIndex": 1,
5843
- "endIndex": 3
5844
- },
5845
- "isStatic": false,
5846
- "isProtected": false,
5847
- "isAbstract": false
5848
- },
5849
5781
  {
5850
5782
  "kind": "Method",
5851
5783
  "canonicalReference": "@genesislcap/grid-pro!GridPro#statePersistanceEnabled:member(1)",
@@ -397,14 +397,6 @@ export declare const CellTemplate: ViewTemplate<GridProCell, any>;
397
397
  */
398
398
  export declare const ColumnTemplate: ViewTemplate<GridColumn, any>;
399
399
 
400
- /**
401
- * Convert string values from 'camelCase' to 'kebab-case'
402
- * @param value - The value to convert to Kebab case.
403
- * @returns The Kebab case result.
404
- * @public
405
- */
406
- export declare const convertToKebabCase: (value: string) => string;
407
-
408
400
  /**
409
401
  * Returns a formatted date time value from the Grid Pro cell value.
410
402
  * @param param - A ValueFormatterParams object.
@@ -827,8 +819,8 @@ export declare class GridPro extends GridPro_base {
827
819
  gridComponents: {
828
820
  [componentName: string]: any;
829
821
  };
830
- protected agAttributes: Record<string, string>;
831
- protected agPropertiesMap: Record<string, string>;
822
+ protected agAttributes: any;
823
+ protected agPropertiesMap: any;
832
824
  protected agGridOptions: GridOptions;
833
825
  protected initialised: boolean;
834
826
  private rehydrationAttempted;
@@ -848,15 +840,8 @@ export declare class GridPro extends GridPro_base {
848
840
  * @internal
849
841
  */
850
842
  private removeConfigWidthsToAutosize;
851
- private saveColumnState;
852
- /**
853
- * Gets the saved grid ColDefs from local storage
854
- * @remarks This is used to restore the grid state when the grid is rehydrated
855
- * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
856
- * @public
857
- */
858
- get savedColumnState(): ColDef[];
859
- private restoreColumnState;
843
+ private serialiseStoreTableConfig;
844
+ private rehydrateTableConfig;
860
845
  /**
861
846
  * @public
862
847
  */
@@ -951,12 +936,7 @@ declare const GridPro_base: (new (...args: any[]) => {
951
936
  getElementsByTagNameNS(namespace: string, localName: string): HTMLCollectionOf<Element>;
952
937
  hasAttribute(qualifiedName: string): boolean;
953
938
  hasAttributeNS(namespace: string, localName: string): boolean;
954
- hasAttributes(): boolean; /**
955
- * Gets the saved grid ColDefs from local storage
956
- * @remarks This is used to restore the grid state when the grid is rehydrated
957
- * @privateRemarks Not using `columnApi.get|setColumnState()` for these flows as it doesn't work setting new columnDefs vs different ordering.
958
- * @public
959
- */
939
+ hasAttributes(): boolean;
960
940
  hasPointerCapture(pointerId: number): boolean;
961
941
  insertAdjacentElement(where: InsertPosition, element: Element): Element;
962
942
  insertAdjacentHTML(position: InsertPosition, text: string): void;
@@ -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
@@ -58,7 +58,6 @@
58
58
  | [agThemeTokenMapCSS](./grid-pro.agthemetokenmapcss.md) | Generates the CSS for a given GridPro theme name and token map |
59
59
  | [CellTemplate](./grid-pro.celltemplate.md) | The Grid Pro Cell Template. |
60
60
  | [ColumnTemplate](./grid-pro.columntemplate.md) | The Grid Pro Column Template. |
61
- | [convertToKebabCase](./grid-pro.converttokebabcase.md) | Convert string values from 'camelCase' to 'kebab-case' |
62
61
  | [defaultAgGridFontFace](./grid-pro.defaultaggridfontface.md) | The default font face for Grid Pro (agGridAlpine). |
63
62
  | [defaultGridProConfig](./grid-pro.defaultgridproconfig.md) | Grid Pro default configuration. |
64
63
  | [foundationAgBooleanRenderer](./grid-pro.foundationagbooleanrenderer.md) | A function that returns a Foundation Boolean Renderer registration for configuring the component with a DesignSystem. |
@@ -320,9 +320,6 @@ export const CellTemplate: ViewTemplate<GridProCell, any>;
320
320
  // @public
321
321
  export const ColumnTemplate: ViewTemplate<GridColumn, any>;
322
322
 
323
- // @public
324
- export const convertToKebabCase: (value: string) => string;
325
-
326
323
  // @public
327
324
  export function dateTimeValueFormatter({ value }: ValueFormatterParams): any;
328
325
 
@@ -548,13 +545,13 @@ export class GridPro extends GridPro_base {
548
545
  // (undocumented)
549
546
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
550
547
  // (undocumented)
551
- protected agAttributes: Record<string, string>;
548
+ protected agAttributes: any;
552
549
  // (undocumented)
553
550
  agGrid: Grid;
554
551
  // (undocumented)
555
552
  protected agGridOptions: GridOptions;
556
553
  // (undocumented)
557
- protected agPropertiesMap: Record<string, string>;
554
+ protected agPropertiesMap: any;
558
555
  // (undocumented)
559
556
  applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
560
557
  // (undocumented)
@@ -604,7 +601,6 @@ export class GridPro extends GridPro_base {
604
601
  persistColumnStateKey: string;
605
602
  // (undocumented)
606
603
  rowHeight: number;
607
- get savedColumnState(): ColDef[];
608
604
  // (undocumented)
609
605
  statePersistanceEnabled(): boolean;
610
606
  // (undocumented)
@@ -0,0 +1,11 @@
1
+ {
2
+ "externals": {
3
+ "@ag-grid-community/client-side-row-model": "clientSideRowModel",
4
+ "@ag-grid-community/core": "agGrid",
5
+ "@ag-grid-community/csv-export": "csvExport",
6
+ "@ag-grid-community/styles": "agGridStyles",
7
+ "@ag-grid-enterprise/core": "agGridEnterprise",
8
+ "@ag-grid-enterprise/excel-export": "excelExport",
9
+ "@ag-grid-enterprise/server-side-row-model": "serverSideRowModel"
10
+ }
11
+ }
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.23.1-alpha-bf28a25.0",
4
+ "version": "14.24.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -11,26 +11,21 @@
11
11
  },
12
12
  "scripts": {
13
13
  "build": "genx build",
14
- "build:rollup": "rollup -c",
14
+ "build:rollup": "genx build -b rollup",
15
15
  "build:webpack": "cross-env NODE_ENV=production webpack",
16
16
  "build:webpack:make-federated-types": "make-federated-types",
17
17
  "clean": "genx clean",
18
18
  "dev": "npm run dev:tsc",
19
- "dev:rollup": "rollup -c -w --configDev",
19
+ "dev:rollup": "genx dev -b rollup",
20
20
  "dev:tsc": "genx dev",
21
21
  "dev:webpack": "cross-env NODE_ENV=development webpack serve",
22
22
  "serve": "genx serve",
23
23
  "test": "echo \"Error: no test specified\""
24
24
  },
25
25
  "devDependencies": {
26
- "@custom-elements-manifest/analyzer": "^0.8.2",
27
- "@genesislcap/foundation-testing": "14.23.1-alpha-bf28a25.0",
28
- "@genesislcap/genx": "14.23.1-alpha-bf28a25.0",
26
+ "@genesislcap/foundation-testing": "^14.24.0",
27
+ "@genesislcap/genx": "^14.24.0",
29
28
  "@playwright/test": "^1.18.1",
30
- "@rollup/plugin-commonjs": "^21.0.1",
31
- "@rollup/plugin-node-resolve": "^13.1.3",
32
- "@rollup/plugin-terser": "^0.4.0",
33
- "@rollup/plugin-typescript": "^8.3.0",
34
29
  "bulma": "^0.9.3",
35
30
  "c8": "^7.11.0",
36
31
  "camel-case": "^4.1.2",
@@ -52,12 +47,6 @@
52
47
  "postcss-import": "^14.0.0",
53
48
  "postcss-loader": "^6.2.1",
54
49
  "postcss-preset-env": "^7.0.1",
55
- "rollup": "^2.7.6",
56
- "rollup-plugin-copy": "^3.4.0",
57
- "rollup-plugin-filesize": "^9.1.2",
58
- "rollup-plugin-lit-css": "^3.2.1",
59
- "rollup-plugin-styles": "^4.0.0",
60
- "rollup-plugin-transform-tagged-template": "^0.0.3",
61
50
  "rxjs": "^7.5.4",
62
51
  "sass": "^1.49.7",
63
52
  "sinon": "15.0.1",
@@ -75,9 +64,9 @@
75
64
  "webpack-merge": "^5.7.3"
76
65
  },
77
66
  "dependencies": {
78
- "@genesislcap/foundation-comms": "14.23.1-alpha-bf28a25.0",
79
- "@genesislcap/foundation-ui": "14.23.1-alpha-bf28a25.0",
80
- "@genesislcap/foundation-utils": "14.23.1-alpha-bf28a25.0",
67
+ "@genesislcap/foundation-comms": "^14.24.0",
68
+ "@genesislcap/foundation-ui": "^14.24.0",
69
+ "@genesislcap/foundation-utils": "^14.24.0",
81
70
  "@microsoft/fast-colors": "^5.1.4",
82
71
  "@microsoft/fast-components": "^2.21.3",
83
72
  "@microsoft/fast-element": "^1.7.0",
@@ -94,10 +83,14 @@
94
83
  "@ag-grid-enterprise/excel-export": "^29.0.0",
95
84
  "@ag-grid-enterprise/server-side-row-model": "^29.0.0"
96
85
  },
97
- "repository": "https://github.com/genesislcap/foundation-ui.git",
86
+ "repository": {
87
+ "type": "git",
88
+ "url": "git+https://github.com/genesislcap/foundation-ui.git",
89
+ "directory": "packages/foundation/foundation-marketplace/grids/grid-pro"
90
+ },
98
91
  "publishConfig": {
99
92
  "access": "public"
100
93
  },
101
94
  "customElements": "dist/custom-elements.json",
102
- "gitHead": "549ee6b1bd5ad5ba19da94c04a41c58543a71bd2"
95
+ "gitHead": "94a3b388d39d65f0376bb347238a4151b3cfdd09"
103
96
  }
@@ -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,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
-