@genesislcap/grid-pro 14.41.1 → 14.41.2-bny.2
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 +31 -0
- package/dist/dts/cell-renderers/action.renderer.d.ts +1 -0
- package/dist/dts/cell-renderers/action.renderer.d.ts.map +1 -1
- package/dist/dts/cell-renderers/actions-menu.renderer.d.ts +1 -1
- package/dist/dts/cell-renderers/actions-menu.renderer.d.ts.map +1 -1
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +7 -0
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/esm/cell-renderers/actions-menu.renderer.js +2 -1
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +22 -3
- package/dist/grid-pro.api.json +64 -2
- package/dist/grid-pro.d.ts +9 -1
- package/docs/api/grid-pro.actionrendererparams.md +1 -0
- package/docs/api/grid-pro.getactionsmenudef.md +1 -1
- package/docs/api/grid-pro.gridprogenesisdatasource.md +2 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.refreshrows.md +15 -0
- package/docs/api/grid-pro.gridprogenesisdatasource.rowdatamapper.md +11 -0
- package/docs/api-report.md +6 -1
- package/package.json +7 -7
|
@@ -1377,6 +1377,13 @@
|
|
|
1377
1377
|
"text": "string"
|
|
1378
1378
|
},
|
|
1379
1379
|
"description": "Optional appearance for the button that opens the menu. Default is 'outline'."
|
|
1380
|
+
},
|
|
1381
|
+
{
|
|
1382
|
+
"name": "hideMenuSingleOption",
|
|
1383
|
+
"optional": true,
|
|
1384
|
+
"type": {
|
|
1385
|
+
"text": "boolean"
|
|
1386
|
+
}
|
|
1380
1387
|
}
|
|
1381
1388
|
],
|
|
1382
1389
|
"description": "Helper function to get ColDef https://www.ag-grid.com/javascript-data-grid/column-properties/ for Actions Menu Renderer.\nWill take the parameter values for a base ColDef and merge them with the overrideDef (if specified).",
|
|
@@ -3251,6 +3258,13 @@
|
|
|
3251
3258
|
},
|
|
3252
3259
|
"default": "false"
|
|
3253
3260
|
},
|
|
3261
|
+
{
|
|
3262
|
+
"kind": "field",
|
|
3263
|
+
"name": "rowDataMapper",
|
|
3264
|
+
"type": {
|
|
3265
|
+
"text": "Function"
|
|
3266
|
+
}
|
|
3267
|
+
},
|
|
3254
3268
|
{
|
|
3255
3269
|
"kind": "field",
|
|
3256
3270
|
"name": "dataSub",
|
|
@@ -3397,6 +3411,10 @@
|
|
|
3397
3411
|
"description": "Restarts the datasource, uses `deinit` and `init` in sequence.",
|
|
3398
3412
|
"privacy": "public"
|
|
3399
3413
|
},
|
|
3414
|
+
{
|
|
3415
|
+
"kind": "method",
|
|
3416
|
+
"name": "refreshRows"
|
|
3417
|
+
},
|
|
3400
3418
|
{
|
|
3401
3419
|
"kind": "method",
|
|
3402
3420
|
"name": "clearRowData",
|
|
@@ -3490,6 +3508,19 @@
|
|
|
3490
3508
|
}
|
|
3491
3509
|
]
|
|
3492
3510
|
},
|
|
3511
|
+
{
|
|
3512
|
+
"kind": "method",
|
|
3513
|
+
"name": "mapTransaction",
|
|
3514
|
+
"privacy": "private",
|
|
3515
|
+
"parameters": [
|
|
3516
|
+
{
|
|
3517
|
+
"name": "transaction",
|
|
3518
|
+
"type": {
|
|
3519
|
+
"text": "RowDataTransaction"
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
]
|
|
3523
|
+
},
|
|
3493
3524
|
{
|
|
3494
3525
|
"kind": "method",
|
|
3495
3526
|
"name": "handleStreamInserts",
|
|
@@ -34,6 +34,7 @@ export type ActionRendererParams = {
|
|
|
34
34
|
* A unique field name used to identify the action button used for E2E testing, so that the data-testid attribute value can be unique.
|
|
35
35
|
*/
|
|
36
36
|
uniqueFieldName?: string;
|
|
37
|
+
contentTemplate?: string;
|
|
37
38
|
};
|
|
38
39
|
/**
|
|
39
40
|
* The AG Action Renderer element.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/action.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEjF,OAAO,EAAe,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG5E;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC;IAEvC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,iBAAkB,YAAW,iBAAiB;IAEzE,MAAM,EAAE,mBAAmB,GAAG,oBAAoB,CAAC;IAGnD,aAAa,EAAE,OAAO,CAAC;IAEvB,IAAI,CAAC,MAAM,EAAE,mBAAmB,GAAG,oBAAoB;IAMvD,MAAM,IAAI,WAAW;IAIrB,OAAO,CAAC,MAAM,EAAE,mBAAmB;IAMnC,UAAU,CAAC,IAAI,KAAA,GAAG,OAAO;IAWnB,YAAY;IAMzB,IAAI,UAAU,WAMb;CACF;AAID;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,6DAElC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,iDAelC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;yBAe1C,CAAC"}
|
|
1
|
+
{"version":3,"file":"action.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/action.renderer.ts"],"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63
|
-
export declare const getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef;
|
|
63
|
+
export declare const getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string, hideMenuSingleOption?: boolean) => ColDef;
|
|
64
64
|
//# sourceMappingURL=actions-menu.renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions-menu.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/actions-menu.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,iBAAkB,YAAW,iBAAiB;IAClE,MAAM,EAAE,mBAAmB,CAAC;IAExC,IAAI,CAAC,MAAM,EAAE,mBAAmB;IAKhC,MAAM,IAAI,WAAW;IAIrB,OAAO,CAAC,MAAM,EAAE,mBAAmB;CAG3C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;;;;;;8BAQ/C,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,iBAAiB,YACnB,cAAc,EAAE,gBACZ,MAAM,4BACM,MAAM,eACnB,OAAO,qBACA,MAAM,
|
|
1
|
+
{"version":3,"file":"actions-menu.renderer.d.ts","sourceRoot":"","sources":["../../../src/cell-renderers/actions-menu.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D;;;;;GAKG;AACH,qBAAa,mBAAoB,SAAQ,iBAAkB,YAAW,iBAAiB;IAClE,MAAM,EAAE,mBAAmB,CAAC;IAExC,IAAI,CAAC,MAAM,EAAE,mBAAmB;IAKhC,MAAM,IAAI,WAAW;IAIrB,OAAO,CAAC,MAAM,EAAE,mBAAmB;CAG3C;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC;;;;;;8BAQ/C,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,iBAAiB,YACnB,cAAc,EAAE,gBACZ,MAAM,4BACM,MAAM,eACnB,OAAO,qBACA,MAAM,yBACF,OAAO,KAC7B,MAsBF,CAAC"}
|
|
@@ -64,6 +64,10 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
64
64
|
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
|
|
65
65
|
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
|
|
66
66
|
closest<E extends Element = Element>(selectors: string): E;
|
|
67
|
+
/**
|
|
68
|
+
* Deinitialises the datasource, resetting it to its initial state.
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
67
71
|
getAttribute(qualifiedName: string): string;
|
|
68
72
|
getAttributeNS(namespace: string, localName: string): string;
|
|
69
73
|
getAttributeNames(): string[];
|
|
@@ -344,6 +348,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
344
348
|
reverse: boolean;
|
|
345
349
|
rowId: any;
|
|
346
350
|
restartOnReconnection: boolean;
|
|
351
|
+
rowDataMapper: Function;
|
|
347
352
|
private dataSub;
|
|
348
353
|
private updateSub;
|
|
349
354
|
private connectionSub;
|
|
@@ -382,6 +387,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
382
387
|
* @public
|
|
383
388
|
*/
|
|
384
389
|
restart(): void;
|
|
390
|
+
refreshRows(): void;
|
|
385
391
|
/**
|
|
386
392
|
* Sends a DATA_LOGOFF when the resource is an active stream
|
|
387
393
|
* @remarks Will only happen for DATASERER resources.
|
|
@@ -396,6 +402,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
396
402
|
private handleStreamResult;
|
|
397
403
|
private applyRequestServerData;
|
|
398
404
|
private applyDataserverData;
|
|
405
|
+
private mapTransaction;
|
|
399
406
|
private handleStreamInserts;
|
|
400
407
|
private handleStreamDeletes;
|
|
401
408
|
private handleStreamUpdates;
|
|
@@ -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,EAAU,WAAW,EAAsB,MAAM,yBAAyB,CAAC;AAClF,OAAO,EACL,OAAO,EAEP,UAAU,EAYX,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,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,EAAU,WAAW,EAAsB,MAAM,yBAAyB,CAAC;AAClF,OAAO,EACL,OAAO,EAEP,UAAU,EAYX,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+K7D;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK,MAAM,GAEjB;IAGD,OAAO,KAAK,mBAAmB,GAI9B;IAED;;;;OAIG;IACG,IAAI;IA0CV;;;OAGG;IACH,MAAM;IAIN;;;;OAIG;IACH,KAAK;IA6BL;;;OAGG;IACH,OAAO;IAKP,WAAW;IAIX;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,aAAa;YAgBP,gBAAgB;IAiD9B,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,iBAAiB;IAezB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;IA+C9B,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,aAAa;IAMd,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;CAItC"}
|
|
@@ -73,7 +73,7 @@ export const foundationGridProActionsMenuRenderer = ActionsMenuRenderer.compose(
|
|
|
73
73
|
* ```
|
|
74
74
|
* @public
|
|
75
75
|
*/
|
|
76
|
-
export const getActionsMenuDef = (actions, overrideDef = {}, customActionsOpenerName = '⋮', isVertical = false, buttonAppearance) => {
|
|
76
|
+
export const getActionsMenuDef = (actions, overrideDef = {}, customActionsOpenerName = '⋮', isVertical = false, buttonAppearance, hideMenuSingleOption) => {
|
|
77
77
|
const actionsMenuDef = {
|
|
78
78
|
cellRenderer: GridProRendererTypes.actionsMenu,
|
|
79
79
|
cellRendererParams: {
|
|
@@ -81,6 +81,7 @@ export const getActionsMenuDef = (actions, overrideDef = {}, customActionsOpener
|
|
|
81
81
|
buttonAppearance,
|
|
82
82
|
isVertical,
|
|
83
83
|
buttonText: customActionsOpenerName,
|
|
84
|
+
hideMenuSingleOption: true,
|
|
84
85
|
},
|
|
85
86
|
cellStyle: { border: 'none', overflow: 'visible' },
|
|
86
87
|
field: 'actions',
|
|
@@ -164,6 +164,9 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
164
164
|
this.deinit();
|
|
165
165
|
this.init();
|
|
166
166
|
}
|
|
167
|
+
refreshRows() {
|
|
168
|
+
this.updateRowData(Array.from(this.rows.values()));
|
|
169
|
+
}
|
|
167
170
|
/**
|
|
168
171
|
* Sends a DATA_LOGOFF when the resource is an active stream
|
|
169
172
|
* @remarks Will only happen for DATASERER resources.
|
|
@@ -186,7 +189,11 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
186
189
|
if (agColumnDefs) {
|
|
187
190
|
this.agGrid.gridApi.setColumnDefs(agColumnDefs);
|
|
188
191
|
}
|
|
189
|
-
|
|
192
|
+
// If there's a provided transformer for updated rowData, process the rows
|
|
193
|
+
const data = this.rowDataMapper && typeof this.rowDataMapper === 'function'
|
|
194
|
+
? this.rowDataMapper(rowData)
|
|
195
|
+
: rowData;
|
|
196
|
+
this.agGrid.gridApi.setRowData(data);
|
|
190
197
|
this.requiresFullRowDataAndColDefs = false;
|
|
191
198
|
}
|
|
192
199
|
loadResourceData(withFullInit = true) {
|
|
@@ -294,7 +301,10 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
294
301
|
this.handleStreamInserts(rowsToInsert);
|
|
295
302
|
this.handleStreamDeletes(rowsToDelete);
|
|
296
303
|
this.handleStreamUpdates(rowsToUpdate);
|
|
297
|
-
this.
|
|
304
|
+
const transaction = this.rowDataMapper
|
|
305
|
+
? this.mapTransaction(this.agTransaction)
|
|
306
|
+
: this.agTransaction;
|
|
307
|
+
this.agGrid.gridApi.applyTransaction(transaction);
|
|
298
308
|
}
|
|
299
309
|
applyDataserverData(dataServerResult) {
|
|
300
310
|
var _a;
|
|
@@ -310,7 +320,13 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
310
320
|
this.handleStreamInserts(dataServerResult.inserts);
|
|
311
321
|
this.handleStreamDeletes(dataServerResult.deletes);
|
|
312
322
|
this.handleStreamUpdates(dataServerResult.updates);
|
|
313
|
-
this.agGrid.gridApi.applyTransaction(this.agTransaction);
|
|
323
|
+
this.agGrid.gridApi.applyTransaction(this.mapTransaction(this.agTransaction));
|
|
324
|
+
}
|
|
325
|
+
mapTransaction(transaction) {
|
|
326
|
+
if (!this.rowDataMapper) {
|
|
327
|
+
return transaction;
|
|
328
|
+
}
|
|
329
|
+
return Object.assign(Object.assign({}, transaction), { add: this.rowDataMapper(transaction.add, this.rows), update: this.rowDataMapper(transaction.update, this.rows), remove: this.rowDataMapper(transaction.remove, this.rows) });
|
|
314
330
|
}
|
|
315
331
|
handleStreamInserts(insertedRows) {
|
|
316
332
|
insertedRows === null || insertedRows === void 0 ? void 0 : insertedRows.forEach((insertData) => {
|
|
@@ -433,6 +449,9 @@ __decorate([
|
|
|
433
449
|
__decorate([
|
|
434
450
|
attr({ mode: 'boolean', attribute: 'restart-on-reconnection' })
|
|
435
451
|
], GridProGenesisDatasource.prototype, "restartOnReconnection", void 0);
|
|
452
|
+
__decorate([
|
|
453
|
+
observable
|
|
454
|
+
], GridProGenesisDatasource.prototype, "rowDataMapper", void 0);
|
|
436
455
|
GridProGenesisDatasource = __decorate([
|
|
437
456
|
customElement({
|
|
438
457
|
name: 'grid-pro-genesis-datasource',
|
package/dist/grid-pro.api.json
CHANGED
|
@@ -590,7 +590,7 @@
|
|
|
590
590
|
},
|
|
591
591
|
{
|
|
592
592
|
"kind": "Content",
|
|
593
|
-
"text": "{\n actionClick?: (rowData: any) => void;\n actionName?: string;\n appearance?: string;\n dataTestId?: string;\n isDisabled?: (rowData: any) => boolean;\n uniqueFieldName?: string;\n}"
|
|
593
|
+
"text": "{\n actionClick?: (rowData: any) => void;\n actionName?: string;\n appearance?: string;\n dataTestId?: string;\n isDisabled?: (rowData: any) => boolean;\n uniqueFieldName?: string;\n contentTemplate?: string;\n}"
|
|
594
594
|
},
|
|
595
595
|
{
|
|
596
596
|
"kind": "Content",
|
|
@@ -4401,7 +4401,7 @@
|
|
|
4401
4401
|
},
|
|
4402
4402
|
{
|
|
4403
4403
|
"kind": "Content",
|
|
4404
|
-
"text": ", customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => "
|
|
4404
|
+
"text": ", customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string, hideMenuSingleOption?: boolean) => "
|
|
4405
4405
|
},
|
|
4406
4406
|
{
|
|
4407
4407
|
"kind": "Reference",
|
|
@@ -6939,6 +6939,37 @@
|
|
|
6939
6939
|
"isProtected": false,
|
|
6940
6940
|
"isAbstract": false
|
|
6941
6941
|
},
|
|
6942
|
+
{
|
|
6943
|
+
"kind": "Method",
|
|
6944
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#refreshRows:member(1)",
|
|
6945
|
+
"docComment": "",
|
|
6946
|
+
"excerptTokens": [
|
|
6947
|
+
{
|
|
6948
|
+
"kind": "Content",
|
|
6949
|
+
"text": "refreshRows(): "
|
|
6950
|
+
},
|
|
6951
|
+
{
|
|
6952
|
+
"kind": "Content",
|
|
6953
|
+
"text": "void"
|
|
6954
|
+
},
|
|
6955
|
+
{
|
|
6956
|
+
"kind": "Content",
|
|
6957
|
+
"text": ";"
|
|
6958
|
+
}
|
|
6959
|
+
],
|
|
6960
|
+
"isStatic": false,
|
|
6961
|
+
"returnTypeTokenRange": {
|
|
6962
|
+
"startIndex": 1,
|
|
6963
|
+
"endIndex": 2
|
|
6964
|
+
},
|
|
6965
|
+
"releaseTag": "Public",
|
|
6966
|
+
"isProtected": false,
|
|
6967
|
+
"overloadIndex": 1,
|
|
6968
|
+
"parameters": [],
|
|
6969
|
+
"isOptional": false,
|
|
6970
|
+
"isAbstract": false,
|
|
6971
|
+
"name": "refreshRows"
|
|
6972
|
+
},
|
|
6942
6973
|
{
|
|
6943
6974
|
"kind": "Method",
|
|
6944
6975
|
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#removeFilter:member(1)",
|
|
@@ -7233,6 +7264,37 @@
|
|
|
7233
7264
|
"isProtected": false,
|
|
7234
7265
|
"isAbstract": false
|
|
7235
7266
|
},
|
|
7267
|
+
{
|
|
7268
|
+
"kind": "Property",
|
|
7269
|
+
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#rowDataMapper:member",
|
|
7270
|
+
"docComment": "",
|
|
7271
|
+
"excerptTokens": [
|
|
7272
|
+
{
|
|
7273
|
+
"kind": "Content",
|
|
7274
|
+
"text": "rowDataMapper: "
|
|
7275
|
+
},
|
|
7276
|
+
{
|
|
7277
|
+
"kind": "Reference",
|
|
7278
|
+
"text": "Function",
|
|
7279
|
+
"canonicalReference": "!Function:interface"
|
|
7280
|
+
},
|
|
7281
|
+
{
|
|
7282
|
+
"kind": "Content",
|
|
7283
|
+
"text": ";"
|
|
7284
|
+
}
|
|
7285
|
+
],
|
|
7286
|
+
"isReadonly": false,
|
|
7287
|
+
"isOptional": false,
|
|
7288
|
+
"releaseTag": "Public",
|
|
7289
|
+
"name": "rowDataMapper",
|
|
7290
|
+
"propertyTypeTokenRange": {
|
|
7291
|
+
"startIndex": 1,
|
|
7292
|
+
"endIndex": 2
|
|
7293
|
+
},
|
|
7294
|
+
"isStatic": false,
|
|
7295
|
+
"isProtected": false,
|
|
7296
|
+
"isAbstract": false
|
|
7297
|
+
},
|
|
7236
7298
|
{
|
|
7237
7299
|
"kind": "Property",
|
|
7238
7300
|
"canonicalReference": "@genesislcap/grid-pro!GridProGenesisDatasource#rowId:member",
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -91,6 +91,7 @@ export declare type ActionRendererParams = {
|
|
|
91
91
|
* A unique field name used to identify the action button used for E2E testing, so that the data-testid attribute value can be unique.
|
|
92
92
|
*/
|
|
93
93
|
uniqueFieldName?: string;
|
|
94
|
+
contentTemplate?: string;
|
|
94
95
|
};
|
|
95
96
|
|
|
96
97
|
/**
|
|
@@ -681,7 +682,7 @@ declare interface FuiCellRendererParams_2 extends ICellRendererParams {
|
|
|
681
682
|
* ```
|
|
682
683
|
* @public
|
|
683
684
|
*/
|
|
684
|
-
export declare const getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef;
|
|
685
|
+
export declare const getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string, hideMenuSingleOption?: boolean) => ColDef;
|
|
685
686
|
|
|
686
687
|
/**
|
|
687
688
|
* Get a Design System prefixed Checkbox template.
|
|
@@ -1209,6 +1210,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
1209
1210
|
reverse: boolean;
|
|
1210
1211
|
rowId: any;
|
|
1211
1212
|
restartOnReconnection: boolean;
|
|
1213
|
+
rowDataMapper: Function;
|
|
1212
1214
|
private dataSub;
|
|
1213
1215
|
private updateSub;
|
|
1214
1216
|
private connectionSub;
|
|
@@ -1247,6 +1249,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
1247
1249
|
* @public
|
|
1248
1250
|
*/
|
|
1249
1251
|
restart(): void;
|
|
1252
|
+
refreshRows(): void;
|
|
1250
1253
|
/**
|
|
1251
1254
|
* Sends a DATA_LOGOFF when the resource is an active stream
|
|
1252
1255
|
* @remarks Will only happen for DATASERER resources.
|
|
@@ -1261,6 +1264,7 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
1261
1264
|
private handleStreamResult;
|
|
1262
1265
|
private applyRequestServerData;
|
|
1263
1266
|
private applyDataserverData;
|
|
1267
|
+
private mapTransaction;
|
|
1264
1268
|
private handleStreamInserts;
|
|
1265
1269
|
private handleStreamDeletes;
|
|
1266
1270
|
private handleStreamUpdates;
|
|
@@ -1333,6 +1337,10 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1333
1337
|
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
|
|
1334
1338
|
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
|
|
1335
1339
|
closest<E extends Element = Element>(selectors: string): E;
|
|
1340
|
+
/**
|
|
1341
|
+
* Deinitialises the datasource, resetting it to its initial state.
|
|
1342
|
+
* @public
|
|
1343
|
+
*/
|
|
1336
1344
|
getAttribute(qualifiedName: string): string;
|
|
1337
1345
|
getAttributeNS(namespace: string, localName: string): string;
|
|
1338
1346
|
getAttributeNames(): string[];
|
|
@@ -9,7 +9,7 @@ Helper function to get ColDef [https://www.ag-grid.com/javascript-data-grid/colu
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef
|
|
12
|
+
getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string, hideMenuSingleOption?: boolean) => ColDef
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Example
|
|
@@ -35,6 +35,7 @@ Only supports Client-Side Row Model.
|
|
|
35
35
|
| [resourceName](./grid-pro.gridprogenesisdatasource.resourcename.md) | | string | |
|
|
36
36
|
| [restartOnReconnection](./grid-pro.gridprogenesisdatasource.restartonreconnection.md) | | boolean | |
|
|
37
37
|
| [reverse](./grid-pro.gridprogenesisdatasource.reverse.md) | | boolean | |
|
|
38
|
+
| [rowDataMapper](./grid-pro.gridprogenesisdatasource.rowdatamapper.md) | | Function | |
|
|
38
39
|
| [rowId](./grid-pro.gridprogenesisdatasource.rowid.md) | | any | |
|
|
39
40
|
|
|
40
41
|
## Methods
|
|
@@ -47,6 +48,7 @@ Only supports Client-Side Row Model.
|
|
|
47
48
|
| [deinit()](./grid-pro.gridprogenesisdatasource.deinit.md) | | Deinitialises the datasource, resetting it to its initial state. |
|
|
48
49
|
| [disconnectedCallback()](./grid-pro.gridprogenesisdatasource.disconnectedcallback.md) | | |
|
|
49
50
|
| [init()](./grid-pro.gridprogenesisdatasource.init.md) | | Initializes the datasource. |
|
|
51
|
+
| [refreshRows()](./grid-pro.gridprogenesisdatasource.refreshrows.md) | | |
|
|
50
52
|
| [removeFilter(fieldName)](./grid-pro.gridprogenesisdatasource.removefilter.md) | | |
|
|
51
53
|
| [reset()](./grid-pro.gridprogenesisdatasource.reset.md) | | Resets the datasource to its initial state. |
|
|
52
54
|
| [resourceNameChanged(oldValue, newValue)](./grid-pro.gridprogenesisdatasource.resourcenamechanged.md) | | |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [GridProGenesisDatasource](./grid-pro.gridprogenesisdatasource.md) > [refreshRows](./grid-pro.gridprogenesisdatasource.refreshrows.md)
|
|
4
|
+
|
|
5
|
+
## GridProGenesisDatasource.refreshRows() method
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
refreshRows(): void;
|
|
11
|
+
```
|
|
12
|
+
**Returns:**
|
|
13
|
+
|
|
14
|
+
void
|
|
15
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/grid-pro](./grid-pro.md) > [GridProGenesisDatasource](./grid-pro.gridprogenesisdatasource.md) > [rowDataMapper](./grid-pro.gridprogenesisdatasource.rowdatamapper.md)
|
|
4
|
+
|
|
5
|
+
## GridProGenesisDatasource.rowDataMapper property
|
|
6
|
+
|
|
7
|
+
**Signature:**
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
rowDataMapper: Function;
|
|
11
|
+
```
|
package/docs/api-report.md
CHANGED
|
@@ -71,6 +71,7 @@ export type ActionRendererParams = {
|
|
|
71
71
|
dataTestId?: string;
|
|
72
72
|
isDisabled?: (rowData: any) => boolean;
|
|
73
73
|
uniqueFieldName?: string;
|
|
74
|
+
contentTemplate?: string;
|
|
74
75
|
};
|
|
75
76
|
|
|
76
77
|
// @public
|
|
@@ -481,7 +482,7 @@ export const foundationGridProShadowOptions: ShadowRootInit;
|
|
|
481
482
|
export const foundationGridProStyles: ElementStyles;
|
|
482
483
|
|
|
483
484
|
// @public
|
|
484
|
-
export const getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string) => ColDef;
|
|
485
|
+
export const getActionsMenuDef: (actions: ActionMenuItem[], overrideDef?: ColDef, customActionsOpenerName?: string, isVertical?: boolean, buttonAppearance?: string, hideMenuSingleOption?: boolean) => ColDef;
|
|
485
486
|
|
|
486
487
|
// @public
|
|
487
488
|
export const getAgBooleanRendererTemplate: (designSystem?: string) => ViewTemplate<any, any>;
|
|
@@ -651,6 +652,8 @@ export class GridProGenesisDatasource extends GridProGenesisDatasource_base {
|
|
|
651
652
|
// (undocumented)
|
|
652
653
|
orderBy: string;
|
|
653
654
|
// (undocumented)
|
|
655
|
+
refreshRows(): void;
|
|
656
|
+
// (undocumented)
|
|
654
657
|
removeFilter(fieldName: string): void;
|
|
655
658
|
// (undocumented)
|
|
656
659
|
request: any;
|
|
@@ -666,6 +669,8 @@ export class GridProGenesisDatasource extends GridProGenesisDatasource_base {
|
|
|
666
669
|
// (undocumented)
|
|
667
670
|
reverse: boolean;
|
|
668
671
|
// (undocumented)
|
|
672
|
+
rowDataMapper: Function;
|
|
673
|
+
// (undocumented)
|
|
669
674
|
rowId: any;
|
|
670
675
|
// (undocumented)
|
|
671
676
|
setFilter(fieldName: string, newFilter: string): 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.41.
|
|
4
|
+
"version": "14.41.2-bny.2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"serve": "genx serve"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@genesislcap/foundation-testing": "
|
|
25
|
-
"@genesislcap/genx": "
|
|
24
|
+
"@genesislcap/foundation-testing": "14.41.2-bny.2",
|
|
25
|
+
"@genesislcap/genx": "14.41.2-bny.2",
|
|
26
26
|
"bulma": "^0.9.3"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@genesislcap/foundation-comms": "
|
|
30
|
-
"@genesislcap/foundation-ui": "
|
|
31
|
-
"@genesislcap/foundation-utils": "
|
|
29
|
+
"@genesislcap/foundation-comms": "14.41.2-bny.2",
|
|
30
|
+
"@genesislcap/foundation-ui": "14.41.2-bny.2",
|
|
31
|
+
"@genesislcap/foundation-utils": "14.41.2-bny.2",
|
|
32
32
|
"@microsoft/fast-colors": "^5.1.4",
|
|
33
33
|
"@microsoft/fast-components": "^2.21.3",
|
|
34
34
|
"@microsoft/fast-element": "^1.7.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"customElements": "dist/custom-elements.json",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "4796266e66246b813f0f96b8617cd9df1d6ec891"
|
|
55
55
|
}
|