@genesislcap/grid-pro 14.228.2-alpha-16265c5.0 → 14.228.2-alpha-abb55b6.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 +0 -22
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +8 -12
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +26 -15
- package/dist/grid-pro.d.ts +8 -12
- package/package.json +13 -13
|
@@ -7486,19 +7486,6 @@
|
|
|
7486
7486
|
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
7487
7487
|
}
|
|
7488
7488
|
},
|
|
7489
|
-
{
|
|
7490
|
-
"kind": "field",
|
|
7491
|
-
"name": "loadingData",
|
|
7492
|
-
"type": {
|
|
7493
|
-
"text": "boolean"
|
|
7494
|
-
},
|
|
7495
|
-
"privacy": "private",
|
|
7496
|
-
"default": "false",
|
|
7497
|
-
"inheritedFrom": {
|
|
7498
|
-
"name": "GridProGenesisDatasource",
|
|
7499
|
-
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
7500
|
-
}
|
|
7501
|
-
},
|
|
7502
7489
|
{
|
|
7503
7490
|
"kind": "field",
|
|
7504
7491
|
"name": "destroy$",
|
|
@@ -11961,15 +11948,6 @@
|
|
|
11961
11948
|
"privacy": "private",
|
|
11962
11949
|
"default": "true"
|
|
11963
11950
|
},
|
|
11964
|
-
{
|
|
11965
|
-
"kind": "field",
|
|
11966
|
-
"name": "loadingData",
|
|
11967
|
-
"type": {
|
|
11968
|
-
"text": "boolean"
|
|
11969
|
-
},
|
|
11970
|
-
"privacy": "private",
|
|
11971
|
-
"default": "false"
|
|
11972
|
-
},
|
|
11973
11951
|
{
|
|
11974
11952
|
"kind": "field",
|
|
11975
11953
|
"name": "destroy$",
|
|
@@ -21,6 +21,13 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
21
21
|
readonly accessKeyLabel: string;
|
|
22
22
|
autocapitalize: string;
|
|
23
23
|
dir: string;
|
|
24
|
+
/**
|
|
25
|
+
* Initializes the datasource.
|
|
26
|
+
* @public
|
|
27
|
+
* @param columnDefinitions - Optionally set the `gridOptions` up with column definitions
|
|
28
|
+
* @param columnStates - Optionally set the grid up with column state
|
|
29
|
+
* @remarks This method is called automatically when the element is connected to the DOM.
|
|
30
|
+
*/
|
|
24
31
|
draggable: boolean;
|
|
25
32
|
hidden: boolean;
|
|
26
33
|
inert: boolean;
|
|
@@ -56,11 +63,6 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
56
63
|
outerHTML: string;
|
|
57
64
|
readonly ownerDocument: Document;
|
|
58
65
|
readonly part: DOMTokenList;
|
|
59
|
-
/**
|
|
60
|
-
* Deinitialises the datasource, resetting it to its initial state.
|
|
61
|
-
* @deprecated Use `destroy` instead
|
|
62
|
-
* @public
|
|
63
|
-
*/
|
|
64
66
|
readonly prefix: string;
|
|
65
67
|
readonly scrollHeight: number;
|
|
66
68
|
scrollLeft: number;
|
|
@@ -87,12 +89,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
87
89
|
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
88
90
|
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
89
91
|
getElementsByTagNameNS(namespace: string, localName: string): HTMLCollectionOf<Element>;
|
|
90
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
91
|
-
* Clears the rowData and columnDefs for the grid.
|
|
92
|
-
* @remarks This is called when `reloadResourceData` happens, on criteria and filters change or full `reset`.
|
|
93
|
-
* @param withColumnDefs - Whether to clear the columnDefs as well. Defaults to true.
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
92
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
96
93
|
hasAttributeNS(namespace: string, localName: string): boolean;
|
|
97
94
|
hasAttributes(): boolean;
|
|
98
95
|
hasPointerCapture(pointerId: number): boolean;
|
|
@@ -352,7 +349,6 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
352
349
|
private updateSub;
|
|
353
350
|
private connectionSub;
|
|
354
351
|
private requiresFullRowDataAndColDefs;
|
|
355
|
-
private loadingData;
|
|
356
352
|
private destroy$;
|
|
357
353
|
connectedCallback(): void;
|
|
358
354
|
disconnectedCallback(): void;
|
|
@@ -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,EACL,MAAM,EACN,WAAW,EAGX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAejC,OAAO,EAAqB,qBAAqB,EAAE,MAAM,+BAA+B,CAAC
|
|
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,EACL,MAAM,EACN,WAAW,EAGX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAejC,OAAO,EAAqB,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;IAyIvF;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,eAAe;IActB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;IAK5B,gBAAgB,CACvB,aAAa,EAAE,kBAAkB,GAChC,kBAAkB,GAAG,IAAI,GAAG,SAAS;IAI/B,qBAAqB,CAC5B,aAAa,EAAE,kBAAkB,EACjC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,GAC3C,IAAI;IAIP,OAAO,CAAC,iBAAiB;CAO1B"}
|
|
@@ -24,19 +24,20 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
24
24
|
this.restartOnReconnection = false;
|
|
25
25
|
this.keepColDefsOnClearRowData = false;
|
|
26
26
|
this.requiresFullRowDataAndColDefs = true;
|
|
27
|
-
this.loadingData = false;
|
|
28
27
|
this.destroy$ = new Subject();
|
|
29
28
|
}
|
|
30
29
|
// DatasourceOptions
|
|
31
30
|
criteriaChanged(oldCriteria, newCriteria) {
|
|
31
|
+
var _a;
|
|
32
32
|
const criteriaIsNotDuplicate = oldCriteria !== normaliseCriteria(newCriteria, criteriaDelimiter);
|
|
33
|
-
if (this.datasource.initialized && criteriaIsNotDuplicate) {
|
|
33
|
+
if (this.datasource.initialized && criteriaIsNotDuplicate && ((_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi)) {
|
|
34
34
|
this.reloadResourceData();
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
requestChanged(oldRequest, newRequest) {
|
|
38
|
+
var _a;
|
|
38
39
|
const requestIsNotDuplicate = oldRequest !== newRequest;
|
|
39
|
-
if (this.datasource.initialized && requestIsNotDuplicate) {
|
|
40
|
+
if (this.datasource.initialized && requestIsNotDuplicate && ((_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi)) {
|
|
40
41
|
this.reloadResourceData();
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -152,7 +153,15 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
152
153
|
* @public
|
|
153
154
|
*/
|
|
154
155
|
destroy() {
|
|
155
|
-
|
|
156
|
+
try {
|
|
157
|
+
// Clear data first
|
|
158
|
+
this.clearRowData();
|
|
159
|
+
// Then reset everything else
|
|
160
|
+
this.reset();
|
|
161
|
+
}
|
|
162
|
+
catch (e) {
|
|
163
|
+
logger.debug('Error during destroy:', e);
|
|
164
|
+
}
|
|
156
165
|
}
|
|
157
166
|
/**
|
|
158
167
|
* Deinitialises the datasource, resetting it to its initial state.
|
|
@@ -184,16 +193,14 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
184
193
|
this.connectionSub.unsubscribe();
|
|
185
194
|
this.connectionSub = undefined;
|
|
186
195
|
}
|
|
187
|
-
|
|
196
|
+
// Don't call clearRowData here since destroy already does it
|
|
188
197
|
this.requiresFullRowDataAndColDefs = true;
|
|
189
198
|
this.dataSubWasLoggedOff = false;
|
|
190
199
|
this.criteriaFromFilters = new Map();
|
|
191
|
-
this.loadingData = false;
|
|
192
200
|
this.update = new BehaviorSubject(new Map());
|
|
193
201
|
if (this.agGrid) {
|
|
194
202
|
this.agGrid.removeAttribute('ds-disconnected');
|
|
195
203
|
}
|
|
196
|
-
// TODO: There may need to be a full destroy path. Datasources need some love!
|
|
197
204
|
this.datasource.destroy();
|
|
198
205
|
}
|
|
199
206
|
/**
|
|
@@ -281,23 +288,26 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
281
288
|
var _a, _b;
|
|
282
289
|
return __awaiter(this, void 0, void 0, function* () {
|
|
283
290
|
logger.debug('GridProGenesisDatasource.reloadResourceData()', this.resourceName);
|
|
284
|
-
if (this.loadingData) {
|
|
285
|
-
logger.debug('Data loading in progress, skipping reload');
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
this.loadingData = true;
|
|
289
291
|
try {
|
|
292
|
+
// Signal to complete any existing subscriptions
|
|
293
|
+
this.destroy$.next();
|
|
294
|
+
this.destroy$.complete();
|
|
295
|
+
this.destroy$ = new Subject();
|
|
296
|
+
// Ensure we unsubscribe from current data stream
|
|
290
297
|
if (this.dataSub) {
|
|
291
298
|
this.dataSub.unsubscribe();
|
|
292
299
|
this.dataSub = undefined;
|
|
293
300
|
}
|
|
301
|
+
// Clear existing data and show loading state
|
|
294
302
|
this.clearRowData(withoutColumnDefs);
|
|
295
303
|
(_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.showLoadingOverlay();
|
|
296
304
|
this.agGrid.removeAttribute('ds-disconnected');
|
|
305
|
+
// Force a new data load
|
|
306
|
+
this.requiresFullRowDataAndColDefs = true;
|
|
297
307
|
yield this.loadResourceData(withoutFullInit);
|
|
298
308
|
}
|
|
299
309
|
finally {
|
|
300
|
-
|
|
310
|
+
logger.debug('Completed reloading resource data for:', this.resourceName);
|
|
301
311
|
}
|
|
302
312
|
});
|
|
303
313
|
}
|
|
@@ -319,6 +329,8 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
319
329
|
return;
|
|
320
330
|
}
|
|
321
331
|
this.$emit(gridProGenesisDatasourceEventNames.dataInit);
|
|
332
|
+
// Clear any existing data before loading new data
|
|
333
|
+
this.rowData = new Map();
|
|
322
334
|
if (this.isSnapshot) {
|
|
323
335
|
const result = yield this.datasource.snapshot();
|
|
324
336
|
if (result) {
|
|
@@ -400,9 +412,8 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
400
412
|
}
|
|
401
413
|
}
|
|
402
414
|
handleStreamResult(result) {
|
|
403
|
-
if (!result
|
|
415
|
+
if (!result)
|
|
404
416
|
return;
|
|
405
|
-
}
|
|
406
417
|
if (this.isRequestServer) {
|
|
407
418
|
this.applyRequestServerData(result);
|
|
408
419
|
}
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -2550,7 +2550,6 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
2550
2550
|
private updateSub;
|
|
2551
2551
|
private connectionSub;
|
|
2552
2552
|
private requiresFullRowDataAndColDefs;
|
|
2553
|
-
private loadingData;
|
|
2554
2553
|
private destroy$;
|
|
2555
2554
|
connectedCallback(): void;
|
|
2556
2555
|
disconnectedCallback(): void;
|
|
@@ -2652,6 +2651,13 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
2652
2651
|
readonly accessKeyLabel: string;
|
|
2653
2652
|
autocapitalize: string;
|
|
2654
2653
|
dir: string;
|
|
2654
|
+
/**
|
|
2655
|
+
* Initializes the datasource.
|
|
2656
|
+
* @public
|
|
2657
|
+
* @param columnDefinitions - Optionally set the `gridOptions` up with column definitions
|
|
2658
|
+
* @param columnStates - Optionally set the grid up with column state
|
|
2659
|
+
* @remarks This method is called automatically when the element is connected to the DOM.
|
|
2660
|
+
*/
|
|
2655
2661
|
draggable: boolean;
|
|
2656
2662
|
hidden: boolean;
|
|
2657
2663
|
inert: boolean;
|
|
@@ -2687,11 +2693,6 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
2687
2693
|
outerHTML: string;
|
|
2688
2694
|
readonly ownerDocument: Document;
|
|
2689
2695
|
readonly part: DOMTokenList;
|
|
2690
|
-
/**
|
|
2691
|
-
* Deinitialises the datasource, resetting it to its initial state.
|
|
2692
|
-
* @deprecated Use `destroy` instead
|
|
2693
|
-
* @public
|
|
2694
|
-
*/
|
|
2695
2696
|
readonly prefix: string;
|
|
2696
2697
|
readonly scrollHeight: number;
|
|
2697
2698
|
scrollLeft: number;
|
|
@@ -2718,12 +2719,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
2718
2719
|
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
|
|
2719
2720
|
getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
|
|
2720
2721
|
getElementsByTagNameNS(namespace: string, localName: string): HTMLCollectionOf<Element>;
|
|
2721
|
-
hasAttribute(qualifiedName: string): boolean;
|
|
2722
|
-
* Clears the rowData and columnDefs for the grid.
|
|
2723
|
-
* @remarks This is called when `reloadResourceData` happens, on criteria and filters change or full `reset`.
|
|
2724
|
-
* @param withColumnDefs - Whether to clear the columnDefs as well. Defaults to true.
|
|
2725
|
-
* @internal
|
|
2726
|
-
*/
|
|
2722
|
+
hasAttribute(qualifiedName: string): boolean;
|
|
2727
2723
|
hasAttributeNS(namespace: string, localName: string): boolean;
|
|
2728
2724
|
hasAttributes(): boolean;
|
|
2729
2725
|
hasPointerCapture(pointerId: number): boolean;
|
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.228.2-alpha-
|
|
4
|
+
"version": "14.228.2-alpha-abb55b6.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@genesislcap/foundation-testing": "14.228.2-alpha-
|
|
42
|
-
"@genesislcap/genx": "14.228.2-alpha-
|
|
43
|
-
"@genesislcap/rollup-builder": "14.228.2-alpha-
|
|
44
|
-
"@genesislcap/ts-builder": "14.228.2-alpha-
|
|
45
|
-
"@genesislcap/uvu-playwright-builder": "14.228.2-alpha-
|
|
46
|
-
"@genesislcap/vite-builder": "14.228.2-alpha-
|
|
47
|
-
"@genesislcap/webpack-builder": "14.228.2-alpha-
|
|
41
|
+
"@genesislcap/foundation-testing": "14.228.2-alpha-abb55b6.0",
|
|
42
|
+
"@genesislcap/genx": "14.228.2-alpha-abb55b6.0",
|
|
43
|
+
"@genesislcap/rollup-builder": "14.228.2-alpha-abb55b6.0",
|
|
44
|
+
"@genesislcap/ts-builder": "14.228.2-alpha-abb55b6.0",
|
|
45
|
+
"@genesislcap/uvu-playwright-builder": "14.228.2-alpha-abb55b6.0",
|
|
46
|
+
"@genesislcap/vite-builder": "14.228.2-alpha-abb55b6.0",
|
|
47
|
+
"@genesislcap/webpack-builder": "14.228.2-alpha-abb55b6.0",
|
|
48
48
|
"rimraf": "^5.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@genesislcap/foundation-comms": "14.228.2-alpha-
|
|
52
|
-
"@genesislcap/foundation-logger": "14.228.2-alpha-
|
|
53
|
-
"@genesislcap/foundation-ui": "14.228.2-alpha-
|
|
54
|
-
"@genesislcap/foundation-utils": "14.228.2-alpha-
|
|
51
|
+
"@genesislcap/foundation-comms": "14.228.2-alpha-abb55b6.0",
|
|
52
|
+
"@genesislcap/foundation-logger": "14.228.2-alpha-abb55b6.0",
|
|
53
|
+
"@genesislcap/foundation-ui": "14.228.2-alpha-abb55b6.0",
|
|
54
|
+
"@genesislcap/foundation-utils": "14.228.2-alpha-abb55b6.0",
|
|
55
55
|
"@microsoft/fast-colors": "5.3.1",
|
|
56
56
|
"@microsoft/fast-components": "2.30.6",
|
|
57
57
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"access": "public"
|
|
78
78
|
},
|
|
79
79
|
"customElements": "dist/custom-elements.json",
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "01e080c975f3a69266bea2b6a38df78312158dc9"
|
|
81
81
|
}
|