@genesislcap/grid-pro 14.85.0 → 14.86.1-alpha-673edf5.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.
@@ -829,13 +829,47 @@
829
829
  "name": "columnDefs",
830
830
  "type": {
831
831
  "text": "ColDef[]"
832
- }
832
+ },
833
+ "description": "The column definitions to apply to the grid."
833
834
  },
834
835
  {
835
- "name": "deferredColumnDefs",
836
- "default": "false"
836
+ "name": "deferredColumnDefsOrState",
837
+ "default": "false",
838
+ "description": "If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element."
837
839
  }
838
- ]
840
+ ],
841
+ "description": "Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.",
842
+ "deprecated": "use `applyTemplateDefinitions` instead.",
843
+ "return": {
844
+ "type": {
845
+ "text": ""
846
+ }
847
+ }
848
+ },
849
+ {
850
+ "kind": "method",
851
+ "name": "mergeAllColumnDefsAndStates",
852
+ "parameters": [
853
+ {
854
+ "name": "columnDefs",
855
+ "type": {
856
+ "text": "ColDef[]"
857
+ },
858
+ "description": "The column definitions to apply to the grid."
859
+ },
860
+ {
861
+ "name": "deferredColumnDefsOrState",
862
+ "default": "false",
863
+ "description": "If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property\non the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true."
864
+ }
865
+ ],
866
+ "description": "Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.",
867
+ "privacy": "public",
868
+ "return": {
869
+ "type": {
870
+ "text": ""
871
+ }
872
+ }
839
873
  },
840
874
  {
841
875
  "kind": "method",
@@ -4774,6 +4808,13 @@
4774
4808
  "text": "GridOptions"
4775
4809
  }
4776
4810
  },
4811
+ {
4812
+ "kind": "field",
4813
+ "name": "deferredColumnStates",
4814
+ "type": {
4815
+ "text": "ColumnState[]"
4816
+ }
4817
+ },
4777
4818
  {
4778
4819
  "kind": "field",
4779
4820
  "name": "criteria",
@@ -5690,6 +5731,17 @@
5690
5731
  "module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
5691
5732
  }
5692
5733
  },
