@genesislcap/grid-pro 14.40.1-alpha-861eac3.0 → 14.40.1

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.
Files changed (33) hide show
  1. package/dist/custom-elements.json +15 -174
  2. package/dist/dts/cell-renderers/actions-menu.renderer.d.ts +1 -1
  3. package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
  4. package/dist/dts/grid-pro.d.ts +6 -22
  5. package/dist/dts/grid-pro.d.ts.map +1 -1
  6. package/dist/dts/index.d.ts +6 -34
  7. package/dist/dts/index.d.ts.map +1 -1
  8. package/dist/dts/tsdoc-metadata.json +1 -1
  9. package/dist/dts/utils/index.d.ts +0 -1
  10. package/dist/dts/utils/index.d.ts.map +1 -1
  11. package/dist/esm/cell-renderers/actions-menu.renderer.js +1 -1
  12. package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +1 -1
  13. package/dist/esm/grid-pro.js +43 -80
  14. package/dist/esm/index.js +6 -34
  15. package/dist/esm/utils/index.js +0 -1
  16. package/dist/grid-pro.api.json +8 -232
  17. package/dist/grid-pro.d.ts +6 -49
  18. package/docs/api/grid-pro.getactionsmenudef.md +1 -1
  19. package/docs/api/grid-pro.gridpro.agattributes.md +1 -1
  20. package/docs/api/grid-pro.gridpro.agpropertiesmap.md +1 -1
  21. package/docs/api/grid-pro.gridpro.applytemplatedefinitions.md +1 -2
  22. package/docs/api/grid-pro.gridpro.md +3 -5
  23. package/docs/api/grid-pro.md +0 -2
  24. package/docs/api-report.md +3 -31
  25. package/externals.js +0 -4
  26. package/package.json +8 -12
  27. package/dist/dts/utils/array.d.ts +0 -9
  28. package/dist/dts/utils/array.d.ts.map +0 -1
  29. package/dist/esm/utils/array.js +0 -27
  30. package/docs/api/grid-pro.converttokebabcase.md +0 -13
  31. package/docs/api/grid-pro.gridpro.getsavedcolumnstate.md +0 -21
  32. package/docs/api/grid-pro.gridpro.gridprogenesisdatasource.md +0 -11
  33. package/docs/api/grid-pro.mergeanddedupcoldefwithcolumnstate.md +0 -31
@@ -1,15 +1,8 @@
1
1
  import { ActionMenuItem } from '@genesislcap/foundation-ui';
2
- import * as AgcCore from '@ag-grid-community/core';
3
- import { ClientSideRowModelModule as AgcCSRMModule } from '@ag-grid-community/client-side-row-model';
4
- import * as AgcCsvExport from '@ag-grid-community/csv-export';
5
- import * as AgeCore from '@ag-grid-enterprise/core';
6
- import * as AgeExcelExport from '@ag-grid-enterprise/excel-export';
7
- import { ServerSideRowModelModule as AgeSSRMModule } from '@ag-grid-enterprise/server-side-row-model';
8
2
  import { Binding } from '@microsoft/fast-element';
9
3
  import { CaptureType } from '@microsoft/fast-element';
10
4
  import { ColDef } from '@ag-grid-community/core';
11
5
  import { ColumnApi } from '@ag-grid-community/core';
12
- import { ColumnState } from '@ag-grid-community/core';
13
6
  import { Connect } from '@genesislcap/foundation-comms';
14
7
  import type { Container } from '@microsoft/fast-foundation';
15
8
  import { Controller } from '@microsoft/fast-element';
@@ -125,18 +118,6 @@ export declare const agActionRendererStyles: ElementStyles;
125
118
  */
126
119
  export declare const agBooleanRendererStyles: ElementStyles;
127
120
 
128
- export { AgcCore }
129
-
130
- export { AgcCSRMModule }
131
-
132
- export { AgcCsvExport }
133
-
134
- export { AgeCore }
135
-
136
- export { AgeExcelExport }
137
-
138
- export { AgeSSRMModule }
139
-
140
121
  /**
141
122
  * All External AG Grid Stock in one CSS.
142
123
  * @remarks This is a collection of multiple AG themes, only needed if the target element needs more than one stock theme.
@@ -398,14 +379,6 @@ export declare const CellTemplate: ViewTemplate<GridProCell, any>;
398
379
  */
