@adaptabletools/adaptable 13.0.0-canary.8 → 13.0.0-canary.9

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.
Files changed (49) hide show
  1. package/agGrid.d.ts +10 -10
  2. package/agGrid.js +10 -10
  3. package/bundle.cjs.js +154 -154
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -3
  8. package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
  9. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +87 -30
  10. package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
  11. package/src/AdaptableOptions/FinsemblePluginOptions.js +2 -0
  12. package/src/AdaptableOptions/GeneralOptions.d.ts +1 -2
  13. package/src/Api/ConditionalStyleApi.d.ts +20 -62
  14. package/src/Api/ConfigApi.d.ts +1 -2
  15. package/src/Api/FinsembleApi.d.ts +10 -0
  16. package/src/Api/FinsembleApi.js +2 -0
  17. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -0
  18. package/src/Api/Implementation/PluginsApiImpl.js +6 -0
  19. package/src/Api/PluginsApi.d.ts +5 -0
  20. package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
  21. package/src/PredefinedConfig/FormatColumnState.d.ts +0 -6
  22. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  23. package/src/Strategy/DataChangeHistoryModule.js +12 -0
  24. package/src/Strategy/FormatColumnModule.js +1 -1
  25. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
  26. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
  27. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +5 -10
  28. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +1 -1
  29. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -4
  30. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -1
  31. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +3 -4
  32. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -1
  33. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -4
  34. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -1
  35. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -4
  36. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  37. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -4
  38. package/src/Utilities/ObjectFactory.js +0 -1
  39. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -3
  40. package/src/Utilities/Services/QueryLanguageService.js +48 -52
  41. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -22
  42. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +0 -1
  43. package/src/agGrid/Adaptable.d.ts +2 -2
  44. package/src/agGrid/Adaptable.js +1 -14
  45. package/src/metamodel/adaptable.metamodel.d.ts +65 -47
  46. package/src/metamodel/adaptable.metamodel.js +1 -1
  47. package/src/types.d.ts +3 -1
  48. package/version.d.ts +1 -1
  49. package/version.js +1 -1
@@ -5,13 +5,8 @@ const tslib_1 = require("tslib");
5
5
  const GeneralConstants = tslib_1.__importStar(require("../Constants/GeneralConstants"));
6
6
  const GeneralConstants_1 = require("../Constants/GeneralConstants");
7
7
  const UIHelper_1 = tslib_1.__importStar(require("../../View/UIHelper"));
8
- const booleanExpressionFunctions_1 = require("../ExpressionFunctions/booleanExpressionFunctions");
9
- const scalarExpressionFunctions_1 = require("../ExpressionFunctions/scalarExpressionFunctions");
10
- const observableExpressionFunctions_1 = require("../ExpressionFunctions/observableExpressionFunctions");
11
- const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedBooleanExpressionFunctions");
12
8
  const AdaptablePredicate_1 = require("../../PredefinedConfig/Common/AdaptablePredicate");
13
9
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
14
- const aggregatedScalarExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedScalarExpressionFunctions");
15
10
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
16
11
  // change type to DeepRequired<AdaptableOptions> to check which properties have no default values defined
