@adaptabletools/adaptable-cjs 18.1.0 → 18.1.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-cjs",
3
- "version": "18.1.0",
3
+ "version": "18.1.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",
@@ -258,7 +258,13 @@ export interface ColumnFilterContext<TData = any> extends BaseContext {
258
258
  * Context used for setting whether a Row can be Column Filtered
259
259
  */
260
260
  export interface IsRowFilterableContext<TData = any> extends BaseContext {
261
+ /**
262
+ * The Row Node about to be evaluated
263
+ */
261
264
  rowNode: IRowNode;
265
+ /**
266
+ * The data in the Row Node
267
+ */
262
268
  data: TData;
263
269
  }
264
270
  /**
@@ -211,7 +211,16 @@ export interface DataFormatTypeContext extends BaseContext {
211
211
  * Defines the Format Data Types for all Data Types
212
212
  */
213
213
  export interface DataFormatDataType {
214
+ /**
215
+ * Data Format type for String columns
216
+ */
214
217
  string?: DataFormatType;
218
+ /**
219
+ * Data Format type for Number columns
220
+ */
215
221
  number?: DataFormatType;
222
+ /**
223
+ * Data Format type for Date columns
224
+ */
216
225
  date?: DataFormatType;
217
226
  }
@@ -2,7 +2,7 @@ import { AdaptablePredicate } from '../PredefinedConfig/Common/AdaptablePredicat
2
2
  import { AdaptableModule, AdaptableQLModule } from '../PredefinedConfig/Common/Types';
3
3
  import { BaseContext } from '../PredefinedConfig/Common/BaseContext';
4
4
  import { AdaptableColumn, AdaptableColumnBase } from '../PredefinedConfig/Common/AdaptableColumn';
5
- import { AdaptableObject, AggregatedBooleanFunctionName, AggregatedScalarExpressionFunction, AggregatedScalarFunctionName, BooleanFunctionName, ExpressionFunction, ObservableFunctionName, ScalarFunctionName, AdaptableField } from '../types';
5
+ import { AdaptableObject, AggregatedBooleanFunctionName, AggregatedExpressionFunction, AggregatedScalarFunctionName, BooleanFunctionName, ExpressionFunction, ObservableFunctionName, ScalarFunctionName, AdaptableField } from '../types';
6
6
  /**
7
7
  * Options for managing Expressions in AdapTable's Query Language
8
8
  */
@@ -62,9 +62,9 @@ export interface ExpressionOptions<TData = any> {
62
62
  */
63
63
  systemAggregatedScalarFunctions?: AggregatedScalarFunctionName[] | ((context: GlobalExpressionFunctionsContext<AggregatedScalarFunctionName>) => AggregatedScalarFunctionName[]);
64
64
  /**
65
- * Bespoke Aggregated Scalar functions - to complement those provided by AdapTable
65
+ * Bespoke Aggregated functions - to complement those provided by AdapTable
66
66
  */
67
- customAggregatedScalarFunctions?: Record<string, AggregatedScalarExpressionFunction> | ((context: GlobalExpressionFunctionsContext<string>) => Record<string, AggregatedScalarExpressionFunction>);
67
+ customAggregatedFunctions?: Record<string, AggregatedExpressionFunction> | ((context: GlobalExpressionFunctionsContext<string>) => Record<string, AggregatedExpressionFunction>);
68
68
  /**
69
69
  * Module-specific Expression Functions available
70
70
  *
@@ -666,8 +666,8 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
666
666
  (_a = (dataChangeTriggerMap[context.trigger] || rowChangeTriggerMap[context.trigger])) !== null && _a !== void 0 ? _a : context.trigger;
667
667
  text = this.replaceAll(text, '[trigger]', mappedTrigger);
668
668
  }
669
- if ((context === null || context === void 0 ? void 0 : context.column) && (context === null || context === void 0 ? void 0 : context.rowNode)) {
670
- text = this.replaceAll(text, '[column]', this.getGridApi().getRawValueFromRowNode(context.rowNode, context.column.columnId));
669
+ if (context === null || context === void 0 ? void 0 : context.column) {
670
+ text = this.replaceAll(text, '[column]', this.getColumnApi().getFriendlyNameForColumnId(context.column.columnId));
671
671
  }
672
672
  if (context === null || context === void 0 ? void 0 : context.rowNode) {
673
673
  const columns = this.extractColsFromText(text);
@@ -12,3 +12,4 @@ export declare const PrimaryKeyDocsLink: string;
12
12
  export declare const LicenseDocsLink: string;
13
13
  export declare const AdaptableOptionsDocsLink: string;
14
14
  export declare const AgGridModulesDocsLink: string;
15
+ export declare const AlertMessageDocsLink: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgGridModulesDocsLink = exports.AdaptableOptionsDocsLink = exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.QuantileAggregatedScalarQueryDocsLink = exports.CumulativeAggregatedScalarQueryDocsLink = exports.AggregatedScalarQueryDocsLink = exports.AggregatedBooleanQueryDocsLink = exports.ObservableQueryDocsLink = exports.ScalarQueryDocsLink = exports.BooleanQueryDocsLink = exports.ExpressionEditorDocsLink = exports.HOST_URL_DOCS = void 0;
3
+ exports.AlertMessageDocsLink = exports.AgGridModulesDocsLink = exports.AdaptableOptionsDocsLink = exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.QuantileAggregatedScalarQueryDocsLink = exports.CumulativeAggregatedScalarQueryDocsLink = exports.AggregatedScalarQueryDocsLink = exports.AggregatedBooleanQueryDocsLink = exports.ObservableQueryDocsLink = exports.ScalarQueryDocsLink = exports.BooleanQueryDocsLink = exports.ExpressionEditorDocsLink = exports.HOST_URL_DOCS = void 0;
4
4
  exports.HOST_URL_DOCS = 'https://docs.adaptabletools.com';
5
5
  //export const HOST_URL_DOCS = 'http://localhost:3000';
6
6
  exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/guide/ui-expression-editor`;
@@ -16,3 +16,4 @@ exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/getting-started-pri
16
16
  exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/guide/licensing`;
17
17
  exports.AdaptableOptionsDocsLink = `${exports.HOST_URL_DOCS}/guide/reference-options-overview`;
18
18
  exports.AgGridModulesDocsLink = `${exports.HOST_URL_DOCS}/guide/dev-guide-aggrid-modules-overview`;
19
+ exports.AlertMessageDocsLink = `${exports.HOST_URL_DOCS}/guide/handbook-alerting-message`;
@@ -362,7 +362,6 @@ const getTrailingGridCountChange$ = (source$, trailingPeriod, counterLimit) => {
362
362
  if (gridCounter === counterLimit) {
363
363
  // reset counter
364
364
  counter = 0;
365
- console.log('reset counter');
366
365
  }
367
366
  return gridCounter;
368
367
  }));
@@ -336,7 +336,7 @@ class QueryLanguageService {
336
336
  }
337
337
  getCustomAggregatedScalarFunctions() {
338
338
  var _a;
339
- const customAggregatedScalarFunctions = (_a = this.adaptableApi.optionsApi.getExpressionOptions()) === null || _a === void 0 ? void 0 : _a.customAggregatedScalarFunctions;
339
+ const customAggregatedScalarFunctions = (_a = this.adaptableApi.optionsApi.getExpressionOptions()) === null || _a === void 0 ? void 0 : _a.customAggregatedFunctions;
340
340
  if (!customAggregatedScalarFunctions) {
341
341
  return {};
342
342
  }
@@ -355,21 +355,22 @@ class QueryLanguageService {
355
355
  return Object.entries(aggregatedScalarFunctions).reduce((acc, [expressionName, customExpressionDefinition]) => {
356
356
  const expression = {
357
357
  handler: (args, context) => {
358
- // There is built in support for column validation
359
- // TODO: change to extractParameters
360
- // { colArgs: { [colId]: value } }
361
358
  const [aggColParam, ...restOfColParams] = (0, expressionFunctionUtils_1.extractColumnParameters)(expressionName, args);
362
359
  const aggColumnId = aggColParam === null || aggColParam === void 0 ? void 0 : aggColParam.value;
363
360
  const groupByParameter = (0, expressionFunctionUtils_1.extractParameter)(expressionName, 'operand', ['GROUP_BY'], args, {
364
361
  isOptional: true,
365
362
  });
366
- const preparedArgs = args.filter((arg) => {
363
+ const groupByColumnIds = groupByParameter === null || groupByParameter === void 0 ? void 0 : groupByParameter.value;
364
+ const contextArgs = args.filter((arg) => {
367
365
  if (typeof arg === 'object' && arg.name === 'COL') {
368
- // filter out only first col
366
+ // filter out aggregation column
369
367
  return arg.value !== aggColumnId;
370
368
  }
371
- // filter out all other objects, e.g. GROUP_BY
372
- return typeof arg !== 'object';
369
+ if (typeof arg === 'object' && arg.name === 'GROUP_BY') {
370
+ // filter out groupBy column
371
+ return false;
372
+ }
373
+ return true;
373
374
  });
374
375
  const aggregationExpressionEvaluation = {
375
376
  aggregationParams: {
@@ -379,18 +380,21 @@ class QueryLanguageService {
379
380
  field: aggColumnId,
380
381
  initialValue: customExpressionDefinition.initialValue,
381
382
  reducer: (acc, value, rowNode, dataIndex) => {
382
- const context = Object.assign({ rowNode, args: preparedArgs.map((arg) => {
383
+ const context = Object.assign({ accumulator: acc, currentValue: value, index: dataIndex, rowNode, args: contextArgs.map((arg) => {
383
384
  // if col, replace with value
384
385
  if (typeof arg === 'object' && arg.name === 'COL') {
385
386
  return getValueForColId(arg.value, rowNode);
386
387
  }
387
388
  return arg;
388
- }), aggColumnId, getValueForColId: (colId) => getValueForColId(colId, rowNode) }, (0, ObjectFactory_1.createBaseContext)(this.adaptableApi));
389
- return customExpressionDefinition.reducer(acc, value, dataIndex, context);
389
+ }), aggColumnId,
390
+ groupByColumnIds, getValueForColId: (colId) => getValueForColId(colId, rowNode) }, (0, ObjectFactory_1.createBaseContext)(this.adaptableApi));
391
+ return customExpressionDefinition.reducer(context);
390
392
  },
391
393
  done: (accValue, dataArray) => {
392
- if (customExpressionDefinition.processReducerValue) {
393
- return customExpressionDefinition.processReducerValue(accValue, dataArray, Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptableApi)), { args }));
394
+ if (customExpressionDefinition.processAggregatedValue) {
395
+ const context = Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptableApi)), { aggregatedValue: accValue, rowNodes: dataArray, args: contextArgs, aggColumnId,
396
+ groupByColumnIds });
397
+ return customExpressionDefinition.processAggregatedValue(context);
394
398
  }
395
399
  return accValue;
396
400
  },
@@ -399,15 +403,29 @@ class QueryLanguageService {
399
403
  },
400
404
  rowValueGetter: (rowNode, aggregationValue) => {
401
405
  if (customExpressionDefinition.prepareRowValue) {
402
- return customExpressionDefinition.prepareRowValue(rowNode, aggregationValue, Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptableApi)), { aggColumnId,
403
- args, getValueForColId: (colId) => getValueForColId(colId, rowNode) }));
406
+ const context = Object.assign(Object.assign({ rowNode: rowNode, aggregatedValue: aggregationValue }, (0, ObjectFactory_1.createBaseContext)(this.adaptableApi)), { args: contextArgs.map((arg) => {
407
+ // if col, replace with value
408
+ if (typeof arg === 'object' && arg.name === 'COL') {
409
+ return getValueForColId(arg.value, rowNode);
410
+ }
411
+ return arg;
412
+ }), aggColumnId,
413
+ groupByColumnIds, getValueForColId: (colId) => getValueForColId(colId, rowNode) });
414
+ return customExpressionDefinition.prepareRowValue(context);
404
415
  }
405
416
  return aggregationValue;
406
417
  },
407
418
  rowFilterFn: (rowNode) => {
408
419
  var _a, _b;
409
- if (customExpressionDefinition.rowFilter) {
410
- return customExpressionDefinition.rowFilter(rowNode, Object.assign(Object.assign({}, (0, ObjectFactory_1.createBaseContext)(this.adaptableApi)), { aggColumnId, getValueForColId: (colId) => getValueForColId(colId, rowNode) }));
420
+ if (customExpressionDefinition.filterRow) {
421
+ return customExpressionDefinition.filterRow(Object.assign(Object.assign({ rowNode }, (0, ObjectFactory_1.createBaseContext)(this.adaptableApi)), { args: contextArgs.map((arg) => {
422
+ // if col, replace with value
423
+ if (typeof arg === 'object' && arg.name === 'COL') {
424
+ return getValueForColId(arg.value, rowNode);
425
+ }
426
+ return arg;
427
+ }), aggColumnId,
428
+ groupByColumnIds, getValueForColId: (colId) => getValueForColId(colId, rowNode) }));
411
429
  }
412
430
  return (_b = (_a = context === null || context === void 0 ? void 0 : context.filterFn) === null || _a === void 0 ? void 0 : _a.call(context, rowNode)) !== null && _b !== void 0 ? _b : true;
413
431
  },
@@ -8,8 +8,11 @@ const Radio_1 = tslib_1.__importStar(require("../../../components/Radio"));
8
8
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
9
  const rebass_1 = require("rebass");
10
10
  const CodeBlock_1 = require("../../../components/CodeBlock");
11
- const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
12
11
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
12
+ const ButtonInfo_1 = require("../../Components/Buttons/ButtonInfo");
13
+ const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
14
+ const Textarea_1 = tslib_1.__importDefault(require("../../../components/Textarea"));
15
+ const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
13
16
  const renderAlertMessageSummary = () => {
14
17
  const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
15
18
  return (React.createElement(rebass_1.Text, { fontSize: 2 },
@@ -48,10 +51,16 @@ const AlertMessageWizardSection = (props) => {
48
51
  ' ',
49
52
  React.createElement(FormLayout_1.default, null,
50
53
  React.createElement(FormLayout_1.FormRow, { label: "Header" },
51
- React.createElement(AdaptableInput_1.default, { minWidth: 250, placeholder: "use defaults", marginTop: 2, type: 'text', autoFocus: false, value: messageHeader !== null && messageHeader !== void 0 ? messageHeader : '',
54
+ React.createElement(Textarea_1.default, { minWidth: 300, rows: 3, placeholder: "use defaults", marginTop: 2, type: 'text', autoFocus: false, value: messageHeader !== null && messageHeader !== void 0 ? messageHeader : '',
52
55
  // placeholder="defaults to column name"
53
56
  onChange: (e) => onMessageHeaderChange(e) })),
54
57
  React.createElement(FormLayout_1.FormRow, { label: "Message" },
55
- React.createElement(AdaptableInput_1.default, { minWidth: 250, marginTop: 2, type: 'text', autoFocus: false, value: messageText !== null && messageText !== void 0 ? messageText : '', onChange: (e) => onMessageTextChange(e) })))))));
58
+ React.createElement(Textarea_1.default, { minWidth: 300, rows: 3, marginTop: 2, type: 'text', autoFocus: false, value: messageText !== null && messageText !== void 0 ? messageText : '', onChange: (e) => onMessageTextChange(e) }))),
59
+ React.createElement(HelpBlock_1.default, { "data-name": "alert-message-documentation", mt: 3, mb: 2, style: {
60
+ fontSize: 'var(--ab-font-size-3)',
61
+ padding: 0,
62
+ } },
63
+ React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.AlertMessageDocsLink, '_blank') }),
64
+ "See Alert Message documentation for more details and examples")))));
56
65
  };
57
66
  exports.AlertMessageWizardSection = AlertMessageWizardSection;
@@ -1369,7 +1369,7 @@ class AdaptableAgGrid {
1369
1369
  */
1370
1370
  this.agGridAdapter.getAgGridApi().addEventListener(core_1.Events.EVENT_FIRST_DATA_RENDERED, (this.listenerFirstDataRendered = () => {
1371
1371
  if (this.initWithLazyData) {
1372
- this.updateColumnModelAndRefreshGrid();
1372
+ this.updateColumnModelAndRefreshGrid({ skipColDefsRefresh: true });
1373
1373
  this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
1374
1374
  this._emit('FirstDataRendered');
1375
1375
  }
@@ -19,25 +19,7 @@ export interface AdaptableNumberCellEditorParams extends ICellEditorParams {
19
19
  }
20
20
  export declare const AdaptableReactNumberEditor: React.ForwardRefExoticComponent<AdaptableNumberCellEditorParams & React.RefAttributes<unknown>>;
21
21
  /**
22
- * Used by default for all `abColDefNumber` columns.
23
- *
24
- * You can configure it by specifying `cellEditorParams` in the colDef:
25
- *
26
- * colDef {
27
- * field: 'stars',
28
- * type: 'abColDefNumber',
29
- * cellEditorParams: {
30
- * emptyValue: 5, // defaults to ''
31
- * showClearButton: false
32
- * }
33
- * }
34
- *
35
- * For now, there are 2 editor params you can configure:
36
- *
37
- * cellEditorParams.showClearButton - defaults to `true` - whether to show the clear button. If `true`, it works together with `cellEditorParams.emptyValue`
38
- * cellEditorParams.emptyValue - defaults to `''` (empty string) - value to set for the cell, when the clear button is pressed.
39
- *
40
- * When the colDef has a `valueParser` provided as a function, it will be used before setting the value for the cell.
22
+ * Number Editor provided by AdapTable and used by default for all `abColDefNumber` columns
41
23
  */
42
24
  export declare class AdaptableNumberEditor implements ICellEditorComp {
43
25
  private value;
@@ -82,25 +82,7 @@ exports.AdaptableReactNumberEditor = (0, react_1.forwardRef)((props, ref) => {
82
82
  });
83
83
  exports.AdaptableReactNumberEditor.displayName = 'AdaptableReactNumberEditor';
84
84
  /**
85
- * Used by default for all `abColDefNumber` columns.
86
- *
87
- * You can configure it by specifying `cellEditorParams` in the colDef:
88
- *
89
- * colDef {
90
- * field: 'stars',
91
- * type: 'abColDefNumber',
92
- * cellEditorParams: {
93
- * emptyValue: 5, // defaults to ''
94
- * showClearButton: false
95
- * }
96
- * }
97
- *
98
- * For now, there are 2 editor params you can configure:
99
- *
100
- * cellEditorParams.showClearButton - defaults to `true` - whether to show the clear button. If `true`, it works together with `cellEditorParams.emptyValue`
101
- * cellEditorParams.emptyValue - defaults to `''` (empty string) - value to set for the cell, when the clear button is pressed.
102
- *
103
- * When the colDef has a `valueParser` provided as a function, it will be used before setting the value for the cell.
85
+ * Number Editor provided by AdapTable and used by default for all `abColDefNumber` columns
104
86
  */
105
87
  class AdaptableNumberEditor {
106
88
  constructor() {
@@ -5,7 +5,7 @@ export type InternalAdaptablePercentageEditorApi = {
5
5
  };
6
6
  export type InternalAdaptablePercentageEditorProps = {
7
7
  /**
8
- * Value to set when the x (when showClear: true) is pressed
8
+ * Value to set when the Clear button is clicked
9
9
  */
10
10
  emptyValue?: string | number;
11
11
  defaultValue?: string | number;
@@ -15,7 +15,7 @@ export type InternalAdaptablePercentageEditorProps = {
15
15
  */
16
16
  type?: string;
17
17
  /**
18
- * Whether to show the clear button. Defaults to false
18
+ * Whether to show the Clear button; defaults to true
19
19
  */
20
20
  showClearButton?: boolean;
21
21
  onValueChange?: (value: string | number) => void;
@@ -2,31 +2,13 @@ import * as React from 'react';
2
2
  import { ICellEditorComp } from '@ag-grid-community/core';
3
3
  import { AdaptableNumberCellEditorParams } from '../AdaptableNumberEditor';
4
4
  /**
5
- * Adaptable percentage editor parameters extending the number editor params.
5
+ * AdapTablePercentageCellEditor parameters - extends AdaptableNumberCellEditorParams
6
6
  */
7
7
  export interface AdaptablePercentageCellEditorParams extends AdaptableNumberCellEditorParams {
8
8
  }
9
9
  export declare const AdaptableReactPercentageEditor: React.ForwardRefExoticComponent<AdaptablePercentageCellEditorParams & React.RefAttributes<unknown>>;
10
10
  /**
11
- * Used by default for all `abColDefNumber` columns.
12
- *
13
- * You can configure it by specifying `cellEditorParams` in the colDef:
14
- *
15
- * colDef {
16
- * field: 'stars',
17
- * type: 'abColDefNumber',
18
- * cellEditorParams: {
19
- * emptyValue: 5, // defaults to ''
20
- * showClearButton: false
21
- * }
22
- * }
23
- *
24
- * For now, there are 2 editor params you can configure:
25
- *
26
- * cellEditorParams.showClearButton - defaults to `true` - whether to show the clear button. If `true`, it works together with `cellEditorParams.emptyValue`
27
- * cellEditorParams.emptyValue - defaults to `''` (empty string) - value to set for the cell, when the clear button is pressed.
28
- *
29
- * When the colDef has a `valueParser` provided as a function, it will be used before setting the value for the cell.
11
+ * Used to edit percentage columns as percentages (similar to how its done in Excel)
30
12
  */
31
13
  export declare class AdaptablePercentageEditor implements ICellEditorComp {
32
14
  private value;
@@ -66,25 +66,7 @@ exports.AdaptableReactPercentageEditor = (0, react_1.forwardRef)((props, ref) =>
66
66
  });
67
67
  exports.AdaptableReactPercentageEditor.displayName = 'AdaptableReactPercentageEditor';
68
68
  /**
69
- * Used by default for all `abColDefNumber` columns.
70
- *
71
- * You can configure it by specifying `cellEditorParams` in the colDef:
72
- *
73
- * colDef {
74
- * field: 'stars',
75
- * type: 'abColDefNumber',
76
- * cellEditorParams: {
77
- * emptyValue: 5, // defaults to ''
78
- * showClearButton: false
79
- * }
80
- * }
81
- *
82
- * For now, there are 2 editor params you can configure:
83
- *
84
- * cellEditorParams.showClearButton - defaults to `true` - whether to show the clear button. If `true`, it works together with `cellEditorParams.emptyValue`
85
- * cellEditorParams.emptyValue - defaults to `''` (empty string) - value to set for the cell, when the clear button is pressed.
86
- *
87
- * When the colDef has a `valueParser` provided as a function, it will be used before setting the value for the cell.
69
+ * Used to edit percentage columns as percentages (similar to how its done in Excel)
88
70
  */
89
71
  class AdaptablePercentageEditor {
90
72
  constructor() {
@@ -167,7 +167,7 @@ const PrimiteValueInput = (props) => {
167
167
  };
168
168
  exports.PrimiteValueInput = PrimiteValueInput;
169
169
  const PrimitiveMultiValueInput = (props) => {
170
- return (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { isMulti: true, allowNewValues: true, value: props.value, columnId: props.lefthandColumnIdParam, onChange: (value) => {
170
+ return (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { isMulti: true, allowNewValues: true, value: props.value, columnId: (0, utils_1.mapColumnExpressionToColumnId)(props.lefthandColumnIdParam), onChange: (value) => {
171
171
  props.onChange(value);
172
172
  } }));
173
173
  };
@@ -155,18 +155,18 @@ const PrimitiveFunctionEditor = (props) => {
155
155
  }, value: props.predicate.operator })),
156
156
  react_1.default.createElement(rebass_1.Flex, { flex: 1, ml: 2 }, restOfFunctionInputDataTypes.map((type, index) => {
157
157
  var _a;
158
+ const key = type + index;
158
159
  const commonProps = {
159
- key: type + index,
160
160
  lefthandColumnIdParam: columnOrFieldId,
161
161
  inputType: type,
162
162
  };
163
163
  if (type.includes('[]')) {
164
- return (react_1.default.createElement(QueryBuilderInputs_1.PrimitiveMultiValueInput, Object.assign({}, commonProps, { value: restOfArgs, onChange: (values) => {
164
+ return (react_1.default.createElement(QueryBuilderInputs_1.PrimitiveMultiValueInput, Object.assign({}, commonProps, { key: key, value: restOfArgs, onChange: (values) => {
165
165
  const args = [...props.predicate.args.slice(0, 1), ...values];
166
166
  props.onChange(Object.assign(Object.assign({}, props.predicate), { args }));
167
167
  } })));
168
168
  }
169
- return (react_1.default.createElement(QueryBuilderInputs_1.PrimiteValueInput, Object.assign({}, commonProps, { value: (_a = restOfArgs[index]) !== null && _a !== void 0 ? _a : null, onChange: (value) => {
169
+ return (react_1.default.createElement(QueryBuilderInputs_1.PrimiteValueInput, Object.assign({}, commonProps, { key: key, value: (_a = restOfArgs[index]) !== null && _a !== void 0 ? _a : null, onChange: (value) => {
170
170
  const args = [...props.predicate.args];
171
171
  // +1 because col is the first argument
172
172
  args[index + 1] = value;
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  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" || '',
5
- PUBLISH_TIMESTAMP: 1717156632230 || Date.now(),
6
- VERSION: "18.1.0" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1718367380027 || Date.now(),
6
+ VERSION: "18.1.2" || '--current-version--',
7
7
  };
@@ -2623,6 +2623,13 @@ export declare const ADAPTABLE_METAMODEL: {
2623
2623
  name: string;
2624
2624
  kind: string;
2625
2625
  desc: string;
2626
+ props: {
2627
+ name: string;
2628
+ kind: string;
2629
+ desc: string;
2630
+ isOpt: boolean;
2631
+ ref: string;
2632
+ }[];
2626
2633
  };
2627
2634
  DataFormatType: {
2628
2635
  name: string;
@@ -3791,6 +3798,17 @@ export declare const ADAPTABLE_METAMODEL: {
3791
3798
  name: string;
3792
3799
  kind: string;
3793
3800
  desc: string;
3801
+ props: ({
3802
+ name: string;
3803
+ kind: string;
3804
+ desc: string;
3805
+ ref?: undefined;
3806
+ } | {
3807
+ name: string;
3808
+ kind: string;
3809
+ desc: string;
3810
+ ref: string;
3811
+ })[];
3794
3812
  };
3795
3813
  Layout: {
3796
3814
  name: string;