@adaptabletools/adaptable 12.0.7 → 12.0.8

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": "12.0.7",
3
+ "version": "12.0.8",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
5
  "keywords": [
6
6
  "web-components",
@@ -1,2 +1,2 @@
1
- declare const _default: 1657722189050;
1
+ declare const _default: 1657781105254;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1657722189050;
3
+ exports.default = 1657781105254;
@@ -1,4 +1,4 @@
1
- import { AdaptableApi } from '../../Api/AdaptableApi';
1
+ import { BaseContext } from '../../../types';
2
2
  import { SelectedCellInfo } from '../Selection/SelectedCellInfo';
3
3
  /**
4
4
  * Defines the Summary operations provides for Selected Cells
@@ -30,7 +30,7 @@ export interface CellSummaryOperation {
30
30
  /**
31
31
  * Context provided to a custom Cell Summary Operation function
32
32
  */
33
- export interface CellSummaryOperationContext {
33
+ export interface CellSummaryOperationContext extends BaseContext {
34
34
  /**
35
35
  * Currently selected cells
36
36
  */
@@ -51,8 +51,4 @@ export interface CellSummaryOperationContext {
51
51
  * Count of currently selected cells
52
52
  */
53
53
  distinctCount: number;
54
- /**
55
- * Adaptable Api object
56
- */
57
- api: AdaptableApi;
58
54
  }
@@ -98,14 +98,15 @@ class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
98
98
  const api = this.api;
99
99
  operationDefinitions === null || operationDefinitions === void 0 ? void 0 : operationDefinitions.forEach((operation) => {
100
100
  if (operation.operationFunction) {
101
- selectedCellSummary[operation.operationName] = operation.operationFunction({
101
+ const cellSummaryOperationContext = {
102
102
  selectedCellInfo,
103
103
  distinctCount,
104
104
  allValues,
105
105
  numericValues,
106
106
  numericColumns,
107
- api,
108
- });
107
+ adaptableApi: this.api,
108
+ };
109
+ selectedCellSummary[operation.operationName] = operation.operationFunction(cellSummaryOperationContext);
109
110
  }
110
111
  });
111
112
  }