17
12
  exports.DefaultAdaptableOptions = {
@@ -64,11 +59,11 @@ exports.DefaultAdaptableOptions = {
64
59
  customPredicateDefs: [],
65
60
  displayColumnFriendlyNamesForExpressions: true,
66
61
  expressionOptions: {
67
- defaultBooleanFunctions: booleanExpressionFunctions_1.booleanExpressionFunctionsList,
68
- defaultScalarFunctions: scalarExpressionFunctions_1.scalarExpressionFunctionsList,
69
- defaultObservableFunctions: observableExpressionFunctions_1.observableExpressionFunctionsList,
70
- defaultAggregatedBooleanFunctions: aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctionsList,
71
- defaultAggregatedScalarFunctions: aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctionsList,
62
+ systemBooleanFunctions: undefined,
63
+ systemScalarFunctions: undefined,
64
+ systemObservableFunctions: undefined,
65
+ systemAggregatedBooleanFunctions: undefined,
66
+ systemAggregatedScalarFunctions: undefined,
72
67
  moduleExpressionFunctions: undefined,
73
68
  queryableColumns: undefined,
74
69
  performExpressionValidation: true,
@@ -16,5 +16,5 @@ export interface ScalarAggregationOperand extends BaseParameter<'aggregationScal
16
16
  value: AggregatedScalarExpressionEvaluation;
17
17
  }
18
18
  export declare const aggregatedBooleanExpressionFunctions: Record<AggregatedBooleanFunctionName, ExpressionFunction>;
19
- export declare const aggregatedBooleanExpressionFunctionsList: Record<AggregatedBooleanFunctionName, ExpressionFunction>[];
19
+ export declare const aggregatedBooleanExpressionFunctionNames: AggregatedBooleanFunctionName[];
20
20
  export {};
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.aggregatedBooleanExpressionFunctionsList = exports.aggregatedBooleanExpressionFunctions = void 0;
3
+ exports.aggregatedBooleanExpressionFunctionNames = exports.aggregatedBooleanExpressionFunctions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
6
6
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
7
7
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
8
8
  const aggregatedScalarExpressionFunctions_1 = require("./aggregatedScalarExpressionFunctions");
9
+ const TypeExtensions_1 = require("../Extensions/TypeExtensions");
9
10
  const SUPPORTED_AGGREGATION_FNS = ['SUM', 'MIN', 'MAX', 'AVG'];
10
11
  const aggregationScalarOperandMap = {
11
12
  SUM: ['string', 'number'],
@@ -174,6 +175,4 @@ const extractScalarOperand = (consumingFunctionName, value, allowedTypes) => {
174
175
  // numeric value
175
176
  return (0, parseInt_1.default)(numericString) * numberUnitRatios[largeNumberUnit.toLowerCase()];
176
177
  };
177
- exports.aggregatedBooleanExpressionFunctionsList = Object.entries(exports.aggregatedBooleanExpressionFunctions).map(([functionName, expressionImplementation]) => ({
178
- [functionName]: expressionImplementation,
179
- }));
178
+ exports.aggregatedBooleanExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.aggregatedBooleanExpressionFunctions);
@@ -42,5 +42,5 @@ export interface CumulatedAggregationValue {
42
42
  export declare const cumulativeAggregatedExpressionFunctions: AggregatedScalarFunctionName[];
43
43
  export declare const aggregatedExpressionFunctions: AggregatedScalarFunctionName[];
44
44
  export declare const aggregatedScalarExpressionFunctions: Record<AggregatedScalarFunctionName, ExpressionFunction>;
45
- export declare const aggregatedScalarExpressionFunctionsList: Record<AggregatedScalarFunctionName, ExpressionFunction>[];
45
+ export declare const aggregatedScalarExpressionFunctionNames: AggregatedScalarFunctionName[];
46
46
  export {};
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.aggregatedScalarExpressionFunctionsList = exports.aggregatedScalarExpressionFunctions = exports.aggregatedExpressionFunctions = exports.cumulativeAggregatedExpressionFunctions = void 0;
3
+ exports.aggregatedScalarExpressionFunctionNames = exports.aggregatedScalarExpressionFunctions = exports.aggregatedExpressionFunctions = exports.cumulativeAggregatedExpressionFunctions = void 0;
4
4
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
5
5
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
6
+ const TypeExtensions_1 = require("../Extensions/TypeExtensions");
6
7
  exports.cumulativeAggregatedExpressionFunctions = [
7
8
  'CUMUL',
8
9
  'OVER',
@@ -649,9 +650,7 @@ const mapAggregationToCumulation = (aggregationParameter, overColumnParameter, c
649
650
  };
650
651
  return cumulationExpressionEvaluation;
651
652
  };
652
- exports.aggregatedScalarExpressionFunctionsList = Object.entries(exports.aggregatedScalarExpressionFunctions).map(([functionName, expressionImplementation]) => ({
653
- [functionName]: expressionImplementation,
654
- }));
653
+ exports.aggregatedScalarExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.aggregatedScalarExpressionFunctions);
655
654
  // !! mutates expressionEvaluation
656
655
  const addGroupByParams = (groupByColumnNames, expressionEvaluation) => {
657
656
  if (groupByColumnNames === null || groupByColumnNames === void 0 ? void 0 : groupByColumnNames.length) {
@@ -4,4 +4,4 @@ import { ExpressionFunction } from '../../parser/src/types';
4
4
  */
5
5
  export declare type BooleanFunctionName = 'EQ' | 'NEQ' | 'GT' | 'LT' | 'GTE' | 'LTE' | 'AND' | 'OR' | 'NOT' | 'BETWEEN' | 'IN' | 'IS_BLANK' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH' | 'ANY_CONTAINS' | 'QUERY';
6
6
  export declare const booleanExpressionFunctions: Record<BooleanFunctionName, ExpressionFunction>;
7
- export declare const booleanExpressionFunctionsList: Record<BooleanFunctionName, ExpressionFunction>[];
7
+ export declare const booleanExpressionFunctionsNames: BooleanFunctionName[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.booleanExpressionFunctionsList = exports.booleanExpressionFunctions = void 0;
3
+ exports.booleanExpressionFunctionsNames = exports.booleanExpressionFunctions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const isAfter_1 = tslib_1.__importDefault(require("date-fns/isAfter"));
6
6
  const isBefore_1 = tslib_1.__importDefault(require("date-fns/isBefore"));
@@ -9,6 +9,7 @@ const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/String
9
9
  const src_1 = require("../../parser/src");
10
10
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
11
11
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
12
+ const TypeExtensions_1 = require("../Extensions/TypeExtensions");
12
13
  exports.booleanExpressionFunctions = {
13
14
  OR: {
14
15
  handler(args) {
@@ -293,6 +294,4 @@ exports.booleanExpressionFunctions = {
293
294
  examples: ['QUERY("anyNamedQuery")'],
294
295
  },
295
296
  };
296
- exports.booleanExpressionFunctionsList = Object.entries(exports.booleanExpressionFunctions).map(([functionName, expressionImplementation]) => ({
297
- [functionName]: expressionImplementation,
298
- }));
297
+ exports.booleanExpressionFunctionsNames = (0, TypeExtensions_1.getTypedKeys)(exports.booleanExpressionFunctions);
@@ -6,5 +6,5 @@ export declare type ObservableFunctionName = 'WHERE' | 'COL' | 'TIMEFRAME' | Obs
6
6
  declare type ObservableFunction = 'ROW_CHANGE' | 'GRID_CHANGE';
7
7
  declare type ChangeFunction = 'MAX' | 'MIN' | 'NONE' | 'COUNT';
8
8
  export declare const observableExpressionFunctions: Record<ObservableFunctionName, ExpressionFunction>;
9
- export declare const observableExpressionFunctionsList: Record<ObservableFunctionName, ExpressionFunction>[];
9
+ export declare const observableExpressionFunctionNames: ObservableFunctionName[];
10
10
  export {};
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.observableExpressionFunctionsList = exports.observableExpressionFunctions = void 0;
3
+ exports.observableExpressionFunctionNames = exports.observableExpressionFunctions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const rxjs_1 = require("rxjs");
6
6
  const operators_1 = require("rxjs/operators");
7
7
  const parseInt_1 = tslib_1.__importDefault(require("lodash/parseInt"));
8
8
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
9
9
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
10
+ const TypeExtensions_1 = require("../Extensions/TypeExtensions");
10
11
  // numeric value(digits) followed by a single 's', 'm' or 'h' letter (case insensitive)
11
12
  const TIMEFRAME_REGEX = /^(\d+)(s|m|h)$/i;
12
13
  const SYSTEM_MAX_TIMEFRAME_SIZE = 86400000; // 24h
@@ -212,9 +213,7 @@ exports.observableExpressionFunctions = {
212
213
  examples: ["TIMEFRAME('20s')", "TIMEFRAME('5m')", "TIMEFRAME('1h')"],
213
214
  },
214
215
  };
215
- exports.observableExpressionFunctionsList = Object.entries(exports.observableExpressionFunctions).map(([functionName, expressionImplementation]) => ({
216
- [functionName]: expressionImplementation,
217
- }));
216
+ exports.observableExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.observableExpressionFunctions);
218
217
  // return TRUE if the last(tail) element has the greatest value
219
218
  const isLastElementMaxValue = (values) => {
220
219
  const [tailValue] = values.slice(-1);
@@ -4,4 +4,4 @@ import { ExpressionFunction } from '../../parser/src/types';
4
4
  */
5
5
  export declare type ScalarFunctionName = 'ADD' | 'SUB' | 'MUL' | 'DIV' | 'MOD' | 'POW' | 'MIN' | 'MAX' | 'AVG' | 'DATE' | 'NOW' | 'TODAY' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR' | 'ADD_DAYS' | 'ADD_WEEKS' | 'ADD_MONTHS' | 'ADD_YEARS' | 'DIFF_DAYS' | 'DIFF_WEEKS' | 'DIFF_MONTHS' | 'DIFF_YEARS' | 'SUB_STRING' | 'REPLACE' | 'COALESCE' | 'LEN' | 'UPPER' | 'LOWER' | 'CONCAT' | 'IF' | 'COL' | 'VAR';
6
6
  export declare const scalarExpressionFunctions: Record<ScalarFunctionName, ExpressionFunction>;
7
- export declare const scalarExpressionFunctionsList: Record<ScalarFunctionName, ExpressionFunction>[];
7
+ export declare const scalarExpressionFunctionNames: ScalarFunctionName[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scalarExpressionFunctionsList = exports.scalarExpressionFunctions = void 0;
3
+ exports.scalarExpressionFunctionNames = exports.scalarExpressionFunctions = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluationError");
6
6
  const parseISO_1 = tslib_1.__importDefault(require("date-fns/parseISO"));
@@ -19,6 +19,7 @@ const differenceInYears_1 = tslib_1.__importDefault(require("date-fns/difference
19
19
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
20
20
  const dateUtils_1 = require("./dateUtils");
21
21
  const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
22
+ const TypeExtensions_1 = require("../Extensions/TypeExtensions");
22
23
  const sanitizeArguments = (values, allowNaN) => {
23
24
  return values.filter((value) => value != undefined && value != null && value !== '' && (allowNaN || !isNaN(value)));
24
25
  };
@@ -356,6 +357,4 @@ exports.scalarExpressionFunctions = {
356
357
  examples: ['VAR(CURRENT_USER)', 'VAR(IS_VALID_VALUE, IS_BLANK([col1]), [col2] < [col3])'],
357
358
  },
358
359
  };
359
- exports.scalarExpressionFunctionsList = Object.entries(exports.scalarExpressionFunctions).map(([functionName, expressionImplementation]) => ({
360
- [functionName]: expressionImplementation,
361
- }));
360
+ exports.scalarExpressionFunctionNames = (0, TypeExtensions_1.getTypedKeys)(exports.scalarExpressionFunctions);
@@ -291,7 +291,6 @@ function CreateEmptyFormatColumn() {
291
291
  Style: CreateEmptyStyle(),
292
292
  DisplayFormat: undefined,
293
293
  CellAlignment: undefined,
294
- HeaderName: undefined,
295
294
  };
296
295
  }
297
296
  exports.CreateEmptyFormatColumn = CreateEmptyFormatColumn;
@@ -43,9 +43,7 @@ export declare class QueryLanguageService implements IQueryLanguageService {
43
43
  isCumulativeAggregate(input: string): boolean;
44
44
  getExpressionWithColumnFriendlyNames(expression?: string): string;
45
45
  getModuleExpressionFunctionsMap(module: AdaptableModule): ModuleExpressionFunctionsMap;
46
- private getFunctionNames;
47
- private extractDefaultExpressionFunctions;
48
- private mapFunctionsDefinitionToMap;
46
+ private extractMappedExpressionFunctions;
49
47
  evaluateCustomQueryVariable(functionName: string, args?: any[]): any;
50
48
  private getBooleanAndScalarFunctions;
51
49
  private getExpressionCacheKey;
@@ -275,7 +275,7 @@ class QueryLanguageService {
275
275
  // Returns the ExpressionFunctions available for the given Module as specified in the `QueryLanguageOptions.moduleExpressionFunctions`
276
276
  // if there are no specific functions defined, it falls back to the default values
277
277
  getModuleExpressionFunctionsMap(module) {
278
- var _a, _b, _c, _d, _e, _f, _g, _h;
278
+ var _a, _b, _c;
279
279
  const expressionOptions = this.adaptableApi.internalApi.getAdaptableOptions().adaptableQLOptions.expressionOptions;
280
280
  if (module) {
281
281
  let cachedResult = this.cacheModuleSpecificExpressionFunctions.get(module);
@@ -283,19 +283,19 @@ class QueryLanguageService {
283
283
  return cachedResult;
284
284
  }
285
285
  }
286
- const defaultBooleanExpressionFunctions = this.extractDefaultExpressionFunctions(expressionOptions.defaultBooleanFunctions, booleanExpressionFunctions_1.booleanExpressionFunctions);
287
- const defaultScalarExpressionFunctions = this.extractDefaultExpressionFunctions(expressionOptions.defaultScalarFunctions, scalarExpressionFunctions_1.scalarExpressionFunctions);
288
- const defaultObservableExpressionFunctions = this.extractDefaultExpressionFunctions(expressionOptions.defaultObservableFunctions, observableExpressionFunctions_1.observableExpressionFunctions);
289
- const defaultAggregatedBooleanFunctions = this.extractDefaultExpressionFunctions(expressionOptions.defaultAggregatedBooleanFunctions, aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions);
290
- const defaultAggregatedScalarFunctions = this.extractDefaultExpressionFunctions(expressionOptions.defaultAggregatedScalarFunctions, aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions);
286
+ const generalBooleanExpressionFunctions = this.extractMappedExpressionFunctions(booleanExpressionFunctions_1.booleanExpressionFunctions, expressionOptions.systemBooleanFunctions, expressionOptions.customBooleanFunctions);
287
+ const generalScalarExpressionFunctions = this.extractMappedExpressionFunctions(scalarExpressionFunctions_1.scalarExpressionFunctions, expressionOptions.systemScalarFunctions, expressionOptions.customScalarFunctions);
288
+ const generalObservableExpressionFunctions = this.extractMappedExpressionFunctions(observableExpressionFunctions_1.observableExpressionFunctions, expressionOptions.systemObservableFunctions);
289
+ const generalAggregatedBooleanExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions, expressionOptions.systemAggregatedBooleanFunctions);
290
+ const generalAggregatedScalarExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions, expressionOptions.systemAggregatedScalarFunctions);
291
291
  if (!module) {
292
292
  (0, LoggingHelper_1.LogAdaptableInfo)(`QueryLanguageService.getModuleExpressionFunctions() was called with an undefined 'module' param, this should never happen`);
293
293
  return {
294
- booleanFunctions: this.mapFunctionsDefinitionToMap(defaultBooleanExpressionFunctions, booleanExpressionFunctions_1.booleanExpressionFunctions),
295
- scalarFunctions: this.mapFunctionsDefinitionToMap(defaultScalarExpressionFunctions, scalarExpressionFunctions_1.scalarExpressionFunctions),
296
- observableFunctions: this.mapFunctionsDefinitionToMap(defaultObservableExpressionFunctions, observableExpressionFunctions_1.observableExpressionFunctions),
297
- aggregatedBooleanFunctions: this.mapFunctionsDefinitionToMap(defaultAggregatedBooleanFunctions, aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions),
298
- aggregatedScalarFunctions: this.mapFunctionsDefinitionToMap(defaultAggregatedScalarFunctions, aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions),
294
+ booleanFunctions: generalBooleanExpressionFunctions,
295
+ scalarFunctions: generalScalarExpressionFunctions,
296
+ observableFunctions: generalObservableExpressionFunctions,
297
+ aggregatedBooleanFunctions: generalAggregatedBooleanExpressionFunctions,
298
+ aggregatedScalarFunctions: generalAggregatedScalarExpressionFunctions,
299
299
  };
300
300
  }
301
301
  let moduleExpressionFunctions;
@@ -303,11 +303,11 @@ class QueryLanguageService {
303
303
  const context = {
304
304
  adaptableApi: this.adaptableApi,
305
305
  module,
306
- defaultBooleanFunctionNames: this.getFunctionNames(defaultBooleanExpressionFunctions),
307
- defaultScalarFunctionNames: this.getFunctionNames(defaultScalarExpressionFunctions),
308
- defaultObservableFunctionNames: this.getFunctionNames(defaultObservableExpressionFunctions),
309
- defaultAggregatedBooleanFunctionNames: this.getFunctionNames(defaultAggregatedBooleanFunctions),
310
- defaultAggregatedScalarFunctionNames: this.getFunctionNames(defaultAggregatedScalarFunctions),
306
+ availableBooleanFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalBooleanExpressionFunctions),
307
+ availableScalarFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalScalarExpressionFunctions),
308
+ availableObservableFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalObservableExpressionFunctions),
309
+ availableAggregatedBooleanFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalAggregatedBooleanExpressionFunctions),
310
+ availableAggregatedScalarFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalAggregatedScalarExpressionFunctions),
311
311
  };
312
312
  moduleExpressionFunctions = (_a = expressionOptions.moduleExpressionFunctions(context)) !== null && _a !== void 0 ? _a : {};
313
313
  }
@@ -315,49 +315,45 @@ class QueryLanguageService {
315
315
  moduleExpressionFunctions = (_c = (_b = expressionOptions.moduleExpressionFunctions) === null || _b === void 0 ? void 0 : _b[module]) !== null && _c !== void 0 ? _c : {};
316
316
  }
317
317
  const moduleExpressionFunctionsMap = {
318
- booleanFunctions: this.mapFunctionsDefinitionToMap((_d = moduleExpressionFunctions.booleanFunctions) !== null && _d !== void 0 ? _d : defaultBooleanExpressionFunctions, booleanExpressionFunctions_1.booleanExpressionFunctions),
319
- scalarFunctions: this.mapFunctionsDefinitionToMap((_e = moduleExpressionFunctions.scalarFunctions) !== null && _e !== void 0 ? _e : defaultScalarExpressionFunctions, scalarExpressionFunctions_1.scalarExpressionFunctions),
320
- observableFunctions: this.mapFunctionsDefinitionToMap((_f = moduleExpressionFunctions.observableFunctions) !== null && _f !== void 0 ? _f : defaultObservableExpressionFunctions, observableExpressionFunctions_1.observableExpressionFunctions),
321
- aggregatedBooleanFunctions: this.mapFunctionsDefinitionToMap((_g = moduleExpressionFunctions.aggregatedBooleanFunctions) !== null && _g !== void 0 ? _g : defaultAggregatedBooleanFunctions, aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions),
322
- aggregatedScalarFunctions: this.mapFunctionsDefinitionToMap((_h = moduleExpressionFunctions.aggregatedScalarFunctions) !== null && _h !== void 0 ? _h : defaultAggregatedScalarFunctions, aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions),
318
+ booleanFunctions: this.extractMappedExpressionFunctions(generalBooleanExpressionFunctions, moduleExpressionFunctions.systemBooleanFunctions, moduleExpressionFunctions.customBooleanFunctions),
319
+ scalarFunctions: this.extractMappedExpressionFunctions(generalScalarExpressionFunctions, moduleExpressionFunctions.systemScalarFunctions, moduleExpressionFunctions.customScalarFunctions),
320
+ observableFunctions: this.extractMappedExpressionFunctions(generalObservableExpressionFunctions, moduleExpressionFunctions.systemObservableFunctions),
321
+ aggregatedBooleanFunctions: this.extractMappedExpressionFunctions(generalAggregatedBooleanExpressionFunctions, moduleExpressionFunctions.systemAggregatedBooleanFunctions),
322
+ aggregatedScalarFunctions: this.extractMappedExpressionFunctions(generalAggregatedScalarExpressionFunctions, moduleExpressionFunctions.systemAggregatedScalarFunctions),
323
323
  };
324
324
  this.cacheModuleSpecificExpressionFunctions.set(module, moduleExpressionFunctionsMap);
325
325
  return moduleExpressionFunctionsMap;
326
326
  }
327
- getFunctionNames(definitions) {
328
- return definitions.flatMap((definition) => {
329
- if (typeof definition === 'string') {
330
- return definition;
331
- }
332
- else {
333
- return (0, TypeExtensions_1.getTypedKeys)(definition);
334
- }
335
- });
336
- }
337
- extractDefaultExpressionFunctions(defaultOptions, availableExpressionFunctions) {
338
- if (typeof defaultOptions === 'function') {
339
- const context = {
327
+ extractMappedExpressionFunctions(availableExpressionFunctions, systemFunctions, customFunctions) {
328
+ const systemFunctionNames = typeof systemFunctions === 'function'
329
+ ? systemFunctions({
340
330
  adaptableApi: this.adaptableApi,
341
331
  availableExpressionFunctionNames: (0, TypeExtensions_1.getTypedKeys)(availableExpressionFunctions),
342
- };
343
- return defaultOptions(context);
332
+ })
333
+ : systemFunctions;
334
+ let generalExpressionFunctions = {};
335
+ // add system functions
336
+ if (Array.isArray(systemFunctionNames)) {
337
+ // add only system functions specified by user
338
+ systemFunctionNames.forEach((systemFunctionName) => {
339
+ generalExpressionFunctions[systemFunctionName] =
340
+ availableExpressionFunctions[systemFunctionName];
341
+ });
344
342
  }
345
- return defaultOptions;
346
- }
347
- mapFunctionsDefinitionToMap(functionsDefinition, internalExpressionFunctions) {
348
- let resultMap = {};
349
- functionsDefinition.forEach((definition) => {
350
- if (typeof definition === 'string') {
351
- const internalFunction = internalExpressionFunctions[definition];
352
- if (internalFunction) {
353
- resultMap[definition] = internalFunction;
354
- }
355
- }
356
- else {
357
- resultMap = Object.assign(Object.assign({}, resultMap), definition);
358
- }
359
- });
360
- return resultMap;
343
+ else {
344
+ // add ALL system functions
345
+ generalExpressionFunctions = Object.assign({}, availableExpressionFunctions);
346
+ }
347
+ const customFunctionDefinitions = typeof customFunctions === 'function'
348
+ ? customFunctions({
349
+ adaptableApi: this.adaptableApi,
350
+ availableExpressionFunctionNames: (0, TypeExtensions_1.getTypedKeys)(generalExpressionFunctions),
351
+ })
352
+ : customFunctions;
353
+ if (customFunctionDefinitions) {
354
+ generalExpressionFunctions = Object.assign(Object.assign({}, generalExpressionFunctions), customFunctionDefinitions);
355
+ }
356
+ return generalExpressionFunctions;
361
357
  }
362
358
  evaluateCustomQueryVariable(functionName, args) {
363
359
  var _a, _b, _c;
@@ -6,13 +6,9 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
8
8
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
9
- const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
10
9
  const CheckBox_1 = require("../../../components/CheckBox");
11
10
  const Tabs_1 = require("../../../components/Tabs");
12
11
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
13
- const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
14
- const react_1 = require("react");
15
- const LoggingHelper_1 = require("../../../Utilities/Helpers/LoggingHelper");
16
12
  const Tag_1 = require("../../../components/Tag");
17
13
  let alignmentOptions = [
18
14
  { value: 'Left', label: 'Left' },
@@ -25,9 +21,6 @@ const renderFormatColumnSettingsSummary = (data) => {
25
21
  React.createElement(rebass_1.Text, null,
26
22
  "Cell alignment ",
27
23
  React.createElement(Tag_1.Tag, null, (_a = data.CellAlignment) !== null && _a !== void 0 ? _a : 'default')),
28
- data.HeaderName ? (React.createElement(rebass_1.Text, { mt: 3 },
29
- "Header name ",
30
- React.createElement(Tag_1.Tag, null, data.HeaderName))) : null,
31
24
  React.createElement(rebass_1.Text, { mt: 3 },
32
25
  "Include grouped rows ",
33
26
  React.createElement(Tag_1.Tag, null, data.IncludeGroupedRows ? 'yes' : 'no'))));
@@ -41,18 +34,6 @@ const FormatColumnSettingsWizardSection = (props) => {
41
34
  const onIncludeGroupedRowsChanged = (IncludeGroupedRows) => {
42
35
  props.onChange(Object.assign(Object.assign({}, data), { IncludeGroupedRows }));
43
36
  };
44
- const onHeaderNameChanged = (event) => {
45
- let e = event.target;
46
- props.onChange(Object.assign(Object.assign({}, data), { HeaderName: e.value }));
47
- };
48
- const [hasHeaderName, setHasHeaderName] = (0, react_1.useState)(false);
49
- (0, react_1.useEffect)(() => {
50
- const hasCustomHeaderName = StringExtensions_1.default.IsNotNullOrEmpty(data.HeaderName);
51
- setHasHeaderName(hasCustomHeaderName);
52
- if (hasCustomHeaderName) {
53
- (0, LoggingHelper_1.ConsoleLogWarning)(`DEPRECATED: The 'FormatColumn.HeaderName' property is deprecated; use a Layout custom Column Header instead!`);
54
- }
55
- }, []);
56
37
  return (React.createElement(Tabs_1.Tabs, null,
57
38
  React.createElement(Tabs_1.Tabs.Tab, null, "Format"),
58
39
  React.createElement(Tabs_1.Tabs.Content, null,
@@ -70,9 +51,6 @@ const FormatColumnSettingsWizardSection = (props) => {
70
51
  label: item.label,
71
52
  onClick: () => onCellAlignmentSelectChanged(item.value),
72
53
  })), columns: ['label'] }, data.CellAlignment ? data.CellAlignment : 'Select Option')),
73
- hasHeaderName && api.scopeApi.isSingleColumnScope(data.Scope) && (React.createElement(FormLayout_1.FormRow, { label: "Header Name" },
74
- React.createElement(Input_1.default, { value: data.HeaderName, onChange: (e) => onHeaderNameChanged(e), style: { minWidth: '15rem' } }),
75
- ' ')),
76
54
  React.createElement(FormLayout_1.FormRow, { label: "Include Grouped Rows:" },
77
55
  React.createElement(rebass_1.Flex, { alignItems: "center", marginLeft: 2 },
78
56
  React.createElement(CheckBox_1.CheckBox, { checked: data.IncludeGroupedRows, onChange: onIncludeGroupedRowsChanged, mr: 2 }))))))));
