@adaptabletools/adaptable 12.1.7 → 12.1.8-canary.0
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/base.css +11 -49
- package/bundle.cjs.js +105 -105
- package/index.css +13 -60
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/FilterOptions.d.ts +12 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +22 -1
- package/src/AdaptableOptions/StateOptions.d.ts +25 -12
- package/src/Api/ColumnApi.d.ts +5 -0
- package/src/Api/ExportApi.d.ts +5 -0
- package/src/Api/FilterApi.d.ts +23 -0
- package/src/Api/GridApi.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +5 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ExportApiImpl.js +19 -3
- package/src/Api/Implementation/FilterApiImpl.d.ts +5 -0
- package/src/Api/Implementation/FilterApiImpl.js +25 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.d.ts +0 -1
- package/src/Api/Implementation/InternalApiImpl.js +0 -3
- package/src/Api/Implementation/PredicateApiImpl.js +4 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -1
- package/src/Api/InternalApi.d.ts +0 -1
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +16 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +6 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +4 -0
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -15
- package/src/PredefinedConfig/Common/Enums.js +1 -18
- package/src/PredefinedConfig/ExportState.d.ts +12 -4
- package/src/PredefinedConfig/LayoutState.d.ts +2 -1
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/AlertRedux.js +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.js +1 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +1 -1
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +28 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +80 -2
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +1 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -28
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
- package/src/Redux/ActionsReducers/ScheduleRedux.js +5 -5
- package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ShortcutRedux.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +15 -6
- package/src/Strategy/AlertModule.d.ts +1 -0
- package/src/Strategy/AlertModule.js +20 -0
- package/src/Strategy/CalculatedColumnModule.js +2 -2
- package/src/Strategy/ExportModule.d.ts +0 -1
- package/src/Strategy/ExportModule.js +0 -16
- package/src/Strategy/FilterModule.js +6 -0
- package/src/Strategy/Interface/IModule.d.ts +4 -0
- package/src/Strategy/LayoutModule.js +20 -20
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +16 -1
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +15 -11
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +12 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +30 -66
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +22 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +423 -220
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +7 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +23 -7
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +0 -1
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -54
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +17 -5
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -4
- package/src/Utilities/ObjectFactory.d.ts +4 -2
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +25 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +103 -0
- package/src/Utilities/Services/AlertService.d.ts +0 -1
- package/src/Utilities/Services/AlertService.js +5 -17
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +4 -4
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +29 -154
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +6 -3
- package/src/Utilities/Services/QueryLanguageService.d.ts +6 -3
- package/src/Utilities/Services/QueryLanguageService.js +23 -6
- package/src/Utilities/Services/ReportService.js +47 -46
- package/src/View/AdaptableView.js +1 -2
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingsTags.d.ts +2 -0
- package/src/View/CalculatedColumn/Utilities/{getCalculatedColumnSettingTags.js → getCalculatedColumnSettingsTags.js} +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +80 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +20 -11
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -52
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +17 -6
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +42 -6
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/EntityRulesEditor/index.js +26 -5
- package/src/View/Components/FilterForm/FilterForm.js +8 -4
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -0
- package/src/View/Components/FilterForm/QuickFilterForm.js +10 -6
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +9 -0
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +28 -0
- package/src/View/Components/PermittedValuesSelector/index.d.ts +1 -0
- package/src/View/Components/PermittedValuesSelector/index.js +5 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +2 -2
- package/src/View/Components/Popups/AdaptableToaster.js +2 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -4
- package/src/View/Export/ExportViewPanel.d.ts +1 -2
- package/src/View/Export/ExportViewPanel.js +2 -6
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +1 -2
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +11 -12
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +1 -2
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +12 -13
- package/src/View/Export/Wizard/ReportSettingsWizard.js +1 -2
- package/src/View/Filter/FilterViewPanel.js +20 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.d.ts +0 -0
- package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.js +0 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +69 -8
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Query/QueryViewPanel.js +1 -1
- package/src/agGrid/Adaptable.d.ts +10 -3
- package/src/agGrid/Adaptable.js +211 -142
- package/src/agGrid/agGridHelper.d.ts +1 -0
- package/src/agGrid/agGridHelper.js +5 -3
- package/src/agGrid/agGridMenuHelper.d.ts +1 -0
- package/src/agGrid/agGridMenuHelper.js +4 -2
- package/src/agGrid/weightedAverage.d.ts +6 -0
- package/src/agGrid/weightedAverage.js +66 -0
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +2 -3
- package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +24 -4
- package/src/components/ExpressionEditor/{EditorInputReactive.d.ts → EditorInputWithWhereClause.d.ts} +3 -3
- package/src/components/ExpressionEditor/{EditorInputReactive.js → EditorInputWithWhereClause.js} +6 -5
- package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.d.ts +2 -0
- package/src/components/ExpressionEditor/{editorButtonsReactive.js → editorButtonsAggregatedBoolean.js} +22 -37
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +50 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.js +40 -0
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +26 -5
- package/src/metamodel/adaptable.metamodel.d.ts +55 -1
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +3 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.d.ts +0 -2
- package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +0 -3
- package/src/View/Layout/LayoutEditorStandalonePopup.js +0 -78
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.d.ts +0 -27
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +0 -86
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.d.ts +0 -16
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +0 -89
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.d.ts +0 -15
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +0 -70
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.d.ts +0 -15
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +0 -70
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.d.ts +0 -7
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.js +0 -11
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.d.ts +0 -6
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +0 -26
- package/src/View/Layout/Wizard/LayoutEditor/index.d.ts +0 -9
- package/src/View/Layout/Wizard/LayoutEditor/index.js +0 -367
- package/src/View/Layout/Wizard/LayoutEditor/reducer.d.ts +0 -28
- package/src/View/Layout/Wizard/LayoutEditor/reducer.js +0 -46
- package/src/View/Layout/Wizard/LayoutEditor/utils.d.ts +0 -10
- package/src/View/Layout/Wizard/LayoutEditor/utils.js +0 -14
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +0 -30
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +0 -132
- package/src/components/ExpressionEditor/editorButtonsReactive.d.ts +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AggregationsSection = exports.AggregationsSectionSummary = void 0;
|
|
3
|
+
exports.AggregationsSection = exports.AggregationsSectionSummary = exports.isAggregationsSectionValid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
@@ -14,6 +14,17 @@ const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
|
14
14
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
15
15
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
16
16
|
const Utilities_1 = require("./Utilities");
|
|
17
|
+
const WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
|
|
18
|
+
const isAggregationsSectionValid = (data) => {
|
|
19
|
+
const weightedAvg = data.AggregationColumns
|
|
20
|
+
? Object.values(data.AggregationColumns).find((agg) => typeof agg === 'object' && agg.type === 'weightedAverage')
|
|
21
|
+
: null;
|
|
22
|
+
if (weightedAvg && !weightedAvg.weightedColumnId) {
|
|
23
|
+
return 'Weighted Average aggregation requires a weighted column';
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
};
|
|
27
|
+
exports.isAggregationsSectionValid = isAggregationsSectionValid;
|
|
17
28
|
const AggregationsSectionSummary = () => {
|
|
18
29
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
19
30
|
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
@@ -32,8 +43,13 @@ const AggregationsSectionSummary = () => {
|
|
|
32
43
|
exports.AggregationsSectionSummary = AggregationsSectionSummary;
|
|
33
44
|
const ColumnRow = (props) => {
|
|
34
45
|
var _a, _b;
|
|
46
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
35
47
|
const aggValue = (_b = (_a = props.layout) === null || _a === void 0 ? void 0 : _a.AggregationColumns) === null || _b === void 0 ? void 0 : _b[props.column.columnId];
|
|
36
|
-
const
|
|
48
|
+
const adaptableAggFunctions = [];
|
|
49
|
+
if (props.column.dataType === 'Number') {
|
|
50
|
+
adaptableAggFunctions.push(WEIGHTED_AVERAGE_AGG_FN_NAME);
|
|
51
|
+
}
|
|
52
|
+
const aggOptions = [...props.column.availableAggregationFunctions, ...adaptableAggFunctions].map((fnName) => {
|
|
37
53
|
return {
|
|
38
54
|
label: fnName,
|
|
39
55
|
onClick: () => {
|
|
@@ -41,14 +57,51 @@ const ColumnRow = (props) => {
|
|
|
41
57
|
if (!aggCols) {
|
|
42
58
|
return;
|
|
43
59
|
}
|
|
44
|
-
|
|
60
|
+
if (fnName === WEIGHTED_AVERAGE_AGG_FN_NAME) {
|
|
61
|
+
aggCols[props.column.columnId] = {
|
|
62
|
+
type: 'weightedAverage',
|
|
63
|
+
weightedColumnId: null,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
aggCols[props.column.columnId] = fnName;
|
|
68
|
+
}
|
|
45
69
|
props.onChangeAggFunction(aggCols);
|
|
46
70
|
},
|
|
47
71
|
};
|
|
48
72
|
});
|
|
49
|
-
|
|
73
|
+
const numericColumnsOptions = props.numberColumns
|
|
74
|
+
.filter((col) => col.columnId !== props.column.columnId)
|
|
75
|
+
.map((col) => {
|
|
76
|
+
return {
|
|
77
|
+
label: col.friendlyName,
|
|
78
|
+
onClick: () => {
|
|
79
|
+
const aggCols = Object.assign({}, props.layout.AggregationColumns);
|
|
80
|
+
if (!aggCols) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
aggCols[props.column.columnId] = {
|
|
84
|
+
type: 'weightedAverage',
|
|
85
|
+
weightedColumnId: col.columnId,
|
|
86
|
+
};
|
|
87
|
+
props.onChangeAggFunction(aggCols);
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
const currentAggFnName = props.aggregationColumnsMap[props.column.columnId];
|
|
92
|
+
let weightName = null;
|
|
93
|
+
if (typeof aggValue === 'object' && aggValue.type === 'weightedAverage') {
|
|
94
|
+
weightName = aggValue.weightedColumnId
|
|
95
|
+
? adaptable.api.columnApi.getFriendlyNameFromColumnId(aggValue.weightedColumnId)
|
|
96
|
+
: 'Select Weight';
|
|
97
|
+
}
|
|
98
|
+
return (React.createElement(rebass_1.Flex, { alignItems: "center" },
|
|
50
99
|
props.column.friendlyName,
|
|
51
|
-
aggValue && (React.createElement(DropdownButton_1.default, { columns: ['label'], items: aggOptions, ml: 2 },
|
|
100
|
+
aggValue && (React.createElement(DropdownButton_1.default, { columns: ['label'], items: aggOptions, ml: 2 }, currentAggFnName)),
|
|
101
|
+
currentAggFnName === WEIGHTED_AVERAGE_AGG_FN_NAME && (React.createElement(rebass_1.Flex, { backgroundColor: "primary", ml: 3, alignItems: "center" },
|
|
102
|
+
React.createElement(rebass_1.Text, null, "Weight"),
|
|
103
|
+
' ',
|
|
104
|
+
React.createElement(DropdownButton_1.default, { columns: ['label'], items: numericColumnsOptions, ml: 2 }, weightName)))));
|
|
52
105
|
};
|
|
53
106
|
const AggregationsSection = (props) => {
|
|
54
107
|
var _a, _b;
|
|
@@ -56,6 +109,7 @@ const AggregationsSection = (props) => {
|
|
|
56
109
|
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
57
110
|
const allAggregableColumns = adaptable.api.columnApi.getAggregetableColumns();
|
|
58
111
|
const allColumns = adaptable.api.columnApi.getColumns();
|
|
112
|
+
const numberColumns = adaptable.api.columnApi.getNumericColumns();
|
|
59
113
|
const sortedAggregableColumns = React.useMemo(() => {
|
|
60
114
|
var _a, _b;
|
|
61
115
|
return sortWithOrder_1.sortWithOrderArray(allAggregableColumns.map((col) => col.columnId), (_b = Object.keys((_a = layout.AggregationColumns) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnFromId(colId));
|
|
@@ -79,10 +133,17 @@ const AggregationsSection = (props) => {
|
|
|
79
133
|
return Object.keys(layout.AggregationColumns || {}).reduce((acc, colId) => {
|
|
80
134
|
var _a;
|
|
81
135
|
let fn = (_a = layout.AggregationColumns) === null || _a === void 0 ? void 0 : _a[colId];
|
|
136
|
+
let fnName = '';
|
|
82
137
|
if (typeof fn === 'boolean') {
|
|
83
|
-
|
|
138
|
+
fnName = allColumnsMap[colId].aggregationFunction;
|
|
139
|
+
}
|
|
140
|
+
if (typeof fn === 'object' && fn.type === 'weightedAverage') {
|
|
141
|
+
fnName = WEIGHTED_AVERAGE_AGG_FN_NAME;
|
|
142
|
+
}
|
|
143
|
+
else if (typeof fn === 'string') {
|
|
144
|
+
fnName = fn;
|
|
84
145
|
}
|
|
85
|
-
acc[colId] =
|
|
146
|
+
acc[colId] = fnName;
|
|
86
147
|
return acc;
|
|
87
148
|
}, {});
|
|
88
149
|
}, [layout]);
|
|
@@ -95,7 +156,7 @@ const AggregationsSection = (props) => {
|
|
|
95
156
|
React.createElement(rebass_1.Flex, null,
|
|
96
157
|
React.createElement(FormLayout_1.default, null,
|
|
97
158
|
React.createElement(CheckBox_1.CheckBox, { checked: layout.SuppressAggFuncInHeader, onChange: handleSuppressAggFuncInHeader }, "Suppress Aggregation Function in Header"))),
|
|
98
|
-
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, showSelectedOnlyPosition: "top", filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => { var _a; return (_a = option.friendlyName) !== null && _a !== void 0 ? _a : option.columnId; }, toListLabel: (column) => (React.createElement(ColumnRow, { onChangeAggFunction: handleAggregationChange, layout: layout, column: column, aggregationColumnsMap: aggregationColumnsMap })), options: sortedAggregableColumns, value: (_b = Object.keys((_a = layout.AggregationColumns) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], allowReorder: () => false, xSelectedLabel: () => {
|
|
159
|
+
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, showSelectedOnlyPosition: "top", filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => { var _a; return (_a = option.friendlyName) !== null && _a !== void 0 ? _a : option.columnId; }, toListLabel: (column) => (React.createElement(ColumnRow, { onChangeAggFunction: handleAggregationChange, layout: layout, column: column, aggregationColumnsMap: aggregationColumnsMap, numberColumns: numberColumns })), options: sortedAggregableColumns, value: (_b = Object.keys((_a = layout.AggregationColumns) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], allowReorder: () => false, xSelectedLabel: () => {
|
|
99
160
|
return `Active aggregations:`;
|
|
100
161
|
}, onChange: handleColumnsSelectionChange }))));
|
|
101
162
|
};
|
|
@@ -16,11 +16,11 @@ const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
|
16
16
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
17
17
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
18
18
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
19
|
-
const ColumnLabels_1 = require("../LayoutEditor/ColumnLabels");
|
|
20
19
|
const Utilities_1 = require("./Utilities");
|
|
21
20
|
const icons_1 = require("../../../../components/icons");
|
|
22
21
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
23
22
|
const Helper_1 = require("../../../../Utilities/Helpers/Helper");
|
|
23
|
+
const ColumnLabels_1 = require("../Components/ColumnLabels");
|
|
24
24
|
const PropertyOrderText = (props) => (React.createElement(rebass_1.Text, { fontWeight: 600, fontSize: 2 }, props.children));
|
|
25
25
|
const ColumnsSectionSummary = () => {
|
|
26
26
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
@@ -88,7 +88,7 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
88
88
|
const renderTextInput = () => {
|
|
89
89
|
return this.props.viewType === 'Toolbar' ? (React.createElement(FieldWrap_1.default, { marginRight: 1, width: 600 },
|
|
90
90
|
React.createElement(ButtonExpand_1.ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.api.queryApi.expandCurrentQuery(this.state.expression), tooltip: "Expand", marginLeft: 1 }),
|
|
91
|
-
React.createElement(Input_1.default, { type: "text", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { fontFamily: 'monospace', fontSize: 12 } }),
|
|
91
|
+
React.createElement(Input_1.default, { type: "text", "data-name": "query-input", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { fontFamily: 'monospace', fontSize: 12 } }),
|
|
92
92
|
isExpressionValid ? (React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => this.runQuery(), tooltip: '', accessLevel: 'Full', variant: "text", tone: "neutral", disabled: this.state.expression == '' || this.state.expression == this.props.CurrentQuery, marginRight: 1 })) : (React.createElement(ButtonInvalid_1.ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Query", marginRight: 1 })),
|
|
93
93
|
' ',
|
|
94
94
|
this.props.CurrentQuery !== '' && (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.clearQuery(), tooltip: "Clear Query", accessLevel: 'Full' })))) : (React.createElement(Input_1.default, { type: "text", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { width: '100%' } }));
|
|
@@ -201,6 +201,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
201
201
|
getVisibleRowNodes(): RowNode[];
|
|
202
202
|
getAllRowNodes(config?: {
|
|
203
203
|
includeGroupRows?: boolean;
|
|
204
|
+
filterFn?: (rowNode: RowNode) => boolean;
|
|
204
205
|
}): RowNode[];
|
|
205
206
|
getRowsInViewport(): RowNode[];
|
|
206
207
|
selectNodes(rowNodes: RowNode[], clearSelection: boolean): void;
|
|
@@ -225,12 +226,11 @@ export declare class Adaptable implements IAdaptable {
|
|
|
225
226
|
private mapColumnDefs;
|
|
226
227
|
private getColDefsForSpecialColumns;
|
|
227
228
|
getColDefsForFreeTextColumns(): ColDef[];
|
|
228
|
-
setupColumnValueGetter({ col }: ColumnSetupInfo): void;
|
|
229
|
+
setupColumnValueGetter({ col, abColumn }: ColumnSetupInfo): void;
|
|
229
230
|
setupColumnAggFunc({ col }: ColumnSetupInfo): void;
|
|
230
231
|
private getColDefsForRowEditColumns;
|
|
231
232
|
getColDefsForActionColumns(): ColDef[];
|
|
232
233
|
updateColDefsForSpecialColumns(): void;
|
|
233
|
-
private cleanupFloatingFilters_WORKAROUND;
|
|
234
234
|
private getColDefsForCalculatedColumns;
|
|
235
235
|
private isRegularColDef;
|
|
236
236
|
private isGroupColDef;
|
|
@@ -253,6 +253,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
253
253
|
buildStandaloneColumnHeader(adaptableColumn: AdaptableColumn): AdaptableMenuItem[];
|
|
254
254
|
prepareGrid(): void;
|
|
255
255
|
setupColumns(): void;
|
|
256
|
+
revertGridOptionsPropertiesToUserValue<T extends keyof GridOptions>(propertyNames: T[]): void;
|
|
256
257
|
setGridOptionsProperty<T extends keyof GridOptions>(propertyName: T, propertyGetter: (userPropertyValue: GridOptions[T]) => GridOptions[T] | undefined): void;
|
|
257
258
|
setColDefProperty<T extends keyof ColDef>(col: Column, propertyName: T, propertyGetter: (userPropertyValue: ColDef[T]) => ColDef[T] | undefined): void;
|
|
258
259
|
private getUserColDefProperty;
|
|
@@ -263,6 +264,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
263
264
|
setupColumnCellRenderer({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
264
265
|
setupColumnTooltipValueGetter({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
265
266
|
setupColumnQuickFilerText({ col, abColumn }: ColumnSetupInfo): void;
|
|
267
|
+
setupAllowedAggFuncs({ col, abColumn }: ColumnSetupInfo): void;
|
|
266
268
|
setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
|
|
267
269
|
setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
268
270
|
setupColumnFloatingFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
@@ -271,7 +273,6 @@ export declare class Adaptable implements IAdaptable {
|
|
|
271
273
|
setupColumnValueSetter({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
272
274
|
setupColumnComparator({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
273
275
|
private applyCurrentTheme;
|
|
274
|
-
private getInitialGroupOrderComparator;
|
|
275
276
|
private applyFinalRendering;
|
|
276
277
|
private isModulePresent;
|
|
277
278
|
private getPreviousColDefInfo;
|
|
@@ -361,6 +362,12 @@ export declare class Adaptable implements IAdaptable {
|
|
|
361
362
|
initLicenseService(): LicenseService;
|
|
362
363
|
showCharts(charts: ChartModel[]): ChartRef[];
|
|
363
364
|
getChartModels(): ChartModel[];
|
|
365
|
+
private getActiveAdaptableAggFuncForCol;
|
|
366
|
+
private registerAdaptableAggFuncs;
|
|
367
|
+
/**
|
|
368
|
+
* When reading the state from the grid, we have to make sure 'avg' is not overriden with the 'avg' string.
|
|
369
|
+
*/
|
|
370
|
+
private handleUpdateWeightedAvgFromGrid;
|
|
364
371
|
}
|
|
365
372
|
export declare class AdaptableNoCodeWizard implements IAdaptableNoCodeWizard {
|
|
366
373
|
private init;
|