@adaptabletools/adaptable-cjs 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 +30 -3
- 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 +2 -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 +19 -8
- 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 +12 -5
- package/src/Strategy/LayoutModule.js +13 -8
- package/src/Strategy/StyledColumnModule.js +58 -30
- 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 +68 -0
- package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
- package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
- package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
- package/src/Utilities/ObjectFactory.d.ts +1 -3
- package/src/Utilities/ObjectFactory.js +0 -9
- package/src/Utilities/Services/ThemeService.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
- 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 +26 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
- 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 +1 -2
- 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 +5 -4
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
- package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
- package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
- package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
- package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -20
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
- 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 +120 -13
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
- 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 +64 -13
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
- 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 +116 -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 +10 -10
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
- 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 +3 -4
- 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 +7 -12
- 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 +45 -12
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
- 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 +10 -17
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
- package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
- package/src/View/Shortcut/shortcutOperations.js +32 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -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 +53 -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 +6 -20
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +34 -24
- 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 +114 -0
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
- package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
- package/src/agGrid/createAgGridIcon.d.ts +10 -0
- package/src/agGrid/createAgGridIcon.js +19 -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.cjs.tsbuildinfo +1 -1
- package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
- package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
- package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
- package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
- package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
- package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
- package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
- package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
- package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
- package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
- package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
- package/src/Aggregation/validateParameterizedAggregations.js +0 -25
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
- package/src/View/Theme/VariantSelector.d.ts +0 -8
- package/src/View/Theme/VariantSelector.js +0 -25
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyledColumnSparklineSettingsSection = exports.isValidSparklineSettings = exports.renderSparklineSummary = void 0;
|
|
3
|
+
exports.StyledColumnSparklineSettingsSection = exports.isValidSparklineSettings = exports.renderSparklineSummary = exports.getStyledColumnSparklineStyleViewValues = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const NewSelect_1 = require("../../../components/NewSelect");
|
|
8
|
-
const Tabs_1 = require("../../../components/Tabs");
|
|
9
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
10
9
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
11
10
|
const Tag_1 = require("../../../components/Tag");
|
|
@@ -14,6 +13,12 @@ const ColorPicker_1 = require("../../../components/ColorPicker");
|
|
|
14
13
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
15
14
|
const Flex_1 = require("../../../components/Flex");
|
|
16
15
|
const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
|
|
16
|
+
const Card_1 = require("../../../components/Card");
|
|
17
|
+
const ErrorBox_1 = tslib_1.__importDefault(require("../../../components/ErrorBox"));
|
|
18
|
+
const StyledColumnSparklinePreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview");
|
|
19
|
+
const STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
20
|
+
/** Sentinel for the theme dropdown — persisted options omit `theme` when this is chosen. */
|
|
21
|
+
const SPARKLINE_CUSTOM_COLOURS_THEME = '__custom__';
|
|
17
22
|
const SparklineTypes = {
|
|
18
23
|
LINE: 'line',
|
|
19
24
|
AREA: 'area',
|
|
@@ -34,22 +39,68 @@ const sparklineTypeLabel = (opts) => {
|
|
|
34
39
|
}
|
|
35
40
|
return type.charAt(0).toUpperCase() + type.slice(1);
|
|
36
41
|
};
|
|
42
|
+
const buildStyledColumnSparklineStyleSummaryStrings = (sparkline, options) => {
|
|
43
|
+
const opts = sparkline.options;
|
|
44
|
+
if (!opts) {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
const items = [`Type: ${sparklineTypeLabel(opts)}`];
|
|
48
|
+
if (typeof opts.theme === 'string' && opts.theme !== 'ag-default') {
|
|
49
|
+
items.push(`Theme: ${opts.theme.replace(/^ag-/, '')}`);
|
|
50
|
+
}
|
|
51
|
+
if (typeof opts.min === 'number' || typeof opts.max === 'number') {
|
|
52
|
+
items.push(`Range: ${opts.min ?? 'auto'} → ${opts.max ?? 'auto'}`);
|
|
53
|
+
}
|
|
54
|
+
if (opts.xKey || opts.yKey) {
|
|
55
|
+
items.push(`Keys: x=${opts.xKey ?? 'x'}, y=${opts.yKey ?? 'y'}`);
|
|
56
|
+
}
|
|
57
|
+
const markerEnabled = opts.type !== 'bar' &&
|
|
58
|
+
opts.marker?.enabled;
|
|
59
|
+
if (markerEnabled) {
|
|
60
|
+
items.push('Markers: On');
|
|
61
|
+
}
|
|
62
|
+
else if (options.includeEmptyFeatures && opts.type !== 'bar') {
|
|
63
|
+
items.push('Markers: Off');
|
|
64
|
+
}
|
|
65
|
+
if (opts.tooltip?.enabled) {
|
|
66
|
+
items.push('Tooltip: On');
|
|
67
|
+
}
|
|
68
|
+
else if (options.includeEmptyFeatures) {
|
|
69
|
+
items.push('Tooltip: Off');
|
|
70
|
+
}
|
|
71
|
+
if (opts.axis?.visible) {
|
|
72
|
+
items.push('Axis: On');
|
|
73
|
+
}
|
|
74
|
+
else if (options.includeEmptyFeatures) {
|
|
75
|
+
items.push('Axis: Off');
|
|
76
|
+
}
|
|
77
|
+
(0, StyledColumnSliceStyleEditors_1.getCellBoxStyleSummaryItems)(sparkline.Cell).forEach(({ label, value }) => {
|
|
78
|
+
items.push(`${label}: ${value}`);
|
|
79
|
+
});
|
|
80
|
+
return items;
|
|
81
|
+
};
|
|
82
|
+
const getStyledColumnSparklineStyleViewValues = (data) => {
|
|
83
|
+
const sparkline = data.SparklineStyle;
|
|
84
|
+
if (!sparkline) {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
return buildStyledColumnSparklineStyleSummaryStrings(sparkline, {
|
|
88
|
+
includeEmptyFeatures: false,
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
exports.getStyledColumnSparklineStyleViewValues = getStyledColumnSparklineStyleViewValues;
|
|
37
92
|
/**
|
|
38
|
-
* Wizard-step summary for the Sparkline Settings step
|
|
39
|
-
* pattern used by Bullet / Badge / Gradient / Percent Bar so the nav row
|
|
40
|
-
* isn't blank when this step is collapsed.
|
|
93
|
+
* Wizard-step summary for the Sparkline Settings step.
|
|
41
94
|
*/
|
|
42
95
|
const renderSparklineSummary = (data) => {
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
45
|
-
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "
|
|
96
|
+
const sparkline = data.SparklineStyle;
|
|
97
|
+
if (!sparkline?.options) {
|
|
98
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
|
|
46
99
|
}
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const cellTags = (0, StyledColumnSliceStyleEditors_1.renderCellStyleSummaryTags)(data.SparklineStyle?.Cell);
|
|
52
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Type: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: type })] }), theme && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Theme: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: theme })] })), (min != null || max != null) && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Range: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: `${min ?? 'auto'} → ${max ?? 'auto'}` })] })), cellTags && (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Cell: ", cellTags] })] }));
|
|
100
|
+
const items = buildStyledColumnSparklineStyleSummaryStrings(sparkline, {
|
|
101
|
+
includeEmptyFeatures: true,
|
|
102
|
+
});
|
|
103
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }));
|
|
53
104
|
};
|
|
54
105
|
exports.renderSparklineSummary = renderSparklineSummary;
|
|
55
106
|
/**
|
|
@@ -97,23 +148,32 @@ const StyledColumnSparklineSettingsSection = ({ onChange }) => {
|
|
|
97
148
|
}
|
|
98
149
|
handleOptionsChange(newOptions);
|
|
99
150
|
};
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
151
|
+
const column = data.ColumnId
|
|
152
|
+
? api.columnApi.getColumnWithColumnId(data.ColumnId)
|
|
153
|
+
: undefined;
|
|
154
|
+
const disabled = !data.ColumnId || !column;
|
|
155
|
+
const isObjectNumberArray = column?.dataType === 'objectArray';
|
|
156
|
+
if (!data.ColumnId || !column) {
|
|
157
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children: !data.ColumnId
|
|
158
|
+
? 'You need to select a column before styling.'
|
|
159
|
+
: `Column "${data.ColumnId}" was not found in the grid.` }) }));
|
|
160
|
+
}
|
|
161
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: "Chart" }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Type:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", disabled: disabled, items: sparklineTypeOptions, value: sparklineType, onValueChange: handleTypeChange, placeholder: "Select Sparkline Type" }) }) }), isObjectNumberArray && ((0, jsx_runtime_1.jsx)(SparklineObjectArrayProperties, { options: sparklineOptions, onChange: handleOptionsChange })), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Min Value:", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { disabled: disabled, type: "number", value: sparklineOptions.min ?? '', onChange: (e) => handleOptionsChange({
|
|
162
|
+
...sparklineOptions,
|
|
163
|
+
min: e.target.value === '' ? undefined : Number(e.target.value),
|
|
164
|
+
}), placeholder: 'Auto', title: "User override for the automatically determined min value (based on series data)" }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Max Value:", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { disabled: disabled, type: "number", value: sparklineOptions.max ?? '', onChange: (e) => handleOptionsChange({
|
|
165
|
+
...sparklineOptions,
|
|
166
|
+
max: e.target.value === '' ? undefined : Number(e.target.value),
|
|
167
|
+
}), placeholder: 'Auto', title: "User override for the automatically determined max value (based on series data)" }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: "Theming" }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(SparklineThemingOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: "Axis" }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(SparklineAxisOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), sparklineOptions.type !== 'bar' && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: "Markers" }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(SparklineMarkerOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] })), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: "Tooltip" }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(SparklineTooltipOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: "Highlight" }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(SparklineHighlightOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[500px]", children: "Optional cell-box styling behind the sparkline" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: data.SparklineStyle?.Cell, onChange: (next) => {
|
|
168
|
+
const sparkStyle = { ...(data.SparklineStyle ?? {}) };
|
|
169
|
+
if (next) {
|
|
170
|
+
sparkStyle.Cell = next;
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
delete sparkStyle.Cell;
|
|
174
|
+
}
|
|
175
|
+
onChange({ ...data, SparklineStyle: sparkStyle });
|
|
176
|
+
} }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnSparklinePreview_1.StyledColumnSparklinePreviewCard, { data: data })] }));
|
|
117
177
|
};
|
|
118
178
|
exports.StyledColumnSparklineSettingsSection = StyledColumnSparklineSettingsSection;
|
|
119
179
|
const SparklineObjectArrayProperties = ({ options, onChange, }) => {
|
|
@@ -147,11 +207,17 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
|
|
|
147
207
|
const handleChange = (key, value) => {
|
|
148
208
|
onChange({ ...options, [key]: value });
|
|
149
209
|
};
|
|
210
|
+
const applySeriesColour = (patch) => {
|
|
211
|
+
const next = { ...options, ...patch };
|
|
212
|
+
delete next.theme;
|
|
213
|
+
onChange(next);
|
|
214
|
+
};
|
|
150
215
|
const handlePaddingChange = (key, value) => {
|
|
151
216
|
const currentPadding = sparklineOptions.padding || {};
|
|
152
217
|
handleChange('padding', { ...currentPadding, [key]: value });
|
|
153
218
|
};
|
|
154
219
|
const themes = [
|
|
220
|
+
{ value: SPARKLINE_CUSTOM_COLOURS_THEME, label: 'Custom colours' },
|
|
155
221
|
{ value: 'ag-default', label: 'Default' },
|
|
156
222
|
{ value: 'ag-default-dark', label: 'Default Dark' },
|
|
157
223
|
{ value: 'ag-sheets', label: 'Sheets' },
|
|
@@ -165,7 +231,9 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
|
|
|
165
231
|
{ value: 'ag-financial', label: 'Financial' },
|
|
166
232
|
{ value: 'ag-financial-dark', label: 'Financial Dark' },
|
|
167
233
|
];
|
|
168
|
-
return ((0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [sparklineOptions.type !== 'line' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Fill", children: (0, jsx_runtime_1.
|
|
234
|
+
return ((0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [sparklineOptions.type !== 'line' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Fill", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { title: "The colour for filling shapes", api: api, value: sparklineOptions.fill, onChange: (color) => applySeriesColour({ fill: color }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Bar, column, and area body colour." })] }) })), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Stroke", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { title: "The colour for the stroke", api: api, value: sparklineOptions.stroke, onChange: (color) => applySeriesColour({ stroke: color }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { title: "The width of the stroke in pixels", type: "number", className: "twa:w-[70px]", min: 0, value: sparklineOptions.strokeWidth ?? '', onChange: (e) => handleChange('strokeWidth', Number(e.target.value)) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: sparklineOptions.type === 'line'
|
|
235
|
+
? 'Line colour. Marker colours are in the Markers card.'
|
|
236
|
+
: 'Outline colour — increase width to see it on bars and columns.' })] }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Padding", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mr-1", children: "Top" }), (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 0, value: sparklineOptions.padding?.top ?? '', onChange: (e) => handlePaddingChange('top', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the top of the chart area" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2 twa:mr-1", children: "Right" }), (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 0, value: sparklineOptions.padding?.right ?? '', onChange: (e) => handlePaddingChange('right', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the right of the chart area" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2 twa:mr-1", children: "Bottom" }), (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 0, value: sparklineOptions.padding?.bottom ?? '', onChange: (e) => handlePaddingChange('bottom', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the bottom of the chart area" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2 twa:mr-1", children: "Left" }), (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 0, value: sparklineOptions.padding?.left ?? '', onChange: (e) => handlePaddingChange('left', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the left of the chart area" })] }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Line Dash", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { title: "Length of dashes and gaps in pixels (comma-separated values, e.g. '3,6,9')", value: sparklineOptions.lineDash?.join(',') ?? '', onChange: (e) => {
|
|
169
237
|
const value = e.target.value;
|
|
170
238
|
const dashArray = value
|
|
171
239
|
? value
|
|
@@ -180,7 +248,15 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
|
|
|
180
248
|
}) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: !sparklineOptions.background?.visible, title: "The colour of the chart background", api: api, value: sparklineOptions.background?.fill, onChange: (fill) => handleChange('background', {
|
|
181
249
|
...sparklineOptions.background,
|
|
182
250
|
fill,
|
|
183
|
-
}) }) })] }) }), typeof sparklineOptions.theme !== 'object' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Theme", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: sparklineOptions.theme ??
|
|
251
|
+
}) }) })] }) }), typeof sparklineOptions.theme !== 'object' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Theme", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: sparklineOptions.theme ?? SPARKLINE_CUSTOM_COLOURS_THEME, onValueChange: (themeName) => {
|
|
252
|
+
if (themeName === SPARKLINE_CUSTOM_COLOURS_THEME) {
|
|
253
|
+
const next = { ...options };
|
|
254
|
+
delete next.theme;
|
|
255
|
+
onChange(next);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
handleChange('theme', themeName);
|
|
259
|
+
}, items: themes }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Palette preset. Use Custom colours when Fill / Stroke above should control the chart." })] }) }))] }));
|
|
184
260
|
};
|
|
185
261
|
const SparklineAxisOptions = ({ options, onChange, }) => {
|
|
186
262
|
const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
@@ -21,6 +21,14 @@ const StyledColumnWizardIconSection_1 = require("./StyledColumnWizardIconSection
|
|
|
21
21
|
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
22
22
|
const StyledColumnBadgeSection_1 = require("./StyledColumnBadgeSection");
|
|
23
23
|
const Flex_1 = require("../../../components/Flex");
|
|
24
|
+
const StyledColumnGradientPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview");
|
|
25
|
+
const StyledColumnPercentBarPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview");
|
|
26
|
+
const StyledColumnBadgePreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview");
|
|
27
|
+
const StyledColumnRatingPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview");
|
|
28
|
+
const StyledColumnIconPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnIconPreview");
|
|
29
|
+
const StyledColumnBulletPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview");
|
|
30
|
+
const StyledColumnRangeBarPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview");
|
|
31
|
+
const StyledColumnSparklinePreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview");
|
|
24
32
|
/**
|
|
25
33
|
* Mirrors the migration default in `VersionUpgrade23.patchStyledColumnName` and
|
|
26
34
|
* the auto-fill logic in `StyledColumnWizardTypeSection` so users opening the
|
|
@@ -144,7 +152,7 @@ const StyledColumnWizard = (props) => {
|
|
|
144
152
|
}
|
|
145
153
|
if (styledColumn.GradientStyle) {
|
|
146
154
|
specificSteps.push({
|
|
147
|
-
details: 'Set
|
|
155
|
+
details: 'Set the Style for the Gradient',
|
|
148
156
|
renderSummary: StyledColumnWizardGradientSection_1.renderStyledColumnGradientStyleSummary,
|
|
149
157
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnWizardGradientSection_1.StyledColumnWizardGradientSection, { onChange: setStyledColumn }) })),
|
|
150
158
|
title: 'Style',
|
|
@@ -155,7 +163,7 @@ const StyledColumnWizard = (props) => {
|
|
|
155
163
|
specificSteps.push({
|
|
156
164
|
title: 'Ranges',
|
|
157
165
|
details: 'Create Cell Ranges',
|
|
158
|
-
renderSummary:
|
|
166
|
+
renderSummary: StyledColumnWizardBulletSection_1.renderStyledColumnBulletRangesSummary,
|
|
159
167
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnWizardBulletSection_1.StyledColumnWizardBulletSection, { variant: "ranges", onChange: setStyledColumn }) })),
|
|
160
168
|
isValid: () => {
|
|
161
169
|
const bs = styledColumn.BulletChartStyle;
|
|
@@ -168,7 +176,7 @@ const StyledColumnWizard = (props) => {
|
|
|
168
176
|
specificSteps.push({
|
|
169
177
|
title: 'Style',
|
|
170
178
|
details: 'Target, bar appearance, cell text, tooltip, background and font',
|
|
171
|
-
renderSummary:
|
|
179
|
+
renderSummary: StyledColumnWizardBulletSection_1.renderStyledColumnBulletStyleSummary,
|
|
172
180
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnWizardBulletSection_1.StyledColumnWizardBulletSection, { variant: "style", onChange: setStyledColumn }) })),
|
|
173
181
|
isValid: () => true,
|
|
174
182
|
});
|
|
@@ -178,7 +186,7 @@ const StyledColumnWizard = (props) => {
|
|
|
178
186
|
title: 'Style',
|
|
179
187
|
details: 'Configure the Icon, Text and Cell styles',
|
|
180
188
|
isValid: () => (0, StyledColumnWizardRatingSection_1.isValidRatingStyle)(styledColumn),
|
|
181
|
-
renderSummary:
|
|
189
|
+
renderSummary: StyledColumnWizardRatingSection_1.renderStyledColumnRatingSummary,
|
|
182
190
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnWizardRatingSection_1.StyledColumnWizardRatingSection, { onChange: setStyledColumn }) })),
|
|
183
191
|
});
|
|
184
192
|
}
|
|
@@ -187,14 +195,14 @@ const StyledColumnWizard = (props) => {
|
|
|
187
195
|
title: 'Style',
|
|
188
196
|
details: 'Set Bounds and optional Ranges',
|
|
189
197
|
isValid: () => (0, StyledColumnWizardRangeBarSection_1.isValidRangeBarBounds)(styledColumn),
|
|
190
|
-
renderSummary:
|
|
198
|
+
renderSummary: StyledColumnWizardRangeBarSection_1.renderStyledColumnRangeBarRangeStepSummary,
|
|
191
199
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnWizardRangeBarSection_1.StyledColumnWizardRangeBarSection, { variant: "range", onChange: setStyledColumn }) })),
|
|
192
200
|
});
|
|
193
201
|
specificSteps.push({
|
|
194
202
|
title: 'Display',
|
|
195
|
-
details: '
|
|
203
|
+
details: 'Configure the Display for the Range Bar',
|
|
196
204
|
isValid: () => true,
|
|
197
|
-
renderSummary:
|
|
205
|
+
renderSummary: StyledColumnWizardRangeBarSection_1.renderStyledColumnRangeBarDisplayStepSummary,
|
|
198
206
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnWizardRangeBarSection_1.StyledColumnWizardRangeBarSection, { variant: "appearance", onChange: setStyledColumn }) })),
|
|
199
207
|
});
|
|
200
208
|
}
|
|
@@ -203,14 +211,14 @@ const StyledColumnWizard = (props) => {
|
|
|
203
211
|
title: 'Mappings',
|
|
204
212
|
details: 'Select a preset or define key → icon mappings',
|
|
205
213
|
isValid: () => (0, StyledColumnWizardIconSection_1.isValidIconStyleMappings)(styledColumn),
|
|
206
|
-
renderSummary:
|
|
214
|
+
renderSummary: StyledColumnWizardIconSection_1.renderStyledColumnIconMappingsSummary,
|
|
207
215
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnWizardIconSection_1.StyledColumnWizardIconSection, { variant: "mappings", onChange: setStyledColumn }) })),
|
|
208
216
|
});
|
|
209
217
|
specificSteps.push({
|
|
210
218
|
title: 'Style',
|
|
211
219
|
details: 'Set Styles for sizing, cell text, tooltips, font and cell',
|
|
212
220
|
isValid: () => true,
|
|
213
|
-
renderSummary:
|
|
221
|
+
renderSummary: StyledColumnWizardIconSection_1.renderStyledColumnIconStyleSummary,
|
|
214
222
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnWizardIconSection_1.StyledColumnWizardIconSection, { variant: "style", onChange: setStyledColumn }) })),
|
|
215
223
|
});
|
|
216
224
|
}
|
|
@@ -228,13 +236,13 @@ const StyledColumnWizard = (props) => {
|
|
|
228
236
|
}
|
|
229
237
|
return true;
|
|
230
238
|
},
|
|
231
|
-
renderSummary:
|
|
239
|
+
renderSummary: StyledColumnBadgeSection_1.renderBadgeSummary,
|
|
232
240
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnBadgeSection_1.StyledColumnBadgeSection, { onChange: setStyledColumn }) })),
|
|
233
241
|
});
|
|
234
242
|
specificSteps.push({
|
|
235
243
|
title: 'Style',
|
|
236
244
|
details: 'Set Cell Density and Cell Style',
|
|
237
|
-
renderSummary:
|
|
245
|
+
renderSummary: StyledColumnBadgeSection_1.renderBadgeStyleSummary,
|
|
238
246
|
render: () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:p-2", children: (0, jsx_runtime_1.jsx)(StyledColumnBadgeSection_1.StyledColumnBadgeStyleSection, { onChange: setStyledColumn }) })),
|
|
239
247
|
});
|
|
240
248
|
}
|
|
@@ -283,7 +291,7 @@ const StyledColumnWizard = (props) => {
|
|
|
283
291
|
title: 'Summary',
|
|
284
292
|
details: 'Review your Styled Column',
|
|
285
293
|
render: () => {
|
|
286
|
-
return ((0, jsx_runtime_1.
|
|
294
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:p-2 twa:flex twa:flex-col twa:gap-3", children: [(0, jsx_runtime_1.jsx)(OnePageAdaptableWizard_1.OnePageWizardSummary, {}), styledColumn.GradientStyle && ((0, jsx_runtime_1.jsx)(StyledColumnGradientPreview_1.StyledColumnGradientPreviewCard, { data: styledColumn })), styledColumn.PercentBarStyle && ((0, jsx_runtime_1.jsx)(StyledColumnPercentBarPreview_1.StyledColumnPercentBarPreviewCard, { data: styledColumn })), styledColumn.BadgeStyle && ((0, jsx_runtime_1.jsx)(StyledColumnBadgePreview_1.StyledColumnBadgePreviewCard, { data: styledColumn })), styledColumn.RatingStyle && ((0, jsx_runtime_1.jsx)(StyledColumnRatingPreview_1.StyledColumnRatingPreviewCard, { data: styledColumn })), styledColumn.IconStyle && ((0, jsx_runtime_1.jsx)(StyledColumnIconPreview_1.StyledColumnIconPreviewCard, { data: styledColumn })), styledColumn.BulletChartStyle && ((0, jsx_runtime_1.jsx)(StyledColumnBulletPreview_1.StyledColumnBulletPreviewCard, { data: styledColumn })), styledColumn.RangeBarStyle && ((0, jsx_runtime_1.jsx)(StyledColumnRangeBarPreview_1.StyledColumnRangeBarPreviewCard, { data: styledColumn })), styledColumn.SparklineStyle && ((0, jsx_runtime_1.jsx)(StyledColumnSparklinePreview_1.StyledColumnSparklinePreviewCard, { data: styledColumn }))] }));
|
|
287
295
|
},
|
|
288
296
|
},
|
|
289
297
|
] }));
|
|
@@ -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. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyledColumnWizardBulletSection = exports.renderStyledColumnBulletSummary = exports.renderStyledColumnBulletStyleSummary = exports.renderStyledColumnBulletRangesSummary = void 0;
|
|
3
|
+
exports.StyledColumnWizardBulletSection = exports.renderStyledColumnBulletSummary = exports.renderStyledColumnBulletStyleSummary = exports.StyledColumnBulletRangesView = exports.renderStyledColumnBulletRangesSummary = exports.getStyledColumnBulletStyleViewValues = exports.getStyledColumnBulletRangesViewValues = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
@@ -17,7 +17,8 @@ const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/Dr
|
|
|
17
17
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
|
|
18
18
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
|
|
19
19
|
const Flex_1 = require("../../../components/Flex");
|
|
20
|
-
const
|
|
20
|
+
const BulletRangesSummaryPreview_1 = require("./StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview");
|
|
21
|
+
const StyledColumnBulletPreview_1 = require("./StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview");
|
|
21
22
|
const NewSelect_1 = require("../../../components/NewSelect");
|
|
22
23
|
const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
|
|
23
24
|
const Card_1 = require("../../../components/Card");
|
|
@@ -30,38 +31,135 @@ const getTargetSummary = (target) => {
|
|
|
30
31
|
return null;
|
|
31
32
|
}
|
|
32
33
|
if (Array.isArray(target)) {
|
|
33
|
-
return
|
|
34
|
+
return target
|
|
35
|
+
.map((entry) => formatSingleBulletTargetSummary(entry))
|
|
36
|
+
.filter(Boolean)
|
|
37
|
+
.join(', ');
|
|
34
38
|
}
|
|
39
|
+
return formatSingleBulletTargetSummary(target);
|
|
40
|
+
};
|
|
41
|
+
const formatSingleBulletTargetSummary = (target) => {
|
|
35
42
|
if (typeof target === 'number') {
|
|
36
43
|
return String(target);
|
|
37
44
|
}
|
|
38
45
|
if (typeof target === 'string') {
|
|
39
46
|
return target;
|
|
40
47
|
}
|
|
41
|
-
// object form
|
|
42
48
|
const t = target;
|
|
43
49
|
return t.Label ?? String(t.Value);
|
|
44
50
|
};
|
|
51
|
+
const formatBulletOriginLabel = (origin) => {
|
|
52
|
+
if (origin == undefined) {
|
|
53
|
+
return 'Auto';
|
|
54
|
+
}
|
|
55
|
+
if (typeof origin === 'number') {
|
|
56
|
+
return `Custom (${origin})`;
|
|
57
|
+
}
|
|
58
|
+
return origin;
|
|
59
|
+
};
|
|
60
|
+
const formatBulletCellTextSummary = (cellText) => cellText
|
|
61
|
+
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
62
|
+
.join(' + ') ?? '';
|
|
63
|
+
const formatBulletToolTipSummary = (toolTipText) => toolTipText
|
|
64
|
+
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
65
|
+
.join(' + ') ?? '';
|
|
66
|
+
const getStyledColumnBulletRangesViewValues = (data) => {
|
|
67
|
+
const bullet = data.BulletChartStyle;
|
|
68
|
+
if (!bullet) {
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
const bandCount = bullet.CellRanges?.length ?? 0;
|
|
72
|
+
const items = [`Bands: ${bandCount}`];
|
|
73
|
+
if (bullet.RangeValueType != null) {
|
|
74
|
+
items.push(`Range Value Type: ${bullet.RangeValueType}`);
|
|
75
|
+
}
|
|
76
|
+
return items;
|
|
77
|
+
};
|
|
78
|
+
exports.getStyledColumnBulletRangesViewValues = getStyledColumnBulletRangesViewValues;
|
|
79
|
+
const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
|
|
80
|
+
const items = [];
|
|
81
|
+
const targetSummary = getTargetSummary(bullet.Target);
|
|
82
|
+
if (targetSummary) {
|
|
83
|
+
items.push(`Target: ${targetSummary}`);
|
|
84
|
+
}
|
|
85
|
+
const marker = bullet.TargetMarker;
|
|
86
|
+
if (marker?.Shape && marker.Shape !== 'Line') {
|
|
87
|
+
items.push(`Target Marker Shape: ${marker.Shape}`);
|
|
88
|
+
}
|
|
89
|
+
if (marker?.Color) {
|
|
90
|
+
items.push(`Target Marker Colour: ${marker.Color}`);
|
|
91
|
+
}
|
|
92
|
+
if (marker?.Size != null) {
|
|
93
|
+
items.push(`Target Marker Size: ${marker.Size}px`);
|
|
94
|
+
}
|
|
95
|
+
if (bullet.Orientation === 'Vertical') {
|
|
96
|
+
items.push('Orientation: Vertical');
|
|
97
|
+
}
|
|
98
|
+
if (bullet.BarColor) {
|
|
99
|
+
items.push(`Bar Colour: ${bullet.BarColor}`);
|
|
100
|
+
}
|
|
101
|
+
if (bullet.BarHeight != null) {
|
|
102
|
+
items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${bullet.BarHeight}px`);
|
|
103
|
+
}
|
|
104
|
+
items.push(`Origin: ${formatBulletOriginLabel(bullet.Origin)}`);
|
|
105
|
+
if (bullet.BackColor) {
|
|
106
|
+
items.push(`Back Colour: ${bullet.BackColor}`);
|
|
107
|
+
}
|
|
108
|
+
if (bullet.CellText?.length) {
|
|
109
|
+
items.push(`Cell Text: ${formatBulletCellTextSummary(bullet.CellText)}`);
|
|
110
|
+
items.push(`Cell Text Position: ${bullet.CellTextPosition ?? 'Below'}`);
|
|
111
|
+
}
|
|
112
|
+
else if (options.includeEmptyCellText) {
|
|
113
|
+
items.push('Cell Text: None');
|
|
114
|
+
}
|
|
115
|
+
(0, StyledColumnSliceStyleEditors_1.getCellFontStyleSummaryItems)(bullet.Font).forEach(({ label, value }) => {
|
|
116
|
+
items.push(`${label}: ${value}`);
|
|
117
|
+
});
|
|
118
|
+
if (bullet.ToolTipText?.length) {
|
|
119
|
+
items.push(`Tooltip: ${formatBulletToolTipSummary(bullet.ToolTipText)}`);
|
|
120
|
+
}
|
|
121
|
+
else if (options.includeEmptyTooltip) {
|
|
122
|
+
items.push('Tooltip: No Tooltip');
|
|
123
|
+
}
|
|
124
|
+
return items;
|
|
125
|
+
};
|
|
126
|
+
const getStyledColumnBulletStyleViewValues = (data) => {
|
|
127
|
+
const bullet = data.BulletChartStyle;
|
|
128
|
+
if (!bullet) {
|
|
129
|
+
return [];
|
|
130
|
+
}
|
|
131
|
+
return buildStyledColumnBulletStyleSummaryStrings(bullet, {
|
|
132
|
+
includeEmptyCellText: false,
|
|
133
|
+
includeEmptyTooltip: false,
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
exports.getStyledColumnBulletStyleViewValues = getStyledColumnBulletStyleViewValues;
|
|
45
137
|
/** Wizard / list-view summary for the Ranges step (qualitative bands). */
|
|
46
138
|
const renderStyledColumnBulletRangesSummary = (data) => {
|
|
47
139
|
const bullet = data.BulletChartStyle;
|
|
48
140
|
if (!bullet) {
|
|
49
|
-
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "
|
|
141
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No bands defined" });
|
|
50
142
|
}
|
|
51
|
-
const
|
|
52
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsx)(
|
|
143
|
+
const tagItems = (0, exports.getStyledColumnBulletRangesViewValues)(data);
|
|
144
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: tagItems.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }), (0, jsx_runtime_1.jsx)(BulletRangesSummaryPreview_1.BulletRangesSummaryPreview, { bulletStyle: bullet })] }));
|
|
53
145
|
};
|
|
54
146
|
exports.renderStyledColumnBulletRangesSummary = renderStyledColumnBulletRangesSummary;
|
|
147
|
+
const StyledColumnBulletRangesView = ({ data }) => (0, exports.renderStyledColumnBulletRangesSummary)(data);
|
|
148
|
+
exports.StyledColumnBulletRangesView = StyledColumnBulletRangesView;
|
|
55
149
|
/** Wizard / list-view summary for the Style step (target, bar, text, font). */
|
|
56
150
|
const renderStyledColumnBulletStyleSummary = (data) => {
|
|
57
151
|
const bullet = data.BulletChartStyle;
|
|
58
152
|
if (!bullet) {
|
|
59
153
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
|
|
60
154
|
}
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
155
|
+
const items = buildStyledColumnBulletStyleSummaryStrings(bullet, {
|
|
156
|
+
includeEmptyCellText: true,
|
|
157
|
+
includeEmptyTooltip: true,
|
|
158
|
+
});
|
|
159
|
+
if (!items.length) {
|
|
160
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Style Defined" });
|
|
161
|
+
}
|
|
162
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: items.map((item) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: item }, item))) }));
|
|
65
163
|
};
|
|
66
164
|
exports.renderStyledColumnBulletStyleSummary = renderStyledColumnBulletStyleSummary;
|
|
67
165
|
/** Full combined summary (ranges + style); kept for callers that expect one block. */
|
|
@@ -70,11 +168,7 @@ const renderStyledColumnBulletSummary = (data) => {
|
|
|
70
168
|
if (!bullet) {
|
|
71
169
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
|
|
72
170
|
}
|
|
73
|
-
|
|
74
|
-
const targetSummary = getTargetSummary(bullet.Target);
|
|
75
|
-
const isVertical = bullet.Orientation === 'Vertical';
|
|
76
|
-
const fontTags = (0, StyledColumnSliceStyleEditors_1.renderFontStyleSummaryTags)(bullet.Font);
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [(0, jsx_runtime_1.jsx)(StyledColumnChartListPreviews_1.StyledColumnBulletChartListPreview, { bullet: bullet }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: [bandCount, " ", bandCount === 1 ? 'band' : 'bands'] }), targetSummary && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 target: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: targetSummary })] })), isVertical && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "vertical" })] })), fontTags && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1", children: ["\u00B7 Font: ", fontTags] }))] })] }));
|
|
171
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:items-start", children: [(0, exports.renderStyledColumnBulletRangesSummary)(data), (0, exports.renderStyledColumnBulletStyleSummary)(data)] }));
|
|
78
172
|
};
|
|
79
173
|
exports.renderStyledColumnBulletSummary = renderStyledColumnBulletSummary;
|
|
80
174
|
/**
|
|
@@ -115,20 +209,25 @@ const MARKER_SHAPES = [
|
|
|
115
209
|
const StyledColumnWizardBulletSection = (props) => {
|
|
116
210
|
const variant = props.variant ?? 'style';
|
|
117
211
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
118
|
-
const
|
|
212
|
+
const column = React.useMemo(() => {
|
|
119
213
|
const columnId = data.ColumnId;
|
|
120
214
|
if (!columnId) {
|
|
215
|
+
return undefined;
|
|
216
|
+
}
|
|
217
|
+
return api.columnApi.getColumnWithColumnId(columnId);
|
|
218
|
+
}, [data.ColumnId, api]);
|
|
219
|
+
const minMaxRangeValues = React.useMemo(() => {
|
|
220
|
+
if (!column) {
|
|
121
221
|
return null;
|
|
122
222
|
}
|
|
123
|
-
const column = api.columnApi.getColumnWithColumnId(columnId);
|
|
124
223
|
return {
|
|
125
224
|
min: api.styledColumnApi.internalApi.getMinValueForNumericColumn(column),
|
|
126
225
|
max: api.styledColumnApi.internalApi.getMaxValueForNumericColumn(column),
|
|
127
226
|
};
|
|
128
|
-
}, [
|
|
227
|
+
}, [column, api]);
|
|
129
228
|
const scope = { ColumnIds: [data.ColumnId] };
|
|
130
229
|
const bullet = data.BulletChartStyle ?? {};
|
|
131
|
-
const disabled = !data.ColumnId;
|
|
230
|
+
const disabled = !data.ColumnId || !column;
|
|
132
231
|
// -------------------------------------------------------------------------
|
|
133
232
|
// Updaters
|
|
134
233
|
// -------------------------------------------------------------------------
|
|
@@ -238,8 +337,10 @@ const StyledColumnWizardBulletSection = (props) => {
|
|
|
238
337
|
// -------------------------------------------------------------------------
|
|
239
338
|
// Render
|
|
240
339
|
// -------------------------------------------------------------------------
|
|
241
|
-
if (!data.ColumnId) {
|
|
242
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children:
|
|
340
|
+
if (!data.ColumnId || !column) {
|
|
341
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children: !data.ColumnId
|
|
342
|
+
? 'You need to select a column before styling.'
|
|
343
|
+
: `Column "${data.ColumnId}" was not found in the grid.` }) }));
|
|
243
344
|
}
|
|
244
345
|
// ----- Ranges-only variant (wizard step before Style) ---------------------
|
|
245
346
|
if (variant === 'ranges') {
|
|
@@ -304,6 +405,6 @@ const StyledColumnWizardBulletSection = (props) => {
|
|
|
304
405
|
delete cleaned.Font;
|
|
305
406
|
props.onChange({ ...data, BulletChartStyle: cleaned });
|
|
306
407
|
}
|
|
307
|
-
} }) })] })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether to display a tooltip" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: bullet.ToolTipText?.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: bullet.ToolTipText?.includes('PercentageValue'), onChange: (checked) => toggleToolTipText('PercentageValue', checked), children: "Percent Value" })] }) }) })] })] }));
|
|
408
|
+
} }) })] })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Tooltip" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether to display a tooltip" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: bullet.ToolTipText?.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: bullet.ToolTipText?.includes('PercentageValue'), onChange: (checked) => toggleToolTipText('PercentageValue', checked), children: "Percent Value" })] }) }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnBulletPreview_1.StyledColumnBulletPreviewCard, { data: data })] }));
|
|
308
409
|
};
|
|
309
410
|
exports.StyledColumnWizardBulletSection = StyledColumnWizardBulletSection;
|
|
@@ -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
|
*/
|