@@ -22,7 +22,6 @@ const isFormatColumnStyleValid = (data, api) => {
22
22
  data.Style &&
23
23
  UIHelper_1.default.IsEmptyStyle(data.Style) &&
24
24
  data.DisplayFormat === undefined &&
25
- data.HeaderName === undefined &&
26
25
  data.CellAlignment === undefined &&
27
26
  !api.scopeApi.isSingleBooleanColumnScope(data.Scope)) {
28
27
  return 'No format applied';
@@ -1,4 +1,4 @@
1
- import { ChartModel, ChartRef, ColDef, ColGroupDef, Column, ExcelStyle, GridOptions, Module, RowNode } from '@ag-grid-community/core';
1
+ import { ChartModel, ChartRef, ColDef, ColGroupDef, Column, ExcelStyle, GridOptions, Module, ModuleNames, RowNode } from '@ag-grid-community/core';
2
2
  import { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard } from '../AdaptableInterfaces/AdaptableNoCodeWizard';
3
3
  import { IAdaptable } from '../AdaptableInterfaces/IAdaptable';
4
4
  import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
@@ -293,7 +293,7 @@ export declare class Adaptable implements IAdaptable {
293
293
  setupColumnComparator({ col, colId, abColumn }: ColumnSetupInfo): void;
294
294
  private applyCurrentTheme;
295
295
  private applyFinalRendering;
296
- private isAgGridModulePresent;
296
+ isAgGridModulePresent(moduleName: ModuleNames): boolean;
297
297
  private getAgGridRegisteredModules;
298
298
  private onRowDataChanged;
299
299
  private onCellDataChanged;
@@ -466,19 +466,13 @@ class Adaptable {
466
466
  AdaptableHelper_1.default.checkValidPrimaryKey(this);
467
467
  }, (e) => {
468
468
  (0, LoggingHelper_1.ConsoleLogError)('Failed to Init Modules : ', e);
469
- // for now we initiliaze the grid even if initialising Modules has failed (perhaps revisit this?)
469
+ // for now we initialize the grid even if initialising Modules has failed (perhaps revisit this?)
470
470
  this.initInternalGridLogic();
471
471
  this.api.internalApi.hideLoadingScreen(); // doesnt really help but at least clears the screen
472
472
  }).then(async () => {
473
473
  this.api.internalApi.hideLoadingScreen();
474
474
  this.isInitialised = true;
475
475
  this._adaptableReady = true;
476
- // setTimeout(() => {
477
- // this.api.eventApi.emit('AdaptableReady', {
478
- // adaptableApi: this.api,
479
- // gridOptions: this.adaptableOptions.gridOptions,
480
- // });
481
- // }, 0);
482
476
  });
483
477
  if (this.abContainerElement == null) {
484
478
  this.abContainerElement = this.getAdaptableContainerElement();
@@ -3406,13 +3400,6 @@ class Adaptable {
3406
3400
  if (layoutCustomHeader) {
3407
3401
  resultHeaderName = layoutCustomHeader;
3408
3402
  }
3409
- // check if the deprecated formatColumn header is used
3410
- const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.columnId);
3411
- if (!layoutCustomHeader && (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.HeaderName) && !formatColumn.IsSuspended) {
3412
- // fallback to the formatColumn property if no Layout custom header is provided
3413
- resultHeaderName = formatColumn.HeaderName;
3414
- (0, LoggingHelper_1.ConsoleLogWarning)(`DEPRECATED: 'FormatColumn.HeaderName' is deprecated: use 'Layout.ColumnHeadersMap' instead`);
3415
- }
3416
3403
  // required here for the initial layout rendering
3417
3404
  abColumn.friendlyName = resultHeaderName;
3418
3405
  return resultHeaderName;