@adaptabletools/adaptable 15.3.1 → 15.3.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/bundle.cjs.js +7 -7
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -0
- package/src/AdaptableOptions/ActionOptions.d.ts +1 -1
- package/src/Api/GridApi.d.ts +11 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +12 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -0
- package/src/Api/Implementation/GridApiImpl.js +8 -0
- package/src/agGrid/Adaptable.d.ts +4 -1
- package/src/agGrid/Adaptable.js +6 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "15.3.
|
|
3
|
+
"version": "15.3.2",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1684762477916;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -208,6 +208,10 @@ export interface IAdaptable {
|
|
|
208
208
|
includeGroupRows?: boolean;
|
|
209
209
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
210
210
|
}): IRowNode[];
|
|
211
|
+
getGroupRowNodes(config?: {
|
|
212
|
+
filterFn?: (rowNode: IRowNode) => boolean;
|
|
213
|
+
}): IRowNode[];
|
|
214
|
+
updateRowGroupsExpandedState(layout?: Layout): void;
|
|
211
215
|
getRowsInViewport(): IRowNode[];
|
|
212
216
|
isGroupRowNode(rowNode: IRowNode): boolean;
|
|
213
217
|
isVisibleNode(rowNode: IRowNode): boolean;
|
|
@@ -150,7 +150,7 @@ export interface ActionRowFormOptions<TData = any> {
|
|
|
150
150
|
*/
|
|
151
151
|
formButtons?: AdaptableButton<ActionRowFormContext<TData>>[];
|
|
152
152
|
/**
|
|
153
|
-
*
|
|
153
|
+
* Event published when the form in an Action Row is submitted via a standard button (provided by AdapTable). This is not invoked when custom form buttons are provided!
|
|
154
154
|
*
|
|
155
155
|
* @param actionRowSubmittedInfo the form submitted info
|
|
156
156
|
* @defaultValue undefined
|
package/src/Api/GridApi.d.ts
CHANGED
|
@@ -225,6 +225,13 @@ export interface GridApi {
|
|
|
225
225
|
includeGroupRows?: boolean;
|
|
226
226
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
227
227
|
}): IRowNode[];
|
|
228
|
+
/**
|
|
229
|
+
* Retrieves all Grouped Row Nodes currently in the Grid
|
|
230
|
+
* @param config - configuration
|
|
231
|
+
*/
|
|
232
|
+
getGroupRowNodes(config?: {
|
|
233
|
+
filterFn?: (rowNode: IRowNode) => boolean;
|
|
234
|
+
}): IRowNode[];
|
|
228
235
|
/**
|
|
229
236
|
* Retrieves Row Nodes that contain given Primary Keys
|
|
230
237
|
* @param primaryKeyValues Primary Kev Values to look up
|
|
@@ -434,6 +441,10 @@ export interface GridApi {
|
|
|
434
441
|
* @param rowNodes AG Grid rows
|
|
435
442
|
*/
|
|
436
443
|
refreshRowNodes(rowNodes: IRowNode[]): void;
|
|
444
|
+
/**
|
|
445
|
+
* Forces a re-render of all Grouped rows (including aggregations)
|
|
446
|
+
*/
|
|
447
|
+
refreshGroupRowNodes(): void;
|
|
437
448
|
/**
|
|
438
449
|
* Returns number of rows in Data Source
|
|
439
450
|
*/
|
|
@@ -61,7 +61,12 @@ class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
61
61
|
});
|
|
62
62
|
// refresh calculated columns
|
|
63
63
|
const aggCalculatedColumnIds = aggregatedCalculatedColumns.map((calculatedColumn) => calculatedColumn.ColumnId);
|
|
64
|
-
this.
|
|
64
|
+
if (this.getLayoutApi().internalApi.isLayoutGrouped()) {
|
|
65
|
+
this.getGridApi().refreshGroupRowNodes();
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
this.getGridApi().refreshCells(null, aggCalculatedColumnIds);
|
|
69
|
+
}
|
|
65
70
|
}
|
|
66
71
|
refreshAggregatedCalculatedColumn(columnId) {
|
|
67
72
|
var _a;
|
|
@@ -74,6 +79,12 @@ class CalculatedColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
74
79
|
.internalApi.getCalculatedColumnExpressionService()
|
|
75
80
|
.createAggregatedScalarLiveValue(aggregatedCalculatedColumn);
|
|
76
81
|
this.getGridApi().refreshCells(null, [columnId]);
|
|
82
|
+
if (this.getLayoutApi().internalApi.isLayoutGrouped()) {
|
|
83
|
+
this.getGridApi().refreshGroupRowNodes();
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.getGridApi().refreshCells(null, [columnId]);
|
|
87
|
+
}
|
|
77
88
|
}
|
|
78
89
|
showCalculatedColumnPopup() {
|
|
79
90
|
(0, logDeprecation_1.logDeprecation)(this.adaptable.logger, 'CalculatedColumnApi', 'showCalculatedColumnPopup', 'openCalculatedColumnSettingsPanel');
|
|
@@ -78,6 +78,9 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
78
78
|
includeGroupRows?: boolean;
|
|
79
79
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
80
80
|
}): IRowNode[];
|
|
81
|
+
getGroupRowNodes(config?: {
|
|
82
|
+
filterFn?: (rowNode: IRowNode) => boolean;
|
|
83
|
+
}): IRowNode[];
|
|
81
84
|
getGridCellFromRowNode(rowNode: IRowNode, columnId: string): GridCell | undefined;
|
|
82
85
|
getRawValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
|
|
83
86
|
getDisplayValueFromRowNode(rowNode: IRowNode, columnId: string): any | undefined;
|
|
@@ -124,6 +127,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
124
127
|
refreshRowByPrimaryKey(primaryKey: any): void;
|
|
125
128
|
refreshRowNode(rowNode: IRowNode): void;
|
|
126
129
|
refreshRowNodes(rowNodes: IRowNode[]): void;
|
|
130
|
+
refreshGroupRowNodes(): void;
|
|
127
131
|
isCellEditable(gridCell: GridCell): boolean;
|
|
128
132
|
areCellsEditable(gridCells: GridCell[]): boolean;
|
|
129
133
|
isEveryCellEditable(gridCells: GridCell[]): boolean;
|
|
@@ -268,6 +268,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
268
268
|
getAllRowNodes(config) {
|
|
269
269
|
return this.adaptable.getAllRowNodes(config);
|
|
270
270
|
}
|
|
271
|
+
getGroupRowNodes(config) {
|
|
272
|
+
return this.adaptable.getGroupRowNodes(config);
|
|
273
|
+
}
|
|
271
274
|
getGridCellFromRowNode(rowNode, columnId) {
|
|
272
275
|
return this.adaptable.getGridCellFromRowNode(rowNode, columnId);
|
|
273
276
|
}
|
|
@@ -453,6 +456,11 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
453
456
|
refreshRowNodes(rowNodes) {
|
|
454
457
|
this.adaptable.redrawRows(rowNodes);
|
|
455
458
|
}
|
|
459
|
+
refreshGroupRowNodes() {
|
|
460
|
+
// see https://www.ag-grid.com/javascript-data-grid/client-side-row-stages/#refreshing-the-client-side-model
|
|
461
|
+
this.adaptable.api.internalApi.getAgGridInstance().api.refreshClientSideRowModel('group');
|
|
462
|
+
this.adaptable.updateRowGroupsExpandedState();
|
|
463
|
+
}
|
|
456
464
|
isCellEditable(gridCell) {
|
|
457
465
|
if (!gridCell) {
|
|
458
466
|
return false;
|
|
@@ -188,7 +188,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
188
188
|
setColumnOrder(VisibleColumnList: string[]): void;
|
|
189
189
|
private persistLayout;
|
|
190
190
|
setLayout(layout?: Layout): void;
|
|
191
|
-
|
|
191
|
+
updateRowGroupsExpandedState(layout?: Layout): void;
|
|
192
192
|
private updateLayoutFromGrid;
|
|
193
193
|
setSelectedCells(): SelectedCellInfo | undefined;
|
|
194
194
|
setSelectedRows(): SelectedRowInfo | undefined;
|
|
@@ -235,6 +235,9 @@ export declare class Adaptable implements IAdaptable {
|
|
|
235
235
|
includeGroupRows?: boolean;
|
|
236
236
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
237
237
|
}): IRowNode[];
|
|
238
|
+
getGroupRowNodes(config?: {
|
|
239
|
+
filterFn?: (rowNode: IRowNode) => boolean;
|
|
240
|
+
}): IRowNode[];
|
|
238
241
|
getRowsInViewport(): IRowNode[];
|
|
239
242
|
selectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
|
|
240
243
|
deSelectNodes(rowNodes: IRowNode[], clearSelection: boolean): void;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -2131,6 +2131,12 @@ class Adaptable {
|
|
|
2131
2131
|
this.forAllRowNodesDo((rowNode) => rowNodes.push(rowNode), config);
|
|
2132
2132
|
return rowNodes;
|
|
2133
2133
|
}
|
|
2134
|
+
getGroupRowNodes(config) {
|
|
2135
|
+
return this.getAllRowNodes({
|
|
2136
|
+
includeGroupRows: true,
|
|
2137
|
+
filterFn: (rowNode) => this.isGroupRowNode(rowNode),
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2134
2140
|
getRowsInViewport() {
|
|
2135
2141
|
return this.gridOptions.api.getRenderedNodes();
|
|
2136
2142
|
}
|