@genesislcap/grid-pro 13.2.0-pa-659.2 → 13.2.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/dts/grid-pro.d.ts
CHANGED
|
@@ -334,8 +334,6 @@ export declare class GridPro extends GridPro_base {
|
|
|
334
334
|
enabledRowFlashing: boolean;
|
|
335
335
|
enableCellFlashing: boolean;
|
|
336
336
|
persistColumnStateKey: string;
|
|
337
|
-
gridAutosizingEnabled: boolean;
|
|
338
|
-
private debounced;
|
|
339
337
|
gridFontFace: string;
|
|
340
338
|
columnComponentName: string;
|
|
341
339
|
eventsAndCallbacks: any;
|
|
@@ -359,8 +357,6 @@ export declare class GridPro extends GridPro_base {
|
|
|
359
357
|
disconnectedCallback(): void;
|
|
360
358
|
combineAllGridComponents(gridOptionsComponents: GridComponents): GridComponents;
|
|
361
359
|
statePersistanceEnabled(): boolean;
|
|
362
|
-
private debouncedColumnAutosize;
|
|
363
|
-
private removeConfigWidthsToAutosize;
|
|
364
360
|
private serialiseStoreTableConfig;
|
|
365
361
|
private rehydrateTableConfig;
|
|
366
362
|
set gridOptions(options: GridOptions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,IAAI,EACJ,SAAS,EACT,OAAO,EAEP,WAAW,EACX,MAAM,
|
|
1
|
+
{"version":3,"file":"grid-pro.d.ts","sourceRoot":"","sources":["../../src/grid-pro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,IAAI,EACJ,SAAS,EACT,OAAO,EAEP,WAAW,EACX,MAAM,EAIP,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAa/D,OAAO,EAKL,cAAc,EACf,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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I,IAAI;IAgBzB,oBAAoB,IAAI,IAAI;IAQ5B,wBAAwB,CAAC,qBAAqB,EAAE,cAAc,GAAG,cAAc;IAc/E,uBAAuB,IAAI,OAAO;IAOlC,OAAO,CAAC,yBAAyB;IAWjC,OAAO,CAAC,oBAAoB;IAa5B,IAAI,WAAW,CAAC,OAAO,EAAE,WAAW,EAuEnC;IAED,OAAO,CAAC,kBAAkB;IAiB1B,wBAAwB,CAAC,UAAU,GAAE,MAAM,EAAO;IAgClD,IAAI,kBAAkB,aAerB;IAED,0BAA0B,CAAC,OAAO,KAAA,EAAE,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAqBtD,mBAAmB,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA;IAiBpC,OAAO,CAAC,eAAe,CAAa;IAEpC,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,eAAe;CAMxB;AAGD,eAAO,MAAM,8BAA8B,EAAE,cAA0B,CAAC;AAExE,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AASF,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAM5B,CAAC"}
|
|
@@ -5,5 +5,4 @@ export declare function getFilterParamsByFieldType(type: string): any;
|
|
|
5
5
|
export declare function dateValueFormatter({ value }: ValueFormatterParams): any;
|
|
6
6
|
export declare function dateTimeValueFormatter({ value }: ValueFormatterParams): any;
|
|
7
7
|
export declare function formatDateExtra(epoch: number): string;
|
|
8
|
-
export declare const DEBOUNCED_RESIZE_TIME = 5;
|
|
9
8
|
//# sourceMappingURL=grid-pro.definitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro.definitions.d.ts","sourceRoot":"","sources":["../../src/grid-pro.definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CActD;AAED,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG,CASvD;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAwC5D;AAED,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,GAAG,GAAG,CAEvE;AAED,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,GAAG,GAAG,CAE3E;AAID,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMrD
|
|
1
|
+
{"version":3,"file":"grid-pro.definitions.d.ts","sourceRoot":"","sources":["../../src/grid-pro.definitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CActD;AAED,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG,CASvD;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAwC5D;AAED,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,GAAG,GAAG,CAEvE;AAED,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,GAAG,GAAG,CAE3E;AAID,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMrD"}
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -3,7 +3,7 @@ import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-mod
|
|
|
3
3
|
import { Grid, ComponentUtil, Events, ModuleRegistry, } from '@ag-grid-community/core';
|
|
4
4
|
import { CsvExportModule } from '@ag-grid-community/csv-export';
|
|
5
5
|
import { Session } from '@genesislcap/foundation-comms';
|
|
6
|
-
import { insertDocumentCSSRule, LifecycleMixin
|
|
6
|
+
import { insertDocumentCSSRule, LifecycleMixin } from '@genesislcap/foundation-utils';
|
|
7
7
|
import { attr, DOM, observable } from '@microsoft/fast-element';
|
|
8
8
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
9
9
|
import { classNames } from '@microsoft/fast-web-utilities';
|
|
@@ -12,7 +12,6 @@ import { ActionRenderer, ActionsMenuRenderer, BooleanRenderer } from './cell-ren
|
|
|
12
12
|
import { GridColumn } from './column';
|
|
13
13
|
import { agThemeFontFaceMap, defaultAgGridFontFace } from './external';
|
|
14
14
|
import { GridProGenesisDatasource, GridProGenesisDatasourceNext, } from './grid-pro-genesis-datasource';
|
|
15
|
-
import { DEBOUNCED_RESIZE_TIME } from './grid-pro.definitions';
|
|
16
15
|
import { foundationGridProStyles as styles } from './grid-pro.styles';
|
|
17
16
|
import { gridProTemplate as template } from './grid-pro.template';
|
|
18
17
|
import { AgGridTheme, GridProRendererTypes, agThemeFontsId, agThemeTokenMapClassname, } from './grid-pro.types';
|
|
@@ -38,7 +37,6 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
38
37
|
this.onlyTemplateColDefs = false;
|
|
39
38
|
this.enabledRowFlashing = false;
|
|
40
39
|
this.enableCellFlashing = false;
|
|
41
|
-
this.gridAutosizingEnabled = false;
|
|
42
40
|
this.gridFontFace = defaultAgGridFontFace;
|
|
43
41
|
this.columnComponentName = 'grid-pro-column';
|
|
44
42
|
this.theme = AgGridTheme.alpine;
|
|
@@ -53,13 +51,6 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
53
51
|
connectedCallback() {
|
|
54
52
|
super.connectedCallback();
|
|
55
53
|
this.rehydrationAttempted = false;
|
|
56
|
-
if (this.gridAutosizingEnabled) {
|
|
57
|
-
respondToVisibility(this, (gridVisible) => {
|
|
58
|
-
if (gridVisible) {
|
|
59
|
-
this.debouncedColumnAutosize.bind(this)();
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
54
|
if (!this.shouldRunConnect)
|
|
64
55
|
return;
|
|
65
56
|
ComponentUtil.ALL_PROPERTIES.forEach((key) => {
|
|
@@ -94,28 +85,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
94
85
|
}
|
|
95
86
|
return true;
|
|
96
87
|
}
|
|
97
|
-
debouncedColumnAutosize() {
|
|
98
|
-
if (!this.gridAutosizingEnabled)
|
|
99
|
-
return;
|
|
100
|
-
if (this.debounced) {
|
|
101
|
-
clearTimeout(this.debounced);
|
|
102
|
-
this.debounced = null;
|
|
103
|
-
}
|
|
104
|
-
this.debounced = setTimeout(() => {
|
|
105
|
-
var _a;
|
|
106
|
-
(_a = this.gridApi) === null || _a === void 0 ? void 0 : _a.sizeColumnsToFit();
|
|
107
|
-
}, DEBOUNCED_RESIZE_TIME);
|
|
108
|
-
}
|
|
109
|
-
removeConfigWidthsToAutosize(colState) {
|
|
110
|
-
return colState.map((col) => (Object.assign(Object.assign({}, col), { width: null })));
|
|
111
|
-
}
|
|
112
88
|
serialiseStoreTableConfig() {
|
|
113
89
|
if (this.rehydrationAttempted && this.statePersistanceEnabled()) {
|
|
114
90
|
const existingOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions') || '{}');
|
|
115
|
-
|
|
116
|
-
colState = this.gridAutosizingEnabled
|
|
117
|
-
? this.removeConfigWidthsToAutosize(colState)
|
|
118
|
-
: colState;
|
|
91
|
+
const colState = this.agGridOptions.columnApi.getColumnState();
|
|
119
92
|
existingOptions[this.persistColumnStateKey] = JSON.stringify(colState);
|
|
120
93
|
this.session.setLocalStorageItem('gridOptions', JSON.stringify(existingOptions));
|
|
121
94
|
}
|
|
@@ -134,10 +107,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
134
107
|
}
|
|
135
108
|
set gridOptions(options) {
|
|
136
109
|
const globalEventListener = this.globalEventListener.bind(this);
|
|
137
|
-
const
|
|
138
|
-
this.serialiseStoreTableConfig.bind(this)();
|
|
139
|
-
this.debouncedColumnAutosize.bind(this)();
|
|
140
|
-
};
|
|
110
|
+
const serialiseStoreTableConfig = this.serialiseStoreTableConfig.bind(this);
|
|
141
111
|
const rehydrateTableConfig = this.rehydrateTableConfig.bind(this);
|
|
142
112
|
Array.from(this.attributes).forEach((attribute) => {
|
|
143
113
|
const attrName = this.agPropertiesMap[attribute.name];
|
|
@@ -162,10 +132,9 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
162
132
|
gridId: this.id,
|
|
163
133
|
});
|
|
164
134
|
rehydrateTableConfig();
|
|
165
|
-
this.debouncedColumnAutosize.bind(this)();
|
|
166
135
|
}, onFirstDataRendered: () => {
|
|
167
136
|
this.enableFlashingRows.bind(this);
|
|
168
|
-
}, onColumnPinned:
|
|
137
|
+
}, onColumnPinned: serialiseStoreTableConfig, onColumnResized: serialiseStoreTableConfig, onColumnMoved: serialiseStoreTableConfig, onDisplayedColumnsChanged: serialiseStoreTableConfig, onFilterChanged: serialiseStoreTableConfig, onGridSizeChanged: serialiseStoreTableConfig, onSortChanged: serialiseStoreTableConfig }), rest);
|
|
169
138
|
this.agGridOptions = Object.assign(Object.assign({}, this.agGridOptions), ComponentUtil.copyAttributesToGridOptions(derivedOptions, this.agAttributes));
|
|
170
139
|
const gridParams = {
|
|
171
140
|
globalEventListener: globalEventListener,
|
|
@@ -286,9 +255,6 @@ __decorate([
|
|
|
286
255
|
__decorate([
|
|
287
256
|
attr({ attribute: 'persist-column-state-key' })
|
|
288
257
|
], GridPro.prototype, "persistColumnStateKey", void 0);
|
|
289
|
-
__decorate([
|
|
290
|
-
attr({ mode: 'boolean', attribute: 'grid-autosizing' })
|
|
291
|
-
], GridPro.prototype, "gridAutosizingEnabled", void 0);
|
|
292
258
|
__decorate([
|
|
293
259
|
observable
|
|
294
260
|
], GridPro.prototype, "gridFontFace", void 0);
|
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": "13.2.0
|
|
4
|
+
"version": "13.2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test": "echo \"Error: no test specified\""
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@genesislcap/foundation-testing": "13.2.0
|
|
29
|
+
"@genesislcap/foundation-testing": "^13.2.0",
|
|
30
30
|
"@playwright/test": "^1.18.1",
|
|
31
31
|
"@rollup/plugin-commonjs": "^21.0.1",
|
|
32
32
|
"@rollup/plugin-node-resolve": "^13.1.3",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"webpack-merge": "^5.7.3"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@genesislcap/foundation-comms": "13.2.0
|
|
82
|
-
"@genesislcap/foundation-ui": "13.2.0
|
|
83
|
-
"@genesislcap/foundation-utils": "13.2.0
|
|
81
|
+
"@genesislcap/foundation-comms": "^13.2.0",
|
|
82
|
+
"@genesislcap/foundation-ui": "^13.2.0",
|
|
83
|
+
"@genesislcap/foundation-utils": "^13.2.0",
|
|
84
84
|
"@microsoft/fast-colors": "^5.1.4",
|
|
85
85
|
"@microsoft/fast-components": "^2.21.3",
|
|
86
86
|
"@microsoft/fast-element": "^1.7.0",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"publishConfig": {
|
|
102
102
|
"access": "public"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "9edee19ccfbd785feccc855c576741fa53664b60"
|
|
105
105
|
}
|