@adaptabletools/adaptable 21.0.11 → 21.0.12

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": "21.0.11",
3
+ "version": "21.0.12",
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",
@@ -8,6 +8,7 @@ import { agGridDataTypeDefinitions, ALL_ADAPTABLE_DATA_TYPES } from './agGridDat
8
8
  import { isPivotGrandTotal } from '../Api/Implementation/ColumnApiImpl';
9
9
  import { isPivotColumnTotal } from '../layout-manager/src/isPivotColumnTotal';
10
10
  import { isPivotAggTotalColumn } from '../layout-manager/src/isPivotAggTotalColumn';
11
+ import { isWeightedAverageAggFuncName } from '../AdaptableState/Common/AggregationColumns';
11
12
  // AG GRID obfuscates its internals, this is (currently) the best way to get hold of its internal services
12
13
  const DANGER_AG_GRID_BEANS_MAP = {};
13
14
  const getColumnApiModule = () => ColumnApiModule;
@@ -608,9 +609,10 @@ export class AgGridAdapter {
608
609
  return false;
609
610
  }
610
611
  getColumnAggregationFunctions(colDef) {
611
- const result = colDef.allowedAggFuncs || ['sum', 'min', 'max', 'count', 'avg', 'first', 'last']; // those are the default fns aggrid supports out-of-the-box
612
+ let result = [].concat(colDef.allowedAggFuncs || ['sum', 'min', 'max', 'count', 'avg', 'first', 'last']); // those are the default fns aggrid supports out-of-the-box
612
613
  const gridOptionsAggFuncs = this.adaptableApi.agGridApi.getGridOption('aggFuncs') || {};
613
614
  result.push(...Object.keys(gridOptionsAggFuncs));
615
+ result = result.filter((func) => !isWeightedAverageAggFuncName(func));
614
616
  return [...new Set(result)];
615
617
  }
616
618
  isTreeColumn(isGeneratedRowGroupColumn) {
@@ -17,6 +17,7 @@ import { AdaptableFilterHandler } from './AdaptableFilterHandler';
17
17
  import { AgGridFilterAdapterFactory } from './AgGridFilterAdapter';
18
18
  import { AgGridFloatingFilterAdapterFactory } from './AgGridFloatingFilterAdapter';
19
19
  import { errorOnce } from './AdaptableLogger';
20
+ import { isWeightedAverageAggFuncName } from '../AdaptableState/Common/AggregationColumns';
20
21
  export function getEditorForColumnDataType(columnDataType, variant) {
21
22
  if (columnDataType === 'number') {
22
23
  return variant === 'react' ? AdaptableReactNumberEditor : AdaptableNumberEditor;
@@ -516,7 +517,10 @@ export class AgGridColumnAdapter {
516
517
  }
517
518
  setupColumnAllowedAggFuncs({ col, abColumn }) {
518
519
  this.setColDefProperty(col, 'allowedAggFuncs', () => {
519
- return abColumn.availableAggregationFunctions;
520
+ if (!abColumn.availableAggregationFunctions) {
521
+ return undefined;
522
+ }
523
+ return abColumn.availableAggregationFunctions.filter((func) => !isWeightedAverageAggFuncName(func));
520
524
  });
521
525
  }
522
526
  setupColumnType(columnSetupInfo) {
package/src/env.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export default {
2
2
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
3
- PUBLISH_TIMESTAMP: 1761929176914 || Date.now(),
4
- VERSION: "21.0.11" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1762861055223 || Date.now(),
4
+ VERSION: "21.0.12" || '--current-version--',
5
5
  };