@genesislcap/grid-pro 14.25.1-alpha-d696af4d9.0 → 14.26.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/README.md +4 -1
- package/dist/custom-elements.json +58 -9
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource-next.d.ts +7 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource-next.d.ts.map +1 -1
- package/dist/dts/grid-pro.d.ts +0 -1
- package/dist/dts/grid-pro.d.ts.map +1 -1
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource-next.js +67 -12
- package/dist/esm/grid-pro.js +2 -6
- package/dist/grid-pro.api.json +0 -31
- package/dist/grid-pro.d.ts +7 -2
- package/docs/api/grid-pro.gridpro.md +0 -1
- package/docs/api-report.md +5 -2
- package/package.json +7 -7
- package/docs/api/grid-pro.gridpro.gridhasrendered.md +0 -11
package/README.md
CHANGED
|
@@ -2,4 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## License
|
|
4
4
|
|
|
5
|
-
Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
5
|
+
Note: this project provides front end dependencies and uses licensed components listed in the next section, thus licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
6
|
+
|
|
7
|
+
### Licensed components
|
|
8
|
+
Genesis low-code platform
|
|
@@ -323,14 +323,6 @@
|
|
|
323
323
|
"default": "false",
|
|
324
324
|
"description": "If true, will enable cell flashing for all cell renderers, unless otherwise defined in custom colDef"
|
|
325
325
|
},
|
|
326
|
-
{
|
|
327
|
-
"kind": "field",
|
|
328
|
-
"name": "gridHasRendered",
|
|
329
|
-
"type": {
|
|
330
|
-
"text": "Boolean"
|
|
331
|
-
},
|
|
332
|
-
"default": "false"
|
|
333
|
-
},
|
|
334
326
|
{
|
|
335
327
|
"kind": "field",
|
|
336
328
|
"name": "persistColumnStateKey",
|
|
@@ -3749,6 +3741,31 @@
|
|
|
3749
3741
|
},
|
|
3750
3742
|
"privacy": "private"
|
|
3751
3743
|
},
|
|
3744
|
+
{
|
|
3745
|
+
"kind": "field",
|
|
3746
|
+
"name": "rowData",
|
|
3747
|
+
"type": {
|
|
3748
|
+
"text": "Map<string, any>"
|
|
3749
|
+
},
|
|
3750
|
+
"privacy": "private",
|
|
3751
|
+
"default": "new Map()"
|
|
3752
|
+
},
|
|
3753
|
+
{
|
|
3754
|
+
"kind": "field",
|
|
3755
|
+
"name": "agTransaction",
|
|
3756
|
+
"type": {
|
|
3757
|
+
"text": "RowDataTransaction"
|
|
3758
|
+
},
|
|
3759
|
+
"privacy": "private"
|
|
3760
|
+
},
|
|
3761
|
+
{
|
|
3762
|
+
"kind": "field",
|
|
3763
|
+
"name": "rowId",
|
|
3764
|
+
"type": {
|
|
3765
|
+
"text": "string"
|
|
3766
|
+
},
|
|
3767
|
+
"privacy": "private"
|
|
3768
|
+
},
|
|
3752
3769
|
{
|
|
3753
3770
|
"kind": "method",
|
|
3754
3771
|
"name": "getRows",
|
|
@@ -3781,7 +3798,7 @@
|
|
|
3781
3798
|
},
|
|
3782
3799
|
{
|
|
3783
3800
|
"kind": "method",
|
|
3784
|
-
"name": "
|
|
3801
|
+
"name": "handleInitialStreamLoad",
|
|
3785
3802
|
"privacy": "private",
|
|
3786
3803
|
"return": {
|
|
3787
3804
|
"type": {
|
|
@@ -3880,6 +3897,14 @@
|
|
|
3880
3897
|
"text": "number"
|
|
3881
3898
|
}
|
|
3882
3899
|
},
|
|
3900
|
+
{
|
|
3901
|
+
"kind": "field",
|
|
3902
|
+
"name": "movingView",
|
|
3903
|
+
"type": {
|
|
3904
|
+
"text": "boolean"
|
|
3905
|
+
},
|
|
3906
|
+
"default": "true"
|
|
3907
|
+
},
|
|
3883
3908
|
{
|
|
3884
3909
|
"kind": "field",
|
|
3885
3910
|
"name": "orderBy",
|
|
@@ -3920,6 +3945,14 @@
|
|
|
3920
3945
|
},
|
|
3921
3946
|
"default": "false"
|
|
3922
3947
|
},
|
|
3948
|
+
{
|
|
3949
|
+
"kind": "field",
|
|
3950
|
+
"name": "rowId",
|
|
3951
|
+
"type": {
|
|
3952
|
+
"text": "string"
|
|
3953
|
+
},
|
|
3954
|
+
"default": "'ROW_REF'"
|
|
3955
|
+
},
|
|
3923
3956
|
{
|
|
3924
3957
|
"kind": "field",
|
|
3925
3958
|
"name": "reverse",
|
|
@@ -4247,6 +4280,14 @@
|
|
|
4247
4280
|
},
|
|
4248
4281
|
"fieldName": "maxView"
|
|
4249
4282
|
},
|
|
4283
|
+
{
|
|
4284
|
+
"name": "moving-view",
|
|
4285
|
+
"type": {
|
|
4286
|
+
"text": "boolean"
|
|
4287
|
+
},
|
|
4288
|
+
"default": "true",
|
|
4289
|
+
"fieldName": "movingView"
|
|
4290
|
+
},
|
|
4250
4291
|
{
|
|
4251
4292
|
"name": "order-by",
|
|
4252
4293
|
"type": {
|
|
@@ -4268,6 +4309,14 @@
|
|
|
4268
4309
|
"default": "false",
|
|
4269
4310
|
"fieldName": "pagination"
|
|
4270
4311
|
},
|
|
4312
|
+
{
|
|
4313
|
+
"name": "row-id",
|
|
4314
|
+
"type": {
|
|
4315
|
+
"text": "string"
|
|
4316
|
+
},
|
|
4317
|
+
"default": "'ROW_REF'",
|
|
4318
|
+
"fieldName": "rowId"
|
|
4319
|
+
},
|
|
4271
4320
|
{
|
|
4272
4321
|
"type": {
|
|
4273
4322
|
"text": "boolean"
|
|
@@ -15,6 +15,7 @@ export type StreamDatasourceOptions = {
|
|
|
15
15
|
resourceColDefs?: MetadataDetail[];
|
|
16
16
|
maxRows?: number;
|
|
17
17
|
maxView?: number;
|
|
18
|
+
rowId?: string;
|
|
18
19
|
pagination?: boolean;
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
@@ -39,11 +40,14 @@ export declare class StreamDatasource implements IServerSideDatasource {
|
|
|
39
40
|
private currentFilterModel;
|
|
40
41
|
private originalCriteriaMatch;
|
|
41
42
|
private currentSortModel;
|
|
43
|
+
private rowData;
|
|
44
|
+
private agTransaction;
|
|
45
|
+
private rowId;
|
|
42
46
|
constructor(options: StreamDatasourceOptions);
|
|
43
47
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
44
48
|
private restartSubscription;
|
|
45
49
|
private getOrderByAndToBeSortedColIds;
|
|
46
|
-
private
|
|
50
|
+
private handleInitialStreamLoad;
|
|
47
51
|
private buildCriteriaMatchFromFilters;
|
|
48
52
|
private criteriaFromFilters;
|
|
49
53
|
private getFiltersByType;
|
|
@@ -380,10 +384,12 @@ export declare class GridProGenesisDatasourceNext extends GridProGenesisDatasour
|
|
|
380
384
|
isSnapshot: boolean;
|
|
381
385
|
maxRows: number;
|
|
382
386
|
maxView: number;
|
|
387
|
+
movingView: boolean;
|
|
383
388
|
orderBy: string;
|
|
384
389
|
resourceName: string;
|
|
385
390
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
386
391
|
pagination: boolean;
|
|
392
|
+
rowId: string;
|
|
387
393
|
reverse: boolean;
|
|
388
394
|
private indexes;
|
|
389
395
|
private dataserverStream;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-pro-genesis-datasource-next.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource-next.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,qBAAqB,EACrB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"grid-pro-genesis-datasource-next.d.ts","sourceRoot":"","sources":["../../../src/grid-pro-genesis-datasource/grid-pro-genesis-datasource-next.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,qBAAqB,EACrB,wBAAwB,EAKzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,OAAO,EAMP,wBAAwB,EAIxB,cAAc,EACd,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAA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AAY;IAKpB,OAAO,CAAC,kBAAkB;IAU1B,IAAI,MAAM,QA2BT;YAEa,sBAAsB;IAapC,OAAO,CAAC,eAAe;CAgDxB"}
|
package/dist/dts/grid-pro.d.ts
CHANGED
|
@@ -338,7 +338,6 @@ export declare class GridPro extends GridPro_base {
|
|
|
338
338
|
* If true, will enable cell flashing for all cell renderers, unless otherwise defined in custom colDef
|
|
339
339
|
*/
|
|
340
340
|
enableCellFlashing: boolean;
|
|
341
|
-
gridHasRendered: Boolean;
|
|
342
341
|
persistColumnStateKey: string;
|
|
343
342
|
/**
|
|
344
343
|
* Boolean attribute to control whether the grid autosizes the columns upon interaction.
|
|
@@ -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,EAKP,MAAM,yBAAyB,CAAC;AASjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAc/D,OAAO,EAKL,cAAc,EACf,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgB1B;;;;;GAKG;AACH,qBAAa,OAAQ,SAAQ,YAAiC;IAChD,SAAS,EAAG,SAAS,CAAC;IACtB,OAAO,EAAG,OAAO,CAAC;IACrB,OAAO,CAAC,OAAO,CAA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StB,OAAO,CAAC,eAAe;CAMxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,EAAE,cAA0B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;CAEhC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAM5B,CAAC"}
|
|
@@ -17,6 +17,7 @@ export class StreamDatasource {
|
|
|
17
17
|
this.moreRows = false;
|
|
18
18
|
this.calculatedRowsCount = 0;
|
|
19
19
|
this.lastSequenceId = 0;
|
|
20
|
+
this.rowData = new Map();
|
|
20
21
|
this.dataserverStream = options.stream;
|
|
21
22
|
this.resourceName = options.resourceName;
|
|
22
23
|
this.resourceParams = options.resourceParams;
|
|
@@ -25,6 +26,7 @@ export class StreamDatasource {
|
|
|
25
26
|
this.resourceColDefs = options.resourceColDefs;
|
|
26
27
|
this.maxRows = options.maxRows;
|
|
27
28
|
this.maxView = options.maxView;
|
|
29
|
+
this.rowId = options.rowId;
|
|
28
30
|
this.pagination = options.pagination;
|
|
29
31
|
}
|
|
30
32
|
getRows(params) {
|
|
@@ -69,6 +71,7 @@ export class StreamDatasource {
|
|
|
69
71
|
if (this.moreRows && params.request.startRow >= this.maxRows) {
|
|
70
72
|
this.connect.getMoreRows(this.streamSourceRef);
|
|
71
73
|
}
|
|
74
|
+
// TODO: take(1) is temporary, won't have to do this once SSRM Transactions are implemented
|
|
72
75
|
this.dataserverStream.pipe(take(1)).subscribe((result) => {
|
|
73
76
|
var _a, _b;
|
|
74
77
|
const messageType = result.MESSAGE_TYPE;
|
|
@@ -78,18 +81,29 @@ export class StreamDatasource {
|
|
|
78
81
|
return;
|
|
79
82
|
}
|
|
80
83
|
this.moreRows = result.MORE_ROWS;
|
|
81
|
-
let rowData = [];
|
|
82
84
|
if (result.ROW) {
|
|
83
85
|
const nextMessage = dataServerResultFilter(result);
|
|
84
|
-
|
|
86
|
+
this.handleInitialStreamLoad(nextMessage);
|
|
85
87
|
}
|
|
88
|
+
// TODO: SSRM Transactions - https://www.ag-grid.com/javascript-data-grid/server-side-model-updating-transactions/
|
|
89
|
+
// if (messageType === MessageType.QUERY_UPDATE) {
|
|
90
|
+
// debugger;
|
|
91
|
+
// if (result.ROW) {
|
|
92
|
+
// const nextMessage = dataServerResultFilter(result);
|
|
93
|
+
// this.agTransaction = { add: [], remove: [], update: [] };
|
|
94
|
+
// this.handleStreamInserts(nextMessage.inserts);
|
|
95
|
+
// this.handleStreamDeletes(nextMessage.deletes);
|
|
96
|
+
// this.handleStreamUpdates(nextMessage.updates);
|
|
97
|
+
// params.api.applyServerSideTransactionAsync(this.agTransaction);
|
|
98
|
+
// }
|
|
99
|
+
// }
|
|
86
100
|
this.lastSequenceId = result.SEQUENCE_ID;
|
|
87
101
|
if (this.lastSequenceId === 1) {
|
|
88
102
|
this.streamSourceRef = result.SOURCE_REF;
|
|
89
|
-
this.rowCount = (_a = result.ROWS_COUNT) !== null && _a !== void 0 ? _a : rowData.
|
|
103
|
+
this.rowCount = (_a = result.ROWS_COUNT) !== null && _a !== void 0 ? _a : this.rowData.size;
|
|
90
104
|
}
|
|
91
|
-
this.calculatedRowsCount += (_b = rowData
|
|
92
|
-
const successRowData = { rowData };
|
|
105
|
+
this.calculatedRowsCount += (_b = this.rowData.size) !== null && _b !== void 0 ? _b : 0;
|
|
106
|
+
const successRowData = { rowData: Array.from(this.rowData.values()) };
|
|
93
107
|
if (this.pagination) {
|
|
94
108
|
successRowData.rowCount = Math.min(this.rowCount, this.maxView);
|
|
95
109
|
}
|
|
@@ -97,10 +111,41 @@ export class StreamDatasource {
|
|
|
97
111
|
params.request.endRow > this.calculatedRowsCount) {
|
|
98
112
|
successRowData.rowCount = this.calculatedRowsCount;
|
|
99
113
|
}
|
|
114
|
+
else if (params.request.endRow === this.rowCount) {
|
|
115
|
+
successRowData.rowCount = this.rowCount;
|
|
116
|
+
}
|
|
100
117
|
params.success(successRowData);
|
|
101
118
|
});
|
|
102
119
|
});
|
|
103
120
|
}
|
|
121
|
+
// TODO: SSRM Transactions - https://www.ag-grid.com/javascript-data-grid/server-side-model-updating-transactions/
|
|
122
|
+
// private handleStreamInserts(insertedRows: any[]) {
|
|
123
|
+
// insertedRows?.forEach((insertData) => {
|
|
124
|
+
// if (this.rowData.has(insertData[this.rowId])) {
|
|
125
|
+
// const rowToBeUpdated = this.rowData.get(insertData[this.rowId]);
|
|
126
|
+
// const updatedRow = { ...rowToBeUpdated, ...insertData };
|
|
127
|
+
// this.agTransaction.update.push(updatedRow);
|
|
128
|
+
// } else {
|
|
129
|
+
// this.agTransaction.add.push(insertData);
|
|
130
|
+
// this.agTransaction.addIndex = 0;
|
|
131
|
+
// }
|
|
132
|
+
// this.rowData.set(insertData[this.rowId], insertData);
|
|
133
|
+
// });
|
|
134
|
+
// }
|
|
135
|
+
// private handleStreamDeletes(deletedRows: any[]) {
|
|
136
|
+
// deletedRows?.forEach((deleteData) => {
|
|
137
|
+
// this.agTransaction.remove.push({ [this.rowId]: deleteData[this.rowId] });
|
|
138
|
+
// this.rowData.delete(deleteData[this.rowId]);
|
|
139
|
+
// });
|
|
140
|
+
// }
|
|
141
|
+
// private handleStreamUpdates(updatedRows: any[]) {
|
|
142
|
+
// updatedRows?.forEach((updateData) => {
|
|
143
|
+
// const rowToBeUpdated = this.rowData.get(updateData[this.rowId]);
|
|
144
|
+
// const updatedRow = { ...rowToBeUpdated, ...updateData };
|
|
145
|
+
// this.agTransaction.update.push(updatedRow);
|
|
146
|
+
// this.rowData.set(updateData[this.rowId], updatedRow);
|
|
147
|
+
// });
|
|
148
|
+
// }
|
|
104
149
|
restartSubscription() {
|
|
105
150
|
this.connect.dataLogoff(this.streamSourceRef);
|
|
106
151
|
const streamOnMessage = (message) => message;
|
|
@@ -117,7 +162,7 @@ export class StreamDatasource {
|
|
|
117
162
|
}
|
|
118
163
|
}
|
|
119
164
|
}
|
|
120
|
-
|
|
165
|
+
handleInitialStreamLoad(result) {
|
|
121
166
|
var _a;
|
|
122
167
|
if (!result)
|
|
123
168
|
return;
|
|
@@ -125,8 +170,7 @@ export class StreamDatasource {
|
|
|
125
170
|
(_a = result.inserts) === null || _a === void 0 ? void 0 : _a.forEach((insertData) => {
|
|
126
171
|
rows.set(insertData.ROW_REF, insertData);
|
|
127
172
|
});
|
|
128
|
-
|
|
129
|
-
return rowData;
|
|
173
|
+
this.rowData = rows;
|
|
130
174
|
}
|
|
131
175
|
buildCriteriaMatchFromFilters() {
|
|
132
176
|
this.resourceParams.CRITERIA_MATCH = this.originalCriteriaMatch;
|
|
@@ -179,7 +223,9 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
|
|
|
179
223
|
this.isSnapshot = false;
|
|
180
224
|
this.maxRows = DatasourceDefaults.MAX_ROWS_250;
|
|
181
225
|
this.maxView = DatasourceDefaults.MAX_VIEW_1000;
|
|
226
|
+
this.movingView = true;
|
|
182
227
|
this.pagination = false;
|
|
228
|
+
this.rowId = 'ROW_REF';
|
|
183
229
|
this.reverse = false;
|
|
184
230
|
}
|
|
185
231
|
resourceNameChanged(oldValue, newValue) {
|
|
@@ -206,6 +252,7 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
|
|
|
206
252
|
init() {
|
|
207
253
|
if (this.agGrid && this.resourceName && this.connect.isConnected) {
|
|
208
254
|
this.agGrid.gridOptions = {
|
|
255
|
+
getRowId: (params) => params.data[this.rowId],
|
|
209
256
|
cacheBlockSize: this.maxRows,
|
|
210
257
|
defaultColDef: {
|
|
211
258
|
filter: true,
|
|
@@ -241,6 +288,7 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
|
|
|
241
288
|
resourceColDefs: this.originalFieldDef,
|
|
242
289
|
maxRows: this.maxRows,
|
|
243
290
|
maxView: this.maxView,
|
|
291
|
+
rowId: this.rowId,
|
|
244
292
|
pagination: this.pagination,
|
|
245
293
|
});
|
|
246
294
|
this.agGrid.gridApi.setServerSideDatasource(this.dataserverStream);
|
|
@@ -280,6 +328,7 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
|
|
|
280
328
|
FIELDS: this.fields,
|
|
281
329
|
MAX_ROWS: this.maxRows,
|
|
282
330
|
MAX_VIEW: this.maxView,
|
|
331
|
+
MOVING_VIEW: this.movingView,
|
|
283
332
|
REVERSE: this.reverse,
|
|
284
333
|
};
|
|
285
334
|
const keys = Array.from(this.indexes.keys());
|
|
@@ -297,7 +346,7 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
|
|
|
297
346
|
}
|
|
298
347
|
createDataserverStream(existingParams = null) {
|
|
299
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
-
const streamOnMessage = (message) => message;
|
|
349
|
+
const streamOnMessage = (message) => logger.debug(message);
|
|
301
350
|
const onError = (error) => logger.error(error);
|
|
302
351
|
return this.connect.stream(this.resourceName, streamOnMessage, onError, existingParams !== null && existingParams !== void 0 ? existingParams : this.params);
|
|
303
352
|
});
|
|
@@ -326,9 +375,9 @@ let GridProGenesisDatasourceNext = class GridProGenesisDatasourceNext extends Li
|
|
|
326
375
|
if (this.agGrid.onlyTemplateColDefs && !templateColDef) {
|
|
327
376
|
return [];
|
|
328
377
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
378
|
+
if (this.fields && !this.fields.includes(field.name)) {
|
|
379
|
+
return [];
|
|
380
|
+
}
|
|
332
381
|
return Object.assign(Object.assign({ field: field.name, type: getColumnType(field.type), filter: getFilterByFieldType(field.type), sortable: [].concat(...this.indexes.values()).includes(field.name) }, cellConfigs), templateColDef);
|
|
333
382
|
});
|
|
334
383
|
const colDefsMergedWithTemplateDefs = this.agGrid.applyTemplateDefinitions(colDefsFromGenesisData);
|
|
@@ -353,6 +402,9 @@ __decorate([
|
|
|
353
402
|
__decorate([
|
|
354
403
|
attr({ attribute: 'max-view' })
|
|
355
404
|
], GridProGenesisDatasourceNext.prototype, "maxView", void 0);
|
|
405
|
+
__decorate([
|
|
406
|
+
attr({ attribute: 'moving-view' })
|
|
407
|
+
], GridProGenesisDatasourceNext.prototype, "movingView", void 0);
|
|
356
408
|
__decorate([
|
|
357
409
|
attr({ attribute: 'order-by' })
|
|
358
410
|
], GridProGenesisDatasourceNext.prototype, "orderBy", void 0);
|
|
@@ -362,6 +414,9 @@ __decorate([
|
|
|
362
414
|
__decorate([
|
|
363
415
|
attr({ mode: 'boolean' })
|
|
364
416
|
], GridProGenesisDatasourceNext.prototype, "pagination", void 0);
|
|
417
|
+
__decorate([
|
|
418
|
+
attr({ attribute: 'row-id' })
|
|
419
|
+
], GridProGenesisDatasourceNext.prototype, "rowId", void 0);
|
|
365
420
|
__decorate([
|
|
366
421
|
attr({ mode: 'boolean' })
|
|
367
422
|
], GridProGenesisDatasourceNext.prototype, "reverse", void 0);
|
package/dist/esm/grid-pro.js
CHANGED
|
@@ -48,7 +48,6 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
48
48
|
* If true, will enable cell flashing for all cell renderers, unless otherwise defined in custom colDef
|
|
49
49
|
*/
|
|
50
50
|
this.enableCellFlashing = false;
|
|
51
|
-
this.gridHasRendered = false;
|
|
52
51
|
/**
|
|
53
52
|
* Boolean attribute to control whether the grid autosizes the columns upon interaction.
|
|
54
53
|
* This will disable the column widths from being manually set, and doesn't save the widths
|
|
@@ -136,9 +135,7 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
136
135
|
return colState.map((col) => (Object.assign(Object.assign({}, col), { width: null })));
|
|
137
136
|
}
|
|
138
137
|
serialiseStoreTableConfig() {
|
|
139
|
-
if (
|
|
140
|
-
return;
|
|
141
|
-
if (this.gridHasRendered && this.statePersistanceEnabled()) {
|
|
138
|
+
if (this.rehydrationAttempted && this.statePersistanceEnabled()) {
|
|
142
139
|
const existingOptions = JSON.parse(this.session.getLocalStorageItem('gridOptions') || '{}');
|
|
143
140
|
let colState = this.agGridOptions.columnApi.getColumnState();
|
|
144
141
|
colState = this.gridAutosizingEnabled
|
|
@@ -195,11 +192,10 @@ export class GridPro extends LifecycleMixin(FoundationElement) {
|
|
|
195
192
|
params,
|
|
196
193
|
gridId: this.id,
|
|
197
194
|
});
|
|
195
|
+
rehydrateTableConfig();
|
|
198
196
|
this.debouncedColumnAutosize.bind(this)();
|
|
199
197
|
}, onFirstDataRendered: () => {
|
|
200
198
|
this.enableFlashingRows.bind(this);
|
|
201
|
-
rehydrateTableConfig();
|
|
202
|
-
this.gridHasRendered = true;
|
|
203
199
|
}, onColumnPinned: gridOnChangeCallback, onColumnResized: gridOnChangeCallback, onColumnMoved: gridOnChangeCallback, onDisplayedColumnsChanged: gridOnChangeCallback, onFilterChanged: gridOnChangeCallback, onGridSizeChanged: gridOnChangeCallback, onSortChanged: gridOnChangeCallback }), rest);
|
|
204
200
|
this.agGridOptions = Object.assign(Object.assign({}, this.agGridOptions), ComponentUtil.copyAttributesToGridOptions(derivedOptions, this.agAttributes));
|
|
205
201
|
const gridParams = {
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -5527,37 +5527,6 @@
|
|
|
5527
5527
|
"isProtected": false,
|
|
5528
5528
|
"isAbstract": false
|
|
5529
5529
|
},
|
|
5530
|
-
{
|
|
5531
|
-
"kind": "Property",
|
|
5532
|
-
"canonicalReference": "@genesislcap/grid-pro!GridPro#gridHasRendered:member",
|
|
5533
|
-
"docComment": "",
|
|
5534
|
-
"excerptTokens": [
|
|
5535
|
-
{
|
|
5536
|
-
"kind": "Content",
|
|
5537
|
-
"text": "gridHasRendered: "
|
|
5538
|
-
},
|
|
5539
|
-
{
|
|
5540
|
-
"kind": "Reference",
|
|
5541
|
-
"text": "Boolean",
|
|
5542
|
-
"canonicalReference": "!Boolean:interface"
|
|
5543
|
-
},
|
|
5544
|
-
{
|
|
5545
|
-
"kind": "Content",
|
|
5546
|
-
"text": ";"
|
|
5547
|
-
}
|
|
5548
|
-
],
|
|
5549
|
-
"isReadonly": false,
|
|
5550
|
-
"isOptional": false,
|
|
5551
|
-
"releaseTag": "Public",
|
|
5552
|
-
"name": "gridHasRendered",
|
|
5553
|
-
"propertyTypeTokenRange": {
|
|
5554
|
-
"startIndex": 1,
|
|
5555
|
-
"endIndex": 2
|
|
5556
|
-
},
|
|
5557
|
-
"isStatic": false,
|
|
5558
|
-
"isProtected": false,
|
|
5559
|
-
"isAbstract": false
|
|
5560
|
-
},
|
|
5561
5530
|
{
|
|
5562
5531
|
"kind": "Property",
|
|
5563
5532
|
"canonicalReference": "@genesislcap/grid-pro!GridPro#gridOptions:member",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -794,7 +794,6 @@ export declare class GridPro extends GridPro_base {
|
|
|
794
794
|
* If true, will enable cell flashing for all cell renderers, unless otherwise defined in custom colDef
|
|
795
795
|
*/
|
|
796
796
|
enableCellFlashing: boolean;
|
|
797
|
-
gridHasRendered: Boolean;
|
|
798
797
|
persistColumnStateKey: string;
|
|
799
798
|
/**
|
|
800
799
|
* Boolean attribute to control whether the grid autosizes the columns upon interaction.
|
|
@@ -1619,10 +1618,12 @@ export declare class GridProGenesisDatasourceNext extends GridProGenesisDatasour
|
|
|
1619
1618
|
isSnapshot: boolean;
|
|
1620
1619
|
maxRows: number;
|
|
1621
1620
|
maxView: number;
|
|
1621
|
+
movingView: boolean;
|
|
1622
1622
|
orderBy: string;
|
|
1623
1623
|
resourceName: string;
|
|
1624
1624
|
resourceNameChanged(oldValue: string, newValue: string): void;
|
|
1625
1625
|
pagination: boolean;
|
|
1626
|
+
rowId: string;
|
|
1626
1627
|
reverse: boolean;
|
|
1627
1628
|
private indexes;
|
|
1628
1629
|
private dataserverStream;
|
|
@@ -2034,11 +2035,14 @@ export declare class StreamDatasource implements IServerSideDatasource {
|
|
|
2034
2035
|
private currentFilterModel;
|
|
2035
2036
|
private originalCriteriaMatch;
|
|
2036
2037
|
private currentSortModel;
|
|
2038
|
+
private rowData;
|
|
2039
|
+
private agTransaction;
|
|
2040
|
+
private rowId;
|
|
2037
2041
|
constructor(options: StreamDatasourceOptions);
|
|
2038
2042
|
getRows(params: IServerSideGetRowsParams): Promise<void>;
|
|
2039
2043
|
private restartSubscription;
|
|
2040
2044
|
private getOrderByAndToBeSortedColIds;
|
|
2041
|
-
private
|
|
2045
|
+
private handleInitialStreamLoad;
|
|
2042
2046
|
private buildCriteriaMatchFromFilters;
|
|
2043
2047
|
private criteriaFromFilters;
|
|
2044
2048
|
private getFiltersByType;
|
|
@@ -2058,6 +2062,7 @@ export declare type StreamDatasourceOptions = {
|
|
|
2058
2062
|
resourceColDefs?: MetadataDetail[];
|
|
2059
2063
|
maxRows?: number;
|
|
2060
2064
|
maxView?: number;
|
|
2065
|
+
rowId?: string;
|
|
2061
2066
|
pagination?: boolean;
|
|
2062
2067
|
};
|
|
2063
2068
|
|
|
@@ -42,7 +42,6 @@ Grid Pro is a Web Component wrapper around the AG Grid Community library.
|
|
|
42
42
|
| [gridAutosizingEnabled](./grid-pro.gridpro.gridautosizingenabled.md) | | boolean | Boolean attribute to control whether the grid autosizes the columns upon interaction. This will disable the column widths from being manually set, and doesn't save the widths in local storage if you are using <code>persist-column-state-key</code>. |
|
|
43
43
|
| [gridComponents](./grid-pro.gridpro.gridcomponents.md) | | { \[componentName: string\]: any; } | |
|
|
44
44
|
| [gridFontFace](./grid-pro.gridpro.gridfontface.md) | | string | |
|
|
45
|
-
| [gridHasRendered](./grid-pro.gridpro.gridhasrendered.md) | | Boolean | |
|
|
46
45
|
| [gridOptions](./grid-pro.gridpro.gridoptions.md) | | GridOptions | |
|
|
47
46
|
| [gridSlot](./grid-pro.gridpro.gridslot.md) | | HTMLSlotElement | |
|
|
48
47
|
| [headerHeight](./grid-pro.gridpro.headerheight.md) | | number | |
|
package/docs/api-report.md
CHANGED
|
@@ -585,8 +585,6 @@ export class GridPro extends GridPro_base {
|
|
|
585
585
|
// (undocumented)
|
|
586
586
|
gridFontFace: string;
|
|
587
587
|
// (undocumented)
|
|
588
|
-
gridHasRendered: Boolean;
|
|
589
|
-
// (undocumented)
|
|
590
588
|
get gridOptions(): GridOptions;
|
|
591
589
|
set gridOptions(options: GridOptions);
|
|
592
590
|
// (undocumented)
|
|
@@ -714,6 +712,8 @@ export class GridProGenesisDatasourceNext extends GridProGenesisDatasourceNext_b
|
|
|
714
712
|
// (undocumented)
|
|
715
713
|
maxView: number;
|
|
716
714
|
// (undocumented)
|
|
715
|
+
movingView: boolean;
|
|
716
|
+
// (undocumented)
|
|
717
717
|
orderBy: string;
|
|
718
718
|
// (undocumented)
|
|
719
719
|
pagination: boolean;
|
|
@@ -729,6 +729,8 @@ export class GridProGenesisDatasourceNext extends GridProGenesisDatasourceNext_b
|
|
|
729
729
|
restart(): void;
|
|
730
730
|
// (undocumented)
|
|
731
731
|
reverse: boolean;
|
|
732
|
+
// (undocumented)
|
|
733
|
+
rowId: string;
|
|
732
734
|
}
|
|
733
735
|
|
|
734
736
|
// @public
|
|
@@ -795,6 +797,7 @@ export type StreamDatasourceOptions = {
|
|
|
795
797
|
resourceColDefs?: MetadataDetail[];
|
|
796
798
|
maxRows?: number;
|
|
797
799
|
maxView?: number;
|
|
800
|
+
rowId?: string;
|
|
798
801
|
pagination?: boolean;
|
|
799
802
|
};
|
|
800
803
|
|
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.
|
|
4
|
+
"version": "14.26.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"serve": "genx serve"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@genesislcap/foundation-testing": "14.
|
|
25
|
-
"@genesislcap/genx": "14.
|
|
24
|
+
"@genesislcap/foundation-testing": "^14.26.0",
|
|
25
|
+
"@genesislcap/genx": "^14.26.0",
|
|
26
26
|
"@playwright/test": "^1.18.1",
|
|
27
27
|
"bulma": "^0.9.3",
|
|
28
28
|
"c8": "^7.11.0",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"watchlist": "^0.3.1"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@genesislcap/foundation-comms": "14.
|
|
42
|
-
"@genesislcap/foundation-ui": "14.
|
|
43
|
-
"@genesislcap/foundation-utils": "14.
|
|
41
|
+
"@genesislcap/foundation-comms": "^14.26.0",
|
|
42
|
+
"@genesislcap/foundation-ui": "^14.26.0",
|
|
43
|
+
"@genesislcap/foundation-utils": "^14.26.0",
|
|
44
44
|
"@microsoft/fast-colors": "^5.1.4",
|
|
45
45
|
"@microsoft/fast-components": "^2.21.3",
|
|
46
46
|
"@microsoft/fast-element": "^1.7.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"access": "public"
|
|
67
67
|
},
|
|
68
68
|
"customElements": "dist/custom-elements.json",
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "5f25fc6e5f9068551f1ea703439f460c352b97d4"
|
|
70
70
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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) > [gridHasRendered](./grid-pro.gridpro.gridhasrendered.md)
|
|
4
|
-
|
|
5
|
-
## GridPro.gridHasRendered property
|
|
6
|
-
|
|
7
|
-
**Signature:**
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
gridHasRendered: Boolean;
|
|
11
|
-
```
|