5734
+ {
5735
+ "kind": "field",
5736
+ "name": "deferredColumnStates",
5737
+ "type": {
5738
+ "text": "ColumnState[]"
5739
+ },
5740
+ "inheritedFrom": {
5741
+ "name": "GridProGenesisDatasource",
5742
+ "module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
5743
+ }
5744
+ },
5693
5745
  {
5694
5746
  "kind": "field",
5695
5747
  "name": "criteria",
@@ -1,4 +1,4 @@
1
- import { GridOptions } from '@ag-grid-community/core';
1
+ import type { ColumnState, GridOptions } from '@ag-grid-community/core';
2
2
  import { Auth, Connect, Datasource } from '@genesislcap/foundation-comms';
3
3
  import { FoundationElement } from '@microsoft/fast-foundation';
4
4
  /**
@@ -38,6 +38,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
38
38
  lang: string;
39
39
  readonly offsetHeight: number;
40
40
  readonly offsetLeft: number;
41
+ /**
42
+ * Returns the row id attribute, depending on the resource type.
43
+ * @remarks Will favour the `row-id` attribute if set.
44
+ * @internal
45
+ */
41
46
  readonly offsetParent: Element;
42
47
  readonly offsetTop: number;
43
48
  readonly offsetWidth: number;
@@ -72,6 +77,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
72
77
  scrollTop: number;
73
78
  readonly scrollWidth: number;
74
79
  readonly shadowRoot: ShadowRoot;
80
+ /**
81
+ * Resets the datasource to its initial state.
82
+ * @public
83
+ * @deprecated Use `deinit` instead
84
+ */
75
85
  slot: string;
76
86
  readonly tagName: string;
77
87
  attachShadow(init: ShadowRootInit): ShadowRoot;
@@ -82,10 +92,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
82
92
  getAttributeNS(namespace: string, localName: string): string;
83
93
  getAttributeNames(): string[];
84
94
  getAttributeNode(qualifiedName: string): Attr;
85
- getAttributeNodeNS(namespace: string, localName: string): Attr; /**
86
- * Restarts the datasource, uses `deinit` and `init` in sequence.
87
- * @public
88
- */
95
+ getAttributeNodeNS(namespace: string, localName: string): Attr;
89
96
  getBoundingClientRect(): DOMRect;
90
97
  getClientRects(): DOMRectList;
91
98
  getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
@@ -102,6 +109,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
102
109
  insertAdjacentElement(where: InsertPosition, element: Element): Element;
103
110
  insertAdjacentHTML(position: InsertPosition, text: string): void;
104
111
  insertAdjacentText(where: InsertPosition, data: string): void;
112
+ /**
113
+ * Sets the columnDefs and rowData for the grid.
114
+ * @remarks This should only happen once, when the grid is first initialized. Follow up updates will use the agTransaction.
115
+ * @internal
116
+ */
105
117
  matches(selectors: string): boolean;
106
118
  releasePointerCapture(pointerId: number): void;
107
119
  removeAttribute(qualifiedName: string): void;
@@ -348,6 +360,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
348
360
  connect: Connect;
349
361
  datasource: Datasource;
350
362
  deferredGridOptions: GridOptions;
363
+ deferredColumnStates: ColumnState[];
351
364
  criteria: string;
352
365
  criteriaChanged(oldCriteria: string, newCriteria: string): void;
353
366
  fields: string;
@@ -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,IAAI,EACJ,OAAO,EAEP,UAAU,EAYX,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAkB/D;;;GAGG;AACH,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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3B,OAAO,CAAC,sBAAsB;IAmC9B,OAAO,CAAC,wBAAwB;IAYhC;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAyBtB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,eAAe;IA6CvB,OAAO,CAAC,aAAa;IAMd,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;CAItC;AAED;;;;GAIG;AACH,qBAGa,2BAA4B,SAAQ,wBAAwB;CAAG"}
@@ -302,6 +302,13 @@ declare const GridPro_base: (new (...args: any[]) => {
302
302
  onresize: (this: GlobalEventHandlers, ev: UIEvent) => any;
303
303
  onscroll: (this: GlobalEventHandlers, ev: Event) => any;
304
304
  onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any;
305
+ /**
306
+ * A function that returns a Foundation Grid Pro registration for configuring the component with a DesignSystem.
307
+ *
308
+ * @public
309
+ * @remarks
310
+ * HTML Element: \<foundation-grid-pro\>
311
+ */
305
312
  onseeked: (this: GlobalEventHandlers, ev: Event) => any;
306
313
  onseeking: (this: GlobalEventHandlers, ev: Event) => any;
307
314
  onselect: (this: GlobalEventHandlers, ev: Event) => any;
@@ -448,7 +455,24 @@ export declare class GridPro extends GridPro_base {
448
455
  get gridProGenesisDatasource(): GridProGenesisDatasource;
449
456
  set gridOptions(options: GridOptions);
450
457
  private enableFlashingRows;
451
- applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
458
+ /**
459
+ * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
460
+ * @deprecated use `applyTemplateDefinitions` instead.
461
+ * @param columnDefs - The column definitions to apply to the grid.
462
+ * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
463
+ * @returns The merged column definitions.
464
+ */
465
+ applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
466
+ /**
467
+ * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
468
+ * @public
469
+ * @remarks This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
470
+ * @param columnDefs - The column definitions to apply to the grid.
471
+ * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property
472
+ * on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.
473
+ * @returns The merged column definitions.
474
+ */
475
+ mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
452
476
  get observedAttributes(): string[];
453
477
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
454
478
  globalEventListener(eventType: any, event: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACN,SAAS,EACT,WAAW,EAEX,OAAO,EACP,WAAW,EAEZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAIL,IAAI,EAEL,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAO/D,OAAO,EAEL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAKL,cAAc,EACf,MAAM,kBAAkB,CAAC;AAW1B;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,UAAW,MAAM,WACa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AW,EAAE;IAapC,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,yBAAyB;IAOjC;;OAEG;IACH,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,IAAI,wBAAwB,IAAI,wBAAwB,CAEvD;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EAuFnC;IAED,OAAO,CAAC,kBAAkB;IAwB1B;;;;;;OAMG;IACH,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAKhF;;;;;;;;OAQG;IACH,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,yBAAyB,UAAQ;IAqDnF,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"}
@@ -216,13 +216,16 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
216
216
  * @internal
217
217
  */
218
218
  setRowData(rowData) {
219
- var _a, _b;
220
- const agColumnDefs = this.getAgColumnDefs(this.datasource.fieldMetadata);
221
- if (agColumnDefs) {
222
- (_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.setColumnDefs(agColumnDefs);
219
+ var _a, _b, _c;
220
+ const preSetColumnDefs = (_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.getColumnDefs();
221
+ if (!preSetColumnDefs || preSetColumnDefs.length === 0) {
222
+ const agColumnDefs = this.getAgColumnDefs(this.datasource.fieldMetadata);
223
+ if (agColumnDefs) {
224
+ (_b = this.agGrid.gridApi) === null || _b === void 0 ? void 0 : _b.setColumnDefs(agColumnDefs);
225
+ }
223
226
  }
224
227
  const data = this.rowDataMapper ? this.rowDataMapper(rowData) : rowData;
225
- (_b = this.agGrid.gridApi) === null || _b === void 0 ? void 0 : _b.setRowData(data);
228
+ (_c = this.agGrid.gridApi) === null || _c === void 0 ? void 0 : _c.setRowData(data);
226
229
  this.requiresFullRowDataAndColDefs = false;
227
230
  }
228
231
  /**
@@ -449,33 +452,33 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
449
452
  getAgColumnDefs(fieldsMetadata) {
450
453
  const colDefsFromGenesisData = fieldsMetadata === null || fieldsMetadata === void 0 ? void 0 : fieldsMetadata.flatMap((field) => {
451
454
  var _a;
452
- const cellConfigs = {};
453
- cellConfigs.filterParams = getFilterParamsByFieldType(field.type);
455
+ const colDefBase = {};
456
+ colDefBase.filterParams = getFilterParamsByFieldType(field.type);
454
457
  switch (field.type) {
455
458
  case FieldTypeEnum.BOOLEAN:
456
459
  if (this.agGrid.autoCellRendererByType) {
457
- cellConfigs.cellRenderer = GridProRendererTypes.boolean;
460
+ colDefBase.cellRenderer = GridProRendererTypes.boolean;
458
461
  }
459
462
  break;
460
463
  case FieldTypeEnum.DATE:
461
- cellConfigs.valueFormatter = dateValueFormatter;
464
+ colDefBase.valueFormatter = dateValueFormatter;
462
465
  break;
463
466
  case FieldTypeEnum.DATETIME:
464
- cellConfigs.valueFormatter = dateTimeValueFormatter;
467
+ colDefBase.valueFormatter = dateTimeValueFormatter;
465
468
  break;
466
469
  default:
467
470
  break;
468
471
  }
469
- const templateColDef = (_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.getColumnDef(field.name);
470
- if (this.agGrid.onlyTemplateColDefs && !templateColDef) {
472
+ const colDefExtras = (_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.getColumnDef(field.name);
473
+ if (this.agGrid.onlyTemplateColDefs && !colDefExtras) {
471
474
  return [];
472
475
  }
473
476
  if (this.fields && !this.fields.includes(field.name)) {
474
477
  return [];
475
478
  }
476
- return Object.assign(Object.assign({ field: field.name }, cellConfigs), templateColDef);
479
+ return Object.assign(Object.assign({ field: field.name }, colDefBase), colDefExtras);
477
480
  });
478
- const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData, true);
481
+ const colDefsMergedWithTemplateDefs = this.agGrid.mergeAllColumnDefsAndStates(colDefsFromGenesisData, true);
479
482
  return colDefsMergedWithTemplateDefs;
480
483
  }
481
484
  buildCriteria() {
@@ -505,6 +508,9 @@ __decorate([
505
508
  __decorate([
506
509
  observable
507
510
  ], GridProGenesisDatasource.prototype, "deferredGridOptions", void 0);
511
+ __decorate([
512
+ observable
513
+ ], GridProGenesisDatasource.prototype, "deferredColumnStates", void 0);
508
514
  __decorate([
509
515
  attr
510
516
  ], GridProGenesisDatasource.prototype, "criteria", void 0);
@@ -267,7 +267,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
267
267
  onFirstDataRendered(event);
268
268
  }
269
269
  }, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback }), rest);
270
- if (!this.gridProGenesisDatasource) {
270
+ if (this.gridProGenesisDatasource) {
271
+ derivedOptions.columnDefs = columnDefs;
272
+ }
273
+ else {
271
274
  derivedOptions.columnDefs = this.applyTemplateDefinitions(columnDefs);
272
275
  }
273
276
  this.agGridOptions = Object.assign(Object.assign({}, this.agGridOptions), ComponentUtil.copyAttributesToGridOptions(derivedOptions, this.agAttributes));
@@ -305,7 +308,28 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
305
308
  });
306
309
  }
307
310
  }
308
- applyTemplateDefinitions(columnDefs, deferredColumnDefs = false) {
311
+ /**
312
+ * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
313
+ * @deprecated use `applyTemplateDefinitions` instead.
314
+ * @param columnDefs - The column definitions to apply to the grid.
315
+ * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
316
+ * @returns The merged column definitions.
317
+ */
318
+ applyTemplateDefinitions(columnDefs, deferredColumnDefsOrState = false) {
319
+ logger.deprecated('applyTemplateDefinitions', 'Use `mergeAllColumnDefsAndStates` instead.');
320
+ return this.mergeAllColumnDefsAndStates(columnDefs, deferredColumnDefsOrState);
321
+ }
322
+ /**
323
+ * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
324
+ * @public
325
+ * @remarks This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
326
+ * @param columnDefs - The column definitions to apply to the grid.
327
+ * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property
328
+ * on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.
329
+ * @returns The merged column definitions.
330
+ */
331
+ mergeAllColumnDefsAndStates(columnDefs, deferredColumnDefsOrState = false) {
332
+ var _a;
309
333
  const columnDefinitions = columnDefs || [];
310
334
  const agColumnNodes = this.querySelectorAll(this.columnComponentName);
311
335
  const overrides = Array.from(agColumnNodes).map((x) => { var _a; return (_a = x.definition) === null || _a === void 0 ? void 0 : _a.field; });
@@ -334,11 +358,14 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
334
358
  }),
335
359
  ];
336
360
  }
337
- if (this.gridProGenesisDatasource && deferredColumnDefs) {
361
+ if (this.gridProGenesisDatasource && deferredColumnDefsOrState) {
338
362
  const savedColumnState = this.getSavedColumnState();
339
- if (savedColumnState.length > 0) {
363
+ if ((savedColumnState === null || savedColumnState === void 0 ? void 0 : savedColumnState.length) > 0) {
340
364
  return mergeAndDedupColDefWithColumnState(colDefsToReturn, savedColumnState);
341
365
  }
366
+ else if (((_a = this.gridProGenesisDatasource.deferredColumnStates) === null || _a === void 0 ? void 0 : _a.length) > 0) {
367
+ return mergeAndDedupColDefWithColumnState(colDefsToReturn, this.gridProGenesisDatasource.deferredColumnStates);
368
+ }
342
369
  }
343
370
  return colDefsToReturn;
344
371
  }
@@ -4904,7 +4904,7 @@
4904
4904
  {
4905
4905
  "kind": "Method",
4906
4906
  "canonicalReference": "@genesislcap/grid-pro!GridPro#applyTemplateDefinitions:member(1)",
4907
- "docComment": "",
4907
+ "docComment": "/**\n * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.\n *\n * @deprecated\n *\n * use `applyTemplateDefinitions` instead.\n *\n * @param columnDefs - The column definitions to apply to the grid.\n *\n * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.\n *\n * @returns The merged column definitions.\n */\n",
4908
4908
  "excerptTokens": [
4909
4909
  {
4910
4910
  "kind": "Content",
@@ -4921,7 +4921,7 @@
4921
4921
  },
4922
4922
  {
4923
4923
  "kind": "Content",
4924
- "text": ", deferredColumnDefs?: "
4924
+ "text": ", deferredColumnDefsOrState?: "
4925
4925
  },
4926
4926
  {
4927
4927
  "kind": "Content",
@@ -4963,7 +4963,7 @@
4963
4963
  "isOptional": false
4964
4964
  },
4965
4965
  {
4966
- "parameterName": "deferredColumnDefs",
4966
+ "parameterName": "deferredColumnDefsOrState",
4967
4967
  "parameterTypeTokenRange": {
4968
4968
  "startIndex": 4,
4969
4969
  "endIndex": 5
@@ -5801,6 +5801,80 @@
5801
5801
  "isProtected": true,
5802
5802
  "isAbstract": false
5803
5803
  },
5804
+ {
5805
+ "kind": "Method",
5806
+ "canonicalReference": "@genesislcap/grid-pro!GridPro#mergeAllColumnDefsAndStates:member(1)",
5807
+ "docComment": "/**\n * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.\n *\n * @remarks\n *\n * This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.\n *\n * @param columnDefs - The column definitions to apply to the grid.\n *\n * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.\n *\n * @returns The merged column definitions.\n *\n * @public\n */\n",
5808
+ "excerptTokens": [
5809
+ {
5810
+ "kind": "Content",
5811
+ "text": "mergeAllColumnDefsAndStates(columnDefs: "
5812
+ },
5813
+ {
5814
+ "kind": "Reference",
5815
+ "text": "ColDef",
5816
+ "canonicalReference": "@ag-grid-community/core!ColDef:interface"
5817
+ },
5818
+ {
5819
+ "kind": "Content",
5820
+ "text": "[]"
5821
+ },
5822
+ {
5823
+ "kind": "Content",
5824
+ "text": ", deferredColumnDefsOrState?: "
5825
+ },
5826
+ {
5827
+ "kind": "Content",
5828
+ "text": "boolean"
5829
+ },
5830
+ {
5831
+ "kind": "Content",
5832
+ "text": "): "
5833
+ },
5834
+ {
5835
+ "kind": "Reference",
5836
+ "text": "ColDef",
5837
+ "canonicalReference": "@ag-grid-community/core!ColDef:interface"
5838
+ },
5839
+ {
5840
+ "kind": "Content",
5841
+ "text": "<any>[]"
5842
+ },
5843
+ {
5844
+ "kind": "Content",
5845
+ "text": ";"
5846
+ }
5847
+ ],
5848
+ "isStatic": false,
5849
+ "returnTypeTokenRange": {
5850
+ "startIndex": 6,
5851
+ "endIndex": 8
5852
+ },
5853
+ "releaseTag": "Public",
5854
+ "isProtected": false,
5855
+ "overloadIndex": 1,
5856
+ "parameters": [
5857
+ {
5858
+ "parameterName": "columnDefs",
5859
+ "parameterTypeTokenRange": {
5860
+ "startIndex": 1,
5861
+ "endIndex": 3
5862
+ },
5863
+ "isOptional": false
5864
+ },
5865
+ {
5866
+ "parameterName": "deferredColumnDefsOrState",
5867
+ "parameterTypeTokenRange": {
5868
+ "startIndex": 4,
5869
+ "endIndex": 5
5870
+ },
5871
+ "isOptional": true
5872
+ }
5873
+ ],
5874
+ "isOptional": false,
5875
+ "isAbstract": false,
5876
+ "name": "mergeAllColumnDefsAndStates"
5877
+ },
5804
5878
  {
5805
5879
  "kind": "Property",
5806
5880
  "canonicalReference": "@genesislcap/grid-pro!GridPro#observedAttributes:member",
@@ -6964,6 +7038,41 @@
6964
7038
  "isAbstract": false,
6965
7039
  "name": "deepClone"
6966
7040
  },
7041
+ {
7042
+ "kind": "Property",
7043
+ "canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#deferredColumnStates:member",
7044
+ "docComment": "",
7045
+ "excerptTokens": [
7046
+ {
7047
+ "kind": "Content",
7048
+ "text": "deferredColumnStates: "
7049
+ },
7050
+ {
7051
+ "kind": "Reference",
7052
+ "text": "ColumnState",
7053
+ "canonicalReference": "@ag-grid-community/core!ColumnState:interface"
7054
+ },
7055
+ {
7056
+ "kind": "Content",
7057
+ "text": "[]"
7058
+ },
7059
+ {
7060
+ "kind": "Content",
7061
+ "text": ";"
7062
+ }
7063
+ ],
7064
+ "isReadonly": false,
7065
+ "isOptional": false,
7066
+ "releaseTag": "Public",
7067
+ "name": "deferredColumnStates",
7068
+ "propertyTypeTokenRange": {
7069
+ "startIndex": 1,
7070
+ "endIndex": 3
7071
+ },
7072
+ "isStatic": false,
7073
+ "isProtected": false,
7074
+ "isAbstract": false
7075
+ },
6967
7076
  {
6968
7077
  "kind": "Property",
6969
7078
  "canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#deferredGridOptions:member",
@@ -19,7 +19,7 @@ import { FoundationElementRegistry } from '@microsoft/fast-foundation';
19
19
  import { FoundationLayoutContainer } from '@genesislcap/foundation-utils';
20
20
  import { Grid } from '@ag-grid-community/core';
21
21
  import type { GridApi } from '@ag-grid-community/core';
22
- import { GridOptions } from '@ag-grid-community/core';
22
+ import type { GridOptions } from '@ag-grid-community/core';
23
23
  import { ICellRendererComp } from '@ag-grid-community/core';
24
24
  import { ICellRendererFunc } from '@ag-grid-community/core';
25
25
  import { ICellRendererParams } from '@ag-grid-community/core';
@@ -875,7 +875,24 @@ export declare class GridPro extends GridPro_base {
875
875
  get gridProGenesisDatasource(): GridProGenesisDatasource;
876
876
  set gridOptions(options: GridOptions);
877
877
  private enableFlashingRows;
878
- applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
878
+ /**
879
+ * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
880
+ * @deprecated use `applyTemplateDefinitions` instead.
881
+ * @param columnDefs - The column definitions to apply to the grid.
882
+ * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
883
+ * @returns The merged column definitions.
884
+ */
885
+ applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
886
+ /**
887
+ * Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
888
+ * @public
889
+ * @remarks This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
890
+ * @param columnDefs - The column definitions to apply to the grid.
891
+ * @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property
892
+ * on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.
893
+ * @returns The merged column definitions.
894
+ */
895
+ mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
879
896
  get observedAttributes(): string[];
880
897
  agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
881
898
  globalEventListener(eventType: any, event: any): void;
@@ -1176,6 +1193,13 @@ declare const GridPro_base: (new (...args: any[]) => {
1176
1193
  onresize: (this: GlobalEventHandlers, ev: UIEvent) => any;
1177
1194
  onscroll: (this: GlobalEventHandlers, ev: Event) => any;
1178
1195
  onsecuritypolicyviolation: (this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any;
1196
+ /**
1197
+ * A function that returns a Foundation Grid Pro registration for configuring the component with a DesignSystem.
1198
+ *
1199
+ * @public
1200
+ * @remarks
1201
+ * HTML Element: \<foundation-grid-pro\>
1202
+ */
1179
1203
  onseeked: (this: GlobalEventHandlers, ev: Event) => any;
1180
1204
  onseeking: (this: GlobalEventHandlers, ev: Event) => any;
1181
1205
  onselect: (this: GlobalEventHandlers, ev: Event) => any;
@@ -1265,6 +1289,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
1265
1289
  connect: Connect;
1266
1290
  datasource: Datasource;
1267
1291
  deferredGridOptions: GridOptions;
1292
+ deferredColumnStates: ColumnState[];
1268
1293
  criteria: string;
1269
1294
  criteriaChanged(oldCriteria: string, newCriteria: string): void;
1270
1295
  fields: string;
@@ -1422,6 +1447,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
1422
1447
  lang: string;
1423
1448
  readonly offsetHeight: number;
1424
1449
  readonly offsetLeft: number;
1450
+ /**
1451
+ * Returns the row id attribute, depending on the resource type.
1452
+ * @remarks Will favour the `row-id` attribute if set.
1453
+ * @internal
1454
+ */
1425
1455
  readonly offsetParent: Element;
1426
1456
  readonly offsetTop: number;
1427
1457
  readonly offsetWidth: number;
@@ -1456,6 +1486,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
1456
1486
  scrollTop: number;
1457
1487
  readonly scrollWidth: number;
1458
1488
  readonly shadowRoot: ShadowRoot;
1489
+ /**
1490
+ * Resets the datasource to its initial state.
1491
+ * @public
1492
+ * @deprecated Use `deinit` instead
1493
+ */
1459
1494
  slot: string;
1460
1495
  readonly tagName: string;
1461
1496
  attachShadow(init: ShadowRootInit): ShadowRoot;
@@ -1466,10 +1501,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
1466
1501
  getAttributeNS(namespace: string, localName: string): string;
1467
1502
  getAttributeNames(): string[];
1468
1503
  getAttributeNode(qualifiedName: string): Attr;
1469
- getAttributeNodeNS(namespace: string, localName: string): Attr; /**
1470
- * Restarts the datasource, uses `deinit` and `init` in sequence.
1471
- * @public
1472
- */
1504
+ getAttributeNodeNS(namespace: string, localName: string): Attr;
1473
1505
  getBoundingClientRect(): DOMRect;
1474
1506
  getClientRects(): DOMRectList;
1475
1507
  getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
@@ -1486,6 +1518,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
1486
1518
  insertAdjacentElement(where: InsertPosition, element: Element): Element;
1487
1519
  insertAdjacentHTML(position: InsertPosition, text: string): void;
1488
1520
  insertAdjacentText(where: InsertPosition, data: string): void;
1521
+ /**
1522
+ * Sets the columnDefs and rowData for the grid.
1523
+ * @remarks This should only happen once, when the grid is first initialized. Follow up updates will use the agTransaction.
1524
+ * @internal
1525
+ */
1489
1526
  matches(selectors: string): boolean;
1490
1527
  releasePointerCapture(pointerId: number): void;
1491
1528
  removeAttribute(qualifiedName: string): void;
@@ -4,20 +4,29 @@
4
4
 
5
5
  ## GridPro.applyTemplateDefinitions() method
6
6
 
7
+ > Warning: This API is now obsolete.
8
+ >
9
+ > use `applyTemplateDefinitions` instead.
10
+ >
11
+
12
+ Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`<!-- -->.
13
+
7
14
  **Signature:**
8
15
 
9
16
  ```typescript
10
- applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
17
+ applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
11
18
  ```
12
19
 
13
20
  ## Parameters
14
21
 
15
22
  | Parameter | Type | Description |
16
23
  | --- | --- | --- |
17
- | columnDefs | ColDef\[\] | |
18
- | deferredColumnDefs | boolean | _(Optional)_ |
24
+ | columnDefs | ColDef\[\] | The column definitions to apply to the grid. |
25
+ | deferredColumnDefsOrState | boolean | _(Optional)_ If true, will merge the column definitions with the saved column state or the <code>deferredColumnStates</code> property on the <code>grid-pro-genesis-datasource</code> element. |
19
26
 
20
27
  **Returns:**
21
28
 
22
29
  ColDef&lt;any&gt;\[\]
23
30
 
31
+ The merged column definitions.
32
+
@@ -63,12 +63,13 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
63
63
  | Method | Modifiers | Description |
64
64
  | --- | --- | --- |
65
65
  | [agAttributeChangedCallback(attName, oldValue, newValue)](./grid-pro.gridpro.agattributechangedcallback.md) | | |
66
- | [applyTemplateDefinitions(columnDefs, deferredColumnDefs)](./grid-pro.gridpro.applytemplatedefinitions.md) | | |
66
+ | [applyTemplateDefinitions(columnDefs, deferredColumnDefsOrState)](./grid-pro.gridpro.applytemplatedefinitions.md) | | Will merge templated column definitions with <code>columnDefs</code> plus localStorage's column state or <code>deferredColumnStates</code>. |
67
67
  | [combineAllGridComponents(gridOptionsComponents)](./grid-pro.gridpro.combineallgridcomponents.md) | | |
68
68
  | [connectedCallback()](./grid-pro.gridpro.connectedcallback.md) | | |
69
69
  | [disconnectedCallback()](./grid-pro.gridpro.disconnectedcallback.md) | | |
70
70
  | [getSavedColumnState()](./grid-pro.gridpro.getsavedcolumnstate.md) | | Gets the saved grid ColumnState\[\] from local storage |
71
71
  | [globalEventListener(eventType, event)](./grid-pro.gridpro.globaleventlistener.md) | | |
72
+ | [mergeAllColumnDefsAndStates(columnDefs, deferredColumnDefsOrState)](./grid-pro.gridpro.mergeallcolumndefsandstates.md) | | Will merge templated column definitions with <code>columnDefs</code> plus localStorage's column state or <code>deferredColumnStates</code>. |
72
73
  | [statePersistanceEnabled()](./grid-pro.gridpro.statepersistanceenabled.md) | | |
73
74
  | [themeChanged(oldValue, newValue)](./grid-pro.gridpro.themechanged.md) | | |
74
75
 
@@ -0,0 +1,31 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [GridPro](./grid-pro.gridpro.md) &gt; [mergeAllColumnDefsAndStates](./grid-pro.gridpro.mergeallcolumndefsandstates.md)
4
+
5
+ ## GridPro.mergeAllColumnDefsAndStates() method
6
+
7
+ Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`<!-- -->.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type | Description |
18
+ | --- | --- | --- |
19
+ | columnDefs | ColDef\[\] | The column definitions to apply to the grid. |
20
+ | deferredColumnDefsOrState | boolean | _(Optional)_ If true, will merge the column definitions with the saved column state or the <code>deferredColumnStates</code> property on the <code>grid-pro-genesis-datasource</code> element. Defaults to false but <code>grid-pro-genesis-datasource</code> will set this to true. |
21
+
22
+ **Returns:**
23
+
24
+ ColDef&lt;any&gt;\[\]
25
+
26
+ The merged column definitions.
27
+
28
+ ## Remarks
29
+
30
+ This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
31
+
@@ -0,0 +1,11 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/grid-pro](./grid-pro.md) &gt; [GridProGenesisDatasource](./grid-pro.gridprogenesisdatasource.md) &gt; [deferredColumnStates](./grid-pro.gridprogenesisdatasource.deferredcolumnstates.md)
4
+
5
+ ## GridProGenesisDatasource.deferredColumnStates property
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ deferredColumnStates: ColumnState[];
11
+ ```
@@ -25,6 +25,7 @@ Only supports Client-Side Row Model.
25
25
  | [connect](./grid-pro.gridprogenesisdatasource.connect.md) | | Connect | |
26
26
  | [criteria](./grid-pro.gridprogenesisdatasource.criteria.md) | | string | |
27
27
  | [datasource](./grid-pro.gridprogenesisdatasource.datasource.md) | | Datasource | |
28
+ | [deferredColumnStates](./grid-pro.gridprogenesisdatasource.deferredcolumnstates.md) | | ColumnState\[\] | |
28
29
  | [deferredGridOptions](./grid-pro.gridprogenesisdatasource.deferredgridoptions.md) | | GridOptions | |
29
30
  | [fields](./grid-pro.gridprogenesisdatasource.fields.md) | | string | |
30
31
  | [isSnapshot](./grid-pro.gridprogenesisdatasource.issnapshot.md) | | boolean | |
@@ -25,7 +25,7 @@ import { FoundationElementRegistry } from '@microsoft/fast-foundation';
25
25
  import { FoundationLayoutContainer } from '@genesislcap/foundation-utils';
26
26
  import { Grid } from '@ag-grid-community/core';
27
27
  import type { GridApi } from '@ag-grid-community/core';
28
- import { GridOptions } from '@ag-grid-community/core';
28
+ import type { GridOptions } from '@ag-grid-community/core';
29
29
  import { ICellRendererComp } from '@ag-grid-community/core';
30
30
  import { ICellRendererFunc } from '@ag-grid-community/core';
31
31
  import { ICellRendererParams } from '@ag-grid-community/core';
@@ -531,8 +531,8 @@ export class GridPro extends GridPro_base {
531
531
  protected agGridOptions: GridOptions;
532
532
  // (undocumented)
533
533
  protected agPropertiesMap: Record<string, string>;
534
- // (undocumented)
535
- applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefs?: boolean): ColDef<any>[];
534
+ // @deprecated
535
+ applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
536
536
  asyncAdd: boolean;
537
537
  asyncRemove: boolean;
538
538
  asyncUpdate: boolean;
@@ -579,6 +579,7 @@ export class GridPro extends GridPro_base {
579
579
  headerHeight: number;
580
580
  // (undocumented)
581
581
  protected initialised: boolean;
582
+ mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
582
583
  // (undocumented)
583
584
  get observedAttributes(): string[];
584
585
  // (undocumented)
@@ -652,6 +653,8 @@ export class GridProGenesisDatasource extends GridProGenesisDatasource_base {
652
653
  // (undocumented)
653
654
  deepClone(): Node;
654
655
  // (undocumented)
656
+ deferredColumnStates: ColumnState[];
657
+ // (undocumented)
655
658
  deferredGridOptions: GridOptions;
656
659
  deinit(): void;
657
660
  // (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.85.0",
4
+ "version": "14.86.1-alpha-673edf5.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -31,15 +31,15 @@
31
31
  "test:debug": "genx test --debug"
32
32
  },
33
33
  "devDependencies": {
34
- "@genesislcap/foundation-testing": "14.85.0",
35
- "@genesislcap/genx": "14.85.0",
34
+ "@genesislcap/foundation-testing": "14.86.1-alpha-673edf5.0",
35
+ "@genesislcap/genx": "14.86.1-alpha-673edf5.0",
36
36
  "rimraf": "^3.0.2"
37
37
  },
38
38
  "dependencies": {
39
- "@genesislcap/foundation-comms": "14.85.0",
40
- "@genesislcap/foundation-logger": "14.85.0",
41
- "@genesislcap/foundation-ui": "14.85.0",
42
- "@genesislcap/foundation-utils": "14.85.0",
39
+ "@genesislcap/foundation-comms": "14.86.1-alpha-673edf5.0",
40
+ "@genesislcap/foundation-logger": "14.86.1-alpha-673edf5.0",
41
+ "@genesislcap/foundation-ui": "14.86.1-alpha-673edf5.0",
42
+ "@genesislcap/foundation-utils": "14.86.1-alpha-673edf5.0",
43
43
  "@microsoft/fast-colors": "^5.1.4",
44
44
  "@microsoft/fast-components": "^2.21.3",
45
45
  "@microsoft/fast-element": "^1.7.0",
@@ -62,5 +62,5 @@
62
62
  "access": "public"
63
63
  },
64
64
  "customElements": "dist/custom-elements.json",
65
- "gitHead": "d9387cdd713b49e3f00f05e866b305f452d6cc82"
65
+ "gitHead": "418c99518ae09435da69102203967a17d53bdf89"
66
66
  }