399
380
  export declare const ColumnTemplate: ViewTemplate<GridColumn, any>;
400
381
 
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
382
  /**
410
383
  * Returns a formatted date time value from the Grid Pro cell value.
411
384
  * @param param - A ValueFormatterParams object.
@@ -686,7 +659,7 @@ declare interface FuiCellRendererParams_2 extends ICellRendererParams {
686
659
  * @returns Merged ColDef (base ColDef created from the parameters + overrideDef) for Actions Menu Renderer.
687
660
  * @example
688
661
  * ```ts
689
- * public exampleActionsMenuDef: AgcCore.ColDef = getActionsMenuDef(
662
+ * public exampleActionsMenuDef: ColDef = getActionsMenuDef(
690
663
  * [
691
664
  * {
692
665
  * name: 'View',
@@ -828,8 +801,8 @@ export declare class GridPro extends GridPro_base {
828
801
  gridComponents: {
829
802
  [componentName: string]: any;
830
803
  };
831
- protected agAttributes: Record<string, string>;
832
- protected agPropertiesMap: Record<string, string>;
804
+ protected agAttributes: any;
805
+ protected agPropertiesMap: any;
833
806
  protected agGridOptions: GridOptions;
834
807
  protected initialised: boolean;
835
808
  private rehydrationAttempted;
@@ -849,23 +822,15 @@ export declare class GridPro extends GridPro_base {
849
822
  * @internal
850
823
  */
851
824
  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;
825
+ private serialiseStoreTableConfig;
826
+ private rehydrateTableConfig;
861
827
  /**
862
828
  * @public
863
829
  */
864
830
  get gridOptions(): GridOptions;
865
- get gridProGenesisDatasource(): GridProGenesisDatasource;
866
831
  set gridOptions(options: GridOptions);
867
832
  private enableFlashingRows;
868
- applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
833
+ applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
869
834
  get observedAttributes(): string[];
870
835
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
871
836
  globalEventListener(eventType: any, event: any): void;
@@ -2005,14 +1970,6 @@ export declare const gridProTemplate: ViewTemplate;
2005
1970
  */
2006
1971
  export declare const logger: Logger;
2007
1972
 
