@adaptabletools/adaptable 15.3.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "15.3.0",
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",
@@ -56,6 +56,6 @@
56
56
  "uuid": "^3.3.2"
57
57
  },
58
58
  "peerDependencies": {
59
- "@ag-grid-community/core": ">=29.3.4"
59
+ "@ag-grid-community/core": ">=29.3.0"
60
60
  }
61
61
  }
@@ -1,2 +1,2 @@
1
- declare const _default: 1683812137774;
1
+ declare const _default: 1684762477916;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1683812137774;
3
+ exports.default = 1684762477916;
@@ -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
- * Function invoked 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!
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
@@ -6,7 +6,7 @@ import { ExpressionOptions } from './ExpressionOptions';
6
6
  import { PredicateOptions } from './PredicateOptions';
7
7
  import { AdaptableObject } from '../types';
8
8
  /**
9
- * Options for managing AdapTableQL - the Adaptable Query Language which evaluates Predicates and Expressions
9
+ * Options for managing AdapTableQL: AdapTable's Query Language which evaluates Predicates and Expressions
10
10
  */
11
11
  export interface AdaptableQLOptions<TData = any> {
12
12
  /**
@@ -18,7 +18,7 @@ export interface AdaptableQLOptions<TData = any> {
18
18
  */
19
19
  caseSensitiveTextComparisons?: boolean;
20
20
  /**
21
- * Whether a Module (or a specific expression) should be evaluated by AdapTableQL
21
+ * Whether a Module (or specific expression) should be evaluated by AdapTableQL
22
22
  * @defaultValue All Modules are evaluated by AdapTable
23
23
  */
24
24
  evaluateAdaptableQLExternally?: (context: EvaluateExpressionExternallyContext<TData>) => boolean;
@@ -35,7 +35,7 @@ export interface AdaptableQLOptions<TData = any> {
35
35
  */
36
36
  customPredicateDefs?: AdaptablePredicateDef[];
37
37
  /**
38
- * Reference a Column's Header (FriendlyName) in all Expression overviews (instead of ColumnId)
38
+ * Reference a Column's Header (i.e. FriendlyName) in all Expression overviews (instead of ColumnId)
39
39
  *
40
40
  * @defaultValue true
41
41
  * @noCodeItem
@@ -51,7 +51,7 @@ export interface EvaluateExpressionExternallyContext<TData = any> extends BaseCo
51
51
  */
52
52
  module: AdaptableQLModule;
53
53
  /**
54
- * The AdapTable Object which contains the Expression or Predicates
54
+ * AdapTable Object which contains the Expression or Predicates
55
55
  */
56
56
  object?: AdaptableObject;
57
57
  /**
@@ -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.getGridApi().refreshCells(null, aggCalculatedColumnIds);
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
- private updateRowGroupsExpandedState;
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;
@@ -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
  }