@adaptabletools/adaptable 20.0.0-canary.0 → 20.0.0-canary.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": "20.0.0-canary.0",
3
+ "version": "20.0.0-canary.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",
@@ -84,9 +84,9 @@ export interface ActionColumnSettings {
84
84
  /**
85
85
  * Button that is displayed inside an Action Column
86
86
  */
87
- export interface ActionColumnButton<ActionColumnButtonContext> extends AdaptableButton<BaseContext> {
87
+ export interface ActionColumnButton<T> extends AdaptableButton<ActionColumnContext<T>> {
88
88
  /**
89
- * Command to assign to Button; will open a Row Form
89
+ * Command to assign to Action Column Button that displays a Row Form
90
90
  */
91
91
  command?: ActionButtonCommand;
92
92
  }
@@ -150,7 +150,7 @@ const DefaultAdaptableOptions = {
150
150
  indicateFilteredColumns: true,
151
151
  autoApplyColumnFilter: true,
152
152
  defaultNumericColumnFilter: 'Equals',
153
- defaultStringColumnFilter: 'Contains',
153
+ defaultTextColumnFilter: 'Contains',
154
154
  defaultDateColumnFilter: 'On',
155
155
  hideQuickFilterDropdown: undefined,
156
156
  hideQuickFilterInput: undefined,
@@ -94,12 +94,12 @@ export interface ColumnFilterOptions<TData = any> {
94
94
  */
95
95
  defaultNumericColumnFilter?: StrictExtract<SystemFilterPredicateId, 'GreaterThan' | 'LessThan' | 'Equals' | 'NotEquals' | 'In'> | ((column: AdaptableColumn) => StrictExtract<SystemFilterPredicateId, 'GreaterThan' | 'LessThan' | 'Equals' | 'NotEquals' | 'In'>);
96
96
  /**
97
- * Default filter type for string Columns
97
+ * Default filter type for text Columns
98
98
  *
99
99
  * @defaultValue Contains
100
100
  * @gridInfoItem
101
101
  */
102
- defaultStringColumnFilter?: StrictExtract<SystemFilterPredicateId, 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'In'> | ((column: AdaptableColumn) => StrictExtract<SystemFilterPredicateId, 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'In'>);
102
+ defaultTextColumnFilter?: StrictExtract<SystemFilterPredicateId, 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'In'> | ((column: AdaptableColumn) => StrictExtract<SystemFilterPredicateId, 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'In'>);
103
103
  /**
104
104
  * Default filter type for date Columns
105
105
  *
@@ -109,11 +109,11 @@ export interface ColumnScopeApi {
109
109
  */
110
110
  isColumnInNumericScope(column: AdaptableColumn, scope: ColumnScope): boolean;
111
111
  /**
112
- * True if Scope has String DataType containing Column
112
+ * True if Scope has text DataType containing Column
113
113
  * @param column Column to check
114
114
  * @param scope Scope to check
115
115
  */
116
- isColumnInStringsScope(column: AdaptableColumn, scope: ColumnScope): boolean;
116
+ isColumnInTextScope(column: AdaptableColumn, scope: ColumnScope): boolean;
117
117
  /**
118
118
  * True if Scope has Data DataType which contains Column
119
119
  * @param column Column to check
@@ -25,7 +25,7 @@ export declare class ColumnScopeApiImpl extends ApiBase implements ColumnScopeAp
25
25
  getColumnTypesInScope(scope: ColumnScope): string[] | undefined;
26
26
  getDataTypesInScope(scope: ColumnScope): ScopeDataType[] | undefined;
27
27
  isColumnInNumericScope(column: AdaptableColumn, scope: ColumnScope): boolean;
28
- isColumnInStringsScope(column: AdaptableColumn, scope: ColumnScope): boolean;
28
+ isColumnInTextScope(column: AdaptableColumn, scope: ColumnScope): boolean;
29
29
  isColumnInDateScope(column: AdaptableColumn, scope: ColumnScope): boolean;
30
30
  isScopeInScope(a: ColumnScope, b: ColumnScope): boolean;
31
31
  createCellColorRangesForScope(scope: ColumnScope): CellColorRange[];
@@ -183,7 +183,7 @@ export class ColumnScopeApiImpl extends ApiBase {
183
183
  }
184
184
  return false;
185
185
  }
186
- isColumnInStringsScope(column, scope) {
186
+ isColumnInTextScope(column, scope) {
187
187
  // if column is not even string then return false
188
188
  if (column == null || column == undefined || column.dataType !== 'text') {
189
189
  return false;
@@ -4,11 +4,11 @@ export type AdaptableColumnDataType = BaseCellDataType | 'textArray' | 'numberAr
4
4
  /**
5
5
  * Column Types recognised by AdapTable; to be set in GridOptions
6
6
  */
7
- export type AdaptableColumnType = 'calculatedColumn' | 'freeTextColumn' | 'actionColumn' | 'fdc3Column';
8
- export declare const CALCULATED_COLUMN_TYPE: AdaptableColumnType;
9
- export declare const FREE_TEXT_COLUMN_TYPE: AdaptableColumnType;
10
- export declare const ACTION_COLUMN_TYPE: AdaptableColumnType;
11
- export declare const FDC3_COLUMN_TYPE: AdaptableColumnType;
7
+ export type AdaptableSpecialColumnType = 'calculatedColumn' | 'freeTextColumn' | 'actionColumn' | 'fdc3Column';
8
+ export declare const CALCULATED_COLUMN_TYPE: AdaptableSpecialColumnType;
9
+ export declare const FREE_TEXT_COLUMN_TYPE: AdaptableSpecialColumnType;
10
+ export declare const ACTION_COLUMN_TYPE: AdaptableSpecialColumnType;
11
+ export declare const FDC3_COLUMN_TYPE: AdaptableSpecialColumnType;
12
12
  /**
13
13
  * Base class for AdapTable Column containing most important properties
14
14
  */
@@ -1,7 +1,7 @@
1
1
  import { SuspendableObject } from './SuspendableObject';
2
2
  import { TypeHint } from './Types';
3
3
  export declare const ROW_SUMMARY_ROW_ID = "__ROW_SUMMARY_ROW_ID";
4
- export declare const WEIGHTED_AVERAGE_AGGREATED_FUNCTION = "WEIGHTED_AVERAGE";
4
+ export declare const WEIGHTED_AVERAGE_AGGREGATED_FUNCTION = "WEIGHTED_AVERAGE";
5
5
  export declare const summarySupportedExpressions: readonly ["MIN", "MAX", "SUM", "AVG", "COUNT", "MEDIAN", "MODE", "DISTINCT", "ONLY", "STD_DEVIATION", "WEIGHTED_AVERAGE"];
6
6
  export type SystemSummarySupportedExpression = (typeof summarySupportedExpressions)[number];
7
7
  export type SummarySupportedExpression = TypeHint<string, SystemSummarySupportedExpression>;
@@ -1,5 +1,5 @@
1
1
  export const ROW_SUMMARY_ROW_ID = '__ROW_SUMMARY_ROW_ID';
2
- export const WEIGHTED_AVERAGE_AGGREATED_FUNCTION = 'WEIGHTED_AVERAGE';
2
+ export const WEIGHTED_AVERAGE_AGGREGATED_FUNCTION = 'WEIGHTED_AVERAGE';
3
3
  export const summarySupportedExpressions = [
4
4
  'MIN',
5
5
  'MAX',
@@ -11,5 +11,5 @@ export const summarySupportedExpressions = [
11
11
  'DISTINCT',
12
12
  'ONLY',
13
13
  'STD_DEVIATION',
14
- WEIGHTED_AVERAGE_AGGREATED_FUNCTION,
14
+ WEIGHTED_AVERAGE_AGGREGATED_FUNCTION,
15
15
  ];
@@ -111,6 +111,10 @@ export interface TableLayout extends LayoutBase {
111
111
  * Pivot Expansions - can NOT be provided
112
112
  */
113
113
  PivotExpandLevel?: never;
114
+ /**
115
+ * Pivot Aggregation Columns - can NOT be provided
116
+ */
117
+ PivotAggregationColumns?: never;
114
118
  }
115
119
  /**
116
120
  * Defines a Pivot-based Layout
@@ -196,7 +200,7 @@ export interface LayoutOld extends AdaptableObject {
196
200
  GridFilter?: GridFilter;
197
201
  RowGroupedColumns?: string[];
198
202
  ExpandedRowGroupValues?: any[];
199
- TableAggregationColumns?: TableAggregationColumns;
203
+ AggregationColumns?: Record<string, string | true | any>;
200
204
  EnablePivot?: boolean;
201
205
  PivotColumns?: string[];
202
206
  PinnedColumnsMap?: {
@@ -1,4 +1,4 @@
1
- import { ROW_SUMMARY_ROW_ID, WEIGHTED_AVERAGE_AGGREATED_FUNCTION, } from '../../PredefinedConfig/Common/RowSummary';
1
+ import { ROW_SUMMARY_ROW_ID, WEIGHTED_AVERAGE_AGGREGATED_FUNCTION, } from '../../PredefinedConfig/Common/RowSummary';
2
2
  import { RowSummarySet } from '../../Redux/ActionsReducers/InternalRedux';
3
3
  import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
4
4
  import Helper from '../Helpers/Helper';
@@ -124,7 +124,7 @@ export class RowSummaryService {
124
124
  if (!expressionLiveValue) {
125
125
  try {
126
126
  let aggregatedScalarExpression = `${expression}([${columnId}])`;
127
- if (aggregatedScalarExpression.includes(WEIGHTED_AVERAGE_AGGREATED_FUNCTION) &&
127
+ if (aggregatedScalarExpression.includes(WEIGHTED_AVERAGE_AGGREGATED_FUNCTION) &&
128
128
  aggColsMap[columnId] &&
129
129
  typeof aggColsMap[columnId] === 'object') {
130
130
  const weight = aggColsMap[columnId].weightedColumnId;
@@ -91,8 +91,8 @@ export const mapColumnFilterToQlPredicate = (columnFilter, abColumn, qlPredicate
91
91
  : { operator: 'Equals', args: [] };
92
92
  break;
93
93
  case 'text':
94
- defaultQlPredicate = columnFilterOptions.defaultStringColumnFilter
95
- ? { operator: columnFilterOptions.defaultStringColumnFilter, args: [] }
94
+ defaultQlPredicate = columnFilterOptions.defaultTextColumnFilter
95
+ ? { operator: columnFilterOptions.defaultTextColumnFilter, args: [] }
96
96
  : { operator: 'Contains', args: [] };
97
97
  break;
98
98
  case 'date':
@@ -15,7 +15,7 @@ import { SortSection, SortSectionSummary } from './sections/SortSection';
15
15
  import { FilterSection, FilterSectionSummary, isColumnFiltersValid, } from './sections/FilterSection';
16
16
  import { GridFilterSection, GridFilterSectionSummary, isGridFiltersValid, } from './sections/GridFilterSection';
17
17
  import { areSummaryRowsValid, RowSummarySection, RowSummarySectionSummary, } from './sections/RowSummarySection';
18
- import { WEIGHTED_AVERAGE_AGGREATED_FUNCTION } from '../../../PredefinedConfig/Common/RowSummary';
18
+ import { WEIGHTED_AVERAGE_AGGREGATED_FUNCTION } from '../../../PredefinedConfig/Common/RowSummary';
19
19
  import { isPivotLayout } from '../../../Utilities/isPivotLayout';
20
20
  import { PivotRowGroupingSection, PivotRowGroupingSectionSummary, } from './sections/PivotRowGroupingSection';
21
21
  import { PivotAggregationsSection, PivotAggregationsSectionSummary, } from './sections/PivotAggregationsSection';
@@ -208,7 +208,7 @@ export const LayoutWizard = (props) => {
208
208
  ColumnsMap: Object.entries(rowSummary.ColumnsMap).reduce((acc, [columnId, aggFunc]) => {
209
209
  if (
210
210
  // see if it is weighted avg
211
- aggFunc === WEIGHTED_AVERAGE_AGGREATED_FUNCTION &&
211
+ aggFunc === WEIGHTED_AVERAGE_AGGREGATED_FUNCTION &&
212
212
  // see if we have a weight in the agg columns
213
213
  aggColsMap[columnId] &&
214
214
  (typeof aggColsMap[columnId] !== 'object' ||
@@ -7,7 +7,7 @@ import { Select } from '../../../../components/Select';
7
7
  import SimpleButton from '../../../../components/SimpleButton';
8
8
  import { Tabs } from '../../../../components/Tabs';
9
9
  import { Tag } from '../../../../components/Tag';
10
- import { summarySupportedExpressions, WEIGHTED_AVERAGE_AGGREATED_FUNCTION, } from '../../../../PredefinedConfig/Common/RowSummary';
10
+ import { summarySupportedExpressions, WEIGHTED_AVERAGE_AGGREGATED_FUNCTION, } from '../../../../PredefinedConfig/Common/RowSummary';
11
11
  import { mapColumnDataTypeToExpressionFunctionType } from '../../../../Utilities/adaptableQlUtils';
12
12
  import { LayoutModuleId } from '../../../../Utilities/Constants/ModuleConstants';
13
13
  import { aggregatedExpressionFunctions } from '../../../../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
@@ -169,7 +169,7 @@ const RowSummaryEditor = React.memo(({ rowSummary, onChange, availableScalarExpr
169
169
  aggregation.weightedColumnId) {
170
170
  expressionOptions.push({
171
171
  label: 'WEIGHTERD_AVG',
172
- value: WEIGHTED_AVERAGE_AGGREATED_FUNCTION,
172
+ value: WEIGHTED_AVERAGE_AGGREGATED_FUNCTION,
173
173
  });
174
174
  }
175
175
  const expression = rowSummary.ColumnsMap[column.columnId];
@@ -1014,13 +1014,13 @@ You need to define at least one Layout!`);
1014
1014
  // this will have to go/be heavily extended with https://github.com/AdaptableTools/adaptable/issues/2230
1015
1015
  this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'columnTypes', (original_columnTypes) => {
1016
1016
  const providedColumnTypes = original_columnTypes || {};
1017
- const adaptableColumnTypes = {
1017
+ const adaptableSpecialColumnTypes = {
1018
1018
  [CALCULATED_COLUMN_TYPE]: {},
1019
1019
  [FREE_TEXT_COLUMN_TYPE]: {},
1020
1020
  [ACTION_COLUMN_TYPE]: {},
1021
1021
  [FDC3_COLUMN_TYPE]: {},
1022
1022
  };
1023
- const patchedColumnTypes = Object.assign({}, providedColumnTypes, adaptableColumnTypes);
1023
+ const patchedColumnTypes = Object.assign({}, providedColumnTypes, adaptableSpecialColumnTypes);
1024
1024
  const customColumnTypes = this.api.columnApi.getColumnTypes() ?? [];
1025
1025
  for (const customColumnType of customColumnTypes) {
1026
1026
  if (!patchedColumnTypes[customColumnType]) {
@@ -391,7 +391,7 @@ export class AgGridColumnAdapter {
391
391
  }
392
392
  // required here for the initial layout rendering
393
393
  // Removed by JW, 3 october 2023; i don't think we need it and it overrides stuff unnecessarily
394
- // abColumn.friendlyName = resultHeaderName;
394
+ abColumn.friendlyName = resultHeaderName;
395
395
  return resultHeaderName;
396
396
  });
397
397
  const newColumnHeader = col?.getColDef()?.headerName;
@@ -479,7 +479,7 @@ export class AgGridColumnAdapter {
479
479
  }
480
480
  if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'StringFormatter') {
481
481
  // change the String format - if the scope allows it
482
- if (this.adaptableApi.columnScopeApi.isColumnInStringsScope(abColumn, mostRelevantFormatColumn.Scope)) {
482
+ if (this.adaptableApi.columnScopeApi.isColumnInTextScope(abColumn, mostRelevantFormatColumn.Scope)) {
483
483
  let cellValue = params.value;
484
484
  if (typeof params.value?.toNumber === 'function' &&
485
485
  typeof params.value?.toString === 'function') {
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: 1740095362364 || Date.now(),
4
- VERSION: "20.0.0-canary.0" || '--current-version--',
3
+ PUBLISH_TIMESTAMP: 1740401859424 || Date.now(),
4
+ VERSION: "20.0.0-canary.2" || '--current-version--',
5
5
  };
@@ -309,11 +309,6 @@ export declare const ADAPTABLE_METAMODEL: {
309
309
  isOpt: boolean;
310
310
  }[];
311
311
  };
312
- AdaptableColumnType: {
313
- name: string;
314
- kind: string;
315
- desc: string;
316
- };
317
312
  AdaptableComment: {
318
313
  name: string;
319
314
  kind: string;
@@ -920,6 +915,11 @@ export declare const ADAPTABLE_METAMODEL: {
920
915
  desc: string;
921
916
  }[];
922
917
  };
918
+ AdaptableSpecialColumnType: {
919
+ name: string;
920
+ kind: string;
921
+ desc: string;
922
+ };
923
923
  AdaptableState: {
924
924
  name: string;
925
925
  kind: string;
@@ -3010,6 +3010,11 @@ export declare const ADAPTABLE_METAMODEL: {
3010
3010
  gridInfo?: undefined;
3011
3011
  })[];
3012
3012
  };
3013
+ ExportResultData: {
3014
+ name: string;
3015
+ kind: string;
3016
+ desc: string;
3017
+ };
3013
3018
  ExportState: {
3014
3019
  name: string;
3015
3020
  kind: string;