@adaptabletools/adaptable 23.0.0-canary.3 → 23.0.0-canary.5
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 +116 -61
- package/package.json +9 -4
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
- package/src/AdaptableOptions/EditOptions.d.ts +2 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
- package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
- package/src/AdaptableState/Common/AdaptableForm.js +31 -0
- package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
- package/src/AdaptableState/Common/AggregationColumns.js +27 -2
- package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
- package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
- package/src/AdaptableState/Common/Enums.d.ts +5 -10
- package/src/AdaptableState/Common/Enums.js +4 -10
- 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 +29 -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/CalculatedColumnModule.js +3 -1
- 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/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 +115 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
- 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 +35 -52
- 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/ColumnFilterWindow.js +1 -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/Selectors/ColumnSelector.js +5 -0
- 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 +24 -23
- 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/LayoutViewPanel.js +23 -21
- 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/View/renderWithAdaptableContext.js +2 -3
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +38 -43
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +27 -17
- package/src/agGrid/AgGridColumnAdapter.js +10 -19
- 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/AdaptableFormComponent/AdaptableFormComponent.js +11 -6
- 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 +35 -15
- 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/components/Tree/TreeDropdown/index.js +2 -6
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
- package/src/layout-manager/src/index.js +2 -9
- package/src/metamodel/adaptable.metamodel.d.ts +39 -46
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -5
- package/themes/dark.css +1 -68
- package/themes/light.css +1 -5
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
- package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -4
- 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/AdaptableComputedCSSVarsContext.d.ts +0 -12
- package/src/View/AdaptableComputedCSSVarsContext.js +0 -29
- 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
- package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
- package/src/components/Select/CSSNumericVariableWatch.js +0 -45
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
3
|
+
export declare const getStyledColumnBulletRangesViewValues: (data: StyledColumn) => string[];
|
|
4
|
+
export declare const getStyledColumnBulletStyleViewValues: (data: StyledColumn) => string[];
|
|
3
5
|
/** Wizard / list-view summary for the Ranges step (qualitative bands). */
|
|
4
6
|
export declare const renderStyledColumnBulletRangesSummary: (data: StyledColumn) => React.JSX.Element;
|
|
7
|
+
export declare const StyledColumnBulletRangesView: React.FunctionComponent<React.PropsWithChildren<{
|
|
8
|
+
data: StyledColumn;
|
|
9
|
+
}>>;
|
|
5
10
|
/** Wizard / list-view summary for the Style step (target, bar, text, font). */
|
|
6
11
|
export declare const renderStyledColumnBulletStyleSummary: (data: StyledColumn) => React.JSX.Element;
|
|
7
12
|
/** Full combined summary (ranges + style); kept for callers that expect one block. */
|
|
@@ -13,9 +13,10 @@ import DropdownButton from '../../../components/DropdownButton';
|
|
|
13
13
|
import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
|
|
14
14
|
import AdaptableInput from '../../Components/AdaptableInput';
|
|
15
15
|
import { Box, Flex } from '../../../components/Flex';
|
|
16
|
-
import {
|
|
16
|
+
import { BulletRangesSummaryPreview } from './StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview';
|
|
17
|
+
import { StyledColumnBulletPreviewCard } from './StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview';
|
|
17
18
|
import { SingleSelect } from '../../../components/NewSelect';
|
|
18
|
-
import {
|
|
19
|
+
import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
19
20
|
import { Card } from '../../../components/Card';
|
|
20
21
|
const BULLET_STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
21
22
|
// ---------------------------------------------------------------------------
|
|
@@ -26,37 +27,131 @@ const getTargetSummary = (target) => {
|
|
|
26
27
|
return null;
|
|
27
28
|
}
|
|
28
29
|
if (Array.isArray(target)) {
|
|
29
|
-
return
|
|
30
|
+
return target
|
|
31
|
+
.map((entry) => formatSingleBulletTargetSummary(entry))
|
|
32
|
+
.filter(Boolean)
|
|
33
|
+
.join(', ');
|
|
30
34
|
}
|
|
35
|
+
return formatSingleBulletTargetSummary(target);
|
|
36
|
+
};
|
|
37
|
+
const formatSingleBulletTargetSummary = (target) => {
|
|
31
38
|
if (typeof target === 'number') {
|
|
32
39
|
return String(target);
|
|
33
40
|
}
|
|
34
41
|
if (typeof target === 'string') {
|
|
35
42
|
return target;
|
|
36
43
|
}
|
|
37
|
-
// object form
|
|
38
44
|
const t = target;
|
|
39
45
|
return t.Label ?? String(t.Value);
|
|
40
46
|
};
|
|
47
|
+
const formatBulletOriginLabel = (origin) => {
|
|
48
|
+
if (origin == undefined) {
|
|
49
|
+
return 'Auto';
|
|
50
|
+
}
|
|
51
|
+
if (typeof origin === 'number') {
|
|
52
|
+
return `Custom (${origin})`;
|
|
53
|
+
}
|
|
54
|
+
return origin;
|
|
55
|
+
};
|
|
56
|
+
const formatBulletCellTextSummary = (cellText) => cellText
|
|
57
|
+
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
58
|
+
.join(' + ') ?? '';
|
|
59
|
+
const formatBulletToolTipSummary = (toolTipText) => toolTipText
|
|
60
|
+
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
61
|
+
.join(' + ') ?? '';
|
|
62
|
+
export const getStyledColumnBulletRangesViewValues = (data) => {
|
|
63
|
+
const bullet = data.BulletChartStyle;
|
|
64
|
+
if (!bullet) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
const bandCount = bullet.CellRanges?.length ?? 0;
|
|
68
|
+
const items = [`Bands: ${bandCount}`];
|
|
69
|
+
if (bullet.RangeValueType != null) {
|
|
70
|
+
items.push(`Range Value Type: ${bullet.RangeValueType}`);
|
|
71
|
+
}
|
|
72
|
+
return items;
|
|
73
|
+
};
|
|
74
|
+
const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
|
|
75
|
+
const items = [];
|
|
76
|
+
const targetSummary = getTargetSummary(bullet.Target);
|
|
77
|
+
if (targetSummary) {
|
|
78
|
+
items.push(`Target: ${targetSummary}`);
|
|
79
|
+
}
|
|
80
|
+
const marker = bullet.TargetMarker;
|
|
81
|
+
if (marker?.Shape && marker.Shape !== 'Line') {
|
|
82
|
+
items.push(`Target Marker Shape: ${marker.Shape}`);
|
|
83
|
+
}
|
|
84
|
+
if (marker?.Color) {
|
|
85
|
+
items.push(`Target Marker Colour: ${marker.Color}`);
|
|
86
|
+
}
|
|
87
|
+
if (marker?.Size != null) {
|
|
88
|
+
items.push(`Target Marker Size: ${marker.Size}px`);
|
|
89
|
+
}
|
|
90
|
+
if (bullet.Orientation === 'Vertical') {
|
|
91
|
+
items.push('Orientation: Vertical');
|
|
92
|
+
}
|
|
93
|
+
if (bullet.BarColor) {
|
|
94
|
+
items.push(`Bar Colour: ${bullet.BarColor}`);
|
|
95
|
+
}
|
|
96
|
+
if (bullet.BarHeight != null) {
|
|
97
|
+
items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${bullet.BarHeight}px`);
|
|
98
|
+
}
|
|
99
|
+
items.push(`Origin: ${formatBulletOriginLabel(bullet.Origin)}`);
|
|
100
|
+
if (bullet.BackColor) {
|
|
101
|
+
items.push(`Back Colour: ${bullet.BackColor}`);
|
|
102
|
+
}
|
|
103
|
+
if (bullet.CellText?.length) {
|
|
104
|
+
items.push(`Cell Text: ${formatBulletCellTextSummary(bullet.CellText)}`);
|
|
105
|
+
items.push(`Cell Text Position: ${bullet.CellTextPosition ?? 'Below'}`);
|
|
106
|
+
}
|
|
107
|
+
else if (options.includeEmptyCellText) {
|
|
108
|
+
items.push('Cell Text: None');
|
|
109
|
+
}
|
|
110
|
+
getCellFontStyleSummaryItems(bullet.Font).forEach(({ label, value }) => {
|
|
111
|
+
items.push(`${label}: ${value}`);
|
|
112
|
+
});
|
|
113
|
+
if (bullet.ToolTipText?.length) {
|
|
114
|
+
items.push(`Tooltip: ${formatBulletToolTipSummary(bullet.ToolTipText)}`);
|
|
115
|
+
}
|
|
116
|
+
else if (options.includeEmptyTooltip) {
|
|
117
|
+
items.push('Tooltip: No Tooltip');
|
|
118
|
+
}
|
|
119
|
+
return items;
|
|
120
|
+
};
|
|
121
|
+
export const getStyledColumnBulletStyleViewValues = (data) => {
|
|
122
|
+
const bullet = data.BulletChartStyle;
|
|
123
|
+
if (!bullet) {
|
|
124
|
+
return [];
|
|
125
|
+
}
|
|
126
|
+
return buildStyledColumnBulletStyleSummaryStrings(bullet, {
|
|
127
|
+
includeEmptyCellText: false,
|
|
128
|
+
includeEmptyTooltip: false,
|
|
129
|
+
});
|
|
130
|
+
};
|
|
41
131
|
/** Wizard / list-view summary for the Ranges step (qualitative bands). */
|
|
42
132
|
export const renderStyledColumnBulletRangesSummary = (data) => {
|
|
43
133
|
const bullet = data.BulletChartStyle;
|
|
44
134
|
if (!bullet) {
|
|
45
|
-
return _jsx(Tag, { children: "
|
|
135
|
+
return _jsx(Tag, { children: "No bands defined" });
|
|
46
136
|
}
|
|
47
|
-
const
|
|
48
|
-
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [_jsx(
|
|
137
|
+
const tagItems = getStyledColumnBulletRangesViewValues(data);
|
|
138
|
+
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: tagItems.map((item) => (_jsx(Tag, { children: item }, item))) }), _jsx(BulletRangesSummaryPreview, { bulletStyle: bullet })] }));
|
|
49
139
|
};
|
|
140
|
+
export const StyledColumnBulletRangesView = ({ data }) => renderStyledColumnBulletRangesSummary(data);
|
|
50
141
|
/** Wizard / list-view summary for the Style step (target, bar, text, font). */
|
|
51
142
|
export const renderStyledColumnBulletStyleSummary = (data) => {
|
|
52
143
|
const bullet = data.BulletChartStyle;
|
|
53
144
|
if (!bullet) {
|
|
54
145
|
return _jsx(Tag, { children: "No Styling Defined" });
|
|
55
146
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
147
|
+
const items = buildStyledColumnBulletStyleSummaryStrings(bullet, {
|
|
148
|
+
includeEmptyCellText: true,
|
|
149
|
+
includeEmptyTooltip: true,
|
|
150
|
+
});
|
|
151
|
+
if (!items.length) {
|
|
152
|
+
return _jsx(Tag, { children: "No Style Defined" });
|
|
153
|
+
}
|
|
154
|
+
return (_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => (_jsx(Tag, { children: item }, item))) }));
|
|
60
155
|
};
|
|
61
156
|
/** Full combined summary (ranges + style); kept for callers that expect one block. */
|
|
62
157
|
export const renderStyledColumnBulletSummary = (data) => {
|
|
@@ -64,11 +159,7 @@ export const renderStyledColumnBulletSummary = (data) => {
|
|
|
64
159
|
if (!bullet) {
|
|
65
160
|
return _jsx(Tag, { children: "No Styling Defined" });
|
|
66
161
|
}
|
|
67
|
-
|
|
68
|
-
const targetSummary = getTargetSummary(bullet.Target);
|
|
69
|
-
const isVertical = bullet.Orientation === 'Vertical';
|
|
70
|
-
const fontTags = renderFontStyleSummaryTags(bullet.Font);
|
|
71
|
-
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [_jsx(StyledColumnBulletChartListPreview, { bullet: bullet }), _jsxs(Flex, { alignItems: "center", className: "twa:flex-wrap", children: [_jsxs(Box, { className: "twa:mr-1", children: [bandCount, " ", bandCount === 1 ? 'band' : 'bands'] }), targetSummary && (_jsxs(Box, { className: "twa:mr-1", children: ["\u00B7 target: ", _jsx(Tag, { children: targetSummary })] })), isVertical && (_jsxs(Box, { className: "twa:mr-1", children: ["\u00B7 ", _jsx(Tag, { children: "vertical" })] })), fontTags && (_jsxs(Box, { className: "twa:mr-1", children: ["\u00B7 Font: ", fontTags] }))] })] }));
|
|
162
|
+
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:items-start", children: [renderStyledColumnBulletRangesSummary(data), renderStyledColumnBulletStyleSummary(data)] }));
|
|
72
163
|
};
|
|
73
164
|
/**
|
|
74
165
|
* Maps the structured `BulletChartStyle.Target` field to one of the simple
|
|
@@ -108,20 +199,25 @@ const MARKER_SHAPES = [
|
|
|
108
199
|
export const StyledColumnWizardBulletSection = (props) => {
|
|
109
200
|
const variant = props.variant ?? 'style';
|
|
110
201
|
const { data, api } = useOnePageAdaptableWizardContext();
|
|
111
|
-
const
|
|
202
|
+
const column = React.useMemo(() => {
|
|
112
203
|
const columnId = data.ColumnId;
|
|
113
204
|
if (!columnId) {
|
|
205
|
+
return undefined;
|
|
206
|
+
}
|
|
207
|
+
return api.columnApi.getColumnWithColumnId(columnId);
|
|
208
|
+
}, [data.ColumnId, api]);
|
|
209
|
+
const minMaxRangeValues = React.useMemo(() => {
|
|
210
|
+
if (!column) {
|
|
114
211
|
return null;
|
|
115
212
|
}
|
|
116
|
-
const column = api.columnApi.getColumnWithColumnId(columnId);
|
|
117
213
|
return {
|
|
118
214
|
min: api.styledColumnApi.internalApi.getMinValueForNumericColumn(column),
|
|
119
215
|
max: api.styledColumnApi.internalApi.getMaxValueForNumericColumn(column),
|
|
120
216
|
};
|
|
121
|
-
}, [
|
|
217
|
+
}, [column, api]);
|
|
122
218
|
const scope = { ColumnIds: [data.ColumnId] };
|
|
123
219
|
const bullet = data.BulletChartStyle ?? {};
|
|
124
|
-
const disabled = !data.ColumnId;
|
|
220
|
+
const disabled = !data.ColumnId || !column;
|
|
125
221
|
// -------------------------------------------------------------------------
|
|
126
222
|
// Updaters
|
|
127
223
|
// -------------------------------------------------------------------------
|
|
@@ -231,8 +327,10 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
231
327
|
// -------------------------------------------------------------------------
|
|
232
328
|
// Render
|
|
233
329
|
// -------------------------------------------------------------------------
|
|
234
|
-
if (!data.ColumnId) {
|
|
235
|
-
return (_jsx(Box, { children: _jsx(ErrorBox, { className: "twa:mt-2", children:
|
|
330
|
+
if (!data.ColumnId || !column) {
|
|
331
|
+
return (_jsx(Box, { children: _jsx(ErrorBox, { className: "twa:mt-2", children: !data.ColumnId
|
|
332
|
+
? 'You need to select a column before styling.'
|
|
333
|
+
: `Column "${data.ColumnId}" was not found in the grid.` }) }));
|
|
236
334
|
}
|
|
237
335
|
// ----- Ranges-only variant (wizard step before Style) ---------------------
|
|
238
336
|
if (variant === 'ranges') {
|
|
@@ -297,5 +395,5 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
297
395
|
delete cleaned.Font;
|
|
298
396
|
props.onChange({ ...data, BulletChartStyle: cleaned });
|
|
299
397
|
}
|
|
300
|
-
} }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether to display a tooltip" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: _jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: bullet.ToolTipText?.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: bullet.ToolTipText?.includes('PercentageValue'), onChange: (checked) => toggleToolTipText('PercentageValue', checked), children: "Percent Value" })] }) }) })] })] }));
|
|
398
|
+
} }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether to display a tooltip" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: _jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: bullet.ToolTipText?.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: bullet.ToolTipText?.includes('PercentageValue'), onChange: (checked) => toggleToolTipText('PercentageValue', checked), children: "Percent Value" })] }) }) })] }), _jsx(StyledColumnBulletPreviewCard, { data: data })] }));
|
|
301
399
|
};
|
|
@@ -3,6 +3,7 @@ import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
|
3
3
|
export interface StyledColumnWizardGradientSectionProps {
|
|
4
4
|
onChange: (styledColumn: StyledColumn) => void;
|
|
5
5
|
}
|
|
6
|
+
export declare const getStyledColumnGradientStyleViewValues: (data: StyledColumn) => string[];
|
|
6
7
|
/**
|
|
7
8
|
* Summary of Gradient-only style options (alpha bounds, auto-contrast, tooltip).
|
|
8
9
|
*/
|
|
@@ -8,15 +8,40 @@ import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableW
|
|
|
8
8
|
import { Box, Flex } from '../../../components/Flex';
|
|
9
9
|
import { NumberInput } from '../../../components/Input/NumberInput';
|
|
10
10
|
import { DEFAULT_GRADIENT_MAX_ALPHA, DEFAULT_GRADIENT_MIN_ALPHA, } from '../../../Utilities/Helpers/StyledColumnGradientHelper';
|
|
11
|
-
import {
|
|
11
|
+
import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
12
12
|
import { Card } from '../../../components/Card';
|
|
13
|
+
import { StyledColumnGradientPreviewCard } from './StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview';
|
|
13
14
|
const STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return opts.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ');
|
|
15
|
+
function formatGradientToolTipSummary(opts) {
|
|
16
|
+
return opts
|
|
17
|
+
.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
18
|
+
.join(' + ');
|
|
19
19
|
}
|
|
20
|
+
const buildStyledColumnGradientStyleSummaryStrings = (gs, options) => {
|
|
21
|
+
const minA = gs.MinAlpha ?? DEFAULT_GRADIENT_MIN_ALPHA;
|
|
22
|
+
const maxA = gs.MaxAlpha ?? DEFAULT_GRADIENT_MAX_ALPHA;
|
|
23
|
+
const items = [`Alpha: ${minA} → ${maxA}`];
|
|
24
|
+
if (gs.AutoContrastText) {
|
|
25
|
+
items.push('Auto Contrast: On');
|
|
26
|
+
}
|
|
27
|
+
if (gs.ToolTipText?.length) {
|
|
28
|
+
items.push(`Tooltip: ${formatGradientToolTipSummary(gs.ToolTipText)}`);
|
|
29
|
+
}
|
|
30
|
+
else if (options.includeEmptyTooltip) {
|
|
31
|
+
items.push('Tooltip: No Tooltip');
|
|
32
|
+
}
|
|
33
|
+
getCellFontStyleSummaryItems(gs.Font).forEach(({ label, value }) => {
|
|
34
|
+
items.push(`${label}: ${value}`);
|
|
35
|
+
});
|
|
36
|
+
return items;
|
|
37
|
+
};
|
|
38
|
+
export const getStyledColumnGradientStyleViewValues = (data) => {
|
|
39
|
+
const gs = data.GradientStyle;
|
|
40
|
+
if (!gs) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
return buildStyledColumnGradientStyleSummaryStrings(gs, { includeEmptyTooltip: false });
|
|
44
|
+
};
|
|
20
45
|
/**
|
|
21
46
|
* Summary of Gradient-only style options (alpha bounds, auto-contrast, tooltip).
|
|
22
47
|
*/
|
|
@@ -25,10 +50,8 @@ export const renderStyledColumnGradientStyleSummary = (data) => {
|
|
|
25
50
|
if (!gs) {
|
|
26
51
|
return _jsx(Tag, { children: "No Styling Defined" });
|
|
27
52
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const fontTags = renderFontStyleSummaryTags(gs.Font);
|
|
31
|
-
return (_jsxs(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: [_jsxs(Box, { children: ["Alpha: ", _jsx(Tag, { children: minA }), " \u2192 ", _jsx(Tag, { children: maxA })] }), gs.AutoContrastText && (_jsxs(Box, { children: ["Text: ", _jsx(Tag, { children: "Auto contrast" })] })), _jsxs(Box, { children: ["Tooltip: ", _jsx(Tag, { children: formatToolTipText(gs.ToolTipText) })] }), fontTags && _jsxs(Box, { children: ["Font: ", fontTags] })] }));
|
|
53
|
+
const items = buildStyledColumnGradientStyleSummaryStrings(gs, { includeEmptyTooltip: true });
|
|
54
|
+
return (_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => (_jsx(Tag, { children: item }, item))) }));
|
|
32
55
|
};
|
|
33
56
|
export const StyledColumnWizardGradientSection = (props) => {
|
|
34
57
|
const { data, api } = useOnePageAdaptableWizardContext();
|
|
@@ -86,5 +109,5 @@ export const StyledColumnWizardGradientSection = (props) => {
|
|
|
86
109
|
else {
|
|
87
110
|
patchGradient({ AutoContrastText: true });
|
|
88
111
|
}
|
|
89
|
-
}, children: "Make text readable on tinted backgrounds" }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[600px]", children: "Set Tooltip properties" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Tooltip:", children: _jsxs(Box, { className: "twa:ml-2", children: [_jsx(CheckBox, { disabled: disabled, checked: gs.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: gs.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent along scale" })] }) }) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Font" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: "Optional font properties (takes precedence over Format Column)" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: disabled, value: gs.Font, onChange: onFontChange }) })] }), !data.ColumnId && (_jsx(ErrorBox, { className: "twa:mt-2", children: "Select a column before changing Gradient style." }))] }));
|
|
112
|
+
}, children: "Make text readable on tinted backgrounds" }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[600px]", children: "Set Tooltip properties" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Tooltip:", children: _jsxs(Box, { className: "twa:ml-2", children: [_jsx(CheckBox, { disabled: disabled, checked: gs.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: gs.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent along scale" })] }) }) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Font" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: "Optional font properties (takes precedence over Format Column)" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: disabled, value: gs.Font, onChange: onFontChange }) })] }), _jsx(StyledColumnGradientPreviewCard, { data: data }), !data.ColumnId && (_jsx(ErrorBox, { className: "twa:mt-2", children: "Select a column before changing Gradient style." }))] }));
|
|
90
113
|
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
3
|
+
export declare const getStyledColumnIconMappingsViewValues: (data: StyledColumn) => string[];
|
|
4
|
+
export declare const getStyledColumnIconStyleViewValues: (data: StyledColumn) => string[];
|
|
3
5
|
/** Mappings step summary. */
|
|
4
6
|
export declare const renderStyledColumnIconMappingsSummary: (data: StyledColumn) => React.JSX.Element;
|
|
7
|
+
export declare const StyledColumnIconMappingsView: React.FunctionComponent<React.PropsWithChildren<{
|
|
8
|
+
data: StyledColumn;
|
|
9
|
+
}>>;
|
|
5
10
|
/** Style step summary (size, text, tooltip, font / cell). */
|
|
6
11
|
export declare const renderStyledColumnIconStyleSummary: (data: StyledColumn) => React.JSX.Element;
|
|
7
12
|
/**
|
|
@@ -12,9 +12,10 @@ import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableW
|
|
|
12
12
|
import { AdaptableIconSelector } from '../../Components/AdaptableIconSelector';
|
|
13
13
|
import { AdaptableIconComponent } from '../../Components/AdaptableIconComponent';
|
|
14
14
|
import { ICON_STYLE_PRESET_DESCRIPTIONS, ICON_STYLE_PRESET_LABELS, getIconStylePresetMappings, } from '../../../Utilities/Helpers/IconStylePresets';
|
|
15
|
-
import { resolveEffectiveIconStyleMappings } from '../../../agGrid/cellRenderers/IconRenderer';
|
|
15
|
+
import { resolveEffectiveIconStyleMappings, resolveIconStyleMappingsForSummaryPreview } from '../../../agGrid/cellRenderers/IconRenderer';
|
|
16
16
|
import { Card } from '../../../components/Card';
|
|
17
|
-
import { StyledColumnCellStyleEditor, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
17
|
+
import { getCellBoxStyleSummaryItems, getCellFontStyleSummaryItems, StyledColumnCellStyleEditor, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
18
|
+
import { StyledColumnIconPreviewCard } from './StyledColumnWizardStyleSection/Components/StyledColumnIconPreview';
|
|
18
19
|
const STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
19
20
|
const detectIconKind = (spec) => {
|
|
20
21
|
if (typeof spec === 'string')
|
|
@@ -37,37 +38,110 @@ const previewIcon = (spec) => {
|
|
|
37
38
|
// ---------------------------------------------------------------------------
|
|
38
39
|
// Summary helpers (used by the wizard step header + Styled Columns list)
|
|
39
40
|
// ---------------------------------------------------------------------------
|
|
41
|
+
const ICON_MAPPINGS_PREVIEW_CHIP_LIMIT = 6;
|
|
40
42
|
const previewMapping = (mapping, index) => {
|
|
41
|
-
return (_jsxs(Flex, { alignItems: "center", className: "twa:gap-1 twa:px-1.5 twa:py-0.5 twa:rounded twa:bg-[var(--ab-color-primary)] twa:text-[var(--ab-color-primarytext)]", children: [_jsx(Box, { children: previewIcon(mapping.Icon) }), _jsx(Box, { className: "twa:text-xs twa:opacity-90", children: String(mapping.Key) })] }, index));
|
|
43
|
+
return (_jsxs(Flex, { alignItems: "center", className: "twa:gap-1 twa:px-1.5 twa:py-0.5 twa:rounded twa:bg-[var(--ab-color-primary)] twa:text-[var(--ab-color-primarytext)]", children: [_jsx(Box, { children: previewIcon(mapping.Icon) }), _jsx(Box, { className: "twa:text-xs twa:opacity-90", children: String(mapping.Key) })] }, `${String(mapping.Key)}-${index}`));
|
|
42
44
|
};
|
|
43
45
|
const renderMappingsPreview = (mappings) => {
|
|
44
46
|
if (!mappings || mappings.length === 0) {
|
|
45
47
|
return _jsx(Tag, { children: "No mappings" });
|
|
46
48
|
}
|
|
47
|
-
const previewItems = mappings.slice(0,
|
|
49
|
+
const previewItems = mappings.slice(0, ICON_MAPPINGS_PREVIEW_CHIP_LIMIT).map((m, i) => previewMapping(m, i));
|
|
48
50
|
const remaining = mappings.length - previewItems.length;
|
|
49
51
|
return (_jsxs(Flex, { alignItems: "center", className: "twa:gap-1 twa:flex-wrap", children: [previewItems, remaining > 0 && _jsxs(Box, { className: "twa:text-xs twa:opacity-60", children: ["+", remaining, " more"] })] }));
|
|
50
52
|
};
|
|
53
|
+
const formatIconCellTextSummary = (cellText) => cellText
|
|
54
|
+
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Description'))
|
|
55
|
+
.join(' + ') ?? '';
|
|
56
|
+
const formatIconToolTipSummary = (toolTipText) => toolTipText
|
|
57
|
+
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Description'))
|
|
58
|
+
.join(' + ') ?? '';
|
|
59
|
+
export const getStyledColumnIconMappingsViewValues = (data) => {
|
|
60
|
+
const ic = data.IconStyle;
|
|
61
|
+
if (!ic) {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
const effectiveMappings = resolveEffectiveIconStyleMappings(ic);
|
|
65
|
+
const items = [`Mappings: ${effectiveMappings.length}`];
|
|
66
|
+
if (ic.Preset) {
|
|
67
|
+
items.push(`Preset: ${ICON_STYLE_PRESET_LABELS[ic.Preset]}`);
|
|
68
|
+
}
|
|
69
|
+
const customCount = ic.Mappings?.length ?? 0;
|
|
70
|
+
if (customCount > 0) {
|
|
71
|
+
items.push(`Custom Mappings: ${customCount}`);
|
|
72
|
+
}
|
|
73
|
+
if (ic.MatchMode && ic.MatchMode !== 'Exact') {
|
|
74
|
+
items.push(`Match Mode: ${ic.MatchMode}`);
|
|
75
|
+
}
|
|
76
|
+
if (ic.Fallback && ic.Fallback !== 'Hide') {
|
|
77
|
+
items.push(`Fallback: ${ic.Fallback}`);
|
|
78
|
+
}
|
|
79
|
+
return items;
|
|
80
|
+
};
|
|
81
|
+
const buildStyledColumnIconStyleSummaryStrings = (ic, options) => {
|
|
82
|
+
const items = [];
|
|
83
|
+
if (ic.Size != null) {
|
|
84
|
+
items.push(`Icon Size: ${ic.Size}px`);
|
|
85
|
+
}
|
|
86
|
+
if (ic.Gap != null) {
|
|
87
|
+
items.push(`Gap: ${ic.Gap}px`);
|
|
88
|
+
}
|
|
89
|
+
if (ic.CellText?.length) {
|
|
90
|
+
items.push(`Cell Text: ${formatIconCellTextSummary(ic.CellText)}`);
|
|
91
|
+
items.push(`Cell Text Position: ${ic.CellTextPosition ?? 'After'}`);
|
|
92
|
+
}
|
|
93
|
+
else if (options.includeEmptyCellText) {
|
|
94
|
+
items.push('Cell Text: None');
|
|
95
|
+
}
|
|
96
|
+
getCellFontStyleSummaryItems(ic.Font).forEach(({ label, value }) => {
|
|
97
|
+
items.push(`${label}: ${value}`);
|
|
98
|
+
});
|
|
99
|
+
getCellBoxStyleSummaryItems(ic.Cell).forEach(({ label, value }) => {
|
|
100
|
+
items.push(`${label}: ${value}`);
|
|
101
|
+
});
|
|
102
|
+
if (ic.ToolTipText?.length) {
|
|
103
|
+
items.push(`Tooltip: ${formatIconToolTipSummary(ic.ToolTipText)}`);
|
|
104
|
+
}
|
|
105
|
+
else if (options.includeEmptyTooltip) {
|
|
106
|
+
items.push('Tooltip: No Tooltip');
|
|
107
|
+
}
|
|
108
|
+
return items;
|
|
109
|
+
};
|
|
110
|
+
export const getStyledColumnIconStyleViewValues = (data) => {
|
|
111
|
+
const ic = data.IconStyle;
|
|
112
|
+
if (!ic) {
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
return buildStyledColumnIconStyleSummaryStrings(ic, {
|
|
116
|
+
includeEmptyCellText: false,
|
|
117
|
+
includeEmptyTooltip: false,
|
|
118
|
+
});
|
|
119
|
+
};
|
|
51
120
|
/** Mappings step summary. */
|
|
52
121
|
export const renderStyledColumnIconMappingsSummary = (data) => {
|
|
53
122
|
const ic = data.IconStyle;
|
|
54
123
|
if (!ic) {
|
|
55
124
|
return _jsx(Tag, { children: "No Icon Style defined" });
|
|
56
125
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const customCount = ic.Mappings?.length ?? 0;
|
|
61
|
-
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [_jsxs(Flex, { alignItems: "center", className: "twa:flex-wrap", children: [_jsxs(Box, { className: "twa:mr-1", children: [effectiveMappings.length, " ", effectiveMappings.length === 1 ? 'mapping' : 'mappings'] }), ic.Preset && (_jsxs(Box, { className: "twa:mr-1", children: ["\u00B7 Preset: ", _jsx(Tag, { children: ICON_STYLE_PRESET_LABELS[ic.Preset] })] })), customCount > 0 && (_jsxs(Box, { className: "twa:mr-1", children: ["\u00B7 Custom: ", _jsx(Tag, { children: customCount })] })), ic.MatchMode && ic.MatchMode !== 'Exact' && (_jsxs(Box, { className: "twa:mr-1", children: ["\u00B7 Match: ", _jsx(Tag, { children: ic.MatchMode })] })), ic.Fallback && ic.Fallback !== 'Hide' && (_jsxs(Box, { className: "twa:mr-1", children: ["\u00B7 Fallback: ", _jsx(Tag, { children: ic.Fallback })] }))] }), renderMappingsPreview(effectiveMappings)] }));
|
|
126
|
+
const tagItems = getStyledColumnIconMappingsViewValues(data);
|
|
127
|
+
const previewMappings = resolveIconStyleMappingsForSummaryPreview(ic);
|
|
128
|
+
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: tagItems.map((item) => (_jsx(Tag, { children: item }, item))) }), renderMappingsPreview(previewMappings)] }));
|
|
62
129
|
};
|
|
130
|
+
export const StyledColumnIconMappingsView = ({ data }) => renderStyledColumnIconMappingsSummary(data);
|
|
63
131
|
/** Style step summary (size, text, tooltip, font / cell). */
|
|
64
132
|
export const renderStyledColumnIconStyleSummary = (data) => {
|
|
65
133
|
const ic = data.IconStyle;
|
|
66
134
|
if (!ic) {
|
|
67
135
|
return _jsx(Tag, { children: "No Icon Style defined" });
|
|
68
136
|
}
|
|
69
|
-
const
|
|
70
|
-
|
|
137
|
+
const items = buildStyledColumnIconStyleSummaryStrings(ic, {
|
|
138
|
+
includeEmptyCellText: true,
|
|
139
|
+
includeEmptyTooltip: true,
|
|
140
|
+
});
|
|
141
|
+
if (!items.length) {
|
|
142
|
+
return _jsx(Tag, { children: "No Style Defined" });
|
|
143
|
+
}
|
|
144
|
+
return (_jsx(Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => (_jsx(Tag, { children: item }, item))) }));
|
|
71
145
|
};
|
|
72
146
|
/**
|
|
73
147
|
* Combined summary for the Styled Columns list row (preview + key facts).
|
|
@@ -240,7 +314,7 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
240
314
|
{ value: 'After', label: 'After' },
|
|
241
315
|
{ value: 'Above', label: 'Above' },
|
|
242
316
|
{ value: 'Below', label: 'Below' },
|
|
243
|
-
] }) }) })] }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: disabled || cellTextDisabled, value: iconStyle.Font, onChange: onFontChange }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether and how to display a tooltip" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { checked: toolTipText.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: toolTipText.includes('IconDescription'), onChange: (checked) => toggleToolTipText('IconDescription', checked), children: "Description" })] }) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional cell box styling (overrides Format Column properties)" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: iconStyle.Cell, onChange: onCellChange }) })] })] }));
|
|
317
|
+
] }) }) })] }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: disabled || cellTextDisabled, value: iconStyle.Font, onChange: onFontChange }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether and how to display a tooltip" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { checked: toolTipText.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: toolTipText.includes('IconDescription'), onChange: (checked) => toggleToolTipText('IconDescription', checked), children: "Description" })] }) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional cell box styling (overrides Format Column properties)" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: iconStyle.Cell, onChange: onCellChange }) })] }), _jsx(StyledColumnIconPreviewCard, { data: data })] }));
|
|
244
318
|
};
|
|
245
319
|
const IconSpecEditorFields = (props) => {
|
|
246
320
|
const kind = detectIconKind(props.value);
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
3
|
+
export declare const getStyledColumnRangeBarRangeViewValues: (data: StyledColumn) => string[];
|
|
4
|
+
export declare const getStyledColumnRangeBarDisplayViewValues: (data: StyledColumn) => string[];
|
|
3
5
|
/** Summary line for the Range wizard step (bounds + bands only). */
|
|
4
6
|
export declare const renderStyledColumnRangeBarRangeStepSummary: (data: StyledColumn) => React.JSX.Element;
|
|
7
|
+
export declare const StyledColumnRangeBarRangeView: React.FunctionComponent<React.PropsWithChildren<{
|
|
8
|
+
data: StyledColumn;
|
|
9
|
+
}>>;
|
|
5
10
|
/** Summary for the Display wizard step (markers, track, text). */
|
|
6
11
|
export declare const renderStyledColumnRangeBarDisplayStepSummary: (data: StyledColumn) => React.JSX.Element;
|
|
7
12
|
/**
|