@adaptabletools/adaptable 23.0.0-canary.4 → 23.0.0-canary.6
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/index.css +117 -62
- package/package.json +9 -4
- package/src/AdaptableOptions/EditOptions.d.ts +2 -2
- package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
- package/src/AdaptableState/Common/AggregationColumns.js +27 -2
- package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
- package/src/AdaptableState/Common/Enums.d.ts +5 -5
- package/src/AdaptableState/Common/Enums.js +4 -4
- package/src/AdaptableState/PlusMinusState.d.ts +3 -3
- package/src/AdaptableState/ShortcutState.d.ts +2 -6
- package/src/AdaptableState/StyledColumnState.d.ts +3 -5
- package/src/AdaptableState/ThemeState.d.ts +33 -28
- package/src/Api/EventApi.d.ts +14 -1
- package/src/Api/Events/ThemeChanged.d.ts +6 -0
- package/src/Api/Events/ThemeSelected.d.ts +11 -0
- package/src/Api/Events/ThemeSelected.js +1 -0
- package/src/Api/Implementation/EventApiImpl.js +4 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -14
- package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
- package/src/Api/Implementation/LayoutHelpers.js +17 -7
- package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
- package/src/Api/Implementation/ThemeApiImpl.js +19 -15
- package/src/Api/Internal/EventInternalApi.d.ts +2 -0
- package/src/Api/Internal/EventInternalApi.js +8 -1
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
- package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
- package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
- package/src/Api/Internal/ThemeInternalApi.js +0 -10
- package/src/Api/LayoutApi.d.ts +1 -8
- package/src/Api/ThemeApi.d.ts +6 -2
- package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
- package/src/Strategy/FormatColumnModule.js +14 -7
- package/src/Strategy/LayoutModule.js +13 -8
- package/src/Strategy/StyledColumnModule.js +64 -36
- package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
- package/src/Utilities/Constants/ReduxConstants.js +1 -14
- package/src/Utilities/Helpers/FormatHelper.js +20 -1
- package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
- package/src/Utilities/Helpers/SparklineOptionsHelper.js +65 -0
- package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +204 -0
- package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
- package/src/Utilities/Helpers/ThemeHelpers.js +38 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.js +143 -0
- package/src/Utilities/ObjectFactory.d.ts +1 -3
- package/src/Utilities/ObjectFactory.js +0 -8
- package/src/Utilities/Services/ThemeService.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +114 -103
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +13 -14
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +55 -55
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +3 -2
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +2 -2
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +31 -39
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +3 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +30 -17
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +3 -3
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +32 -41
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +21 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +10 -7
- package/src/View/Comments/CommentsEditor.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +0 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +3 -1
- package/src/View/Components/ModuleProfile.js +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +0 -1
- package/src/View/Components/RangesComponent.d.ts +7 -2
- package/src/View/Components/RangesComponent.js +94 -22
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +1 -1
- package/src/View/Components/ValueSelector/index.js +70 -57
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +6 -4
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +3 -2
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +5 -15
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -26
- package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -13
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +20 -22
- package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
- package/src/View/Export/Wizard/ScheduledReportSettings.js +13 -13
- package/src/View/Export/Wizard/ScheduledReportWizard.js +4 -5
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +21 -22
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +21 -5
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +117 -12
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +66 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +30 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +13 -8
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +62 -13
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +5 -3
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +15 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +53 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +33 -68
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +15 -11
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +115 -26
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
- package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +11 -11
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -52
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
- package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
- package/src/View/Layout/Wizard/sections/SettingsSection.js +4 -5
- package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +9 -14
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +43 -13
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +11 -18
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +6 -22
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +11 -18
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +17 -6
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +3 -3
- package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
- package/src/View/Shortcut/shortcutOperations.js +28 -0
- package/src/View/SpecialColumnSettingsWizardStep.js +9 -8
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +24 -15
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +96 -16
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +45 -24
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +108 -33
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +21 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +121 -23
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +34 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +86 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +121 -34
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -75
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +16 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +4 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +12 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +16 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +31 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +58 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +30 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +91 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +52 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +53 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +58 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +126 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +52 -29
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
- package/src/View/Theme/ThemePopup.d.ts +2 -14
- package/src/View/Theme/ThemePopup.js +1 -36
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +7 -21
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +36 -26
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +27 -17
- package/src/agGrid/AgGridColumnAdapter.js +9 -15
- package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
- package/src/agGrid/AgGridMenuAdapter.js +20 -37
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
- package/src/agGrid/buildValueAggregationMenuItem.js +111 -0
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
- package/src/agGrid/cellRenderers/IconRenderer.js +43 -15
- package/src/agGrid/createAgGridIcon.d.ts +10 -0
- package/src/agGrid/createAgGridIcon.js +16 -0
- package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/components/Input/NumberInput.js +1 -1
- package/src/components/Panel/index.js +1 -1
- package/src/components/SimpleButton/index.js +4 -4
- package/src/components/Toggle/Toggle.js +1 -1
- package/src/components/Toggle/ToggleGroup.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +2 -9
- package/src/metamodel/adaptable.metamodel.d.ts +39 -29
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -4
- package/themes/dark.css +1 -68
- package/themes/light.css +1 -5
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
- package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -63
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -55
- package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
- package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -137
- package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
- package/src/Aggregation/parameterizedAggregationHeader.js +0 -60
- package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
- package/src/Aggregation/parameterizedAggregationHelpers.js +0 -111
- package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
- package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -66
- package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
- package/src/Aggregation/validateParameterizedAggregations.js +0 -20
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -43
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -28
- package/src/View/Theme/VariantSelector.d.ts +0 -8
- package/src/View/Theme/VariantSelector.js +0 -20
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { getAggFuncName, getDisplayAggFuncNames, isWeightedAverageAggregation, WEIGHTED_AVERAGE_AGG_FN_NAME, } from '../AdaptableState/Common/AggregationColumns';
|
|
2
|
+
const toFuncLabel = (funcName) => {
|
|
3
|
+
if (funcName === 'avg') {
|
|
4
|
+
return 'Average';
|
|
5
|
+
}
|
|
6
|
+
if (funcName === 'weightedAvg') {
|
|
7
|
+
return 'Weighted Average';
|
|
8
|
+
}
|
|
9
|
+
return funcName ? funcName.charAt(0).toUpperCase() + funcName.slice(1) : funcName;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Builds the replacement for AG Grid's built-in `valueAggSubMenu` column menu item.
|
|
13
|
+
*
|
|
14
|
+
* AG Grid does not allow customizing the built-in submenu, so we rebuild an
|
|
15
|
+
* equivalent one: the column's existing aggregation functions plus a
|
|
16
|
+
* `Weighted Average` item whose submenu lists the numeric columns that can be
|
|
17
|
+
* used as the weight parameter.
|
|
18
|
+
*
|
|
19
|
+
* Both standard and weighted selections persist through the current Layout
|
|
20
|
+
* (`updateCurrentLayout`), so the existing `weightedAvg` aggFunc can read the
|
|
21
|
+
* chosen `weightedColumnId` back from the Layout.
|
|
22
|
+
*
|
|
23
|
+
* Weighted Average is never used in Pivot Layouts, so this only deals with the
|
|
24
|
+
* Table Layout aggregations and the caller skips it entirely in Pivot mode.
|
|
25
|
+
*/
|
|
26
|
+
export function buildValueAggregationMenuItem(adaptableApi, menuContext) {
|
|
27
|
+
const column = menuContext.adaptableColumn;
|
|
28
|
+
const columnId = column.columnId;
|
|
29
|
+
const currentLayout = adaptableApi.layoutApi.getCurrentLayout();
|
|
30
|
+
const aggregationColumns = currentLayout.TableAggregationColumns || [];
|
|
31
|
+
const currentAggFunc = aggregationColumns.find((agg) => agg.ColumnId === columnId)?.AggFunc;
|
|
32
|
+
let activeAggFuncName;
|
|
33
|
+
if (currentAggFunc != null) {
|
|
34
|
+
const aggFuncName = getAggFuncName(currentAggFunc);
|
|
35
|
+
activeAggFuncName = aggFuncName === true ? column.aggregationFunction : aggFuncName;
|
|
36
|
+
}
|
|
37
|
+
const activeWeightColumnId = isWeightedAverageAggregation(currentAggFunc)
|
|
38
|
+
? currentAggFunc.weightedColumnId
|
|
39
|
+
: undefined;
|
|
40
|
+
const applyAggregation = (aggFuncValue) => {
|
|
41
|
+
const upsert = (cols) => {
|
|
42
|
+
const list = cols ? [...cols] : [];
|
|
43
|
+
const index = list.findIndex((col) => col.ColumnId === columnId);
|
|
44
|
+
if (index >= 0) {
|
|
45
|
+
list[index] = { ...list[index], AggFunc: aggFuncValue };
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
list.push({ ColumnId: columnId, AggFunc: aggFuncValue });
|
|
49
|
+
}
|
|
50
|
+
return list;
|
|
51
|
+
};
|
|
52
|
+
adaptableApi.layoutApi.updateCurrentLayout((layout) => {
|
|
53
|
+
const tableLayout = layout;
|
|
54
|
+
return {
|
|
55
|
+
...tableLayout,
|
|
56
|
+
TableAggregationColumns: upsert(tableLayout.TableAggregationColumns),
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const removeAggregation = () => {
|
|
61
|
+
adaptableApi.layoutApi.updateCurrentLayout((layout) => {
|
|
62
|
+
const tableLayout = layout;
|
|
63
|
+
return {
|
|
64
|
+
...tableLayout,
|
|
65
|
+
TableAggregationColumns: (tableLayout.TableAggregationColumns || []).filter((col) => col.ColumnId !== columnId),
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
// 'None' clears any aggregation for the column and is checked when none is set
|
|
70
|
+
const subMenu = [
|
|
71
|
+
{
|
|
72
|
+
name: 'None',
|
|
73
|
+
checked: activeAggFuncName == null,
|
|
74
|
+
action: () => removeAggregation(),
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
// getDisplayAggFuncNames already positions weightedAvg right after 'avg'
|
|
78
|
+
// (and only includes it when the column is eligible)
|
|
79
|
+
const aggFuncItems = getDisplayAggFuncNames(column).map((funcName) => {
|
|
80
|
+
// Weighted Average needs a weight column parameter, so instead of a plain
|
|
81
|
+
// action it gets a submenu listing the numeric columns usable as the weight.
|
|
82
|
+
if (funcName === WEIGHTED_AVERAGE_AGG_FN_NAME) {
|
|
83
|
+
const weightColumnItems = adaptableApi.columnApi
|
|
84
|
+
.getNumericColumns()
|
|
85
|
+
.filter((numericColumn) => numericColumn.columnId !== columnId)
|
|
86
|
+
.map((numericColumn) => ({
|
|
87
|
+
name: numericColumn.friendlyName ?? numericColumn.columnId,
|
|
88
|
+
checked: activeWeightColumnId === numericColumn.columnId,
|
|
89
|
+
action: () => applyAggregation({
|
|
90
|
+
type: 'weightedAverage',
|
|
91
|
+
weightedColumnId: numericColumn.columnId,
|
|
92
|
+
}),
|
|
93
|
+
}));
|
|
94
|
+
return {
|
|
95
|
+
name: 'Weighted Average',
|
|
96
|
+
checked: activeAggFuncName === WEIGHTED_AVERAGE_AGG_FN_NAME,
|
|
97
|
+
subMenu: weightColumnItems,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
name: toFuncLabel(funcName),
|
|
102
|
+
checked: activeAggFuncName === funcName,
|
|
103
|
+
action: () => applyAggregation(funcName),
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
subMenu.push(...aggFuncItems);
|
|
107
|
+
return {
|
|
108
|
+
name: 'Value Aggregation',
|
|
109
|
+
subMenu,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -18,6 +18,12 @@ import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
|
|
|
18
18
|
* is configured for case-insensitive matching.
|
|
19
19
|
*/
|
|
20
20
|
export declare const resolveEffectiveIconStyleMappings: (iconStyle: IconStyle | undefined) => IconStyleMapping[];
|
|
21
|
+
/**
|
|
22
|
+
* Mapping list for wizard / settings summaries: custom mappings first so
|
|
23
|
+
* user-authored entries are always visible, then any remaining preset
|
|
24
|
+
* entries (after override filtering).
|
|
25
|
+
*/
|
|
26
|
+
export declare const resolveIconStyleMappingsForSummaryPreview: (iconStyle: IconStyle | undefined) => IconStyleMapping[];
|
|
21
27
|
export declare const getIconRendererForColumn: (styledColumn: StyledColumn, abColumn: AdaptableColumn, api: AdaptableApi) => any;
|
|
22
28
|
/** Helper exposed for the tooltip getter in `AgGridColumnAdapter`. */
|
|
23
29
|
export declare const findIconStyleMappingForValue: (iconStyle: IconStyle | undefined, cellValue: any) => IconStyleMapping | undefined;
|
|
@@ -8,6 +8,25 @@ import { isUnsupportedColumnDataTypeForIconStyle } from '../../Utilities/Helpers
|
|
|
8
8
|
import { errorOnce } from '../AdaptableLogger';
|
|
9
9
|
const DEFAULT_SIZE = 18;
|
|
10
10
|
const DEFAULT_GAP = 4;
|
|
11
|
+
const normaliseIconMappingKey = (key, matchMode) => {
|
|
12
|
+
if (typeof key === 'string' && matchMode === 'CaseInsensitive') {
|
|
13
|
+
return key.toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
return key;
|
|
16
|
+
};
|
|
17
|
+
const resolveIconStyleMappingParts = (iconStyle) => {
|
|
18
|
+
const presetMappings = iconStyle.Preset
|
|
19
|
+
? getIconStylePresetMappings(iconStyle.Preset)
|
|
20
|
+
: [];
|
|
21
|
+
const userMappings = iconStyle.Mappings ?? [];
|
|
22
|
+
if (presetMappings.length === 0 || userMappings.length === 0) {
|
|
23
|
+
return { presetMappings, userMappings };
|
|
24
|
+
}
|
|
25
|
+
const matchMode = iconStyle.MatchMode ?? 'Exact';
|
|
26
|
+
const overrideKeys = new Set(userMappings.map((m) => normaliseIconMappingKey(m.Key, matchMode)));
|
|
27
|
+
const filteredPreset = presetMappings.filter((p) => !overrideKeys.has(normaliseIconMappingKey(p.Key, matchMode)));
|
|
28
|
+
return { presetMappings: filteredPreset, userMappings };
|
|
29
|
+
};
|
|
11
30
|
/**
|
|
12
31
|
* Resolve the **effective** mapping list for an `IconStyle`:
|
|
13
32
|
*
|
|
@@ -27,24 +46,33 @@ const DEFAULT_GAP = 4;
|
|
|
27
46
|
export const resolveEffectiveIconStyleMappings = (iconStyle) => {
|
|
28
47
|
if (!iconStyle)
|
|
29
48
|
return [];
|
|
30
|
-
const presetMappings = iconStyle
|
|
31
|
-
? getIconStylePresetMappings(iconStyle.Preset)
|
|
32
|
-
: [];
|
|
33
|
-
const userMappings = iconStyle.Mappings ?? [];
|
|
49
|
+
const { presetMappings, userMappings } = resolveIconStyleMappingParts(iconStyle);
|
|
34
50
|
if (presetMappings.length === 0)
|
|
35
51
|
return userMappings;
|
|
36
|
-
if (userMappings.length === 0)
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
if (userMappings.length === 0) {
|
|
53
|
+
return iconStyle.Preset ? getIconStylePresetMappings(iconStyle.Preset) : [];
|
|
54
|
+
}
|
|
55
|
+
return [...presetMappings, ...userMappings];
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Mapping list for wizard / settings summaries: custom mappings first so
|
|
59
|
+
* user-authored entries are always visible, then any remaining preset
|
|
60
|
+
* entries (after override filtering).
|
|
61
|
+
*/
|
|
62
|
+
export const resolveIconStyleMappingsForSummaryPreview = (iconStyle) => {
|
|
63
|
+
if (!iconStyle)
|
|
64
|
+
return [];
|
|
65
|
+
const { presetMappings, userMappings } = resolveIconStyleMappingParts(iconStyle);
|
|
66
|
+
if (userMappings.length === 0) {
|
|
67
|
+
if (presetMappings.length > 0) {
|
|
68
|
+
return presetMappings;
|
|
42
69
|
}
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
70
|
+
return iconStyle.Preset ? getIconStylePresetMappings(iconStyle.Preset) : [];
|
|
71
|
+
}
|
|
72
|
+
if (presetMappings.length === 0) {
|
|
73
|
+
return userMappings;
|
|
74
|
+
}
|
|
75
|
+
return [...userMappings, ...presetMappings];
|
|
48
76
|
};
|
|
49
77
|
/**
|
|
50
78
|
* Look up `cellValue` in the mapping list using the configured match mode.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an AG Grid icon element for the given icon name.
|
|
3
|
+
*
|
|
4
|
+
* Mimics AG Grid's internal icon creation, producing a
|
|
5
|
+
* `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
|
|
6
|
+
* so the icon picks up AG Grid's own icon font/theme styling.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
|
|
9
|
+
*/
|
|
10
|
+
export declare function createAgGridIcon(name: string): HTMLElement;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an AG Grid icon element for the given icon name.
|
|
3
|
+
*
|
|
4
|
+
* Mimics AG Grid's internal icon creation, producing a
|
|
5
|
+
* `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
|
|
6
|
+
* so the icon picks up AG Grid's own icon font/theme styling.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
|
|
9
|
+
*/
|
|
10
|
+
export function createAgGridIcon(name) {
|
|
11
|
+
const element = document.createElement('span');
|
|
12
|
+
element.className = `ag-icon ag-icon-${name}`;
|
|
13
|
+
element.setAttribute('role', 'presentation');
|
|
14
|
+
element.setAttribute('unselectable', 'on');
|
|
15
|
+
return element;
|
|
16
|
+
}
|
|
@@ -19,6 +19,6 @@ function UnusedItem({ unusedItem, disabled }) {
|
|
|
19
19
|
const title = currentItem ? currentItem.Title : unusedItem;
|
|
20
20
|
return (_jsx(DragList.DraggableItem, { id: unusedItem, children: (itemDomProps) => {
|
|
21
21
|
const { onPointerDown, ...restDomProps } = itemDomProps;
|
|
22
|
-
return (_jsx("div", { "data-name": "unused-item", ...restDomProps, ...(disabled ? {} : { onPointerDown }), className: clsx('twa:rounded-md twa:text-sm twa:text-
|
|
22
|
+
return (_jsx("div", { "data-name": "unused-item", ...restDomProps, ...(disabled ? {} : { onPointerDown }), className: clsx('twa:rounded-md twa:text-sm twa:text-primary-foreground twa:p-2 twa:select-none', 'twa:bg-primary', restDomProps.className), children: title }));
|
|
23
23
|
} }));
|
|
24
24
|
}
|
|
@@ -151,7 +151,7 @@ const FunctionsDropdown = ({ expressionFunctions, baseClassName }) => {
|
|
|
151
151
|
return (_jsx(Box, { onMouseEnter: () => setOverFunction(functionName), onClick: () => hidePopup(), children: functionName === 'VAR' ? (_jsx(VarEditorButton, { className: buttonClassName }, functionName)) : (_jsx(EditorButton, { data: getEditorButtonData(functionName), className: buttonClassName, children: functionName }, functionName)) }, functionName));
|
|
152
152
|
})
|
|
153
153
|
.filter(Boolean);
|
|
154
|
-
return (_jsxs(Box, { className: clsx('twa:mb-2 twa:mx-1', fns.length === 0 ? 'twa:hidden' : ''), children: [_jsx(Tag, { className: "twa:mb-1 twa:bg-primarylight twa:text-
|
|
154
|
+
return (_jsxs(Box, { className: clsx('twa:mb-2 twa:mx-1', fns.length === 0 ? 'twa:hidden' : ''), children: [_jsx(Tag, { className: "twa:mb-1 twa:bg-primarylight twa:text-primary-foreground twa:w-full", children: StringExtensions.Humanize(groupName) }), fns] }, groupName));
|
|
155
155
|
}) })] }), _jsx(Box, { className: clsx(`${baseClassName}__dropdown-functions-description `, `twa:flex-1 twa:p-2 twa:w-[600px] twa:max-w-[60vw]`, `twa:rounded-standard twa:shadow-sm twa:overflow-auto twa:h-auto`, 'twa:bg-primarylight twa:text-primary-foreground'), children: overFunction ? (_jsxs(_Fragment, { children: [_jsx(Tag, { className: "twa:bg-accent twa:text-accent-foreground", children: overFunction }), _jsx(ExpressionFunctionDocumentation, { expressionFunction: expressionFunctions[overFunction] })] })) : (_jsx(Flex, { className: "twa:size-full twa:items-center twa:justify-center twa:text-2 twa:italic", children: _jsxs("ul", { children: [_jsxs("li", { children: ["Hover over a Function to learn more", _jsx("br", {}), _jsx("br", {})] }), _jsx("li", { children: "Click a Function to add it to the Expression in the Editor" })] }) })) })] })] })), children: _jsx(SimpleButton, { "data-name": "expression-dropdown", icon: "arrow-down", iconPosition: 'end', className: "twa:mr-1", children: _jsx(Flex, { className: "twa:mr-1 twa:text-2", children: _jsx(Icon, { name: "equation" }) }) }) }));
|
|
156
156
|
};
|
|
157
157
|
export function BaseEditorInput(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Tag } from '../Tag';
|
|
3
3
|
import { Box } from '../Flex';
|
|
4
|
-
const signatureClassName = 'twa:m-0 twa:whitespace-pre-wrap twa:bg-primary twa:text-
|
|
4
|
+
const signatureClassName = 'twa:m-0 twa:whitespace-pre-wrap twa:bg-primary twa:text-primary-foreground twa:rounded-standard twa:p-1 twa:inline-block';
|
|
5
5
|
export const ExpressionFunctionDocumentation = (props) => {
|
|
6
6
|
return props.expressionFunction ? (_jsxs(Box, { "data-name": "expression-editor-documentation", className: "twa:my-2 twa:p-2 twa:rounded-standard twa:leading-normal", children: [props.expressionFunction.description && (_jsx(Box, { className: "twa:mb-3 twa:font-bold twa:whitespace-pre-wrap", "data-name": "expression-editor-documentation-description", children: props.expressionFunction.description })), props.expressionFunction.signatures && (_jsxs(Box, { "data-name": "expression-editor-documentation-signatures", children: [_jsx("b", { children: "Signatures" }), _jsx("ul", { className: "twa:flex twa:flex-col twa:gap-1", children: props.expressionFunction.signatures.map((signature, index) => (_jsx("li", { children: _jsx("pre", { className: signatureClassName, children: signature }) }, index))) })] })), props.expressionFunction.examples && (_jsxs(Box, { "data-name": "expression-editor-documentation-examples", children: [_jsx("b", { children: "Examples" }), _jsx("ul", { className: "twa:flex twa:flex-col twa:gap-1", children: props.expressionFunction.examples.map((example, index) => (_jsx("li", { children: _jsx("pre", { className: signatureClassName, children: example }) }, index))) })] })), props.expressionFunction.returnType && (_jsxs(Box, { "data-name": "expression-editor-documentation-examples", children: [_jsx("b", { children: "Return Type" }), _jsx(Tag, { className: "twa:bg-accentlight twa:text-accent twa:ml-3 twa:rounded-full twa:py-1", children: props.expressionFunction.returnType })] }))] })) : null;
|
|
7
7
|
};
|
|
@@ -19,7 +19,7 @@ const Body = ({ children, bodyScroll, variant, className, style, }) => {
|
|
|
19
19
|
bodyScroll = 'auto';
|
|
20
20
|
}
|
|
21
21
|
const bodyCls = clsx(DEFAULT_BODY_CLS, `${baseClassName}__body`, variant && `${baseClassName}__body--variant-${variant}`, bodyScroll ? `twa:overflow-auto` : null, {
|
|
22
|
-
'twa:bg-primarylight twa:text-
|
|
22
|
+
'twa:bg-primarylight twa:text-primary-foreground twa:border-0': variant === 'modern',
|
|
23
23
|
}, className);
|
|
24
24
|
return (_jsx(Box, { style: style, className: bodyCls, children: children }));
|
|
25
25
|
};
|
|
@@ -78,11 +78,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
|
78
78
|
'twa:*:z-1',
|
|
79
79
|
// all svgs inside should be aligned middle
|
|
80
80
|
'twa:[&_svg]:align-middle',
|
|
81
|
-
// 'twa:text-
|
|
81
|
+
// 'twa:text-primary-foreground',
|
|
82
82
|
// the text variant has the background applied on the before pseudo element
|
|
83
83
|
// so let's configure the before pseudo element for all buttons here
|
|
84
84
|
'twa:before:content-[""] twa:before:absolute twa:before:inset-0 twa:before:block', 'twa:before:z-0 twa:before:pointer-events-none twa:before:rounded-[inherit]', 'twa:outline-none twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50', disabled ? `${baseClassName}--disabled` : '', `${baseClassName}--variant-${variant}`, `${baseClassName}--tone-${tone}`, 'twa:transition-opacity twa:duration-200', {
|
|
85
|
-
'twa:text-
|
|
85
|
+
'twa:text-primary-foreground': tone == 'neutral',
|
|
86
86
|
'twa:text-inherit': tone === 'none',
|
|
87
87
|
'twa:text-success': tone === 'success',
|
|
88
88
|
'twa:text-accent': tone === 'accent',
|
|
@@ -95,11 +95,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
|
95
95
|
? 'twa:bg-background twa:border-input-border twa:border'
|
|
96
96
|
: '', variant === 'raised'
|
|
97
97
|
? {
|
|
98
|
-
'twa:text-
|
|
98
|
+
'twa:text-primary-foreground twa:shadow-(--ab-cmp-simple-button__box-shadow) twa:hover:not-disabled:shadow-(--ab-cmp-simple-button__hover-box-shadow) twa:transition-(--ab-cmp-simple-button__transition) twa:duration-200 twa:focus:shadow-(--ab-focus__box-shadow)': true,
|
|
99
99
|
'twa:bg-success twa:text-text-on-success': tone == 'success',
|
|
100
100
|
'twa:bg-accent twa:text-accent-foreground': tone == 'accent',
|
|
101
101
|
'twa:bg-transparent': tone == 'none',
|
|
102
|
-
'twa:bg-primary twa:text-
|
|
102
|
+
'twa:bg-primary twa:text-primary-foreground': tone == 'neutral',
|
|
103
103
|
'twa:bg-error twa:text-text-on-error': tone == 'error',
|
|
104
104
|
'twa:bg-warn twa:text-text-on-warn': tone == 'warning',
|
|
105
105
|
'twa:bg-info twa:text-text-on-info': tone == 'info',
|
|
@@ -40,7 +40,7 @@ export const Toggle = ({ onPressedChange, pressed, icon, children, ...rest }) =>
|
|
|
40
40
|
// backgrounds
|
|
41
41
|
{
|
|
42
42
|
'twa:text-inherit twa:bg-transparent': !pressed,
|
|
43
|
-
'twa:hover:bg-primarylight twa:hover:text-
|
|
43
|
+
'twa:hover:bg-primarylight twa:hover:text-primary-foreground': !pressed,
|
|
44
44
|
[`${baseClassName}--pressed`]: pressed,
|
|
45
45
|
'twa:bg-accent twa:hover:bg-accent/90 twa:text-accent-foreground': pressed,
|
|
46
46
|
}, {
|
|
@@ -20,7 +20,7 @@ export const ToggleGroup = (props) => {
|
|
|
20
20
|
activeIndex: index,
|
|
21
21
|
}));
|
|
22
22
|
}, []);
|
|
23
|
-
return (_jsx(ToggleGroupContext.Provider, { value: context, children: _jsx(Flex, { ref: ref, tabIndex: 0, className: clsx('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-
|
|
23
|
+
return (_jsx(ToggleGroupContext.Provider, { value: context, children: _jsx(Flex, { ref: ref, tabIndex: 0, className: clsx('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-primary-foreground', 'twa:rounded-standard twa:overflow-hidden', 'twa:inline-flex twa:w-fit', 'twa:focus:outline-0',
|
|
24
24
|
// make the shadow of child Toggle buttons invisible when the group is not focused
|
|
25
25
|
'twa:not-focus-within:[--ab-focus-light__box-shadow:none]', 'twa:not-focus-within:[--ab-focus__box-shadow:none]'), onMouseDown: (event) => {
|
|
26
26
|
const index = context.toggleButtons.findIndex((btn) => contains(btn.node, event.target));
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "23.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1781163715617 || Date.now(),
|
|
4
|
+
VERSION: "23.0.0-canary.6" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -10,7 +10,6 @@ import { destructurePivotColumnId } from './destructurePivotColumnId';
|
|
|
10
10
|
import { isPivotAggTotalColumn } from './isPivotAggTotalColumn';
|
|
11
11
|
import { isPivotGrandTotal } from './isPivotGrandTotal';
|
|
12
12
|
import { isPivotColumnTotal } from './isPivotColumnTotal';
|
|
13
|
-
import { isParameterizedAggFuncName } from '../../Aggregation/ParameterizedAggregationRegistry';
|
|
14
13
|
import { getMarker } from '../../devTools';
|
|
15
14
|
export const PIVOT_ANY_TOTAL_COL_TYPE = 'pivotAnyTotal';
|
|
16
15
|
export const PIVOT_GRAND_TOTAL_COL_TYPE = 'pivotGrandTotal';
|
|
@@ -523,24 +522,18 @@ export class LayoutManager extends LMEmitter {
|
|
|
523
522
|
});
|
|
524
523
|
}
|
|
525
524
|
if (gridState.aggregation) {
|
|
526
|
-
TableAggregationColumns = gridState.aggregation.aggregationModel
|
|
527
|
-
.map((agg) => {
|
|
525
|
+
TableAggregationColumns = gridState.aggregation.aggregationModel.map((agg) => {
|
|
528
526
|
const prevAggForColumn = prevAggColumnsMap?.[agg.colId];
|
|
529
527
|
if (prevAggForColumn && prevAggForColumn.AggFunc.aggFunc === agg.aggFunc) {
|
|
530
528
|
return prevAggForColumn;
|
|
531
529
|
}
|
|
532
|
-
// Parameterized aggs require layout metadata (e.g. weight column); ignore incomplete picks.
|
|
533
|
-
if (isParameterizedAggFuncName(agg.aggFunc)) {
|
|
534
|
-
return prevAggForColumn ?? null;
|
|
535
|
-
}
|
|
536
530
|
return {
|
|
537
531
|
ColumnId: agg.colId,
|
|
538
532
|
AggFunc: {
|
|
539
533
|
aggFunc: agg.aggFunc,
|
|
540
534
|
},
|
|
541
535
|
};
|
|
542
|
-
})
|
|
543
|
-
.filter(Boolean);
|
|
536
|
+
});
|
|
544
537
|
}
|
|
545
538
|
// if there's a current layout set
|
|
546
539
|
// we want to only return the AG Grid columns that are also in the current layout
|
|
@@ -792,15 +792,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
792
792
|
};
|
|
793
793
|
AdaptableTheme: {
|
|
794
794
|
k: string;
|
|
795
|
-
p: ({
|
|
796
|
-
n: string;
|
|
797
|
-
k: string;
|
|
798
|
-
o: boolean;
|
|
799
|
-
} | {
|
|
800
|
-
n: string;
|
|
801
|
-
k: string;
|
|
802
|
-
o?: undefined;
|
|
803
|
-
})[];
|
|
804
795
|
};
|
|
805
796
|
AdaptableToolPanel: {
|
|
806
797
|
k: string;
|
|
@@ -3808,6 +3799,9 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3808
3799
|
o: boolean;
|
|
3809
3800
|
}[];
|
|
3810
3801
|
};
|
|
3802
|
+
NumberScopeDataType: {
|
|
3803
|
+
k: string;
|
|
3804
|
+
};
|
|
3811
3805
|
NumericStyledColumn: {
|
|
3812
3806
|
k: string;
|
|
3813
3807
|
p: ({
|
|
@@ -3860,9 +3854,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3860
3854
|
k: string;
|
|
3861
3855
|
}[];
|
|
3862
3856
|
};
|
|
3863
|
-
ParameterizedAggFunc: {
|
|
3864
|
-
k: string;
|
|
3865
|
-
};
|
|
3866
3857
|
PercentBarStyle: {
|
|
3867
3858
|
k: string;
|
|
3868
3859
|
p: ({
|
|
@@ -3983,11 +3974,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3983
3974
|
k: string;
|
|
3984
3975
|
o: boolean;
|
|
3985
3976
|
r: string;
|
|
3986
|
-
} | {
|
|
3987
|
-
n: string;
|
|
3988
|
-
k: string;
|
|
3989
|
-
r: string;
|
|
3990
|
-
o?: undefined;
|
|
3991
3977
|
})[];
|
|
3992
3978
|
};
|
|
3993
3979
|
PlusMinusOptions: {
|
|
@@ -4655,9 +4641,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4655
4641
|
k: string;
|
|
4656
4642
|
}[];
|
|
4657
4643
|
};
|
|
4658
|
-
ShortcutScopeDataType: {
|
|
4659
|
-
k: string;
|
|
4660
|
-
};
|
|
4661
4644
|
ShortcutState: {
|
|
4662
4645
|
k: string;
|
|
4663
4646
|
p: {
|
|
@@ -4918,6 +4901,26 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4918
4901
|
o?: undefined;
|
|
4919
4902
|
})[];
|
|
4920
4903
|
};
|
|
4904
|
+
SystemThemeEntry: {
|
|
4905
|
+
k: string;
|
|
4906
|
+
};
|
|
4907
|
+
SystemThemeName: {
|
|
4908
|
+
k: string;
|
|
4909
|
+
};
|
|
4910
|
+
SystemThemeOptions: {
|
|
4911
|
+
k: string;
|
|
4912
|
+
p: ({
|
|
4913
|
+
n: string;
|
|
4914
|
+
k: string;
|
|
4915
|
+
o: boolean;
|
|
4916
|
+
r?: undefined;
|
|
4917
|
+
} | {
|
|
4918
|
+
n: string;
|
|
4919
|
+
k: string;
|
|
4920
|
+
r: string;
|
|
4921
|
+
o?: undefined;
|
|
4922
|
+
})[];
|
|
4923
|
+
};
|
|
4921
4924
|
TableAggregationColumns: {
|
|
4922
4925
|
k: string;
|
|
4923
4926
|
};
|
|
@@ -5010,14 +5013,28 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
5010
5013
|
k: string;
|
|
5011
5014
|
}[];
|
|
5012
5015
|
};
|
|
5013
|
-
|
|
5016
|
+
ThemeSelectedInfo: {
|
|
5014
5017
|
k: string;
|
|
5015
5018
|
p: {
|
|
5016
5019
|
n: string;
|
|
5017
5020
|
k: string;
|
|
5018
|
-
|
|
5021
|
+
r: string;
|
|
5019
5022
|
}[];
|
|
5020
5023
|
};
|
|
5024
|
+
ThemeState: {
|
|
5025
|
+
k: string;
|
|
5026
|
+
p: ({
|
|
5027
|
+
n: string;
|
|
5028
|
+
k: string;
|
|
5029
|
+
o: boolean;
|
|
5030
|
+
r: string;
|
|
5031
|
+
} | {
|
|
5032
|
+
n: string;
|
|
5033
|
+
k: string;
|
|
5034
|
+
o: boolean;
|
|
5035
|
+
r?: undefined;
|
|
5036
|
+
})[];
|
|
5037
|
+
};
|
|
5021
5038
|
ToastPositions: {
|
|
5022
5039
|
k: string;
|
|
5023
5040
|
};
|
|
@@ -5180,13 +5197,6 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
5180
5197
|
VueFrameworkComponent: {
|
|
5181
5198
|
k: string;
|
|
5182
5199
|
};
|
|
5183
|
-
WeightedAverageAggregation: {
|
|
5184
|
-
k: string;
|
|
5185
|
-
p: {
|
|
5186
|
-
n: string;
|
|
5187
|
-
k: string;
|
|
5188
|
-
}[];
|
|
5189
|
-
};
|
|
5190
5200
|
WindowPosition: {
|
|
5191
5201
|
k: string;
|
|
5192
5202
|
};
|