@genesislcap/grid-pro 14.83.3 → 14.83.4-alpha-7f87e78.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.
- package/dist/custom-elements.json +767 -726
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +19 -11
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +18 -1
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +18 -12
- package/dist/esm/grid-pro.js +30 -4
- package/dist/grid-pro.api.json +112 -3
- package/dist/grid-pro.d.ts +37 -12
- package/docs/api/grid-pro.gridpro.applytemplatedefinitions.md +12 -3
- package/docs/api/grid-pro.gridpro.md +2 -1
- package/docs/api/grid-pro.gridpro.mergeallcolumndefsandstates.md +31 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.deferredcolumnstates.md +11 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.md +1 -0
- package/docs/api-report.md +6 -3
- package/package.json +8 -8
|
@@ -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;
|
|
@@ -246,12 +258,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
246
258
|
onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
|
|
247
259
|
onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
|
|
248
260
|
onauxclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
|
|
249
|
-
onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any;
|
|
250
|
-
* Maps the transaction data to the row data mapper function, if it exists.
|
|
251
|
-
* @param transaction - The transaction data to be mapped.
|
|
252
|
-
* @param operations - The operations to be mapped. Can be 'add', 'update' or 'remove'.
|
|
253
|
-
* @returns The mapped transaction (if the row data mapper function exists), or the original transaction.
|
|
254
|
-
*/
|
|
261
|
+
onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any;
|
|
255
262
|
onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any;
|
|
256
263
|
oncancel: (this: GlobalEventHandlers, ev: Event) => any;
|
|
257
264
|
oncanplay: (this: GlobalEventHandlers, ev: Event) => any;
|
|
@@ -353,6 +360,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
353
360
|
connect: Connect;
|
|
354
361
|
datasource: Datasource;
|
|
355
362
|
deferredGridOptions: GridOptions;
|
|
363
|
+
deferredColumnStates: ColumnState[];
|
|
356
364
|
criteria: string;
|
|
357
365
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
358
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;
|
|
1
|
+
{"version":3,"file":"grid-pro-genesis-datasource.d.ts","sourceRoot":"","sources":["../../../src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;IAqB3B,OAAO,CAAC,sBAAsB;IA0B9B,OAAO,CAAC,wBAAwB;IAUhC;;;;;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"}
|
package/dist/dts/grid-pro.d.ts
CHANGED
|
@@ -451,7 +451,24 @@ export declare class GridPro extends GridPro_base {
|
|
|
451
451
|
get gridProGenesisDatasource(): GridProGenesisDatasource;
|
|
452
452
|
set gridOptions(options: GridOptions);
|
|
453
453
|
private enableFlashingRows;
|
|
454
|
-
|
|
454
|
+
/**
|
|
455
|
+
* Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
|
|
456
|
+
* @deprecated use `applyTemplateDefinitions` instead.
|
|
457
|
+
* @param columnDefs - The column definitions to apply to the grid.
|
|
458
|
+
* @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.
|
|
459
|
+
* @returns The merged column definitions.
|
|
460
|
+
*/
|
|
461
|
+
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
|
|
462
|
+
/**
|
|
463
|
+
* Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
|
|
464
|
+
* @public
|
|
465
|
+
* @remarks This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
|
|
466
|
+
* @param columnDefs - The column definitions to apply to the grid.
|
|
467
|
+
* @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property
|
|
468
|
+
* on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.
|
|
469
|
+
* @returns The merged column definitions.
|
|
470
|
+
*/
|
|
471
|
+
mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
|
|
455
472
|
get observedAttributes(): string[];
|
|
456
473
|
agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
|
|
457
474
|
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,EACL,wBAAwB,EAEzB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAKL,cAAc,EACf,MAAM,kBAAkB,CAAC;AAU1B;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,UAAW,MAAM,WACa,CAAC;;;;;;;;uBAgD5D;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7CL;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,YAAiC;IAChD,SAAS,EAAG,SAAS,CAAC;IACtB,O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;;;;;;;kBAM5B,CAAC"}
|
|
@@ -216,9 +216,12 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
216
216
|
* @internal
|
|
217
217
|
*/
|
|
218
218
|
setRowData(rowData) {
|
|
219
|
-
const
|
|
220
|
-
if (
|
|
221
|
-
this.
|
|
219
|
+
const preSetColumnDefs = this.agGrid.gridApi.getColumnDefs();
|
|
220
|
+
if (!preSetColumnDefs || preSetColumnDefs.length === 0) {
|
|
221
|
+
const agColumnDefs = this.getAgColumnDefs(this.datasource.fieldMetadata);
|
|
222
|
+
if (agColumnDefs) {
|
|
223
|
+
this.agGrid.gridApi.setColumnDefs(agColumnDefs);
|
|
224
|
+
}
|
|
222
225
|
}
|
|
223
226
|
const data = this.rowDataMapper ? this.rowDataMapper(rowData) : rowData;
|
|
224
227
|
this.agGrid.gridApi.setRowData(data);
|
|
@@ -440,33 +443,33 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
440
443
|
getAgColumnDefs(fieldsMetadata) {
|
|
441
444
|
const colDefsFromGenesisData = fieldsMetadata === null || fieldsMetadata === void 0 ? void 0 : fieldsMetadata.flatMap((field) => {
|
|
442
445
|
var _a;
|
|
443
|
-
const
|
|
444
|
-
|
|
446
|
+
const colDefByFieldType = {};
|
|
447
|
+
colDefByFieldType.filterParams = getFilterParamsByFieldType(field.type);
|
|
445
448
|
switch (field.type) {
|
|
446
449
|
case FieldTypeEnum.BOOLEAN:
|
|
447
450
|
if (this.agGrid.autoCellRendererByType) {
|
|
448
|
-
|
|
451
|
+
colDefByFieldType.cellRenderer = GridProRendererTypes.boolean;
|
|
449
452
|
}
|
|
450
453
|
break;
|
|
451
454
|
case FieldTypeEnum.DATE:
|
|
452
|
-
|
|
455
|
+
colDefByFieldType.valueFormatter = dateValueFormatter;
|
|
453
456
|
break;
|
|
454
457
|
case FieldTypeEnum.DATETIME:
|
|
455
|
-
|
|
458
|
+
colDefByFieldType.valueFormatter = dateTimeValueFormatter;
|
|
456
459
|
break;
|
|
457
460
|
default:
|
|
458
461
|
break;
|
|
459
462
|
}
|
|
460
|
-
const
|
|
461
|
-
if (this.agGrid.onlyTemplateColDefs && !
|
|
463
|
+
const colDefExtras = (_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.getColumnDef(field.name);
|
|
464
|
+
if (this.agGrid.onlyTemplateColDefs && !colDefExtras) {
|
|
462
465
|
return [];
|
|
463
466
|
}
|
|
464
467
|
if (this.fields && !this.fields.includes(field.name)) {
|
|
465
468
|
return [];
|
|
466
469
|
}
|
|
467
|
-
return Object.assign(Object.assign({ field: field.name },
|
|
470
|
+
return Object.assign(Object.assign({ field: field.name }, colDefByFieldType), colDefExtras);
|
|
468
471
|
});
|
|
469
|
-
const colDefsMergedWithTemplateDefs = this.agGrid.
|
|
472
|
+
const colDefsMergedWithTemplateDefs = this.agGrid.mergeAllColumnDefsAndStates(colDefsFromGenesisData, true);
|
|
470
473
|
return colDefsMergedWithTemplateDefs;
|
|
471
474
|
}
|
|
472
475
|
buildCriteria() {
|
|
@@ -496,6 +499,9 @@ __decorate([
|
|
|
496
499
|
__decorate([
|
|
497
500
|
observable
|
|
498
501
|
], GridProGenesisDatasource.prototype, "deferredGridOptions", void 0);
|
|
502
|
+
__decorate([
|
|
503
|
+
observable
|
|
504
|
+
], GridProGenesisDatasource.prototype, "deferredColumnStates", void 0);
|
|
499
505
|
__decorate([
|
|
500
506
|
attr
|
|
501
507
|
], GridProGenesisDatasource.prototype, "criteria", void 0);
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -269,7 +269,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
269
269
|
onFirstDataRendered(event);
|
|
270
270
|
}
|
|
271
271
|
}, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback }), rest);
|
|
272
|
-
if (
|
|
272
|
+
if (this.gridProGenesisDatasource) {
|
|
273
|
+
derivedOptions.columnDefs = columnDefs;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
273
276
|
derivedOptions.columnDefs = this.applyTemplateDefinitions(columnDefs);
|
|
274
277
|
}
|
|
275
278
|
this.agGridOptions = Object.assign(Object.assign({}, this.agGridOptions), ComponentUtil.copyAttributesToGridOptions(derivedOptions, this.agAttributes));
|
|
@@ -305,7 +308,27 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
305
308
|
});
|
|
306
309
|
}
|
|
307
310
|
}
|
|
308
|
-
|
|
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
|
+
return this.mergeAllColumnDefsAndStates(columnDefs, deferredColumnDefsOrState);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
|
|
323
|
+
* @public
|
|
324
|
+
* @remarks This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
|
|
325
|
+
* @param columnDefs - The column definitions to apply to the grid.
|
|
326
|
+
* @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property
|
|
327
|
+
* on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.
|
|
328
|
+
* @returns The merged column definitions.
|
|
329
|
+
*/
|
|
330
|
+
mergeAllColumnDefsAndStates(columnDefs, deferredColumnDefsOrState = false) {
|
|
331
|
+
var _a;
|
|
309
332
|
const columnDefinitions = columnDefs || [];
|
|
310
333
|
const agColumnNodes = this.querySelectorAll(this.columnComponentName);
|
|
311
334
|
const overrides = Array.from(agColumnNodes).map((x) => { var _a; return (_a = x.definition) === null || _a === void 0 ? void 0 : _a.field; });
|
|
@@ -334,11 +357,14 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
334
357
|
}),
|
|
335
358
|
];
|
|
336
359
|
}
|
|
337
|
-
if (this.gridProGenesisDatasource &&
|
|
360
|
+
if (this.gridProGenesisDatasource && deferredColumnDefsOrState) {
|
|
338
361
|
const savedColumnState = this.getSavedColumnState();
|
|
339
|
-
if (savedColumnState.length > 0) {
|
|
362
|
+
if ((savedColumnState === null || savedColumnState === void 0 ? void 0 : savedColumnState.length) > 0) {
|
|
340
363
|
return mergeAndDedupColDefWithColumnState(colDefsToReturn, savedColumnState);
|
|
341
364
|
}
|
|
365
|
+
else if (((_a = this.gridProGenesisDatasource.deferredColumnStates) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
366
|
+
return mergeAndDedupColDefWithColumnState(colDefsToReturn, this.gridProGenesisDatasource.deferredColumnStates);
|
|
367
|
+
}
|
|
342
368
|
}
|
|
343
369
|
return colDefsToReturn;
|
|
344
370
|
}
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -5033,7 +5033,7 @@
|
|
|
5033
5033
|
{
|
|
5034
5034
|
"kind": "Method",
|
|
5035
5035
|
"canonicalReference": "@genesislcap/grid-pro!GridPro#applyTemplateDefinitions:member(1)",
|
|
5036
|
-
"docComment": "",
|
|
5036
|
+
"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",
|
|
5037
5037
|
"excerptTokens": [
|
|
5038
5038
|
{
|
|
5039
5039
|
"kind": "Content",
|
|
@@ -5050,7 +5050,7 @@
|
|
|
5050
5050
|
},
|
|
5051
5051
|
{
|
|
5052
5052
|
"kind": "Content",
|
|
5053
|
-
"text": ",
|
|
5053
|
+
"text": ", deferredColumnDefsOrState?: "
|
|
5054
5054
|
},
|
|
5055
5055
|
{
|
|
5056
5056
|
"kind": "Content",
|
|
@@ -5092,7 +5092,7 @@
|
|
|
5092
5092
|
"isOptional": false
|
|
5093
5093
|
},
|
|
5094
5094
|
{
|
|
5095
|
-
"parameterName": "
|
|
5095
|
+
"parameterName": "deferredColumnDefsOrState",
|
|
5096
5096
|
"parameterTypeTokenRange": {
|
|
5097
5097
|
"startIndex": 4,
|
|
5098
5098
|
"endIndex": 5
|
|
@@ -5930,6 +5930,80 @@
|
|
|
5930
5930
|
"isProtected": true,
|
|
5931
5931
|
"isAbstract": false
|
|
5932
5932
|
},
|
|
5933
|
+
{
|
|
5934
|
+
"kind": "Method",
|
|
5935
|
+
"canonicalReference": "@genesislcap/grid-pro!GridPro#mergeAllColumnDefsAndStates:member(1)",
|
|
5936
|
+
"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",
|
|
5937
|
+
"excerptTokens": [
|
|
5938
|
+
{
|
|
5939
|
+
"kind": "Content",
|
|
5940
|
+
"text": "mergeAllColumnDefsAndStates(columnDefs: "
|
|
5941
|
+
},
|
|
5942
|
+
{
|
|
5943
|
+
"kind": "Reference",
|
|
5944
|
+
"text": "ColDef",
|
|
5945
|
+
"canonicalReference": "@ag-grid-community/core!ColDef:interface"
|
|
5946
|
+
},
|
|
5947
|
+
{
|
|
5948
|
+
"kind": "Content",
|
|
5949
|
+
"text": "[]"
|
|
5950
|
+
},
|
|
5951
|
+
{
|
|
5952
|
+
"kind": "Content",
|
|
5953
|
+
"text": ", deferredColumnDefsOrState?: "
|
|
5954
|
+
},
|
|
5955
|
+
{
|
|
5956
|
+
"kind": "Content",
|
|
5957
|
+
"text": "boolean"
|
|
5958
|
+
},
|
|
5959
|
+
{
|
|
5960
|
+
"kind": "Content",
|
|
5961
|
+
"text": "): "
|
|
5962
|
+
},
|
|
5963
|
+
{
|
|
5964
|
+
"kind": "Reference",
|
|
5965
|
+
"text": "ColDef",
|
|
5966
|
+
"canonicalReference": "@ag-grid-community/core!ColDef:interface"
|
|
5967
|
+
},
|
|
5968
|
+
{
|
|
5969
|
+
"kind": "Content",
|
|
5970
|
+
"text": "<any>[]"
|
|
5971
|
+
},
|
|
5972
|
+
{
|
|
5973
|
+
"kind": "Content",
|
|
5974
|
+
"text": ";"
|
|
5975
|
+
}
|
|
5976
|
+
],
|
|
5977
|
+
"isStatic": false,
|
|
5978
|
+
"returnTypeTokenRange": {
|
|
5979
|
+
"startIndex": 6,
|
|
5980
|
+
"endIndex": 8
|
|
5981
|
+
},
|
|
5982
|
+
"releaseTag": "Public",
|
|
5983
|
+
"isProtected": false,
|
|
5984
|
+
"overloadIndex": 1,
|
|
5985
|
+
"parameters": [
|
|
5986
|
+
{
|
|
5987
|
+
"parameterName": "columnDefs",
|
|
5988
|
+
"parameterTypeTokenRange": {
|
|
5989
|
+
"startIndex": 1,
|
|
5990
|
+
"endIndex": 3
|
|
5991
|
+
},
|
|
5992
|
+
"isOptional": false
|
|
5993
|
+
},
|
|
5994
|
+
{
|
|
5995
|
+
"parameterName": "deferredColumnDefsOrState",
|
|
5996
|
+
"parameterTypeTokenRange": {
|
|
5997
|
+
"startIndex": 4,
|
|
5998
|
+
"endIndex": 5
|
|
5999
|
+
},
|
|
6000
|
+
"isOptional": true
|
|
6001
|
+
}
|
|
6002
|
+
],
|
|
6003
|
+
"isOptional": false,
|
|
6004
|
+
"isAbstract": false,
|
|
6005
|
+
"name": "mergeAllColumnDefsAndStates"
|
|
6006
|
+
},
|
|
5933
6007
|
{
|
|
5934
6008
|
"kind": "Property",
|
|
5935
6009
|
"canonicalReference": "@genesislcap/grid-pro!GridPro#observedAttributes:member",
|
|
@@ -6933,6 +7007,41 @@
|
|
|
6933
7007
|
"isAbstract": false,
|
|
6934
7008
|
"name": "deepClone"
|
|
6935
7009
|
},
|
|
7010
|
+
{
|
|
7011
|
+
"kind": "Property",
|
|
7012
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#deferredColumnStates:member",
|
|
7013
|
+
"docComment": "",
|
|
7014
|
+
"excerptTokens": [
|
|
7015
|
+
{
|
|
7016
|
+
"kind": "Content",
|
|
7017
|
+
"text": "deferredColumnStates: "
|
|
7018
|
+
},
|
|
7019
|
+
{
|
|
7020
|
+
"kind": "Reference",
|
|
7021
|
+
"text": "ColumnState",
|
|
7022
|
+
"canonicalReference": "@ag-grid-community/core!ColumnState:interface"
|
|
7023
|
+
},
|
|
7024
|
+
{
|
|
7025
|
+
"kind": "Content",
|
|
7026
|
+
"text": "[]"
|
|
7027
|
+
},
|
|
7028
|
+
{
|
|
7029
|
+
"kind": "Content",
|
|
7030
|
+
"text": ";"
|
|
7031
|
+
}
|
|
7032
|
+
],
|
|
7033
|
+
"isReadonly": false,
|
|
7034
|
+
"isOptional": false,
|
|
7035
|
+
"releaseTag": "Public",
|
|
7036
|
+
"name": "deferredColumnStates",
|
|
7037
|
+
"propertyTypeTokenRange": {
|
|
7038
|
+
"startIndex": 1,
|
|
7039
|
+
"endIndex": 3
|
|
7040
|
+
},
|
|
7041
|
+
"isStatic": false,
|
|
7042
|
+
"isProtected": false,
|
|
7043
|
+
"isAbstract": false
|
|
7044
|
+
},
|
|
6936
7045
|
{
|
|
6937
7046
|
"kind": "Property",
|
|
6938
7047
|
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#deferredGridOptions:member",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -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';
|
|
@@ -886,7 +886,24 @@ export declare class GridPro extends GridPro_base {
|
|
|
886
886
|
get gridProGenesisDatasource(): GridProGenesisDatasource;
|
|
887
887
|
set gridOptions(options: GridOptions);
|
|
888
888
|
private enableFlashingRows;
|
|
889
|
-
|
|
889
|
+
/**
|
|
890
|
+
* Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
|
|
891
|
+
* @deprecated use `applyTemplateDefinitions` instead.
|
|
892
|
+
* @param columnDefs - The column definitions to apply to the grid.
|
|
893
|
+
* @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.
|
|
894
|
+
* @returns The merged column definitions.
|
|
895
|
+
*/
|
|
896
|
+
applyTemplateDefinitions(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
|
|
897
|
+
/**
|
|
898
|
+
* Will merge templated column definitions with `columnDefs` plus localStorage's column state or `deferredColumnStates`.
|
|
899
|
+
* @public
|
|
900
|
+
* @remarks This will favor the column state from the browser's local storage over the `deferredColumnStates` property on the `grid-pro-genesis-datasource` element.
|
|
901
|
+
* @param columnDefs - The column definitions to apply to the grid.
|
|
902
|
+
* @param deferredColumnDefsOrState - If true, will merge the column definitions with the saved column state or the `deferredColumnStates` property
|
|
903
|
+
* on the `grid-pro-genesis-datasource` element. Defaults to false but `grid-pro-genesis-datasource` will set this to true.
|
|
904
|
+
* @returns The merged column definitions.
|
|
905
|
+
*/
|
|
906
|
+
mergeAllColumnDefsAndStates(columnDefs: ColDef[], deferredColumnDefsOrState?: boolean): ColDef<any>[];
|
|
890
907
|
get observedAttributes(): string[];
|
|
891
908
|
agAttributeChangedCallback(attName: any, oldValue: any, newValue: any): void;
|
|
892
909
|
globalEventListener(eventType: any, event: any): void;
|
|
@@ -1260,6 +1277,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
1260
1277
|
connect: Connect;
|
|
1261
1278
|
datasource: Datasource;
|
|
1262
1279
|
deferredGridOptions: GridOptions;
|
|
1280
|
+
deferredColumnStates: ColumnState[];
|
|
1263
1281
|
criteria: string;
|
|
1264
1282
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
1265
1283
|
fields: string;
|
|
@@ -1417,6 +1435,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1417
1435
|
lang: string;
|
|
1418
1436
|
readonly offsetHeight: number;
|
|
1419
1437
|
readonly offsetLeft: number;
|
|
1438
|
+
/**
|
|
1439
|
+
* Returns the row id attribute, depending on the resource type.
|
|
1440
|
+
* @remarks Will favour the `row-id` attribute if set.
|
|
1441
|
+
* @internal
|
|
1442
|
+
*/
|
|
1420
1443
|
readonly offsetParent: Element;
|
|
1421
1444
|
readonly offsetTop: number;
|
|
1422
1445
|
readonly offsetWidth: number;
|
|
@@ -1451,6 +1474,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1451
1474
|
scrollTop: number;
|
|
1452
1475
|
readonly scrollWidth: number;
|
|
1453
1476
|
readonly shadowRoot: ShadowRoot;
|
|
1477
|
+
/**
|
|
1478
|
+
* Resets the datasource to its initial state.
|
|
1479
|
+
* @public
|
|
1480
|
+
* @deprecated Use `deinit` instead
|
|
1481
|
+
*/
|
|
1454
1482
|
slot: string;
|
|
1455
1483
|
readonly tagName: string;
|
|
1456
1484
|
attachShadow(init: ShadowRootInit): ShadowRoot;
|
|
@@ -1461,10 +1489,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1461
1489
|
getAttributeNS(namespace: string, localName: string): string;
|
|
1462
1490
|
getAttributeNames(): string[];
|
|
1463
1491
|
getAttributeNode(qualifiedName: string): Attr;
|
|
1464
|
-
getAttributeNodeNS(namespace: string, localName: string): Attr;
|
|
1465
|
-
* Restarts the datasource, uses `deinit` and `init` in sequence.
|
|
1466
|
-
* @public
|
|
1467
|
-
*/
|
|
1492
|
+
getAttributeNodeNS(namespace: string, localName: string): Attr;
|
|
1468
1493
|
getBoundingClientRect(): DOMRect;
|
|
1469
1494
|
getClientRects(): DOMRectList;
|
|
1470
1495
|
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
|
|
@@ -1481,6 +1506,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1481
1506
|
insertAdjacentElement(where: InsertPosition, element: Element): Element;
|
|
1482
1507
|
insertAdjacentHTML(position: InsertPosition, text: string): void;
|
|
1483
1508
|
insertAdjacentText(where: InsertPosition, data: string): void;
|
|
1509
|
+
/**
|
|
1510
|
+
* Sets the columnDefs and rowData for the grid.
|
|
1511
|
+
* @remarks This should only happen once, when the grid is first initialized. Follow up updates will use the agTransaction.
|
|
1512
|
+
* @internal
|
|
1513
|
+
*/
|
|
1484
1514
|
matches(selectors: string): boolean;
|
|
1485
1515
|
releasePointerCapture(pointerId: number): void;
|
|
1486
1516
|
removeAttribute(qualifiedName: string): void;
|
|
@@ -1625,12 +1655,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1625
1655
|
onanimationiteration: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
|
|
1626
1656
|
onanimationstart: (this: GlobalEventHandlers, ev: AnimationEvent) => any;
|
|
1627
1657
|
onauxclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
|
|
1628
|
-
onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any;
|
|
1629
|
-
* Maps the transaction data to the row data mapper function, if it exists.
|
|
1630
|
-
* @param transaction - The transaction data to be mapped.
|
|
1631
|
-
* @param operations - The operations to be mapped. Can be 'add', 'update' or 'remove'.
|
|
1632
|
-
* @returns The mapped transaction (if the row data mapper function exists), or the original transaction.
|
|
1633
|
-
*/
|
|
1658
|
+
onbeforeinput: (this: GlobalEventHandlers, ev: InputEvent) => any;
|
|
1634
1659
|
onblur: (this: GlobalEventHandlers, ev: FocusEvent) => any;
|
|
1635
1660
|
oncancel: (this: GlobalEventHandlers, ev: Event) => any;
|
|
1636
1661
|
oncanplay: (this: GlobalEventHandlers, ev: Event) => any;
|
|
@@ -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[],
|
|
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
|
-
|
|
|
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<any>\[\]
|
|
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,
|
|
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) > [@genesislcap/grid-pro](./grid-pro.md) > [GridPro](./grid-pro.gridpro.md) > [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<any>\[\]
|
|
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) > [@genesislcap/grid-pro](./grid-pro.md) > [GridProGenesisDatasource](./grid-pro.gridprogenesisdatasource.md) > [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 | |
|