@genesislcap/grid-pro 14.147.1-alpha-3a79940.0 → 14.147.1-alpha-e9dbeac.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 +735 -694
- package/dist/dts/datasource/server-side.datasource.d.ts +15 -8
- package/dist/dts/datasource/server-side.datasource.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +1 -7
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/esm/datasource/server-side.datasource.js +78 -26
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +9 -9
- package/dist/grid-pro.d.ts +16 -15
- package/docs/api-report.md +4 -2
- package/package.json +13 -13
|
@@ -53,9 +53,11 @@ export declare class StreamDatasource extends StreamBaseDatasource implements IS
|
|
|
53
53
|
constructor(options: StreamDatasourceOptions);
|
|
54
54
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
55
55
|
private sortMapByNumericKey;
|
|
56
|
-
|
|
56
|
+
dataLogoff(): void;
|
|
57
57
|
private restartSubscription;
|
|
58
58
|
private getOrderByAndToBeSortedColIds;
|
|
59
|
+
private getAvailableIndexes;
|
|
60
|
+
private getAvailableIndexFields;
|
|
59
61
|
private handleCurrentStreamLoad;
|
|
60
62
|
private buildCriteriaMatchFromFilters;
|
|
61
63
|
private criteriaFromFilters;
|
|
@@ -212,11 +214,6 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
212
214
|
readonly DOCUMENT_TYPE_NODE: number;
|
|
213
215
|
readonly ELEMENT_NODE: number;
|
|
214
216
|
readonly ENTITY_NODE: number;
|
|
215
|
-
/**
|
|
216
|
-
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
217
|
-
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
218
|
-
* @alpha
|
|
219
|
-
*/
|
|
220
217
|
readonly ENTITY_REFERENCE_NODE: number;
|
|
221
218
|
readonly NOTATION_NODE: number;
|
|
222
219
|
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
@@ -261,7 +258,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
261
258
|
ariaValueMin: string;
|
|
262
259
|
ariaValueNow: string;
|
|
263
260
|
ariaValueText: string;
|
|
264
|
-
role: string;
|
|
261
|
+
role: string; /**
|
|
262
|
+
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
263
|
+
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
264
|
+
* @alpha
|
|
265
|
+
*/
|
|
265
266
|
animate(keyframes: PropertyIndexedKeyframes | Keyframe[], options?: number | KeyframeAnimationOptions): Animation;
|
|
266
267
|
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
267
268
|
after(...nodes: (string | Node)[]): void;
|
|
@@ -400,6 +401,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
400
401
|
applyFuncName: string;
|
|
401
402
|
applyAsyncFuncName: string;
|
|
402
403
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
404
|
+
/**
|
|
405
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
406
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
407
|
+
* @internal
|
|
408
|
+
*/
|
|
409
|
+
private reloadResourceData;
|
|
403
410
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
404
411
|
pagination: boolean;
|
|
405
412
|
private indexes;
|
|
@@ -408,8 +415,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
408
415
|
connectedCallback(): void;
|
|
409
416
|
disconnectedCallback(): void;
|
|
410
417
|
deepClone(): Node;
|
|
418
|
+
deinit(): void;
|
|
411
419
|
init(): void;
|
|
412
|
-
reset(): void;
|
|
413
420
|
restart(): void;
|
|
414
421
|
private clearRowData;
|
|
415
422
|
private getResourceIndexes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EAEnB,kBAAkB,EAClB,2BAA2B,EAG5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,IAAI,EACJ,OAAO,EAKP,wBAAwB,EAIxB,cAAc,EAGd,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAOhF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAEnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,oBAAqB,YAAW,qBAAqB;IACnF,IAAI,EAAG,IAAI,CAAC;IACT,OAAO,EAAG,OAAO,CAAC;IAE3B,gBAAgB,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IAC7D,OAAO,CAAC,YAAY,CAAS;IAC7B,cAAc,EAAE,GAAG,CAAC;IACpB,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,eAAe,CAAmB;IAE1C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAU;IAE5B,eAAe,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,iBAAiB,SAAK;IAEtB;;;OAGG;IACH,iBAAiB,SAAK;IAEtB,OAAO,CAAC,QAAQ,CAAS;IAEzB,OAAO,CAAC,mBAAmB,CAAK;IAChC,OAAO,CAAC,cAAc,CAAK;IAE3B,OAAO,CAAC,kBAAkB,CAAM;IAChC,OAAO,CAAC,qBAAqB,CAAoB;IACjD,OAAO,CAAC,gBAAgB,CAAkB;gBAE9B,OAAO,EAAE,uBAAuB;IAiBtC,OAAO,CAAC,MAAM,EAAE,wBAAwB;
|
|
1
|
+
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EAEnB,kBAAkB,EAClB,2BAA2B,EAG5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,IAAI,EACJ,OAAO,EAKP,wBAAwB,EAIxB,cAAc,EAGd,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAQvC,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAOhF;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAEnC,OAAO,CAAC,EAAE,MA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
|
removeAttribute(qualifiedName: string): void;
|
|
96
96
|
removeAttributeNS(namespace: string, localName: string): void;
|
|
97
97
|
removeAttributeNode(attr: Attr): Attr;
|
|
98
|
-
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
99
|
-
* Initializes the datasource and loads the data for the grid.
|
|
100
|
-
* Handles both snapshot and stream data (for both REQUEST_SERVER and DATASERVER resource types).
|
|
101
|
-
*
|
|
102
|
-
* @param withFullInit - if true, will call datasource.init() with requiresMetadataFetch = true, fetching fresh metadata
|
|
103
|
-
* @internal
|
|
104
|
-
*/
|
|
98
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
105
99
|
requestPointerLock(): void;
|
|
106
100
|
scroll(options?: ScrollToOptions): void;
|
|
107
101
|
scroll(x: number, y: number): 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,KAAK,EAAU,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EACL,IAAI,EACJ,UAAU,EAaX,MAAM,+BAA+B,CAAC;AAMvC,OAAO,EAAE,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,KAAK,EAAU,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EACL,IAAI,EACJ,UAAU,EAaX,MAAM,+BAA+B,CAAC;AAMvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AKG;YACW,kBAAkB;IAYhC;;;;;;OAMG;YACW,gBAAgB;IA0D9B,OAAO,CAAC,cAAc;IActB,YAAY,CAAC,MAAM,KAAA;IAOnB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;IA2C9B,OAAO,CAAC,mBAAmB;IAsB3B,OAAO,CAAC,eAAe;IAwEvB,OAAO,CAAC,aAAa;IAMd,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;CAGR"}
|
|
@@ -72,12 +72,21 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
72
72
|
const coldIdBeingSorted = this.currentSortModel[0].colId; // Not allowing multiple sorts by user
|
|
73
73
|
const sortTypeBeingApplied = this.currentSortModel[0].sort;
|
|
74
74
|
const orderByAndToBeSortedColIds = this.getOrderByAndToBeSortedColIds(this.resourceIndexes, coldIdBeingSorted);
|
|
75
|
-
orderByAndToBeSortedColIds
|
|
76
|
-
this.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
if (!orderByAndToBeSortedColIds) {
|
|
76
|
+
const availableIndexes = this.getAvailableIndexes(this.resourceIndexes);
|
|
77
|
+
const availableIndexFields = this.getAvailableIndexFields(this.resourceIndexes);
|
|
78
|
+
logger.warn('The FIELD/column (${coldIdBeingSorted}) being sorted is not part of an INDEX, required for the [orderBy] operation. See https://learn.genesis.global/docs/database/data-types/index-entities/');
|
|
79
|
+
logger.debug('Available indexes:', availableIndexes);
|
|
80
|
+
logger.debug('Columns that can be sorted with the available indexes:', availableIndexFields);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
orderByAndToBeSortedColIds.toBeSorted.forEach((colId) => {
|
|
84
|
+
this.currentSortModel.push({ sort: sortTypeBeingApplied, colId });
|
|
85
|
+
});
|
|
86
|
+
this.resourceParams.ORDER_BY = orderByAndToBeSortedColIds.orderBy;
|
|
87
|
+
this.resourceParams.REVERSE = sortTypeBeingApplied === 'desc' ? true : false;
|
|
88
|
+
this.restartSubscription();
|
|
89
|
+
}
|
|
81
90
|
}
|
|
82
91
|
}
|
|
83
92
|
if (this.moreRows && params.request.startRow >= Number(this.maxRows)) {
|
|
@@ -163,6 +172,31 @@ export class StreamDatasource extends StreamBaseDatasource {
|
|
|
163
172
|
}
|
|
164
173
|
}
|
|
165
174
|
}
|
|
175
|
+
getAvailableIndexes(data) {
|
|
176
|
+
const availabeIndexes = [];
|
|
177
|
+
for (const [key] of data) {
|
|
178
|
+
if (key) {
|
|
179
|
+
availabeIndexes.push(key);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return availabeIndexes;
|
|
183
|
+
}
|
|
184
|
+
getAvailableIndexFields(data) {
|
|
185
|
+
const innermostValues = [];
|
|
186
|
+
function traverse(items) {
|
|
187
|
+
for (const item of items) {
|
|
188
|
+
if (item !== null) {
|
|
189
|
+
innermostValues.push(item);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
for (const [key, value] of data) {
|
|
194
|
+
if (key !== null && value !== null) {
|
|
195
|
+
traverse(value);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return innermostValues;
|
|
199
|
+
}
|
|
166
200
|
handleCurrentStreamLoad(result) {
|
|
167
201
|
var _a;
|
|
168
202
|
if (!result)
|
|
@@ -253,6 +287,7 @@ __decorate([
|
|
|
253
287
|
Connect
|
|
254
288
|
], StreamDatasource.prototype, "connect", void 0);
|
|
255
289
|
const criteriaDelimiter = ';';
|
|
290
|
+
const withoutColumnDefs = null;
|
|
256
291
|
/**
|
|
257
292
|
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
258
293
|
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
@@ -266,14 +301,27 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
266
301
|
this.pagination = false;
|
|
267
302
|
}
|
|
268
303
|
criteriaChanged(oldCriteria, newCriteria) {
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
// TODO: check grid-pro-genesis-datasource criteriaChanged
|
|
273
|
-
if (!startingCriteria && criteriaNotDuplicate) {
|
|
274
|
-
this.restart();
|
|
304
|
+
const criteriaIsNotDuplicate = oldCriteria !== normaliseCriteria(newCriteria, criteriaDelimiter);
|
|
305
|
+
if (this.ssrmDatasource && criteriaIsNotDuplicate) {
|
|
306
|
+
this.reloadResourceData();
|
|
275
307
|
}
|
|
276
308
|
}
|
|
309
|
+
/**
|
|
310
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
311
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
312
|
+
* @internal
|
|
313
|
+
*/
|
|
314
|
+
reloadResourceData() {
|
|
315
|
+
var _a, _b, _c;
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
this.ssrmDatasource.dataLogoff();
|
|
318
|
+
this.clearRowData(withoutColumnDefs);
|
|
319
|
+
this.ssrmDatasource = undefined;
|
|
320
|
+
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
321
|
+
(_c = (_b = this.agGrid) === null || _b === void 0 ? void 0 : _b.gridApi) === null || _c === void 0 ? void 0 : _c.showLoadingOverlay();
|
|
322
|
+
this.init();
|
|
323
|
+
});
|
|
324
|
+
}
|
|
277
325
|
resourceNameChanged(oldValue, newValue) {
|
|
278
326
|
if (!oldValue || oldValue === newValue)
|
|
279
327
|
return;
|
|
@@ -294,7 +342,7 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
294
342
|
DOM.queueUpdate(() => {
|
|
295
343
|
if (!shouldRunDisconnect)
|
|
296
344
|
return;
|
|
297
|
-
this.
|
|
345
|
+
this.deinit();
|
|
298
346
|
});
|
|
299
347
|
}
|
|
300
348
|
deepClone() {
|
|
@@ -303,6 +351,13 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
303
351
|
copy.deferredColumnStates = structuredClone(this.deferredColumnStates);
|
|
304
352
|
return copy;
|
|
305
353
|
}
|
|
354
|
+
deinit() {
|
|
355
|
+
var _a;
|
|
356
|
+
this.clearRowData();
|
|
357
|
+
this.ssrmDatasource = undefined;
|
|
358
|
+
this.originalFieldDef = undefined;
|
|
359
|
+
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
360
|
+
}
|
|
306
361
|
init() {
|
|
307
362
|
if (this.agGrid && this.resourceName && this.connect.isConnected) {
|
|
308
363
|
this.agGrid.gridOptions = Object.assign({ getRowId: (params) => {
|
|
@@ -349,25 +404,22 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
349
404
|
}
|
|
350
405
|
logger.warn(`Application not connected, falling back to local columnDefs/rowData`);
|
|
351
406
|
}
|
|
352
|
-
reset() {
|
|
353
|
-
var _a;
|
|
354
|
-
this.clearRowData();
|
|
355
|
-
this.ssrmDatasource = undefined;
|
|
356
|
-
this.originalFieldDef = undefined;
|
|
357
|
-
(_a = this.agGrid.gridApi) === null || _a === void 0 ? void 0 : _a.refreshServerSide({ purge: true });
|
|
358
|
-
}
|
|
359
407
|
restart() {
|
|
360
|
-
this.
|
|
408
|
+
this.deinit();
|
|
361
409
|
this.init();
|
|
362
410
|
}
|
|
363
|
-
clearRowData() {
|
|
411
|
+
clearRowData(withColumnDefs = true) {
|
|
364
412
|
var _a, _b, _c, _d;
|
|
365
|
-
|
|
366
|
-
|
|
413
|
+
this.rowData = new Map();
|
|
414
|
+
if (withColumnDefs) {
|
|
415
|
+
(_b = (_a = this.agGrid) === null || _a === void 0 ? void 0 : _a.gridApi) === null || _b === void 0 ? void 0 : _b.setColumnDefs([]);
|
|
416
|
+
}
|
|
417
|
+
this.agTransaction = { remove: [] };
|
|
367
418
|
(_c = this.agGrid.gridApi) === null || _c === void 0 ? void 0 : _c.forEachNode((node) => {
|
|
368
|
-
agTransaction.remove.push(node.data);
|
|
419
|
+
this.agTransaction.remove.push(node.data);
|
|
369
420
|
});
|
|
370
|
-
(_d = this.agGrid.gridApi) === null || _d === void 0 ? void 0 : _d.applyServerSideTransaction(agTransaction);
|
|
421
|
+
(_d = this.agGrid.gridApi) === null || _d === void 0 ? void 0 : _d.applyServerSideTransaction(this.agTransaction);
|
|
422
|
+
this.agTransaction = undefined;
|
|
371
423
|
}
|
|
372
424
|
getResourceIndexes(avaialbleIndexes) {
|
|
373
425
|
const resourceIndexesMap = new Map();
|
|
@@ -89,18 +89,18 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
89
89
|
if (this.agGrid &&
|
|
90
90
|
this.datasource.validResourceName(this.resourceName) &&
|
|
91
91
|
this.connect.isConnected) {
|
|
92
|
+
const meta = yield this.connect.getMetadata(this.resourceName);
|
|
93
|
+
if (!meta) {
|
|
94
|
+
// TODO: improve getMetadata implementation to return error details
|
|
95
|
+
const message = `No metadata found for ${this.resourceName}, datasource will not work. Falling back to local columnDefs/rowData.`;
|
|
96
|
+
logger.warn(message);
|
|
97
|
+
this.handleErrors({ ERROR: message });
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
this.isRequestServer = meta.TYPE === ResourceType.REQUEST_SERVER;
|
|
92
101
|
const gridOptions = Object.assign({ getRowId: (params) => params.data[this.rowId] }, this.deferredGridOptions);
|
|
93
102
|
this.agGrid.gridOptions = Object.assign({}, gridOptions);
|
|
94
103
|
this.agGrid.addEventListener('onGridReady', () => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
const meta = yield this.connect.getMetadata(this.resourceName);
|
|
96
|
-
if (!meta) {
|
|
97
|
-
// TODO: improve getMetadata implementation to return error details
|
|
98
|
-
const message = `No metadata found for ${this.resourceName}, datasource will not work. Falling back to local columnDefs/rowData.`;
|
|
99
|
-
logger.warn(message);
|
|
100
|
-
this.handleErrors({ ERROR: message });
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
this.isRequestServer = meta.TYPE === ResourceType.REQUEST_SERVER;
|
|
104
104
|
yield this.loadResourceData();
|
|
105
105
|
}), { once: true });
|
|
106
106
|
const filterDebounceTime = 600;
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -1911,13 +1911,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1911
1911
|
removeAttribute(qualifiedName: string): void;
|
|
1912
1912
|
removeAttributeNS(namespace: string, localName: string): void;
|
|
1913
1913
|
removeAttributeNode(attr: Attr): Attr;
|
|
1914
|
-
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
1915
|
-
* Initializes the datasource and loads the data for the grid.
|
|
1916
|
-
* Handles both snapshot and stream data (for both REQUEST_SERVER and DATASERVER resource types).
|
|
1917
|
-
*
|
|
1918
|
-
* @param withFullInit - if true, will call datasource.init() with requiresMetadataFetch = true, fetching fresh metadata
|
|
1919
|
-
* @internal
|
|
1920
|
-
*/
|
|
1914
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
1921
1915
|
requestPointerLock(): void;
|
|
1922
1916
|
scroll(options?: ScrollToOptions): void;
|
|
1923
1917
|
scroll(x: number, y: number): void;
|
|
@@ -2176,6 +2170,12 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
2176
2170
|
applyFuncName: string;
|
|
2177
2171
|
applyAsyncFuncName: string;
|
|
2178
2172
|
criteriaChanged(oldCriteria: string, newCriteria: string): void;
|
|
2173
|
+
/**
|
|
2174
|
+
* Resets the grid data while keeping columnDefs and sends a DATA_LOGOFF message if it's a stream.
|
|
2175
|
+
* @remarks This is used when the grid is already initialized and we want to reload the data due to a criteria/filter change.
|
|
2176
|
+
* @internal
|
|
2177
|
+
*/
|
|
2178
|
+
private reloadResourceData;
|
|
2179
2179
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
2180
2180
|
pagination: boolean;
|
|
2181
2181
|
private indexes;
|
|
@@ -2184,8 +2184,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
2184
2184
|
connectedCallback(): void;
|
|
2185
2185
|
disconnectedCallback(): void;
|
|
2186
2186
|
deepClone(): Node;
|
|
2187
|
+
deinit(): void;
|
|
2187
2188
|
init(): void;
|
|
2188
|
-
reset(): void;
|
|
2189
2189
|
restart(): void;
|
|
2190
2190
|
private clearRowData;
|
|
2191
2191
|
private getResourceIndexes;
|
|
@@ -2349,11 +2349,6 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
2349
2349
|
readonly DOCUMENT_TYPE_NODE: number;
|
|
2350
2350
|
readonly ELEMENT_NODE: number;
|
|
2351
2351
|
readonly ENTITY_NODE: number;
|
|
2352
|
-
/**
|
|
2353
|
-
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
2354
|
-
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
2355
|
-
* @alpha
|
|
2356
|
-
*/
|
|
2357
2352
|
readonly ENTITY_REFERENCE_NODE: number;
|
|
2358
2353
|
readonly NOTATION_NODE: number;
|
|
2359
2354
|
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
@@ -2398,7 +2393,11 @@ declare const GridProServerSideDatasource_base: (new (...args: any[]) => {
|
|
|
2398
2393
|
ariaValueMin: string;
|
|
2399
2394
|
ariaValueNow: string;
|
|
2400
2395
|
ariaValueText: string;
|
|
2401
|
-
role: string;
|
|
2396
|
+
role: string; /**
|
|
2397
|
+
* A Genesis Datasource element, for server-side | SSRM-compatible data fetching and used exclusively by the GridPro element.
|
|
2398
|
+
* @remarks Only supports Server-Side Row Model. Requires `@ag-grid-enterprise/server-side-row-model` setup and valid AG Grid Enterprise license.
|
|
2399
|
+
* @alpha
|
|
2400
|
+
*/
|
|
2402
2401
|
animate(keyframes: PropertyIndexedKeyframes | Keyframe[], options?: number | KeyframeAnimationOptions): Animation;
|
|
2403
2402
|
getAnimations(options?: GetAnimationsOptions): Animation[];
|
|
2404
2403
|
after(...nodes: (string | Node)[]): void;
|
|
@@ -2712,9 +2711,11 @@ export declare class StreamDatasource extends StreamBaseDatasource implements IS
|
|
|
2712
2711
|
constructor(options: StreamDatasourceOptions);
|
|
2713
2712
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
2714
2713
|
private sortMapByNumericKey;
|
|
2715
|
-
|
|
2714
|
+
dataLogoff(): void;
|
|
2716
2715
|
private restartSubscription;
|
|
2717
2716
|
private getOrderByAndToBeSortedColIds;
|
|
2717
|
+
private getAvailableIndexes;
|
|
2718
|
+
private getAvailableIndexFields;
|
|
2718
2719
|
private handleCurrentStreamLoad;
|
|
2719
2720
|
private buildCriteriaMatchFromFilters;
|
|
2720
2721
|
private criteriaFromFilters;
|
package/docs/api-report.md
CHANGED
|
@@ -1015,6 +1015,8 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1015
1015
|
// (undocumented)
|
|
1016
1016
|
deepClone(): Node;
|
|
1017
1017
|
// (undocumented)
|
|
1018
|
+
deinit(): void;
|
|
1019
|
+
// (undocumented)
|
|
1018
1020
|
disconnectedCallback(): void;
|
|
1019
1021
|
// (undocumented)
|
|
1020
1022
|
init(): void;
|
|
@@ -1023,8 +1025,6 @@ export class GridProServerSideDatasource extends GridProServerSideDatasource_bas
|
|
|
1023
1025
|
// (undocumented)
|
|
1024
1026
|
get params(): any;
|
|
1025
1027
|
// (undocumented)
|
|
1026
|
-
reset(): void;
|
|
1027
|
-
// (undocumented)
|
|
1028
1028
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
1029
1029
|
// (undocumented)
|
|
1030
1030
|
restart(): void;
|
|
@@ -1199,6 +1199,8 @@ export class StreamDatasource extends StreamBaseDatasource implements IServerSid
|
|
|
1199
1199
|
// (undocumented)
|
|
1200
1200
|
connect: Connect;
|
|
1201
1201
|
// (undocumented)
|
|
1202
|
+
dataLogoff(): void;
|
|
1203
|
+
// (undocumented)
|
|
1202
1204
|
dataserverStream: SocketObservable<FilteredDataServerResult>;
|
|
1203
1205
|
// (undocumented)
|
|
1204
1206
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
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.147.1-alpha-
|
|
4
|
+
"version": "14.147.1-alpha-e9dbeac.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"test:debug": "genx test --debug"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@genesislcap/foundation-testing": "14.147.1-alpha-
|
|
34
|
-
"@genesislcap/genx": "14.147.1-alpha-
|
|
35
|
-
"@genesislcap/rollup-builder": "14.147.1-alpha-
|
|
36
|
-
"@genesislcap/ts-builder": "14.147.1-alpha-
|
|
37
|
-
"@genesislcap/uvu-playwright-builder": "14.147.1-alpha-
|
|
38
|
-
"@genesislcap/vite-builder": "14.147.1-alpha-
|
|
39
|
-
"@genesislcap/webpack-builder": "14.147.1-alpha-
|
|
33
|
+
"@genesislcap/foundation-testing": "14.147.1-alpha-e9dbeac.0",
|
|
34
|
+
"@genesislcap/genx": "14.147.1-alpha-e9dbeac.0",
|
|
35
|
+
"@genesislcap/rollup-builder": "14.147.1-alpha-e9dbeac.0",
|
|
36
|
+
"@genesislcap/ts-builder": "14.147.1-alpha-e9dbeac.0",
|
|
37
|
+
"@genesislcap/uvu-playwright-builder": "14.147.1-alpha-e9dbeac.0",
|
|
38
|
+
"@genesislcap/vite-builder": "14.147.1-alpha-e9dbeac.0",
|
|
39
|
+
"@genesislcap/webpack-builder": "14.147.1-alpha-e9dbeac.0",
|
|
40
40
|
"rimraf": "^3.0.2"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@genesislcap/foundation-comms": "14.147.1-alpha-
|
|
44
|
-
"@genesislcap/foundation-logger": "14.147.1-alpha-
|
|
45
|
-
"@genesislcap/foundation-ui": "14.147.1-alpha-
|
|
46
|
-
"@genesislcap/foundation-utils": "14.147.1-alpha-
|
|
43
|
+
"@genesislcap/foundation-comms": "14.147.1-alpha-e9dbeac.0",
|
|
44
|
+
"@genesislcap/foundation-logger": "14.147.1-alpha-e9dbeac.0",
|
|
45
|
+
"@genesislcap/foundation-ui": "14.147.1-alpha-e9dbeac.0",
|
|
46
|
+
"@genesislcap/foundation-utils": "14.147.1-alpha-e9dbeac.0",
|
|
47
47
|
"@microsoft/fast-colors": "^5.3.1",
|
|
48
48
|
"@microsoft/fast-components": "^2.30.6",
|
|
49
49
|
"@microsoft/fast-element": "^1.12.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
70
|
"customElements": "dist/custom-elements.json",
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "409d501207d5051f3a556b0a6062feb84a84ae99"
|
|
72
72
|
}
|