@adaptabletools/adaptable-cjs 23.0.0-canary.3 → 23.0.0-canary.4
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 +1 -1
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
- package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
- package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
- package/src/AdaptableState/Common/AdaptableForm.js +34 -0
- package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
- package/src/AdaptableState/Common/Enums.d.ts +0 -5
- package/src/AdaptableState/Common/Enums.js +1 -7
- package/src/Api/Implementation/LayoutHelpers.js +12 -0
- package/src/Strategy/CalculatedColumnModule.js +3 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +120 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +8 -16
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
- package/src/View/Components/Selectors/ColumnSelector.js +5 -0
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +3 -1
- package/src/View/Layout/LayoutViewPanel.js +23 -21
- package/src/View/renderWithAdaptableContext.js +1 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -1
- package/src/agGrid/AdaptableAgGrid.js +3 -18
- package/src/agGrid/AgGridColumnAdapter.js +1 -4
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +10 -5
- package/src/components/Combobox/VirtualizedList.js +5 -5
- package/src/components/Combobox/comboboxUtils.d.ts +4 -1
- package/src/components/Combobox/comboboxUtils.js +2 -0
- package/src/components/Combobox/index.d.ts +1 -0
- package/src/components/Combobox/index.js +36 -16
- package/src/components/Tree/TreeDropdown/index.js +1 -5
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
- package/src/metamodel/adaptable.metamodel.d.ts +0 -17
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +0 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
- package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -5
- package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
- package/src/View/AdaptableComputedCSSVarsContext.js +0 -36
- package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
- package/src/components/Select/CSSNumericVariableWatch.js +0 -51
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable-cjs",
|
|
3
|
-
"version": "23.0.0-canary.
|
|
3
|
+
"version": "23.0.0-canary.4",
|
|
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",
|
|
@@ -170,10 +170,6 @@ const DefaultAdaptableOptions = {
|
|
|
170
170
|
},
|
|
171
171
|
},
|
|
172
172
|
filterOptions: {
|
|
173
|
-
filterActionOnDataChange: {
|
|
174
|
-
applyFilter: 'Always',
|
|
175
|
-
throttleDelay: 0,
|
|
176
|
-
},
|
|
177
173
|
clearFiltersOnStartUp: false,
|
|
178
174
|
enableFilterOnSpecialColumns: true,
|
|
179
175
|
useAdaptableFiltering: true,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FilterActionOnDataChange } from '../AdaptableState/Common/FilterActionOnDataChange';
|
|
2
1
|
import { BaseContext } from '../../types';
|
|
3
2
|
import { AdaptableColumn } from '../AdaptableState/Common/AdaptableColumn';
|
|
4
3
|
import { SystemAlertPredicateId, SystemFilterPredicateId } from '../../types';
|
|
@@ -30,12 +29,6 @@ export interface FilterOptions<TData = any> {
|
|
|
30
29
|
* @returns
|
|
31
30
|
*/
|
|
32
31
|
customInFilterValues?: (context: CustomInFilterValuesContext<TData>) => Promise<InFilterValueResult> | InFilterValueResult;
|
|
33
|
-
/**
|
|
34
|
-
* When to re-filter grid after data changes: 'Always', 'Never' or 'Throttle' (with a delay value)
|
|
35
|
-
*
|
|
36
|
-
* @defaultValue 'Always'
|
|
37
|
-
*/
|
|
38
|
-
filterActionOnDataChange?: FilterActionOnDataChange;
|
|
39
32
|
/**
|
|
40
33
|
* Allow filtering on Calculated & FreeText columns
|
|
41
34
|
*
|
|
@@ -133,8 +133,19 @@ export interface AdaptableFormField {
|
|
|
133
133
|
/**
|
|
134
134
|
* Field Default Value - can be of type string, boolean, number, or for
|
|
135
135
|
* `select` fields with `multi: true` an array of those.
|
|
136
|
+
*
|
|
137
|
+
* For single `select` fields, this is also the value restored when the user
|
|
138
|
+
* clears the combobox (unless {@link clearToDefault} is `false`).
|
|
136
139
|
*/
|
|
137
140
|
defaultValue?: string | boolean | number | Array<string | number | boolean>;
|
|
141
|
+
/**
|
|
142
|
+
* For single `select` fields only. When the user clears the combobox,
|
|
143
|
+
* whether to restore {@link defaultValue} instead of leaving the field empty.
|
|
144
|
+
*
|
|
145
|
+
* Defaults to `true` when `defaultValue` is set, otherwise `false`.
|
|
146
|
+
* Set to `false` when an empty selection is a distinct state from the default.
|
|
147
|
+
*/
|
|
148
|
+
clearToDefault?: boolean;
|
|
138
149
|
/**
|
|
139
150
|
* Items to populate the `select` and `radio` fieldTypes.
|
|
140
151
|
*
|
|
@@ -166,7 +177,10 @@ export interface AdaptableFormField {
|
|
|
166
177
|
/**
|
|
167
178
|
* Placeholder text shown inside `text`, `textarea`, `number`, `date`,
|
|
168
179
|
* `time` and `datetime` inputs when empty. For `select` fields it is
|
|
169
|
-
* rendered as the empty-state label.
|
|
180
|
+
* rendered as the empty-state label when no value is selected.
|
|
181
|
+
*
|
|
182
|
+
* When omitted on a `select` field with a {@link defaultValue}, the label of
|
|
183
|
+
* the matching `options` entry is used as the empty-state label.
|
|
170
184
|
*/
|
|
171
185
|
placeholder?: string;
|
|
172
186
|
/**
|
|
@@ -310,6 +324,9 @@ export declare function isAdaptableFormFieldGroup(entry: AdaptableFormField | Ad
|
|
|
310
324
|
* computing defaults, validation or per-field lookups.
|
|
311
325
|
*/
|
|
312
326
|
export declare function flattenAdaptableFormFields<T extends BaseContext>(formDef?: AdaptableForm<T, any>): AdaptableFormField[];
|
|
327
|
+
export declare function shouldClearSelectToDefault(field: AdaptableFormField): boolean;
|
|
328
|
+
export declare function resolveSelectValueAfterClear(field: AdaptableFormField, newValue: unknown): unknown;
|
|
329
|
+
export declare function resolveSelectPlaceholder(field: AdaptableFormField, options: AdaptableFormFieldOption[]): string | undefined;
|
|
313
330
|
export declare function getDefaultAdaptableFormData<T extends BaseContext = BaseContext>(formDef?: AdaptableForm<T, any>): AdaptableFormData;
|
|
314
331
|
/**
|
|
315
332
|
* Resolves a field's `options` to the current array of options.
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isAdaptableFormFieldGroup = isAdaptableFormFieldGroup;
|
|
4
4
|
exports.flattenAdaptableFormFields = flattenAdaptableFormFields;
|
|
5
|
+
exports.shouldClearSelectToDefault = shouldClearSelectToDefault;
|
|
6
|
+
exports.resolveSelectValueAfterClear = resolveSelectValueAfterClear;
|
|
7
|
+
exports.resolveSelectPlaceholder = resolveSelectPlaceholder;
|
|
5
8
|
exports.getDefaultAdaptableFormData = getDefaultAdaptableFormData;
|
|
6
9
|
exports.resolveAdaptableFormFieldOptionsSync = resolveAdaptableFormFieldOptionsSync;
|
|
7
10
|
exports.isAdaptableFormFieldHidden = isAdaptableFormFieldHidden;
|
|
@@ -42,6 +45,37 @@ function flattenAdaptableFormFields(formDef) {
|
|
|
42
45
|
}
|
|
43
46
|
return out;
|
|
44
47
|
}
|
|
48
|
+
function shouldClearSelectToDefault(field) {
|
|
49
|
+
if (field.fieldType !== 'select' || field.multi) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
if (field.clearToDefault === false) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
if (field.clearToDefault === true) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
return (field.defaultValue !== undefined && field.defaultValue !== null && field.defaultValue !== '');
|
|
59
|
+
}
|
|
60
|
+
function resolveSelectValueAfterClear(field, newValue) {
|
|
61
|
+
if (field.fieldType !== 'select' || field.multi) {
|
|
62
|
+
return newValue;
|
|
63
|
+
}
|
|
64
|
+
const isEmpty = newValue === null || newValue === undefined || newValue === '';
|
|
65
|
+
if (!isEmpty || !shouldClearSelectToDefault(field)) {
|
|
66
|
+
return newValue;
|
|
67
|
+
}
|
|
68
|
+
return field.defaultValue;
|
|
69
|
+
}
|
|
70
|
+
function resolveSelectPlaceholder(field, options) {
|
|
71
|
+
if (field.placeholder) {
|
|
72
|
+
return field.placeholder;
|
|
73
|
+
}
|
|
74
|
+
if (field.defaultValue === undefined || field.defaultValue === null || field.defaultValue === '') {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
return options.find((option) => option.value === field.defaultValue)?.label;
|
|
78
|
+
}
|
|
45
79
|
function getDefaultAdaptableFormData(formDef) {
|
|
46
80
|
return flattenAdaptableFormFields(formDef).reduce((data, field) => {
|
|
47
81
|
if (field.fieldType === 'select' && field.multi) {
|
|
@@ -33,9 +33,10 @@ export interface CellDataChangedInfo<TData = any> {
|
|
|
33
33
|
*/
|
|
34
34
|
rowData?: TData;
|
|
35
35
|
/**
|
|
36
|
-
* What triggered the change - user, background change
|
|
36
|
+
* What triggered the change - user, background change, a reverted change, or a
|
|
37
|
+
* derived update on a Calculated Column whose source value changed?
|
|
37
38
|
*/
|
|
38
|
-
trigger?: 'edit' | 'tick' | 'undo' | 'aggChange';
|
|
39
|
+
trigger?: 'edit' | 'tick' | 'undo' | 'aggChange' | 'calculatedColumnChange';
|
|
39
40
|
/**
|
|
40
41
|
* Whether the change was prevented by a validation rule
|
|
41
42
|
*/
|
|
@@ -49,11 +49,6 @@ export declare enum SummaryOperation {
|
|
|
49
49
|
Only = "Only",
|
|
50
50
|
Weighted_Average = "Weighted Avg"
|
|
51
51
|
}
|
|
52
|
-
export declare enum FilterOnDataChangeOptions {
|
|
53
|
-
Always = "Always",
|
|
54
|
-
Never = "Never",
|
|
55
|
-
Throttle = "Throttle"
|
|
56
|
-
}
|
|
57
52
|
export declare enum ChangeDirection {
|
|
58
53
|
Up = "Up",
|
|
59
54
|
Down = "Down",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// General Enums
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ChangeDirection = exports.
|
|
4
|
+
exports.ChangeDirection = exports.SummaryOperation = exports.StatusColour = exports.FontSize = exports.FontStyle = exports.FontWeight = exports.SelectionMode = exports.SortOrder = exports.ScheduleType = exports.MathOperation = void 0;
|
|
5
5
|
var MathOperation;
|
|
6
6
|
(function (MathOperation) {
|
|
7
7
|
MathOperation["Add"] = "Add";
|
|
@@ -64,12 +64,6 @@ var SummaryOperation;
|
|
|
64
64
|
SummaryOperation["Only"] = "Only";
|
|
65
65
|
SummaryOperation["Weighted_Average"] = "Weighted Avg";
|
|
66
66
|
})(SummaryOperation || (exports.SummaryOperation = SummaryOperation = {}));
|
|
67
|
-
var FilterOnDataChangeOptions;
|
|
68
|
-
(function (FilterOnDataChangeOptions) {
|
|
69
|
-
FilterOnDataChangeOptions["Always"] = "Always";
|
|
70
|
-
FilterOnDataChangeOptions["Never"] = "Never";
|
|
71
|
-
FilterOnDataChangeOptions["Throttle"] = "Throttle";
|
|
72
|
-
})(FilterOnDataChangeOptions || (exports.FilterOnDataChangeOptions = FilterOnDataChangeOptions = {}));
|
|
73
67
|
var ChangeDirection;
|
|
74
68
|
(function (ChangeDirection) {
|
|
75
69
|
ChangeDirection["Up"] = "Up";
|
|
@@ -263,6 +263,9 @@ const tableLayoutToTableLayoutModel = (tableLayout) => {
|
|
|
263
263
|
if (tableLayout.Metadata) {
|
|
264
264
|
result.Ignore_Metadata = tableLayout.Metadata;
|
|
265
265
|
}
|
|
266
|
+
if (tableLayout.OpenCharts) {
|
|
267
|
+
result.Ignore_OpenCharts = tableLayout.OpenCharts;
|
|
268
|
+
}
|
|
266
269
|
if (tableLayout.RowSummaries != null) {
|
|
267
270
|
result.Ignore_RowSummaries = tableLayout.RowSummaries;
|
|
268
271
|
}
|
|
@@ -343,6 +346,9 @@ const pivotLayoutToPivotLayoutModel = (pivotLayout) => {
|
|
|
343
346
|
if (pivotLayout.Metadata) {
|
|
344
347
|
result.Ignore_Metadata = pivotLayout.Metadata;
|
|
345
348
|
}
|
|
349
|
+
if (pivotLayout.OpenCharts) {
|
|
350
|
+
result.Ignore_OpenCharts = pivotLayout.OpenCharts;
|
|
351
|
+
}
|
|
346
352
|
return result;
|
|
347
353
|
};
|
|
348
354
|
exports.pivotLayoutToPivotLayoutModel = pivotLayoutToPivotLayoutModel;
|
|
@@ -393,6 +399,9 @@ const tableLayoutModelToTableLayout = (layoutModel) => {
|
|
|
393
399
|
if (layoutModel.Ignore_Metadata) {
|
|
394
400
|
tableLayout.Metadata = layoutModel.Ignore_Metadata;
|
|
395
401
|
}
|
|
402
|
+
if (layoutModel.Ignore_OpenCharts) {
|
|
403
|
+
tableLayout.OpenCharts = layoutModel.Ignore_OpenCharts;
|
|
404
|
+
}
|
|
396
405
|
// if (layoutModel.RowGroupDisplayType) {
|
|
397
406
|
tableLayout.RowGroupDisplayType = layoutModel.RowGroupDisplayType ?? 'single';
|
|
398
407
|
// }
|
|
@@ -499,6 +508,9 @@ const pivotLayoutModelToPivotLayout = (layoutModel) => {
|
|
|
499
508
|
if (layoutModel.Ignore_Metadata) {
|
|
500
509
|
pivotLayout.Metadata = layoutModel.Ignore_Metadata;
|
|
501
510
|
}
|
|
511
|
+
if (layoutModel.Ignore_OpenCharts) {
|
|
512
|
+
pivotLayout.OpenCharts = layoutModel.Ignore_OpenCharts;
|
|
513
|
+
}
|
|
502
514
|
if (layoutModel.PivotGroupedColumns) {
|
|
503
515
|
pivotLayout.PivotGroupedColumns = layoutModel.PivotGroupedColumns;
|
|
504
516
|
}
|
|
@@ -36,7 +36,9 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
36
36
|
this.api.internalApi
|
|
37
37
|
.getDataService()
|
|
38
38
|
.on('CellDataChanged', (cellDataChangedInfo) => {
|
|
39
|
-
if (cellDataChangedInfo.trigger !== 'aggChange' &&
|
|
39
|
+
if (cellDataChangedInfo.trigger !== 'aggChange' &&
|
|
40
|
+
cellDataChangedInfo.trigger !== 'calculatedColumnChange' &&
|
|
41
|
+
!cellDataChangedInfo.preventEdit) {
|
|
40
42
|
this.api.internalApi
|
|
41
43
|
.getCalculatedColumnExpressionService()
|
|
42
44
|
.listentoCellDataChange(cellDataChangedInfo);
|
|
@@ -8,6 +8,7 @@ export declare class CalculatedColumnExpressionService implements ICalculatedCol
|
|
|
8
8
|
private adaptableApi;
|
|
9
9
|
private aggregatedScalarLiveValuesMap;
|
|
10
10
|
constructor(adaptableApi: AdaptableApi);
|
|
11
|
+
buildSyntheticCellDataChangedInfosForCalcColumns(cellDataChangedInfo: CellDataChangedInfo): CellDataChangedInfo[];
|
|
11
12
|
listentoCellDataChange(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
12
13
|
listentoRowDataChange(rowDataChangedInfo: RowDataChangedInfo): void;
|
|
13
14
|
destroy(): void;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CalculatedColumnExpressionService = void 0;
|
|
4
4
|
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
5
5
|
const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
|
|
6
|
+
const CalculatedColumnSyntheticChange_1 = require("./CalculatedColumnSyntheticChange");
|
|
6
7
|
class CalculatedColumnExpressionService {
|
|
7
8
|
adaptableApi;
|
|
8
9
|
aggregatedScalarLiveValuesMap = new Map();
|
|
@@ -10,7 +11,13 @@ class CalculatedColumnExpressionService {
|
|
|
10
11
|
this.adaptableApi = adaptableApi;
|
|
11
12
|
this.adaptableApi = adaptableApi;
|
|
12
13
|
}
|
|
14
|
+
buildSyntheticCellDataChangedInfosForCalcColumns(cellDataChangedInfo) {
|
|
15
|
+
return (0, CalculatedColumnSyntheticChange_1.buildSyntheticCellDataChangedInfosForCalcColumns)(this.adaptableApi, cellDataChangedInfo);
|
|
16
|
+
}
|
|
13
17
|
listentoCellDataChange(cellDataChangedInfo) {
|
|
18
|
+
if (cellDataChangedInfo.trigger === 'calculatedColumnChange') {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
14
21
|
const refreshedCalculatedColumns = [];
|
|
15
22
|
this.aggregatedScalarLiveValuesMap.forEach((aggregatedScalarLiveValue, calculatedColumnId) => {
|
|
16
23
|
const calculatedColumn = this.adaptableApi.calculatedColumnApi.getCalculatedColumnById(calculatedColumnId);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AdaptableApi } from '../../types';
|
|
2
|
+
import { CellDataChangedInfo } from '../../AdaptableState/Common/CellDataChangedInfo';
|
|
3
|
+
export declare function buildSyntheticCellDataChangedInfosForCalcColumns(adaptableApi: AdaptableApi, info: CellDataChangedInfo): CellDataChangedInfo[];
|
|
4
|
+
export declare function expandCellDataChangedInfosWithCalculatedColumns(adaptableApi: AdaptableApi, cellDataChangedInfos: CellDataChangedInfo[]): CellDataChangedInfo[];
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildSyntheticCellDataChangedInfosForCalcColumns = buildSyntheticCellDataChangedInfosForCalcColumns;
|
|
4
|
+
exports.expandCellDataChangedInfosWithCalculatedColumns = expandCellDataChangedInfosWithCalculatedColumns;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const parser = tslib_1.__importStar(require("../../parser/src"));
|
|
7
|
+
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
8
|
+
const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
|
|
9
|
+
function isScalarCalculatedColumn(calculatedColumn) {
|
|
10
|
+
return !!calculatedColumn.Query?.ScalarExpression;
|
|
11
|
+
}
|
|
12
|
+
function collectDependentScalarCalculatedColumns(adaptableApi, rootColumnId) {
|
|
13
|
+
const collected = [];
|
|
14
|
+
const seenCalcColumnIds = new Set();
|
|
15
|
+
const queue = [rootColumnId];
|
|
16
|
+
while (queue.length > 0) {
|
|
17
|
+
const columnId = queue.shift();
|
|
18
|
+
const adaptableColumn = adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
19
|
+
if (!adaptableColumn) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const dependentColumnIds = adaptableApi.calculatedColumnApi.internalApi.getCalculatedColumnsDependentOnColumn(adaptableColumn);
|
|
23
|
+
dependentColumnIds.forEach((dependentColumnId) => {
|
|
24
|
+
if (seenCalcColumnIds.has(dependentColumnId)) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const calculatedColumn = adaptableApi.calculatedColumnApi.getCalculatedColumnForColumnId(dependentColumnId);
|
|
28
|
+
if (!calculatedColumn || !isScalarCalculatedColumn(calculatedColumn)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
seenCalcColumnIds.add(dependentColumnId);
|
|
32
|
+
collected.push(calculatedColumn);
|
|
33
|
+
queue.push(dependentColumnId);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return collected;
|
|
37
|
+
}
|
|
38
|
+
function buildShadowRowData(adaptableApi, info) {
|
|
39
|
+
const shadowData = Helper_1.default.cloneObject(info.rowNode?.data ?? info.rowData ?? {});
|
|
40
|
+
const fieldName = info.column.field ?? info.column.columnId;
|
|
41
|
+
adaptableApi.internalApi.setValueUsingField(shadowData, fieldName, info.oldValue);
|
|
42
|
+
return shadowData;
|
|
43
|
+
}
|
|
44
|
+
function evaluateScalarExpressionWithShadowData(adaptableApi, calculatedColumn, rowNode, shadowData) {
|
|
45
|
+
const internalApi = adaptableApi.internalApi;
|
|
46
|
+
const moduleFns = internalApi
|
|
47
|
+
.getQueryLanguageService()
|
|
48
|
+
.getModuleExpressionFunctionsMap(ModuleConstants_1.CalculatedColumnModuleId);
|
|
49
|
+
const baseFunctions = { ...moduleFns.booleanFunctions, ...moduleFns.scalarFunctions };
|
|
50
|
+
const resolveColumnValue = (columnId) => {
|
|
51
|
+
const childCalculatedColumn = adaptableApi.calculatedColumnApi.getCalculatedColumnForColumnId(columnId);
|
|
52
|
+
if (childCalculatedColumn?.Query?.ScalarExpression) {
|
|
53
|
+
return evaluateScalarExpressionWithShadowData(adaptableApi, childCalculatedColumn, rowNode, shadowData);
|
|
54
|
+
}
|
|
55
|
+
const adaptableColumn = adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
56
|
+
return internalApi.getValueUsingField(shadowData, adaptableColumn?.field ?? columnId);
|
|
57
|
+
};
|
|
58
|
+
const customFunctions = {
|
|
59
|
+
...baseFunctions,
|
|
60
|
+
COL: {
|
|
61
|
+
...baseFunctions.COL,
|
|
62
|
+
handler: (args) => resolveColumnValue(args[0]),
|
|
63
|
+
},
|
|
64
|
+
FIELD: {
|
|
65
|
+
...baseFunctions.FIELD,
|
|
66
|
+
handler: (args) => internalApi.getValueUsingField(shadowData, args[0]),
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
return parser.evaluate(calculatedColumn.Query.ScalarExpression, {
|
|
70
|
+
node: { ...rowNode, data: shadowData },
|
|
71
|
+
functions: customFunctions,
|
|
72
|
+
...internalApi.buildBaseContext(),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function buildSyntheticCellDataChangedInfosForCalcColumns(adaptableApi, info) {
|
|
76
|
+
if (!info.rowNode ||
|
|
77
|
+
info.preventEdit ||
|
|
78
|
+
info.trigger === 'undo' ||
|
|
79
|
+
info.trigger === 'aggChange' ||
|
|
80
|
+
info.trigger === 'calculatedColumnChange') {
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
const calculatedColumns = collectDependentScalarCalculatedColumns(adaptableApi, info.column.columnId);
|
|
84
|
+
if (!calculatedColumns.length) {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
const shadowData = buildShadowRowData(adaptableApi, info);
|
|
88
|
+
const expressionService = adaptableApi.internalApi.getCalculatedColumnExpressionService();
|
|
89
|
+
const syntheticEvents = [];
|
|
90
|
+
calculatedColumns.forEach((calculatedColumn) => {
|
|
91
|
+
const oldValue = evaluateScalarExpressionWithShadowData(adaptableApi, calculatedColumn, info.rowNode, shadowData);
|
|
92
|
+
const newValue = expressionService.evaluateCalculatedColumnQuery(calculatedColumn, info.rowNode);
|
|
93
|
+
if (oldValue == newValue) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const column = adaptableApi.columnApi.getColumnWithColumnId(calculatedColumn.ColumnId);
|
|
97
|
+
if (!column) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
syntheticEvents.push(adaptableApi.internalApi.buildCellDataChangedInfo({
|
|
101
|
+
oldValue,
|
|
102
|
+
newValue,
|
|
103
|
+
column,
|
|
104
|
+
primaryKeyValue: info.primaryKeyValue,
|
|
105
|
+
rowNode: info.rowNode,
|
|
106
|
+
trigger: 'calculatedColumnChange',
|
|
107
|
+
}));
|
|
108
|
+
});
|
|
109
|
+
return syntheticEvents;
|
|
110
|
+
}
|
|
111
|
+
function expandCellDataChangedInfosWithCalculatedColumns(adaptableApi, cellDataChangedInfos) {
|
|
112
|
+
if (!cellDataChangedInfos.length) {
|
|
113
|
+
return cellDataChangedInfos;
|
|
114
|
+
}
|
|
115
|
+
const syntheticEvents = cellDataChangedInfos.flatMap((info) => buildSyntheticCellDataChangedInfosForCalcColumns(adaptableApi, info));
|
|
116
|
+
if (!syntheticEvents.length) {
|
|
117
|
+
return cellDataChangedInfos;
|
|
118
|
+
}
|
|
119
|
+
return [...cellDataChangedInfos, ...syntheticEvents];
|
|
120
|
+
}
|
|
@@ -11,4 +11,5 @@ export interface ICalculatedColumnExpressionService extends IAdaptableService {
|
|
|
11
11
|
destroyAggregatedScalarLiveValue(calculatedColumn: CalculatedColumn): void;
|
|
12
12
|
listentoCellDataChange(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
13
13
|
listentoRowDataChange(rowDataChangedInfo: RowDataChangedInfo): void;
|
|
14
|
+
buildSyntheticCellDataChangedInfosForCalcColumns(cellDataChangedInfo: CellDataChangedInfo): CellDataChangedInfo[];
|
|
14
15
|
}
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
8
|
-
const
|
|
8
|
+
const NewSelect_1 = require("../../../../components/NewSelect");
|
|
9
9
|
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
10
10
|
const chartingHelper_1 = require("../../../../Utilities/Helpers/chartingHelper");
|
|
11
11
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../../../Components/AdaptableInput"));
|
|
@@ -40,28 +40,20 @@ const SettingsSection = (props) => {
|
|
|
40
40
|
});
|
|
41
41
|
}, [props.chartDefinition]);
|
|
42
42
|
const aggFuncs = ['sum', 'min', 'max', 'count', 'avg', 'first', 'last'];
|
|
43
|
-
const aggFuncsOptions = aggFuncs.map((aggFunc) => ({
|
|
44
|
-
label: aggFunc,
|
|
45
|
-
onClick: () => {
|
|
46
|
-
props.onChange({
|
|
47
|
-
...props.chartDefinition,
|
|
48
|
-
Model: {
|
|
49
|
-
...props.chartDefinition.Model,
|
|
50
|
-
aggFunc,
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
}));
|
|
55
43
|
const aggFunc = props.chartDefinition.Model.aggFunc;
|
|
56
|
-
const
|
|
44
|
+
const handleAggFuncChange = React.useCallback((value) => {
|
|
57
45
|
props.onChange({
|
|
58
46
|
...props.chartDefinition,
|
|
59
47
|
Model: {
|
|
60
48
|
...props.chartDefinition.Model,
|
|
61
|
-
aggFunc:
|
|
49
|
+
aggFunc: value,
|
|
62
50
|
},
|
|
63
51
|
});
|
|
64
52
|
}, [props.chartDefinition]);
|
|
65
|
-
|
|
53
|
+
const aggFuncsOptions = aggFuncs.map((option) => ({
|
|
54
|
+
label: option,
|
|
55
|
+
value: option,
|
|
56
|
+
}));
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Name", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { onChange: handleNameChange, value: props.chartDefinition.Name }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Unlink Chart", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onClick: handleUnLinkChange, checked: props.chartDefinition.Model.unlinkChart }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Suppress Chart Ranges", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onClick: handleSuppressChartRanges, checked: props.chartDefinition.Model.suppressChartRanges }) }), props.chartDefinition.Model.modelType === 'range' && typeof aggFunc !== 'function' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Agg Func", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { placeholder: "Select", items: aggFuncsOptions, value: aggFunc || undefined, onValueChange: handleAggFuncChange }) }))] }));
|
|
66
58
|
};
|
|
67
59
|
exports.SettingsSection = SettingsSection;
|
|
@@ -32,6 +32,6 @@ const ColumnFilterWindow = (props) => {
|
|
|
32
32
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { children: [label, (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsx)(AdaptableIconComponent_1.AdaptableIconComponent, { icon: { name: 'filter' } })] }));
|
|
33
33
|
}
|
|
34
34
|
return label;
|
|
35
|
-
}, onChange: (column) => setColumnId(column), filterColumn: (column) => column.queryable,
|
|
35
|
+
}, onChange: (column) => setColumnId(column), filterColumn: (column) => column.queryable, value: columnId }) }) }) }), (0, jsx_runtime_1.jsx)(AdaptableColumnFilter_1.AdaptableColumnFilter, { columnId: columnId, location: 'filterForm' })] }));
|
|
36
36
|
};
|
|
37
37
|
exports.ColumnFilterWindow = ColumnFilterWindow;
|
|
@@ -19,6 +19,7 @@ const ColumnSelector = function (props) {
|
|
|
19
19
|
return {
|
|
20
20
|
label,
|
|
21
21
|
textLabel,
|
|
22
|
+
tooltip: textLabel,
|
|
22
23
|
value: column.columnId,
|
|
23
24
|
};
|
|
24
25
|
})
|
|
@@ -35,7 +36,11 @@ const ColumnSelector = function (props) {
|
|
|
35
36
|
virtualized: true,
|
|
36
37
|
items: options,
|
|
37
38
|
showClear: false,
|
|
39
|
+
showItemTooltip: true,
|
|
38
40
|
onValueChange: (colId) => {
|
|
41
|
+
if (colId === null) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
39
44
|
props.onChange(colId);
|
|
40
45
|
},
|
|
41
46
|
value: props.value,
|
|
@@ -10,7 +10,9 @@ const Flex_1 = require("../../../components/Flex");
|
|
|
10
10
|
const ColumnScope_1 = require("../../../AdaptableState/Common/ColumnScope");
|
|
11
11
|
const FlashingAlertScopeWizardSection = (props) => {
|
|
12
12
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
13
|
-
const availableColumns = React.useMemo(() => api.columnApi
|
|
13
|
+
const availableColumns = React.useMemo(() => api.columnApi
|
|
14
|
+
.getUIAvailableColumns()
|
|
15
|
+
.filter((column) => !column.isActionColumn && !api.columnApi.isFdc3Column(column.columnId)), [api]);
|
|
14
16
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:p-2 twa:h-full", children: (0, jsx_runtime_1.jsx)(NewScopeComponent_1.NewScopeComponent, { descriptions: {
|
|
15
17
|
rowScope: 'Changes anywhere in the row will trigger an Flashing Cell',
|
|
16
18
|
columnScope: 'Changes in selected columns will trigger an Flashing Cell',
|
|
@@ -37,29 +37,31 @@ const LayoutViewPanelComponent = (props) => {
|
|
|
37
37
|
const entityAccessLevel = AdaptableHelper_1.default.getAccessLevelForObject(layoutEntity, accessLevel);
|
|
38
38
|
const elementType = viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
39
39
|
const layoutSelectStyle = elementType === 'ToolPanel' ? { minWidth: '100%' } : {};
|
|
40
|
+
const toLayoutSelectItems = (layouts) => layouts.map((layout) => ({
|
|
41
|
+
label: layout.Name,
|
|
42
|
+
value: layout.Name,
|
|
43
|
+
}));
|
|
40
44
|
const tableLayoutsArray = Layouts.filter((layout) => !(0, isPivotLayout_1.isPivotLayout)(layout));
|
|
41
45
|
const pivotLayoutsArray = Layouts.filter((layout) => (0, isPivotLayout_1.isPivotLayout)(layout));
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
].filter(Boolean);
|
|
62
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Layout__wrap twa:gap-0.5`, flexWrap: viewType === 'ToolPanel' ? 'wrap' : 'nowrap', children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { style: layoutSelectStyle, className: "twa:flex-1", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { groups: layoutGroups, showItemTooltip: true, disabled: isErrorLayout, className: `twa:w-full twa:min-w-30 ab-${elementType}__Layout__select`, ariaLabel: 'Select Layout', value: layoutEntity ? layoutEntity.Name : null, onValueChange: (layout) => onSelectLayout(layout) }) }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: (0, join_1.default)(accessLevel === GeneralConstants.ACCESS_LEVEL_READ_ONLY
|
|
46
|
+
const showLayoutTypeHeadings = tableLayoutsArray.length > 0 && pivotLayoutsArray.length > 0;
|
|
47
|
+
const layoutSelectCommonProps = {
|
|
48
|
+
showItemTooltip: true,
|
|
49
|
+
disabled: isErrorLayout,
|
|
50
|
+
className: `twa:w-full twa:min-w-30 ab-${elementType}__Layout__select`,
|
|
51
|
+
ariaLabel: 'Select Layout',
|
|
52
|
+
value: layoutEntity ? layoutEntity.Name : null,
|
|
53
|
+
onValueChange: (layout) => onSelectLayout(layout),
|
|
54
|
+
};
|
|
55
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Layout__wrap twa:gap-0.5`, flexWrap: viewType === 'ToolPanel' ? 'wrap' : 'nowrap', children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { style: layoutSelectStyle, className: "twa:flex-1", children: showLayoutTypeHeadings ? ((0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { ...layoutSelectCommonProps, groups: [
|
|
56
|
+
{
|
|
57
|
+
label: 'Table Layouts',
|
|
58
|
+
items: toLayoutSelectItems(tableLayoutsArray),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'Pivot Layouts',
|
|
62
|
+
items: toLayoutSelectItems(pivotLayoutsArray),
|
|
63
|
+
},
|
|
64
|
+
] })) : ((0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { ...layoutSelectCommonProps, items: toLayoutSelectItems(Layouts) })) }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: (0, join_1.default)(accessLevel === GeneralConstants.ACCESS_LEVEL_READ_ONLY
|
|
63
65
|
? GeneralConstants.READ_ONLY_STYLE
|
|
64
66
|
: '', `ab-${elementType}__Layout__wrap`), children: [(0, jsx_runtime_1.jsx)(ButtonEdit_1.ButtonEdit, { disabled: isErrorLayout, onClick: () => api.layoutApi.showLayoutEditor(layoutEntity.Name), tooltip: GeneralConstants_1.LAYOUT_EDIT_TOOLTIP, className: `ab-${elementType}__Layout__edit`, accessLevel: entityAccessLevel }), (0, jsx_runtime_1.jsx)(ButtonClone_1.ButtonClone, { disabled: isErrorLayout, onClick: () => api.layoutApi.showLayoutEditor(layoutEntity.Name, (0, isPivotLayout_1.isPivotLayout)(layoutEntity) ? 'pivot' : 'table', 'Clone'), tooltip: GeneralConstants_1.LAYOUT_CLONE_TOOLTIP, className: `ab-${elementType}__Layout__clone`, tone: "neutral", variant: "text", children: null, accessLevel: cloneAccessLevel }), (0, jsx_runtime_1.jsx)(NewDropdownButton_1.NewDropdownButton, { variant: "text", tooltip: GeneralConstants_1.LAYOUT_NEW_TABLE_OR_PIVOT_TOOLTIP, "data-name": "new", items: [
|
|
65
67
|
{
|
|
@@ -5,9 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const AdaptableContext_1 = tslib_1.__importDefault(require("./AdaptableContext"));
|
|
8
|
-
const AdaptableComputedCSSVarsContext_1 = require("./AdaptableComputedCSSVarsContext");
|
|
9
8
|
const tooltip_1 = require("../components/ui/tooltip");
|
|
10
9
|
const renderWithAdaptableContext = (children, adaptable) => {
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { delay: 300, children: (0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: adaptable.adaptableStore.TheStore, children: (0, jsx_runtime_1.jsx)(
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { delay: 300, children: (0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: adaptable.adaptableStore.TheStore, children: (0, jsx_runtime_1.jsx)(AdaptableContext_1.default.Provider, { value: adaptable, children: children }) }) }));
|
|
12
11
|
};
|
|
13
12
|
exports.renderWithAdaptableContext = renderWithAdaptableContext;
|
|
@@ -97,7 +97,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
97
97
|
private LicenseService;
|
|
98
98
|
private ChartingService;
|
|
99
99
|
private rowListeners;
|
|
100
|
-
private throttleFilterOnDataChange;
|
|
101
100
|
private debouncedSetSelectedRows;
|
|
102
101
|
private debouncedSetSelectedCells;
|
|
103
102
|
private agGridListenerKeydown;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdaptableAgGrid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const throttle_1 = tslib_1.__importDefault(require("../Utilities/utils/throttle"));
|
|
6
5
|
const debounce_1 = tslib_1.__importDefault(require("../Utilities/utils/debounce"));
|
|
7
6
|
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
8
7
|
const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
@@ -25,6 +24,7 @@ const ThemeService_1 = require("../Utilities/Services/ThemeService");
|
|
|
25
24
|
const ValidationService_1 = require("../Utilities/Services/ValidationService");
|
|
26
25
|
const ModuleService_1 = require("../Utilities/Services/ModuleService");
|
|
27
26
|
const CalculatedColumnExpressionService_1 = require("../Utilities/Services/CalculatedColumnExpressionService");
|
|
27
|
+
const CalculatedColumnSyntheticChange_1 = require("../Utilities/Services/CalculatedColumnSyntheticChange");
|
|
28
28
|
const QueryLanguageService_1 = require("../Utilities/Services/QueryLanguageService");
|
|
29
29
|
const AlertService_1 = require("../Utilities/Services/AlertService");
|
|
30
30
|
const TeamSharingService_1 = require("../Utilities/Services/TeamSharingService");
|
|
@@ -87,7 +87,6 @@ const ParameterizedAggregationRegistry_1 = require("../Aggregation/Parameterized
|
|
|
87
87
|
const parameterizedAggregationHelpers_1 = require("../Aggregation/parameterizedAggregationHelpers");
|
|
88
88
|
const parameterizedAggregationHeader_1 = require("../Aggregation/parameterizedAggregationHeader");
|
|
89
89
|
const RowFormService_1 = require("../Utilities/Services/RowFormService");
|
|
90
|
-
const Enums_1 = require("../AdaptableState/Common/Enums");
|
|
91
90
|
const EnvVars_1 = require("../EnvVars");
|
|
92
91
|
const AdaptableUpgradeHelper_1 = require("../migration/AdaptableUpgradeHelper");
|
|
93
92
|
const Modal_1 = require("../components/Modal");
|
|
@@ -208,7 +207,6 @@ class AdaptableAgGrid {
|
|
|
208
207
|
LicenseService;
|
|
209
208
|
ChartingService;
|
|
210
209
|
rowListeners;
|
|
211
|
-
throttleFilterOnDataChange;
|
|
212
210
|
debouncedSetSelectedRows;
|
|
213
211
|
debouncedSetSelectedCells;
|
|
214
212
|
agGridListenerKeydown;
|
|
@@ -1703,12 +1701,6 @@ class AdaptableAgGrid {
|
|
|
1703
1701
|
}), true);
|
|
1704
1702
|
gridContainerElement.addEventListener('mouseleave', (this.agGridListenerMouseLeave = (event) => this._emit('MouseLeave', event)));
|
|
1705
1703
|
}
|
|
1706
|
-
this.throttleFilterOnDataChange = (0, throttle_1.default)(
|
|
1707
|
-
// the extra function is to make sure we have a reference to ag-grid-api
|
|
1708
|
-
() => this.agGridAdapter.getAgGridApi()?.onFilterChanged(), this.adaptableOptions.filterOptions.filterActionOnDataChange.throttleDelay, {
|
|
1709
|
-
trailing: true,
|
|
1710
|
-
leading: false,
|
|
1711
|
-
});
|
|
1712
1704
|
/**
|
|
1713
1705
|
* Use Case: User has started inline editing but its disabled in Row Form Options
|
|
1714
1706
|
* Action: Stop editing
|
|
@@ -3817,7 +3809,6 @@ class AdaptableAgGrid {
|
|
|
3817
3809
|
this.listenerCellSelectionChanged = null;
|
|
3818
3810
|
this.listenerGlobalSetRowSelection = null;
|
|
3819
3811
|
this.listenerSortChanged = null;
|
|
3820
|
-
this.throttleFilterOnDataChange = null;
|
|
3821
3812
|
const liveGridOptions = this.agGridAdapter.DANGER_getLiveGridOptions();
|
|
3822
3813
|
if (liveGridOptions) {
|
|
3823
3814
|
this.agGridOptionsService.revertGridOptionsPropertiesToUserValue(liveGridOptions, [
|
|
@@ -4137,6 +4128,7 @@ class AdaptableAgGrid {
|
|
|
4137
4128
|
* There are a few things we need to do AFTER we edit a cell and it makes sense to put them in one place
|
|
4138
4129
|
*/
|
|
4139
4130
|
performPostEditChecks(rowNode, cellDataChangedInfos) {
|
|
4131
|
+
cellDataChangedInfos = (0, CalculatedColumnSyntheticChange_1.expandCellDataChangedInfosWithCalculatedColumns)(this.api, cellDataChangedInfos);
|
|
4140
4132
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
4141
4133
|
// if a Cell Data Change is undone, log to the Console
|
|
4142
4134
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
@@ -4294,14 +4286,7 @@ class AdaptableAgGrid {
|
|
|
4294
4286
|
}
|
|
4295
4287
|
}
|
|
4296
4288
|
filterOnDataChange() {
|
|
4297
|
-
|
|
4298
|
-
Enums_1.FilterOnDataChangeOptions.Always) {
|
|
4299
|
-
this.agGridAdapter.getAgGridApi()?.onFilterChanged();
|
|
4300
|
-
}
|
|
4301
|
-
else if (this.adaptableOptions.filterOptions.filterActionOnDataChange.applyFilter ==
|
|
4302
|
-
Enums_1.FilterOnDataChangeOptions.Throttle) {
|
|
4303
|
-
this.throttleFilterOnDataChange();
|
|
4304
|
-
}
|
|
4289
|
+
this.agGridAdapter.getAgGridApi()?.onFilterChanged();
|
|
4305
4290
|
}
|
|
4306
4291
|
refreshLayout() {
|
|
4307
4292
|
const columnDefs = this.agGridAdapter.getColumnDefinitionsInclSpecialColumns();
|