@genesislcap/grid-pro 15.10.1 → 15.10.3
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 +390 -344
- package/dist/dts/datasource/server-side.datasource.d.ts +2 -0
- 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 +7 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/dts/react.d.ts +9 -9
- package/dist/esm/datasource/server-side.datasource.js +79 -71
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +11 -3
- package/dist/grid-pro.d.ts +9 -1
- package/dist/react.cjs +6 -6
- package/dist/react.mjs +5 -5
- package/package.json +14 -14
|
@@ -437,6 +437,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
437
437
|
*/
|
|
438
438
|
private removeServerSideSortIndicatorStyling;
|
|
439
439
|
init(): Promise<void>;
|
|
440
|
+
private clearReadyListener;
|
|
441
|
+
private onDatasourceReady;
|
|
440
442
|
destroy(): Promise<void>;
|
|
441
443
|
restart(): Promise<void>;
|
|
442
444
|
private clearRowData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-side.datasource.d.ts","sourceRoot":"","sources":["../../../src/datasource/server-side.datasource.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,EACV,iBAAiB,EAYlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,cAAc,EAEf,MAAM,+BAA+B,CAAC;AAYvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;;;;;;;;kBA8DhC,CAAA;;;;;;;;8BAmBgD,CAAC,cAAe,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAgB3E,CAAC;4IAGwC,CAAA;wFAKlB,CAAC;+IAIT,CAAC;2FAGV,CAAC;;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G;YACW,kBAAkB;IA+BhC;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB,CAA+B;IAEzD;;;;;;;;;OASG;IACH,OAAO,CAAC,0BAA0B,CAAS;IAE3C;;;;;;OAMG;IACI,uBAAuB;IAM9B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,wBAAwB;IAsEhC,OAAO,CAAC,yBAAyB;YAyCnB,sBAAsB;YA2DtB,eAAe;IAmBpB,gBAAgB,CAAC,WAAW,EAAE,GAAG,GAAG,GAAG;IAIvC,QAAQ;CAGlB"}
|
|
@@ -136,7 +136,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
136
136
|
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
137
137
|
setHTMLUnsafe(html: string): void;
|
|
138
138
|
setPointerCapture(pointerId: number): void;
|
|
139
|
-
toggleAttribute(qualifiedName: string, force
|
|
139
|
+
toggleAttribute(qualifiedName: string, force? /**
|
|
140
|
+
* Sets the columnDefs and rowData for the grid.
|
|
141
|
+
* @remarks This should only happen once, when the grid is first initialized. Follow up updates will use transactions.
|
|
142
|
+
* @internal
|
|
143
|
+
*/: boolean): boolean;
|
|
140
144
|
webkitMatchesSelector(selectors: string): boolean;
|
|
141
145
|
textContent: string;
|
|
142
146
|
readonly baseURI: string;
|
|
@@ -425,6 +429,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
425
429
|
private _sourceRef;
|
|
426
430
|
private _nextOffset;
|
|
427
431
|
private _loadMoreCount;
|
|
432
|
+
private readonly onDatasourceReady;
|
|
428
433
|
connectedCallback(): void;
|
|
429
434
|
disconnectedCallback(): void;
|
|
430
435
|
deepClone(): Node;
|
|
@@ -437,6 +442,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
437
442
|
* @remarks This method is called automatically when the element is connected to the DOM.
|
|
438
443
|
*/
|
|
439
444
|
init(keepColDefsOnClearRowData?: boolean): Promise<void>;
|
|
445
|
+
private clearReadyListener;
|
|
440
446
|
/**
|
|
441
447
|
* Destroys the datasource, resetting it to its initial state.
|
|
442
448
|
* @public
|
|
@@ -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":"AACA,OAAO,EACL,iBAAiB,EAUlB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,qBAAqB,EAAqB,MAAM,+BAA+B,CAAC;AAwBzF;;GAEG;AACH,UAAU,eAAe;IACvB,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;;;;;;;;kBAwBwF,CAAC;;;;;;;;8BAiDjF,CAAC,cACN,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":"AACA,OAAO,EACL,iBAAiB,EAUlB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,EAAE,qBAAqB,EAAqB,MAAM,+BAA+B,CAAC;AAwBzF;;GAEG;AACH,UAAU,eAAe;IACvB,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;IACZ,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;;;;;;;;kBAwBwF,CAAC;;;;;;;;8BAiDjF,CAAC,cACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAmCyC,CAAC;4IASpC,CAAA;wFAKL,CAAF;+IAE6D,CAAC;2FAE/B,CAAC;;;;;;;;;;;;;;;;;;;;;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C;;;;;OAKG;cACgB,iBAAiB,IAAI,iBAAiB;IAazD;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAc1B;;;;OAIG;IACH,OAAO,CAAC,2BAA2B;IAQnC;;;;;;OAMG;IACM,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE;IAqBlD;;;OAGG;IACH,OAAO,CAAC,cAAc;IAQb,QAAQ;CA+BlB"}
|
package/dist/dts/react.d.ts
CHANGED
|
@@ -80,15 +80,6 @@ export declare const GridPro: React.ForwardRefExoticComponent<
|
|
|
80
80
|
>;
|
|
81
81
|
export type GridProRef = GridProWC;
|
|
82
82
|
|
|
83
|
-
export declare const GridProCell: React.ForwardRefExoticComponent<
|
|
84
|
-
React.PropsWithChildren<
|
|
85
|
-
Omit<PublicOf<GridProCellWC>, 'children' | 'style'> &
|
|
86
|
-
HTMLWCProps & {
|
|
87
|
-
}
|
|
88
|
-
> & React.RefAttributes<GridProCellWC>
|
|
89
|
-
>;
|
|
90
|
-
export type GridProCellRef = GridProCellWC;
|
|
91
|
-
|
|
92
83
|
export declare const DateEditor: React.ForwardRefExoticComponent<
|
|
93
84
|
React.PropsWithChildren<
|
|
94
85
|
Omit<PublicOf<DateEditorWC>, 'children' | 'style'> &
|
|
@@ -134,6 +125,15 @@ export declare const StringEditor: React.ForwardRefExoticComponent<
|
|
|
134
125
|
>;
|
|
135
126
|
export type StringEditorRef = StringEditorWC;
|
|
136
127
|
|
|
128
|
+
export declare const GridProCell: React.ForwardRefExoticComponent<
|
|
129
|
+
React.PropsWithChildren<
|
|
130
|
+
Omit<PublicOf<GridProCellWC>, 'children' | 'style'> &
|
|
131
|
+
HTMLWCProps & {
|
|
132
|
+
}
|
|
133
|
+
> & React.RefAttributes<GridProCellWC>
|
|
134
|
+
>;
|
|
135
|
+
export type GridProCellRef = GridProCellWC;
|
|
136
|
+
|
|
137
137
|
export declare const ActionRenderer: React.ForwardRefExoticComponent<
|
|
138
138
|
React.PropsWithChildren<
|
|
139
139
|
Omit<PublicOf<ActionRendererWC>, 'children' | 'style'> &
|
|
@@ -99,6 +99,77 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
99
99
|
this.liveUpdates = false;
|
|
100
100
|
this.request = {};
|
|
101
101
|
this.sortIndicatorCSSDestroy = null;
|
|
102
|
+
this.onDatasourceReady = (_event) => __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const initOK = yield this.initializeDatasource(this.datasourceOptions(), true, false);
|
|
104
|
+
if (!initOK) {
|
|
105
|
+
logger.debug(`Genesis Datasource init failed for ${this.resourceName}`);
|
|
106
|
+
this.clearRowData();
|
|
107
|
+
this.setDisconnected(true);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (!this.isSsrmSupportedForResource()) {
|
|
111
|
+
this.refuseServerSideDatasource();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this.$emit(gridProGenesisDatasourceEventNames.dataInit);
|
|
115
|
+
this.setDisconnected(false);
|
|
116
|
+
this.indexes = this.getResourceIndexes(this.datasource.availableIndexes, this.datasource.availableSortableFields);
|
|
117
|
+
const fieldMetadata = toFieldMetadata(this.datasource.originalFieldDef);
|
|
118
|
+
const agColumnDefs = yield this.getAgColumnDefs(fieldMetadata);
|
|
119
|
+
// Emit event to set column definitions
|
|
120
|
+
this.$emit(datasourceEventNames.schemaUpdated, {
|
|
121
|
+
schema: agColumnDefs,
|
|
122
|
+
metadata: fieldMetadata,
|
|
123
|
+
});
|
|
124
|
+
if (this.isRequestServer) {
|
|
125
|
+
// Enable polling if not in snapshot mode and polling is not disabled
|
|
126
|
+
const usePolling = !this.isSnapshot && !this.disablePolling;
|
|
127
|
+
this.ssrmDatasource = new ReqRepServerSideDatasource({
|
|
128
|
+
createReqRepRequestFunc: this.createReqRepRequest.bind(this),
|
|
129
|
+
createReqRepStreamFunc: usePolling ? this.createReqRepStream.bind(this) : undefined,
|
|
130
|
+
onPollingUpdateFunc: usePolling ? this.applyReqRepPollingUpdate.bind(this) : undefined,
|
|
131
|
+
resetPreviousPollResultFunc: usePolling
|
|
132
|
+
? this.resetPreviousPollResult.bind(this)
|
|
133
|
+
: undefined,
|
|
134
|
+
usePolling: usePolling,
|
|
135
|
+
reloadResourceDataFunc: this.reloadResourceData.bind(this),
|
|
136
|
+
errorHandlerFunc: this.handleErrors.bind(this),
|
|
137
|
+
onNoDataAvailableFunc: () => this.$emit(datasourceEventNames.noDataAvailable),
|
|
138
|
+
onDataAvailableFunc: () => this.$emit(datasourceEventNames.loadingFinished),
|
|
139
|
+
resourceName: this.resourceName,
|
|
140
|
+
resourceParams: this.datasource.requestOnlyParams,
|
|
141
|
+
resourceIndexes: this.indexes,
|
|
142
|
+
resourceColDefs: this.datasource.originalFieldDef,
|
|
143
|
+
maxRows: +this.maxRows,
|
|
144
|
+
maxView: +this.maxView,
|
|
145
|
+
rowId: this.rowId,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
this.ssrmDatasource = new DataserverServerSideDatasource({
|
|
150
|
+
createDataserverStreamFunc: this.createDataserverStream.bind(this),
|
|
151
|
+
reloadResourceDataFunc: this.reloadResourceData.bind(this),
|
|
152
|
+
errorHandlerFunc: this.handleErrors.bind(this),
|
|
153
|
+
onNoDataAvailableFunc: () => this.$emit(datasourceEventNames.noDataAvailable),
|
|
154
|
+
onDataAvailableFunc: () => this.$emit(datasourceEventNames.loadingFinished),
|
|
155
|
+
resourceName: this.resourceName,
|
|
156
|
+
resourceParams: this.datasource.dataserverOnlyParams,
|
|
157
|
+
resourceIndexes: this.indexes,
|
|
158
|
+
resourceColDefs: this.datasource.originalFieldDef,
|
|
159
|
+
maxRows: +this.maxRows,
|
|
160
|
+
maxView: +this.maxView,
|
|
161
|
+
rowId: this.rowId,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
// Emit event to set server side datasource
|
|
165
|
+
this.$emit(datasourceEventNames.setServerSideDatasource, {
|
|
166
|
+
datasource: this.ssrmDatasource,
|
|
167
|
+
});
|
|
168
|
+
// Emit event to restore cached filter config
|
|
169
|
+
this.$emit(datasourceEventNames.filtersRestored);
|
|
170
|
+
// Apply custom sort indicator styling for server-side datasource
|
|
171
|
+
this.applyServerSideSortIndicatorStyling();
|
|
172
|
+
});
|
|
102
173
|
/**
|
|
103
174
|
* Stores the previous poll result for comparison (poll N vs poll N-1).
|
|
104
175
|
* @remarks
|
|
@@ -270,85 +341,22 @@ let GridProServerSideDatasource = class GridProServerSideDatasource extends Life
|
|
|
270
341
|
keepColDefsOnClearRowData: this.keepColDefsOnClearRowData,
|
|
271
342
|
});
|
|
272
343
|
// TODO: refactor this to prevent rendering datasource component until grid is ready
|
|
273
|
-
this.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
this.clearRowData();
|
|
278
|
-
this.setDisconnected(true);
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
if (!this.isSsrmSupportedForResource()) {
|
|
282
|
-
this.refuseServerSideDatasource();
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
this.$emit(gridProGenesisDatasourceEventNames.dataInit);
|
|
286
|
-
this.setDisconnected(false);
|
|
287
|
-
this.indexes = this.getResourceIndexes(this.datasource.availableIndexes, this.datasource.availableSortableFields);
|
|
288
|
-
const fieldMetadata = toFieldMetadata(this.datasource.originalFieldDef);
|
|
289
|
-
const agColumnDefs = yield this.getAgColumnDefs(fieldMetadata);
|
|
290
|
-
// Emit event to set column definitions
|
|
291
|
-
this.$emit(datasourceEventNames.schemaUpdated, {
|
|
292
|
-
schema: agColumnDefs,
|
|
293
|
-
metadata: fieldMetadata,
|
|
294
|
-
});
|
|
295
|
-
if (this.isRequestServer) {
|
|
296
|
-
// Enable polling if not in snapshot mode and polling is not disabled
|
|
297
|
-
const usePolling = !this.isSnapshot && !this.disablePolling;
|
|
298
|
-
this.ssrmDatasource = new ReqRepServerSideDatasource({
|
|
299
|
-
createReqRepRequestFunc: this.createReqRepRequest.bind(this),
|
|
300
|
-
createReqRepStreamFunc: usePolling ? this.createReqRepStream.bind(this) : undefined,
|
|
301
|
-
onPollingUpdateFunc: usePolling ? this.applyReqRepPollingUpdate.bind(this) : undefined,
|
|
302
|
-
resetPreviousPollResultFunc: usePolling
|
|
303
|
-
? this.resetPreviousPollResult.bind(this)
|
|
304
|
-
: undefined,
|
|
305
|
-
usePolling: usePolling,
|
|
306
|
-
reloadResourceDataFunc: this.reloadResourceData.bind(this),
|
|
307
|
-
errorHandlerFunc: this.handleErrors.bind(this),
|
|
308
|
-
onNoDataAvailableFunc: () => this.$emit(datasourceEventNames.noDataAvailable),
|
|
309
|
-
onDataAvailableFunc: () => this.$emit(datasourceEventNames.loadingFinished),
|
|
310
|
-
resourceName: this.resourceName,
|
|
311
|
-
resourceParams: this.datasource.requestOnlyParams,
|
|
312
|
-
resourceIndexes: this.indexes,
|
|
313
|
-
resourceColDefs: this.datasource.originalFieldDef,
|
|
314
|
-
maxRows: +this.maxRows,
|
|
315
|
-
maxView: +this.maxView,
|
|
316
|
-
rowId: this.rowId,
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
else {
|
|
320
|
-
this.ssrmDatasource = new DataserverServerSideDatasource({
|
|
321
|
-
createDataserverStreamFunc: this.createDataserverStream.bind(this),
|
|
322
|
-
reloadResourceDataFunc: this.reloadResourceData.bind(this),
|
|
323
|
-
errorHandlerFunc: this.handleErrors.bind(this),
|
|
324
|
-
onNoDataAvailableFunc: () => this.$emit(datasourceEventNames.noDataAvailable),
|
|
325
|
-
onDataAvailableFunc: () => this.$emit(datasourceEventNames.loadingFinished),
|
|
326
|
-
resourceName: this.resourceName,
|
|
327
|
-
resourceParams: this.datasource.dataserverOnlyParams,
|
|
328
|
-
resourceIndexes: this.indexes,
|
|
329
|
-
resourceColDefs: this.datasource.originalFieldDef,
|
|
330
|
-
maxRows: +this.maxRows,
|
|
331
|
-
maxView: +this.maxView,
|
|
332
|
-
rowId: this.rowId,
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
// Emit event to set server side datasource
|
|
336
|
-
this.$emit(datasourceEventNames.setServerSideDatasource, {
|
|
337
|
-
datasource: this.ssrmDatasource,
|
|
338
|
-
});
|
|
339
|
-
// Emit event to restore cached filter config
|
|
340
|
-
this.$emit(datasourceEventNames.filtersRestored);
|
|
341
|
-
// Apply custom sort indicator styling for server-side datasource
|
|
342
|
-
this.applyServerSideSortIndicatorStyling();
|
|
343
|
-
}), { once: true });
|
|
344
|
+
this.clearReadyListener();
|
|
345
|
+
this.addEventListener(datasourceEventNames.ready, this.onDatasourceReady, {
|
|
346
|
+
once: true,
|
|
347
|
+
});
|
|
344
348
|
if (!this.resourceName) {
|
|
345
349
|
this.handleErrors('Application not connected or invalid resource name, datasource will not work.', 'unknown');
|
|
346
350
|
}
|
|
347
351
|
});
|
|
348
352
|
}
|
|
353
|
+
clearReadyListener() {
|
|
354
|
+
this.removeEventListener(datasourceEventNames.ready, this.onDatasourceReady);
|
|
355
|
+
}
|
|
349
356
|
destroy() {
|
|
350
357
|
return __awaiter(this, void 0, void 0, function* () {
|
|
351
358
|
var _a, _b;
|
|
359
|
+
this.clearReadyListener();
|
|
352
360
|
this.datasource.destroy();
|
|
353
361
|
(_a = this.liveUpdatesStream) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
354
362
|
this.liveUpdatesStream = undefined;
|
|
@@ -62,6 +62,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
62
62
|
this._isMoreRowsResult = false;
|
|
63
63
|
this._nextOffset = 0;
|
|
64
64
|
this._loadMoreCount = 0;
|
|
65
|
+
this.onDatasourceReady = () => {
|
|
66
|
+
void this.loadResourceData();
|
|
67
|
+
};
|
|
65
68
|
}
|
|
66
69
|
// DatasourceOptions
|
|
67
70
|
criteriaChanged(oldCriteria, newCriteria) {
|
|
@@ -152,9 +155,10 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
152
155
|
options: Object.assign({ getRowId: (params) => params.data[this.rowId] }, this.deferredGridOptions),
|
|
153
156
|
});
|
|
154
157
|
// TODO: instead of listening to ready event, we should only render the datasource slot when the grid is ready
|
|
155
|
-
this.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
this.clearReadyListener();
|
|
159
|
+
this.addEventListener(datasourceEventNames.ready, this.onDatasourceReady, {
|
|
160
|
+
once: true,
|
|
161
|
+
});
|
|
158
162
|
const filterDebounceTime = 600;
|
|
159
163
|
this.updateSub = this.update
|
|
160
164
|
.pipe(skip(1), debounceTime(filterDebounceTime), tap((f) => logger.debug('filters (debounced): ', f)))
|
|
@@ -163,6 +167,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
163
167
|
});
|
|
164
168
|
});
|
|
165
169
|
}
|
|
170
|
+
clearReadyListener() {
|
|
171
|
+
this.removeEventListener(datasourceEventNames.ready, this.onDatasourceReady);
|
|
172
|
+
}
|
|
166
173
|
/**
|
|
167
174
|
* Destroys the datasource, resetting it to its initial state.
|
|
168
175
|
* @public
|
|
@@ -170,6 +177,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
170
177
|
destroy() {
|
|
171
178
|
var _a;
|
|
172
179
|
logger.debug('GridProGenesisDatasource.destroy()', this.resourceName);
|
|
180
|
+
this.clearReadyListener();
|
|
173
181
|
if (this.dataSub) {
|
|
174
182
|
this.dataSub.unsubscribe();
|
|
175
183
|
this.dataSub = undefined;
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -4447,6 +4447,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
4447
4447
|
private _sourceRef;
|
|
4448
4448
|
private _nextOffset;
|
|
4449
4449
|
private _loadMoreCount;
|
|
4450
|
+
private readonly onDatasourceReady;
|
|
4450
4451
|
connectedCallback(): void;
|
|
4451
4452
|
disconnectedCallback(): void;
|
|
4452
4453
|
deepClone(): Node;
|
|
@@ -4459,6 +4460,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
4459
4460
|
* @remarks This method is called automatically when the element is connected to the DOM.
|
|
4460
4461
|
*/
|
|
4461
4462
|
init(keepColDefsOnClearRowData?: boolean): Promise<void>;
|
|
4463
|
+
private clearReadyListener;
|
|
4462
4464
|
/**
|
|
4463
4465
|
* Destroys the datasource, resetting it to its initial state.
|
|
4464
4466
|
* @public
|
|
@@ -4717,7 +4719,11 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
4717
4719
|
setAttributeNodeNS(attr: Attr): Attr | null;
|
|
4718
4720
|
setHTMLUnsafe(html: string): void;
|
|
4719
4721
|
setPointerCapture(pointerId: number): void;
|
|
4720
|
-
toggleAttribute(qualifiedName: string, force
|
|
4722
|
+
toggleAttribute(qualifiedName: string, force? /**
|
|
4723
|
+
* Sets the columnDefs and rowData for the grid.
|
|
4724
|
+
* @remarks This should only happen once, when the grid is first initialized. Follow up updates will use transactions.
|
|
4725
|
+
* @internal
|
|
4726
|
+
*/: boolean): boolean;
|
|
4721
4727
|
webkitMatchesSelector(selectors: string): boolean;
|
|
4722
4728
|
textContent: string;
|
|
4723
4729
|
readonly baseURI: string;
|
|
@@ -5072,6 +5078,8 @@ export declare class GridProServerSideDatasource extends GridProServerSideDataso
|
|
|
5072
5078
|
*/
|
|
5073
5079
|
private removeServerSideSortIndicatorStyling;
|
|
5074
5080
|
init(): Promise<void>;
|
|
5081
|
+
private clearReadyListener;
|
|
5082
|
+
private onDatasourceReady;
|
|
5075
5083
|
destroy(): Promise<void>;
|
|
5076
5084
|
restart(): Promise<void>;
|
|
5077
5085
|
private clearRowData;
|
package/dist/react.cjs
CHANGED
|
@@ -91,11 +91,6 @@ const GridPro = React.forwardRef(function GridPro(props, ref) {
|
|
|
91
91
|
return React.createElement(customElements.getName(GridProWC) ?? '%%prefix%%-grid-pro', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
-
const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
95
|
-
const { children, ...rest } = props;
|
|
96
|
-
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
94
|
const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
100
95
|
const { children, ...rest } = props;
|
|
101
96
|
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
@@ -121,6 +116,11 @@ const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
|
121
116
|
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
122
117
|
});
|
|
123
118
|
|
|
119
|
+
const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
120
|
+
const { children, ...rest } = props;
|
|
121
|
+
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
124
|
const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
125
125
|
const { children, ...rest } = props;
|
|
126
126
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
|
@@ -485,12 +485,12 @@ const MulticolumnDropdown = React.forwardRef(function MulticolumnDropdown(props,
|
|
|
485
485
|
module.exports = {
|
|
486
486
|
GridProBeta,
|
|
487
487
|
GridPro,
|
|
488
|
-
GridProCell,
|
|
489
488
|
DateEditor,
|
|
490
489
|
MultiselectEditor,
|
|
491
490
|
NumberEditor,
|
|
492
491
|
SelectEditor,
|
|
493
492
|
StringEditor,
|
|
493
|
+
GridProCell,
|
|
494
494
|
ActionRenderer,
|
|
495
495
|
ActionsMenuRenderer,
|
|
496
496
|
BooleanRenderer,
|
package/dist/react.mjs
CHANGED
|
@@ -89,11 +89,6 @@ export const GridPro = React.forwardRef(function GridPro(props, ref) {
|
|
|
89
89
|
return React.createElement(customElements.getName(GridProWC) ?? '%%prefix%%-grid-pro', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
export const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
93
|
-
const { children, ...rest } = props;
|
|
94
|
-
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
92
|
export const DateEditor = React.forwardRef(function DateEditor(props, ref) {
|
|
98
93
|
const { children, ...rest } = props;
|
|
99
94
|
return React.createElement(customElements.getName(DateEditorWC) ?? '%%prefix%%-date-editor', { ...rest, ref }, children);
|
|
@@ -119,6 +114,11 @@ export const StringEditor = React.forwardRef(function StringEditor(props, ref) {
|
|
|
119
114
|
return React.createElement(customElements.getName(StringEditorWC) ?? '%%prefix%%-string-editor', { ...rest, ref }, children);
|
|
120
115
|
});
|
|
121
116
|
|
|
117
|
+
export const GridProCell = React.forwardRef(function GridProCell(props, ref) {
|
|
118
|
+
const { children, ...rest } = props;
|
|
119
|
+
return React.createElement(customElements.getName(GridProCellWC) ?? 'grid-pro-cell', { ...rest, ref }, children);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
122
|
export const ActionRenderer = React.forwardRef(function ActionRenderer(props, ref) {
|
|
123
123
|
const { children, ...rest } = props;
|
|
124
124
|
return React.createElement(customElements.getName(ActionRendererWC) ?? '%%prefix%%-grid-pro-action-renderer', { ...rest, ref }, children);
|
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": "15.10.
|
|
4
|
+
"version": "15.10.3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@genesislcap/foundation-testing": "15.10.
|
|
44
|
-
"@genesislcap/genx": "15.10.
|
|
45
|
-
"@genesislcap/rollup-builder": "15.10.
|
|
46
|
-
"@genesislcap/ts-builder": "15.10.
|
|
47
|
-
"@genesislcap/uvu-playwright-builder": "15.10.
|
|
48
|
-
"@genesislcap/vite-builder": "15.10.
|
|
49
|
-
"@genesislcap/webpack-builder": "15.10.
|
|
43
|
+
"@genesislcap/foundation-testing": "15.10.3",
|
|
44
|
+
"@genesislcap/genx": "15.10.3",
|
|
45
|
+
"@genesislcap/rollup-builder": "15.10.3",
|
|
46
|
+
"@genesislcap/ts-builder": "15.10.3",
|
|
47
|
+
"@genesislcap/uvu-playwright-builder": "15.10.3",
|
|
48
|
+
"@genesislcap/vite-builder": "15.10.3",
|
|
49
|
+
"@genesislcap/webpack-builder": "15.10.3"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@genesislcap/foundation-comms": "15.10.
|
|
53
|
-
"@genesislcap/foundation-criteria": "15.10.
|
|
54
|
-
"@genesislcap/foundation-logger": "15.10.
|
|
55
|
-
"@genesislcap/foundation-ui": "15.10.
|
|
56
|
-
"@genesislcap/foundation-utils": "15.10.
|
|
52
|
+
"@genesislcap/foundation-comms": "15.10.3",
|
|
53
|
+
"@genesislcap/foundation-criteria": "15.10.3",
|
|
54
|
+
"@genesislcap/foundation-logger": "15.10.3",
|
|
55
|
+
"@genesislcap/foundation-ui": "15.10.3",
|
|
56
|
+
"@genesislcap/foundation-utils": "15.10.3",
|
|
57
57
|
"@microsoft/fast-colors": "5.3.1",
|
|
58
58
|
"@microsoft/fast-components": "2.30.6",
|
|
59
59
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"require": "./dist/react.cjs"
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "6e5c9bb135b3da6792c4c3a8e632b09b0bc3fbca"
|
|
95
95
|
}
|