@adaptabletools/adaptable-cjs 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 +34 -0
- package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
- package/src/AdaptableState/Common/AggregationColumns.js +30 -3
- 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 +5 -11
- 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 +31 -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/CalculatedColumnModule.js +3 -1
- 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/CalculatedColumnExpressionService.d.ts +1 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +120 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
- package/src/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 +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 +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/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 +1 -2
- 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 +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 +22 -21
- 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/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 +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/View/renderWithAdaptableContext.js +1 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +36 -41
- 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 +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/AdaptableFormComponent/AdaptableFormComponent.js +10 -5
- package/src/components/Combobox/VirtualizedList.js +5 -5
- package/src/components/Combobox/comboboxUtils.d.ts +4 -1
- package/src/components/Combobox/comboboxUtils.js +2 -0
- package/src/components/Combobox/index.d.ts +1 -0
- package/src/components/Combobox/index.js +36 -16
- package/src/components/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 +1 -5
- 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.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
- package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -5
- 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/AdaptableComputedCSSVarsContext.d.ts +0 -12
- package/src/View/AdaptableComputedCSSVarsContext.js +0 -36
- 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
- package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
- package/src/components/Select/CSSNumericVariableWatch.js +0 -51
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.renderCellStyleSummaryTags = exports.renderFontStyleSummaryTags = exports.StyledColumnCellStyleEditor = exports.StyledColumnFontStyleEditor = void 0;
|
|
3
|
+
exports.renderCellStyleSummaryTags = exports.getCellBoxStyleSummaryItems = exports.renderFontStyleSummaryTags = exports.getCellFontStyleSummaryItems = exports.StyledColumnCellStyleEditor = exports.StyledColumnFontStyleEditor = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
7
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
7
8
|
const ColorPicker_1 = require("../../../components/ColorPicker");
|
|
8
9
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
@@ -74,9 +75,11 @@ exports.StyledColumnFontStyleEditor = StyledColumnFontStyleEditor;
|
|
|
74
75
|
*/
|
|
75
76
|
const StyledColumnCellStyleEditor = (props) => {
|
|
76
77
|
const cell = props.value ?? {};
|
|
78
|
+
const cellRef = React.useRef(cell);
|
|
79
|
+
cellRef.current = cell;
|
|
77
80
|
const { disabled } = props;
|
|
78
81
|
const update = (patch) => {
|
|
79
|
-
const next = { ...
|
|
82
|
+
const next = { ...cellRef.current, ...patch };
|
|
80
83
|
Object.keys(next).forEach((k) => {
|
|
81
84
|
const v = next[k];
|
|
82
85
|
if (v === undefined || v === null || v === '') {
|
|
@@ -94,53 +97,73 @@ const StyledColumnCellStyleEditor = (props) => {
|
|
|
94
97
|
};
|
|
95
98
|
exports.StyledColumnCellStyleEditor = StyledColumnCellStyleEditor;
|
|
96
99
|
/**
|
|
97
|
-
*
|
|
100
|
+
* Descriptive font properties for summary panels (`Label: value` strings).
|
|
98
101
|
*/
|
|
99
|
-
const
|
|
100
|
-
if (!font)
|
|
101
|
-
return
|
|
102
|
-
|
|
102
|
+
const getCellFontStyleSummaryItems = (font) => {
|
|
103
|
+
if (!font) {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
const items = [];
|
|
103
107
|
if (font.ForeColor) {
|
|
104
|
-
|
|
108
|
+
items.push({ label: 'Fore Colour', value: font.ForeColor });
|
|
105
109
|
}
|
|
106
110
|
if (font.FontWeight === 'Bold') {
|
|
107
|
-
|
|
111
|
+
items.push({ label: 'Font Weight', value: 'Bold' });
|
|
108
112
|
}
|
|
109
113
|
if (font.FontStyle === 'Italic') {
|
|
110
|
-
|
|
114
|
+
items.push({ label: 'Font Style', value: 'Italic' });
|
|
111
115
|
}
|
|
112
116
|
if (font.TextDecoration && font.TextDecoration !== 'None') {
|
|
113
|
-
|
|
117
|
+
items.push({ label: 'Text Decoration', value: font.TextDecoration });
|
|
114
118
|
}
|
|
115
119
|
if (font.FontSize) {
|
|
116
|
-
|
|
120
|
+
items.push({ label: 'Font Size', value: font.FontSize });
|
|
117
121
|
}
|
|
118
122
|
if (font.Alignment && font.Alignment !== 'Default') {
|
|
119
|
-
|
|
123
|
+
items.push({ label: 'Alignment', value: font.Alignment });
|
|
120
124
|
}
|
|
121
|
-
|
|
125
|
+
return items;
|
|
126
|
+
};
|
|
127
|
+
exports.getCellFontStyleSummaryItems = getCellFontStyleSummaryItems;
|
|
128
|
+
/**
|
|
129
|
+
* Compact summary tags for the Font slice; used by wizard summary panels.
|
|
130
|
+
*/
|
|
131
|
+
const renderFontStyleSummaryTags = (font) => {
|
|
132
|
+
const items = (0, exports.getCellFontStyleSummaryItems)(font);
|
|
133
|
+
if (!items.length) {
|
|
122
134
|
return null;
|
|
123
|
-
|
|
135
|
+
}
|
|
136
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:flex-wrap", children: items.map(({ label, value }) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: `${label}: ${value}` }, label))) }));
|
|
124
137
|
};
|
|
125
138
|
exports.renderFontStyleSummaryTags = renderFontStyleSummaryTags;
|
|
126
139
|
/**
|
|
127
|
-
*
|
|
140
|
+
* Descriptive cell box properties for summary panels (`Label: value` strings).
|
|
128
141
|
*/
|
|
129
|
-
const
|
|
130
|
-
if (!cell)
|
|
131
|
-
return
|
|
132
|
-
|
|
142
|
+
const getCellBoxStyleSummaryItems = (cell) => {
|
|
143
|
+
if (!cell) {
|
|
144
|
+
return [];
|
|
145
|
+
}
|
|
146
|
+
const items = [];
|
|
133
147
|
if (cell.BackColor) {
|
|
134
|
-
|
|
148
|
+
items.push({ label: 'Back Colour', value: cell.BackColor });
|
|
135
149
|
}
|
|
136
150
|
if (cell.BorderColor) {
|
|
137
|
-
|
|
151
|
+
items.push({ label: 'Border Colour', value: cell.BorderColor });
|
|
138
152
|
}
|
|
139
153
|
if (cell.BorderRadius != null) {
|
|
140
|
-
|
|
154
|
+
items.push({ label: 'Border Radius', value: `${cell.BorderRadius}px` });
|
|
141
155
|
}
|
|
142
|
-
|
|
156
|
+
return items;
|
|
157
|
+
};
|
|
158
|
+
exports.getCellBoxStyleSummaryItems = getCellBoxStyleSummaryItems;
|
|
159
|
+
/**
|
|
160
|
+
* Compact summary tags for the Cell slice; used by wizard summary panels.
|
|
161
|
+
*/
|
|
162
|
+
const renderCellStyleSummaryTags = (cell) => {
|
|
163
|
+
const items = (0, exports.getCellBoxStyleSummaryItems)(cell);
|
|
164
|
+
if (!items.length) {
|
|
143
165
|
return null;
|
|
144
|
-
|
|
166
|
+
}
|
|
167
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:flex-wrap", children: items.map(({ label, value }) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: `${label}: ${value}` }, label))) }));
|
|
145
168
|
};
|
|
146
169
|
exports.renderCellStyleSummaryTags = renderCellStyleSummaryTags;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { StyledColumn } from '../../../types';
|
|
3
|
+
export declare const getStyledColumnSparklineStyleViewValues: (data: StyledColumn) => string[];
|
|
3
4
|
/**
|
|
4
|
-
* Wizard-step summary for the Sparkline Settings step
|
|
5
|
-
* pattern used by Bullet / Badge / Gradient / Percent Bar so the nav row
|
|
6
|
-
* isn't blank when this step is collapsed.
|
|
5
|
+
* Wizard-step summary for the Sparkline Settings step.
|
|
7
6
|
*/
|
|
8
7
|
export declare const renderSparklineSummary: (data: StyledColumn) => React.ReactNode;
|
|
9
8
|
/**
|
|
@@ -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. */
|