@genesislcap/grid-pro 14.127.2 → 14.127.4
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 +22 -0
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts +9 -14
- package/dist/dts/grid-pro-genesis-datasource/grid-pro-genesis-datasource.d.ts.map +1 -1
- package/dist/esm/grid-pro-genesis-datasource/grid-pro-genesis-datasource.js +33 -5
- package/dist/grid-pro.d.ts +9 -14
- package/package.json +8 -8
|
@@ -6087,6 +6087,19 @@
|
|
|
6087
6087
|
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
6088
6088
|
}
|
|
6089
6089
|
},
|
|
6090
|
+
{
|
|
6091
|
+
"kind": "field",
|
|
6092
|
+
"name": "defaultRowIdByResourceType",
|
|
6093
|
+
"type": {
|
|
6094
|
+
"text": "string"
|
|
6095
|
+
},
|
|
6096
|
+
"privacy": "private",
|
|
6097
|
+
"readonly": true,
|
|
6098
|
+
"inheritedFrom": {
|
|
6099
|
+
"name": "GridProGenesisDatasource",
|
|
6100
|
+
"module": "src/grid-pro-genesis-datasource/grid-pro-genesis-datasource.ts"
|
|
6101
|
+
}
|
|
6102
|
+
},
|
|
6090
6103
|
{
|
|
6091
6104
|
"kind": "method",
|
|
6092
6105
|
"name": "init",
|
|
@@ -8342,6 +8355,15 @@
|
|
|
8342
8355
|
"privacy": "private",
|
|
8343
8356
|
"readonly": true
|
|
8344
8357
|
},
|
|
8358
|
+
{
|
|
8359
|
+
"kind": "field",
|
|
8360
|
+
"name": "defaultRowIdByResourceType",
|
|
8361
|
+
"type": {
|
|
8362
|
+
"text": "string"
|
|
8363
|
+
},
|
|
8364
|
+
"privacy": "private",
|
|
8365
|
+
"readonly": true
|
|
8366
|
+
},
|
|
8345
8367
|
{
|
|
8346
8368
|
"kind": "method",
|
|
8347
8369
|
"name": "init",
|
|
@@ -120,13 +120,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
120
120
|
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
121
121
|
webkitMatchesSelector(selectors: string): boolean;
|
|
122
122
|
readonly baseURI: string;
|
|
123
|
-
readonly childNodes: NodeListOf<ChildNode>;
|
|
124
|
-
* Initializes the datasource and loads the data for the grid.
|
|
125
|
-
* Handles both snapshot and stream data (for both REQUEST_SERVER and DATASERVER resource types).
|
|
126
|
-
*
|
|
127
|
-
* @param withFullInit - if true, will call datasource.init() with requiresMetadataFetch = true, fetching fresh metadata
|
|
128
|
-
* @internal
|
|
129
|
-
*/
|
|
123
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
130
124
|
readonly firstChild: ChildNode;
|
|
131
125
|
readonly isConnected: boolean;
|
|
132
126
|
readonly lastChild: ChildNode;
|
|
@@ -258,12 +252,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
258
252
|
onclose: (this: GlobalEventHandlers, ev: Event) => any;
|
|
259
253
|
oncontextmenu: (this: GlobalEventHandlers, ev: MouseEvent) => any;
|
|
260
254
|
oncuechange: (this: GlobalEventHandlers, ev: Event) => any;
|
|
261
|
-
ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
|
|
262
|
-
* Maps the transaction data to the row data mapper function, if it exists.
|
|
263
|
-
* @param transaction - The transaction data to be mapped.
|
|
264
|
-
* @param operations - The operations to be mapped. Can be 'add', 'update' or 'remove'.
|
|
265
|
-
* @returns The mapped transaction (if the row data mapper function exists), or the original transaction.
|
|
266
|
-
*/
|
|
255
|
+
ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
|
|
267
256
|
ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
268
257
|
ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
269
258
|
ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
@@ -386,11 +375,17 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
386
375
|
deepClone(): Node;
|
|
387
376
|
private get agGrid();
|
|
388
377
|
/**
|
|
389
|
-
* Returns the row
|
|
378
|
+
* Returns the `row-id` attribute, depending on the resource type.
|
|
390
379
|
* @remarks Will favour the `row-id` attribute if set.
|
|
391
380
|
* @internal
|
|
392
381
|
*/
|
|
393
382
|
private get rowId();
|
|
383
|
+
/**
|
|
384
|
+
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
385
|
+
* @internal
|
|
386
|
+
*/
|
|
387
|
+
private get hasDefaultRowId();
|
|
388
|
+
private get defaultRowIdByResourceType();
|
|
394
389
|
/**
|
|
395
390
|
* Initializes the datasource.
|
|
396
391
|
* @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,IAAI,EACJ,UAAU,EAaX,MAAM,+BAA+B,CAAC;AAMvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAgBtE;;;GAGG;AACH,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB
|
|
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,IAAI,EACJ,UAAU,EAaX,MAAM,+BAA+B,CAAC;AAMvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAgBtE;;;GAGG;AACH,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AK,eAAe,GAM1B;IAED,OAAO,KAAK,0BAA0B,GAIrC;IAED;;;;OAIG;IACG,IAAI;IAmDV;;;OAGG;IACH,MAAM;IAIN;;;;OAIG;IACH,KAAK;IA6BL;;;OAGG;IACH,OAAO;IAKP;;OAEG;IACH,WAAW;IAIX;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAUlB;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IAWpB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAgBlB;;;;;OAKG;YACW,kBAAkB;IAWhC;;;;;;OAMG;YACW,gBAAgB;IA4C9B,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,sBAAsB;IA2C9B,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,sBAAsB;IAmC9B,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,wBAAwB;IAqBhC;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAyBtB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,mBAAmB;IAwB3B,OAAO,CAAC,eAAe;IAwEvB,OAAO,CAAC,aAAa;IAMd,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAK9C,YAAY,CAAC,SAAS,EAAE,MAAM;CAItC"}
|
|
@@ -94,7 +94,7 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
94
94
|
}
|
|
95
95
|
// Genesis Specific
|
|
96
96
|
/**
|
|
97
|
-
* Returns the row
|
|
97
|
+
* Returns the `row-id` attribute, depending on the resource type.
|
|
98
98
|
* @remarks Will favour the `row-id` attribute if set.
|
|
99
99
|
* @internal
|
|
100
100
|
*/
|
|
@@ -105,6 +105,20 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
105
105
|
return DatasourceDefaults.REQUEST_SERVER_ROW_ID;
|
|
106
106
|
return DatasourceDefaults.DATASERVER_ROW_ID;
|
|
107
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
get hasDefaultRowId() {
|
|
113
|
+
return (!this.rowIdAttr ||
|
|
114
|
+
this.rowIdAttr === DatasourceDefaults.REQUEST_SERVER_ROW_ID ||
|
|
115
|
+
this.rowIdAttr === DatasourceDefaults.DATASERVER_ROW_ID);
|
|
116
|
+
}
|
|
117
|
+
get defaultRowIdByResourceType() {
|
|
118
|
+
return this.isRequestServer
|
|
119
|
+
? DatasourceDefaults.REQUEST_SERVER_ROW_ID
|
|
120
|
+
: DatasourceDefaults.DATASERVER_ROW_ID;
|
|
121
|
+
}
|
|
108
122
|
/**
|
|
109
123
|
* Initializes the datasource.
|
|
110
124
|
* @public
|
|
@@ -448,15 +462,29 @@ let GridProGenesisDatasource = class GridProGenesisDatasource extends LifecycleM
|
|
|
448
462
|
}
|
|
449
463
|
handleStreamDeletes(deletedRows) {
|
|
450
464
|
deletedRows === null || deletedRows === void 0 ? void 0 : deletedRows.forEach((deleteData) => {
|
|
451
|
-
|
|
465
|
+
if (this.hasDefaultRowId || this.isRequestServer) {
|
|
466
|
+
this.agTransaction.remove.push({ [this.rowId]: deleteData[this.rowId] });
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
const rowToBeDeleted = Object.values(Object.fromEntries(this.rows)).find((obj) => obj[this.defaultRowIdByResourceType] === deleteData[this.defaultRowIdByResourceType]);
|
|
470
|
+
this.agTransaction.remove.push({ [this.rowId]: rowToBeDeleted[this.rowId] });
|
|
471
|
+
}
|
|
452
472
|
this.rows.delete(deleteData[this.rowId]);
|
|
453
473
|
});
|
|
454
474
|
}
|
|
455
475
|
handleStreamUpdates(updatedRows) {
|
|
456
476
|
updatedRows === null || updatedRows === void 0 ? void 0 : updatedRows.forEach((updateData) => {
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
477
|
+
let updatedRow;
|
|
478
|
+
if (this.hasDefaultRowId || this.isRequestServer) {
|
|
479
|
+
const rowToBeUpdated = this.rows.get(updateData[this.rowId]);
|
|
480
|
+
updatedRow = Object.assign(Object.assign({}, rowToBeUpdated), updateData);
|
|
481
|
+
this.agTransaction.update.push(updatedRow);
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
const rowToBeUpdated = Object.values(Object.fromEntries(this.rows)).find((obj) => obj[this.defaultRowIdByResourceType] === updateData[this.defaultRowIdByResourceType]);
|
|
485
|
+
updatedRow = Object.assign(Object.assign({}, rowToBeUpdated), updateData);
|
|
486
|
+
this.agTransaction.update.push(updatedRow);
|
|
487
|
+
}
|
|
460
488
|
this.rows.set(updateData[this.rowId], updatedRow);
|
|
461
489
|
});
|
|
462
490
|
}
|
package/dist/grid-pro.d.ts
CHANGED
|
@@ -1702,11 +1702,17 @@ export declare class GridProGenesisDatasource extends GridProGenesisDatasource_b
|
|
|
1702
1702
|
deepClone(): Node;
|
|
1703
1703
|
private get agGrid();
|
|
1704
1704
|
/**
|
|
1705
|
-
* Returns the row
|
|
1705
|
+
* Returns the `row-id` attribute, depending on the resource type.
|
|
1706
1706
|
* @remarks Will favour the `row-id` attribute if set.
|
|
1707
1707
|
* @internal
|
|
1708
1708
|
*/
|
|
1709
1709
|
private get rowId();
|
|
1710
|
+
/**
|
|
1711
|
+
* Returns whether the `row-id` attribute is the default one, depending on the resource type.
|
|
1712
|
+
* @internal
|
|
1713
|
+
*/
|
|
1714
|
+
private get hasDefaultRowId();
|
|
1715
|
+
private get defaultRowIdByResourceType();
|
|
1710
1716
|
/**
|
|
1711
1717
|
* Initializes the datasource.
|
|
1712
1718
|
* @public
|
|
@@ -1902,13 +1908,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
1902
1908
|
toggleAttribute(qualifiedName: string, force?: boolean): boolean;
|
|
1903
1909
|
webkitMatchesSelector(selectors: string): boolean;
|
|
1904
1910
|
readonly baseURI: string;
|
|
1905
|
-
readonly childNodes: NodeListOf<ChildNode>;
|
|
1906
|
-
* Initializes the datasource and loads the data for the grid.
|
|
1907
|
-
* Handles both snapshot and stream data (for both REQUEST_SERVER and DATASERVER resource types).
|
|
1908
|
-
*
|
|
1909
|
-
* @param withFullInit - if true, will call datasource.init() with requiresMetadataFetch = true, fetching fresh metadata
|
|
1910
|
-
* @internal
|
|
1911
|
-
*/
|
|
1911
|
+
readonly childNodes: NodeListOf<ChildNode>;
|
|
1912
1912
|
readonly firstChild: ChildNode;
|
|
1913
1913
|
readonly isConnected: boolean;
|
|
1914
1914
|
readonly lastChild: ChildNode;
|
|
@@ -2040,12 +2040,7 @@ declare const GridProGenesisDatasource_base: (new (...args: any[]) => {
|
|
|
2040
2040
|
onclose: (this: GlobalEventHandlers, ev: Event) => any;
|
|
2041
2041
|
oncontextmenu: (this: GlobalEventHandlers, ev: MouseEvent) => any;
|
|
2042
2042
|
oncuechange: (this: GlobalEventHandlers, ev: Event) => any;
|
|
2043
|
-
ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
|
|
2044
|
-
* Maps the transaction data to the row data mapper function, if it exists.
|
|
2045
|
-
* @param transaction - The transaction data to be mapped.
|
|
2046
|
-
* @param operations - The operations to be mapped. Can be 'add', 'update' or 'remove'.
|
|
2047
|
-
* @returns The mapped transaction (if the row data mapper function exists), or the original transaction.
|
|
2048
|
-
*/
|
|
2043
|
+
ondblclick: (this: GlobalEventHandlers, ev: MouseEvent) => any;
|
|
2049
2044
|
ondrag: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
2050
2045
|
ondragend: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
|
2051
2046
|
ondragenter: (this: GlobalEventHandlers, ev: DragEvent) => any;
|
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.127.
|
|
4
|
+
"version": "14.127.4",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"test:debug": "genx test --debug"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@genesislcap/foundation-testing": "14.127.
|
|
34
|
-
"@genesislcap/genx": "14.127.
|
|
33
|
+
"@genesislcap/foundation-testing": "14.127.4",
|
|
34
|
+
"@genesislcap/genx": "14.127.4",
|
|
35
35
|
"rimraf": "^3.0.2"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@genesislcap/foundation-comms": "14.127.
|
|
39
|
-
"@genesislcap/foundation-logger": "14.127.
|
|
40
|
-
"@genesislcap/foundation-ui": "14.127.
|
|
41
|
-
"@genesislcap/foundation-utils": "14.127.
|
|
38
|
+
"@genesislcap/foundation-comms": "14.127.4",
|
|
39
|
+
"@genesislcap/foundation-logger": "14.127.4",
|
|
40
|
+
"@genesislcap/foundation-ui": "14.127.4",
|
|
41
|
+
"@genesislcap/foundation-utils": "14.127.4",
|
|
42
42
|
"@microsoft/fast-colors": "^5.3.1",
|
|
43
43
|
"@microsoft/fast-components": "^2.30.6",
|
|
44
44
|
"@microsoft/fast-element": "^1.12.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
64
|
"customElements": "dist/custom-elements.json",
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c33b055140917037d95b26b0a6c7e4be4132f354"
|
|
66
66
|
}
|