2008
- /**
2009
- * Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
2010
- * @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
2011
- * @privateRemarks For restoring saved `ColumnState` but also keep custom renderers and other `ColDef` properties.
2012
- * @public
2013
- */
2014
- export declare function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
2015
-
2016
1973
  declare interface SelectCellRendererParams extends ICellRendererParams {
2017
1974
  accessor: string;
2018
1975
  defaultValue?: string;
@@ -16,7 +16,7 @@ getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActio
16
16
 
17
17
 
18
18
  ```ts
19
- public exampleActionsMenuDef: AgcCore.ColDef = getActionsMenuDef(
19
+ public exampleActionsMenuDef: ColDef = getActionsMenuDef(
20
20
  [
21
21
  {
22
22
  name: 'View',
@@ -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
- | [mergeAndDedupColDefWithColumnState(colDefs, columnStates, arr1Field, arr2Field)](./grid-pro.mergeanddedupcoldefwithcolumnstate.md) | Merges two arrays, one of <code>ColDef</code> and one of <code>ColumnState</code>, and deduplicates them. |
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. |
@@ -5,17 +5,10 @@
5
5
  ```ts
6
6
 
7
7
  import { ActionMenuItem } from '@genesislcap/foundation-ui';
8
- import * as AgcCore from '@ag-grid-community/core';
9
- import { ClientSideRowModelModule as AgcCSRMModule } from '@ag-grid-community/client-side-row-model';
10
- import * as AgcCsvExport from '@ag-grid-community/csv-export';
11
- import * as AgeCore from '@ag-grid-enterprise/core';
12
- import * as AgeExcelExport from '@ag-grid-enterprise/excel-export';
13
- import { ServerSideRowModelModule as AgeSSRMModule } from '@ag-grid-enterprise/server-side-row-model';
14
8
  import { Binding } from '@microsoft/fast-element';
15
9
  import { CaptureType } from '@microsoft/fast-element';
16
10
  import { ColDef } from '@ag-grid-community/core';
17
11
  import { ColumnApi } from '@ag-grid-community/core';
18
- import { ColumnState } from '@ag-grid-community/core';
19
12
  import { Connect } from '@genesislcap/foundation-comms';
20
13
  import type { Container } from '@microsoft/fast-foundation';
21
14
  import { Controller } from '@microsoft/fast-element';
@@ -98,18 +91,6 @@ export const agActionRendererStyles: ElementStyles;
98
91
  // @public
99
92
  export const agBooleanRendererStyles: ElementStyles;
100
93
 
101
- export { AgcCore }
102
-
103
- export { AgcCSRMModule }
104
-
105
- export { AgcCsvExport }
106
-
107
- export { AgeCore }
108
-
109
- export { AgeExcelExport }
110
-
111
- export { AgeSSRMModule }
112
-
113
94
  // @public
114
95
  export const agExternalStockStyles: ElementStyles;
115
96
 
@@ -321,9 +302,6 @@ export const CellTemplate: ViewTemplate<GridProCell, any>;
321
302
  // @public
322
303
  export const ColumnTemplate: ViewTemplate<GridColumn, any>;
323
304
 
324
- // @public
325
- export const convertToKebabCase: (value: string) => string;
326
-
327
305
  // @public
328
306
  export function dateTimeValueFormatter({ value }: ValueFormatterParams): any;
329
307
 
@@ -549,15 +527,15 @@ export class GridPro extends GridPro_base {
549
527
  // (undocumented)
550
528
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
551
529
  // (undocumented)
552
- protected agAttributes: Record<string, string>;
530
+ protected agAttributes: any;
553
531
  // (undocumented)
554
532
  agGrid: Grid;
555
533
  // (undocumented)
556
534
  protected agGridOptions: GridOptions;
557
535
  // (undocumented)
558
- protected agPropertiesMap: Record<string, string>;
536
+ protected agPropertiesMap: any;
559
537
  // (undocumented)
560
- applyTemplateDefinitions(columnDefs?: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
538
+ applyTemplateDefinitions(columnDefs?: ColDef[]): ColDef<any>[];
561
539
  // (undocumented)
562
540
  autoCellRendererByType: boolean;
563
541
  // (undocumented)
@@ -577,7 +555,6 @@ export class GridPro extends GridPro_base {
577
555
  enabledRowFlashing: boolean;
578
556
  // (undocumented)
579
557
  eventsAndCallbacks: any;
580
- getSavedColumnState(): ColumnState[];
581
558
  // (undocumented)
582
559
  globalEventListener(eventType: any, event: any): void;
583
560
  // (undocumented)
@@ -593,8 +570,6 @@ export class GridPro extends GridPro_base {
593
570
  get gridOptions(): GridOptions;
594
571
  set gridOptions(options: GridOptions);
595
572
  // (undocumented)
596
- get gridProGenesisDatasource(): GridProGenesisDatasource;
597
- // (undocumented)
598
573
  gridSlot: HTMLSlotElement;
599
574
  // (undocumented)
600
575
  headerHeight: number;
@@ -762,9 +737,6 @@ export const gridProTemplate: ViewTemplate;
762
737
  // @public
763
738
  export const logger: Logger;
764
739
 
765
- // @public
766
- export function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
767
-
768
740
  // @public
769
741
  export class SelectRenderer extends FoundationElement implements ICellRendererComp {
770
742
  // (undocumented)
package/externals.js CHANGED
@@ -3,9 +3,5 @@ module.exports = {
3
3
  '@ag-grid-community/client-side-row-model': 'clientSideRowModel',
4
4
  '@ag-grid-community/core': 'agGrid',
5
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
6
  },
11
7
  };
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.40.1-alpha-861eac3.0",
4
+ "version": "14.40.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -21,14 +21,14 @@
21
21
  "serve": "genx serve"
22
22
  },
23
23
  "devDependencies": {
24
- "@genesislcap/foundation-testing": "14.40.1-alpha-861eac3.0",
25
- "@genesislcap/genx": "14.40.1-alpha-861eac3.0",
24
+ "@genesislcap/foundation-testing": "^14.40.1",
25
+ "@genesislcap/genx": "^14.40.1",
26
26
  "bulma": "^0.9.3"
27
27
  },
28
28
  "dependencies": {
29
- "@genesislcap/foundation-comms": "14.40.1-alpha-861eac3.0",
30
- "@genesislcap/foundation-ui": "14.40.1-alpha-861eac3.0",
31
- "@genesislcap/foundation-utils": "14.40.1-alpha-861eac3.0",
29
+ "@genesislcap/foundation-comms": "^14.40.1",
30
+ "@genesislcap/foundation-ui": "^14.40.1",
31
+ "@genesislcap/foundation-utils": "^14.40.1",
32
32
  "@microsoft/fast-colors": "^5.1.4",
33
33
  "@microsoft/fast-components": "^2.21.3",
34
34
  "@microsoft/fast-element": "^1.7.0",
@@ -40,11 +40,7 @@
40
40
  "peerDependencies": {
41
41
  "@ag-grid-community/client-side-row-model": "29.2.0",
42
42
  "@ag-grid-community/core": "29.2.0",
43
- "@ag-grid-community/csv-export": "29.2.0",
44
- "@ag-grid-community/styles": "29.2.0",
45
- "@ag-grid-enterprise/core": "29.2.0",
46
- "@ag-grid-enterprise/excel-export": "29.2.0",
47
- "@ag-grid-enterprise/server-side-row-model": "29.2.0"
43
+ "@ag-grid-community/csv-export": "29.2.0"
48
44
  },
49
45
  "repository": {
50
46
  "type": "git",
@@ -55,5 +51,5 @@
55
51
  "access": "public"
56
52
  },
57
53
  "customElements": "dist/custom-elements.json",
58
- "gitHead": "78f768e212e45f7239ee5df7ce28c0f4af797bf4"
54
+ "gitHead": "b2f957496de6a98f8221da5c72ab9a1b6d6ea74b"
59
55
  }
@@ -1,9 +0,0 @@
1
- import { ColDef, ColumnState } from '@ag-grid-community/core';
2
- /**
3
- * Merges two arrays, one of `ColDef` and one of `ColumnState`, and deduplicates them.
4
- * @remarks ColDef uses `field` and ColumnState uses `colId` to identify columns.
5
- * @privateRemarks For restoring saved `ColumnState` but also keep custom renderers and other `ColDef` properties.
6
- * @public
7
- */
8
- export declare function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
9
- //# sourceMappingURL=array.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../src/utils/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,MAAM,EAAE,EACjB,YAAY,EAAE,WAAW,EAAE,EAC3B,SAAS,SAAU,EACnB,SAAS,SAAU,GAClB,MAAM,EAAE,CAuBV"}
@@ -1,27 +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 mergeAndDedupColDefWithColumnState(colDefs, columnStates, arr1Field = 'field', arr2Field = 'colId') {
8
- const merged = {};
9
- const deduplicated = [];
10
- columnStates.forEach((state) => {
11
- const matchingColDef = colDefs.find((item) => item[arr1Field] === state[arr2Field]);
12
- if (matchingColDef) {
13
- const colDefStateMerge = Object.assign(Object.assign({}, matchingColDef), state);
14
- delete colDefStateMerge.colId;
15
- merged[matchingColDef[arr1Field]] = colDefStateMerge;
16
- deduplicated.push(colDefStateMerge);
17
- }
18
- });
19
- colDefs.forEach((def) => {
20
- if (!merged.hasOwnProperty(def[arr1Field])) {
21
- const newObj = Object.assign({}, def);
22
- merged[def[arr1Field]] = newObj;
23
- deduplicated.push(newObj);
24
- }
25
- });
26
- return deduplicated;
27
- }
@@ -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; [mergeAndDedupColDefWithColumnState](./grid-pro.mergeanddedupcoldefwithcolumnstate.md)
4
-
5
- ## mergeAndDedupColDefWithColumnState() function
6
-
7
- Merges two arrays, one of `ColDef` and one of `ColumnState`<!-- -->, and deduplicates them.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- export declare function mergeAndDedupColDefWithColumnState(colDefs: ColDef[], columnStates: ColumnState[], arr1Field?: string, arr2Field?: string): ColDef[];
13
- ```
14
-
15
- ## Parameters
16
-
17
- | Parameter | Type | Description |
18
- | --- | --- | --- |
19
- | colDefs | ColDef\[\] | |
20
- | columnStates | ColumnState\[\] | |
21
- | arr1Field | string | _(Optional)_ |
22
- | arr2Field | string | _(Optional)_ |
23
-
24
- **Returns:**
25
-
26
- ColDef\[\]
27
-
28
- ## Remarks
29
-
30
- ColDef uses `field` and ColumnState uses `colId` to identify columns.
31
-