@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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledColumnRatingPreviewCard = exports.StyledColumnRatingPreview = exports.RatingPreview = exports.DEFAULT_RATING_ICON = exports.DEFAULT_RATING_GAP = exports.DEFAULT_RATING_SIZE = exports.DEFAULT_RATING_MAX = void 0;
|
|
4
|
+
exports.getRatingCellChromeCss = getRatingCellChromeCss;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const React = tslib_1.__importStar(require("react"));
|
|
8
|
+
const Flex_1 = require("../../../../../components/Flex");
|
|
9
|
+
const Card_1 = require("../../../../../components/Card");
|
|
10
|
+
const Tag_1 = require("../../../../../components/Tag");
|
|
11
|
+
const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
|
|
12
|
+
exports.DEFAULT_RATING_MAX = 5;
|
|
13
|
+
exports.DEFAULT_RATING_SIZE = 14;
|
|
14
|
+
exports.DEFAULT_RATING_GAP = 2;
|
|
15
|
+
exports.DEFAULT_RATING_ICON = 'Star';
|
|
16
|
+
const DEFAULT_FILLED_COLOR = 'var(--ab-color-warn, #f5a623)';
|
|
17
|
+
const DEFAULT_EMPTY_COLOR = 'color-mix(in srgb, currentColor 22%, transparent)';
|
|
18
|
+
const PREVIEW_CELL_CLASS = 'ab-RatingPreviewCell twa:inline-flex twa:items-center twa:min-w-[140px] twa:min-h-[32px] twa:px-2 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
|
|
19
|
+
const ICON_PATHS = {
|
|
20
|
+
Star: 'M12 2 L14.9 8.6 L22 9.3 L16.7 14.1 L18.2 21 L12 17.4 L5.8 21 L7.3 14.1 L2 9.3 L9.1 8.6 Z',
|
|
21
|
+
Heart: 'M12 21 C 12 21 3 14.5 3 8.5 C 3 5.5 5.5 3 8.5 3 C 10.3 3 11.7 4 12 5.2 C 12.3 4 13.7 3 15.5 3 C 18.5 3 21 5.5 21 8.5 C 21 14.5 12 21 12 21 Z',
|
|
22
|
+
Circle: 'M12 4 a8 8 0 1 0 0.0001 0 Z',
|
|
23
|
+
Thumb: 'M2 11 h4 v10 h-4 z M7 11 l4 -8 c.5 -1 2 -1 2 0 l-1 5 h6 c1 0 2 1 1.7 2 l-2 8 c-.3 1 -1 1.6 -2 1.6 H7 z',
|
|
24
|
+
};
|
|
25
|
+
const clamp = (n, lo, hi) => Math.max(lo, Math.min(hi, n));
|
|
26
|
+
function getRatingCellChromeCss(cell) {
|
|
27
|
+
if (!cell || !(0, StyleHelper_1.hasCellBoxStyle)(cell)) {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
return (0, StyleHelper_1.convertAdaptableStyleToCSS)(cell);
|
|
31
|
+
}
|
|
32
|
+
const RatingPreview = ({ rating, value, }) => {
|
|
33
|
+
const instanceId = React.useId();
|
|
34
|
+
const max = rating.Max ?? exports.DEFAULT_RATING_MAX;
|
|
35
|
+
const size = rating.Size ?? exports.DEFAULT_RATING_SIZE;
|
|
36
|
+
const gap = rating.Gap ?? exports.DEFAULT_RATING_GAP;
|
|
37
|
+
const icon = rating.Icon ?? exports.DEFAULT_RATING_ICON;
|
|
38
|
+
const filledColor = rating.FilledColor ?? DEFAULT_FILLED_COLOR;
|
|
39
|
+
const emptyColor = rating.EmptyColor ?? DEFAULT_EMPTY_COLOR;
|
|
40
|
+
const allowHalf = rating.AllowHalf ?? true;
|
|
41
|
+
const previewValue = value ?? Math.max(1, Math.min(max, max * 0.7));
|
|
42
|
+
const effective = allowHalf ? previewValue : Math.round(previewValue);
|
|
43
|
+
const d = ICON_PATHS[icon];
|
|
44
|
+
return ((0, jsx_runtime_1.jsxs)("span", { style: {
|
|
45
|
+
display: 'inline-flex',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
gap: `${gap}px`,
|
|
48
|
+
lineHeight: 1,
|
|
49
|
+
}, "aria-hidden": "true", children: [Array.from({ length: max }).map((_, i) => {
|
|
50
|
+
const fill = clamp(effective - i, 0, 1);
|
|
51
|
+
const clipId = `ab-rating-preview-clip-${instanceId}-${i}`;
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("path", { d: d, fill: emptyColor }), fill > 0 && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: clipId, children: (0, jsx_runtime_1.jsx)("rect", { x: 0, y: 0, width: 24 * fill, height: 24 }) }) }), (0, jsx_runtime_1.jsx)("path", { d: d, fill: filledColor, clipPath: `url(#${clipId})` })] }))] }, i));
|
|
53
|
+
}), rating.ShowValue && ((0, jsx_runtime_1.jsx)("span", { style: { marginLeft: 6, fontVariantNumeric: 'tabular-nums' }, children: previewValue }))] }));
|
|
54
|
+
};
|
|
55
|
+
exports.RatingPreview = RatingPreview;
|
|
56
|
+
const StyledColumnRatingPreview = ({ data }) => {
|
|
57
|
+
const rating = data.RatingStyle;
|
|
58
|
+
if (!rating) {
|
|
59
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Rating Style" });
|
|
60
|
+
}
|
|
61
|
+
const previewCellChrome = getRatingCellChromeCss(rating.Cell);
|
|
62
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: PREVIEW_CELL_CLASS, style: previewCellChrome, children: (0, jsx_runtime_1.jsx)(exports.RatingPreview, { rating: rating }) }));
|
|
63
|
+
};
|
|
64
|
+
exports.StyledColumnRatingPreview = StyledColumnRatingPreview;
|
|
65
|
+
const StyledColumnRatingPreviewCard = ({ data }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Preview" }) }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(exports.StyledColumnRatingPreview, { data: data }) })] }));
|
|
66
|
+
exports.StyledColumnRatingPreviewCard = StyledColumnRatingPreviewCard;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CellBoxStyle } from '../../../../../AdaptableState/Common/AdaptableStyle';
|
|
3
|
+
import { StyledColumn } from '../../../../../AdaptableState/StyledColumnState';
|
|
4
|
+
export declare function getSparklineCellChromeCss(cell: CellBoxStyle | undefined): React.CSSProperties;
|
|
5
|
+
export declare const StyledColumnSparklinePreview: React.FunctionComponent<React.PropsWithChildren<{
|
|
6
|
+
data: StyledColumn;
|
|
7
|
+
}>>;
|
|
8
|
+
export declare const StyledColumnSparklinePreviewCard: React.FunctionComponent<React.PropsWithChildren<{
|
|
9
|
+
data: StyledColumn;
|
|
10
|
+
}>>;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StyledColumnSparklinePreviewCard = exports.StyledColumnSparklinePreview = void 0;
|
|
4
|
+
exports.getSparklineCellChromeCss = getSparklineCellChromeCss;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
+
const React = tslib_1.__importStar(require("react"));
|
|
8
|
+
const ag_charts_enterprise_1 = require("ag-charts-enterprise");
|
|
9
|
+
const AdaptableHelper_1 = require("../../../../../Utilities/Helpers/AdaptableHelper");
|
|
10
|
+
const SparklineOptionsHelper_1 = require("../../../../../Utilities/Helpers/SparklineOptionsHelper");
|
|
11
|
+
const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
|
|
12
|
+
const Flex_1 = require("../../../../../components/Flex");
|
|
13
|
+
const Card_1 = require("../../../../../components/Card");
|
|
14
|
+
const Tag_1 = require("../../../../../components/Tag");
|
|
15
|
+
const AdaptableContext_1 = require("../../../../AdaptableContext");
|
|
16
|
+
const FALLBACK_NUMBER_ARRAY = [12, 18, 9, 22, 15, 28, 19, 24, 17, 21];
|
|
17
|
+
const PREVIEW_HEIGHT = 36;
|
|
18
|
+
const PREVIEW_CELL_CLASS = 'ab-SparklinePreviewCell twa:block twa:min-w-[200px] twa:min-h-[36px] twa:px-2 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
|
|
19
|
+
function getSparklineCellChromeCss(cell) {
|
|
20
|
+
if (!cell || !(0, StyleHelper_1.hasCellBoxStyle)(cell)) {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
return (0, StyleHelper_1.convertAdaptableStyleToCSS)(cell);
|
|
24
|
+
}
|
|
25
|
+
const resolveSparklinePreviewData = (columnId, getColumnWithColumnId, getRowNodeForIndex) => {
|
|
26
|
+
if (!columnId) {
|
|
27
|
+
return FALLBACK_NUMBER_ARRAY;
|
|
28
|
+
}
|
|
29
|
+
const column = getColumnWithColumnId(columnId);
|
|
30
|
+
if (!column) {
|
|
31
|
+
return FALLBACK_NUMBER_ARRAY;
|
|
32
|
+
}
|
|
33
|
+
for (let row = 0; row < 20; row++) {
|
|
34
|
+
const rowNode = getRowNodeForIndex(row);
|
|
35
|
+
const cellData = rowNode?.data?.[column.field];
|
|
36
|
+
if (Array.isArray(cellData) && cellData.length > 0) {
|
|
37
|
+
return cellData;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return FALLBACK_NUMBER_ARRAY;
|
|
41
|
+
};
|
|
42
|
+
const buildSparklinePreviewOptions = (sparklineStyle, container, data, width, height) => {
|
|
43
|
+
const persisted = sparklineStyle.options ?? { type: 'line' };
|
|
44
|
+
const sanitized = AdaptableHelper_1.AdaptableHelper.removeAdaptableObjectPrimitives({
|
|
45
|
+
...persisted,
|
|
46
|
+
});
|
|
47
|
+
const options = (0, SparklineOptionsHelper_1.resolveSparklineOptionsForRender)({
|
|
48
|
+
...sanitized,
|
|
49
|
+
type: sanitized.type ?? 'line',
|
|
50
|
+
container,
|
|
51
|
+
width,
|
|
52
|
+
height,
|
|
53
|
+
data: data,
|
|
54
|
+
});
|
|
55
|
+
// Custom tooltip renderers expect AG Grid row context — use the default tooltip in preview.
|
|
56
|
+
if (options.tooltip?.renderer) {
|
|
57
|
+
const { renderer: _renderer, ...tooltipRest } = options.tooltip;
|
|
58
|
+
options.tooltip = tooltipRest;
|
|
59
|
+
}
|
|
60
|
+
return options;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* AG Grid registers chart modules via `AgChartsEnterpriseModule.setup()` when
|
|
64
|
+
* sparklines are enabled. Standalone `AgCharts.createSparkline` needs the same
|
|
65
|
+
* setup — otherwise the settings-panel preview throws "No modules registered".
|
|
66
|
+
*/
|
|
67
|
+
let agChartsPreviewModulesReady = false;
|
|
68
|
+
const ensureAgChartsEnterpriseModules = () => {
|
|
69
|
+
if (agChartsPreviewModulesReady) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
ag_charts_enterprise_1.AgChartsEnterpriseModule.setup();
|
|
73
|
+
agChartsPreviewModulesReady = true;
|
|
74
|
+
};
|
|
75
|
+
const createSparkline = (options) => {
|
|
76
|
+
ensureAgChartsEnterpriseModules();
|
|
77
|
+
return ag_charts_enterprise_1.AgChartsEnterpriseModule.createSparkline(options);
|
|
78
|
+
};
|
|
79
|
+
const SparklinePreviewCanvas = ({ sparklineStyle, columnId }) => {
|
|
80
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
81
|
+
const containerRef = React.useRef(null);
|
|
82
|
+
const instanceRef = React.useRef(null);
|
|
83
|
+
const [previewError, setPreviewError] = React.useState(null);
|
|
84
|
+
const canDisplay = adaptable.api.styledColumnApi.canDisplaySparklines();
|
|
85
|
+
const optionsKey = JSON.stringify(sparklineStyle.options ?? {});
|
|
86
|
+
React.useEffect(() => {
|
|
87
|
+
return () => {
|
|
88
|
+
instanceRef.current?.destroy();
|
|
89
|
+
instanceRef.current = null;
|
|
90
|
+
};
|
|
91
|
+
}, []);
|
|
92
|
+
React.useEffect(() => {
|
|
93
|
+
const container = containerRef.current;
|
|
94
|
+
if (!container || !canDisplay) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const data = resolveSparklinePreviewData(columnId, (id) => adaptable.api.columnApi.getColumnWithColumnId(id), (index) => adaptable.api.gridApi.getRowNodeForIndex(index));
|
|
98
|
+
const width = Math.max(container.clientWidth, 200);
|
|
99
|
+
const options = buildSparklinePreviewOptions(sparklineStyle, container, data, width, PREVIEW_HEIGHT);
|
|
100
|
+
try {
|
|
101
|
+
if (!instanceRef.current) {
|
|
102
|
+
instanceRef.current = createSparkline(options);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
instanceRef.current.update(options);
|
|
106
|
+
}
|
|
107
|
+
setPreviewError(null);
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
instanceRef.current?.destroy();
|
|
111
|
+
instanceRef.current = null;
|
|
112
|
+
setPreviewError(error instanceof Error ? error.message : 'Unable to render sparkline preview');
|
|
113
|
+
}
|
|
114
|
+
}, [sparklineStyle, columnId, canDisplay, adaptable.api, optionsKey]);
|
|
115
|
+
if (!canDisplay) {
|
|
116
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Sparklines module not registered" });
|
|
117
|
+
}
|
|
118
|
+
if (previewError) {
|
|
119
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: previewError });
|
|
120
|
+
}
|
|
121
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: containerRef, className: "ab-SparklinePreviewCanvas", style: { width: '100%', height: PREVIEW_HEIGHT } }));
|
|
122
|
+
};
|
|
123
|
+
const StyledColumnSparklinePreview = ({ data }) => {
|
|
124
|
+
const sparklineStyle = data.SparklineStyle;
|
|
125
|
+
if (!sparklineStyle) {
|
|
126
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Sparkline Style" });
|
|
127
|
+
}
|
|
128
|
+
const previewCellChrome = getSparklineCellChromeCss(sparklineStyle.Cell);
|
|
129
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: PREVIEW_CELL_CLASS, style: previewCellChrome, children: (0, jsx_runtime_1.jsx)(SparklinePreviewCanvas, { sparklineStyle: sparklineStyle, columnId: data.ColumnId }) }));
|
|
130
|
+
};
|
|
131
|
+
exports.StyledColumnSparklinePreview = StyledColumnSparklinePreview;
|
|
132
|
+
const StyledColumnSparklinePreviewCard = ({ data }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Preview" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[500px]", children: "Sample sparkline using first non-empty cell in Column (or demo data when unavailable)" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(exports.StyledColumnSparklinePreview, { data: data }) })] }));
|
|
133
|
+
exports.StyledColumnSparklinePreviewCard = StyledColumnSparklinePreviewCard;
|
|
@@ -49,19 +49,24 @@ const renderStyledColumnRangesSummary = (data, api) => {
|
|
|
49
49
|
exports.renderStyledColumnRangesSummary = renderStyledColumnRangesSummary;
|
|
50
50
|
const StyledColumnWizardRangesSection = (props) => {
|
|
51
51
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
52
|
-
const
|
|
52
|
+
const column = React.useMemo(() => {
|
|
53
53
|
const columnId = data.ColumnId;
|
|
54
54
|
if (!columnId) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
return api.columnApi.getColumnWithColumnId(columnId);
|
|
58
|
+
}, [data.ColumnId, api]);
|
|
59
|
+
const minMaxRangeValues = React.useMemo(() => {
|
|
60
|
+
if (!column) {
|
|
55
61
|
return null;
|
|
56
62
|
}
|
|
57
|
-
const column = api.columnApi.getColumnWithColumnId(columnId);
|
|
58
63
|
return {
|
|
59
64
|
min: api.styledColumnApi.internalApi.getMinValueForNumericColumn(column),
|
|
60
65
|
max: api.styledColumnApi.internalApi.getMaxValueForNumericColumn(column),
|
|
61
66
|
};
|
|
62
|
-
}, [
|
|
67
|
+
}, [column, api]);
|
|
63
68
|
const scope = { ColumnIds: [data.ColumnId] };
|
|
64
|
-
const disabled = !data.ColumnId;
|
|
69
|
+
const disabled = !data.ColumnId || !column;
|
|
65
70
|
// Gradient updates
|
|
66
71
|
const onUpdateGradientStyleRanges = (ranges) => {
|
|
67
72
|
const gradientStyle = {
|
|
@@ -154,6 +159,8 @@ const StyledColumnWizardRangesSection = (props) => {
|
|
|
154
159
|
}
|
|
155
160
|
props.onChange(newStyledColumn);
|
|
156
161
|
}, [data]);
|
|
157
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [data?.GradientStyle && ((0, jsx_runtime_1.jsx)(RangesComponent_1.RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, showZeroCentredTab: true, showRangeDirection: true, zeroCentred: data.GradientStyle.ZeroCentred, onApplyZeroCentred: onApplyGradientZeroCentred, ranges: data.GradientStyle.CellRanges ?? [], rangeValueType: data.GradientStyle?.RangeValueType, onRangeValueTypeChange: handleRangeValueTypeChange, columnComparison: data?.GradientStyle?.ColumnComparison, updateRanges: onUpdateGradientStyleRanges, updateColumnComparison: onUpdateGradientStyleColumnComparison })), data?.PercentBarStyle && ((0, jsx_runtime_1.jsx)(RangesComponent_1.RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, ranges: data.PercentBarStyle?.CellRanges, rangeValueType: data.PercentBarStyle?.RangeValueType, onRangeValueTypeChange: handleRangeValueTypeChange, columnComparison: data?.PercentBarStyle?.ColumnComparison, updateRanges: onUpdatePercentBarStyleRanges, updateColumnComparison: onUpdatePercentBarStyleColumnComparison })), !data.ColumnId && ((0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children:
|
|
162
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [data?.GradientStyle && ((0, jsx_runtime_1.jsx)(RangesComponent_1.RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, showZeroCentredTab: true, showRangeDirection: true, zeroCentred: data.GradientStyle.ZeroCentred, onApplyZeroCentred: onApplyGradientZeroCentred, ranges: data.GradientStyle.CellRanges ?? [], rangeValueType: data.GradientStyle?.RangeValueType, onRangeValueTypeChange: handleRangeValueTypeChange, columnComparison: data?.GradientStyle?.ColumnComparison, updateRanges: onUpdateGradientStyleRanges, updateColumnComparison: onUpdateGradientStyleColumnComparison })), data?.PercentBarStyle && ((0, jsx_runtime_1.jsx)(RangesComponent_1.RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, ranges: data.PercentBarStyle?.CellRanges, rangeValueType: data.PercentBarStyle?.RangeValueType, onRangeValueTypeChange: handleRangeValueTypeChange, columnComparison: data?.PercentBarStyle?.ColumnComparison, updateRanges: onUpdatePercentBarStyleRanges, updateColumnComparison: onUpdatePercentBarStyleColumnComparison })), (!data.ColumnId || !column) && ((0, jsx_runtime_1.jsx)(ErrorBox_1.default, { className: "twa:mt-2", children: !data.ColumnId
|
|
163
|
+
? 'You need to select a column before defining Ranges.'
|
|
164
|
+
: `Column "${data.ColumnId}" was not found in the grid.` }))] }));
|
|
158
165
|
};
|
|
159
166
|
exports.StyledColumnWizardRangesSection = StyledColumnWizardRangesSection;
|
|
@@ -2,13 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { StyledColumn } from '../../../../AdaptableState/StyledColumnState';
|
|
3
3
|
import { AdaptableApi } from '../../../../types';
|
|
4
4
|
export { renderStyledColumnRangesSummary, StyledColumnWizardRangesSection, } from './StyledColumnWizardRangesSection';
|
|
5
|
+
export declare const getStyledColumnPercentBarStyleViewValues: (data: StyledColumn) => string[];
|
|
5
6
|
/**
|
|
6
7
|
* Compact summary of the *non-range* style properties of a Percent Bar.
|
|
7
|
-
* (Gradient uses `renderStyledColumnGradientStyleSummary`.)
|
|
8
|
-
*
|
|
9
|
-
* Used by:
|
|
10
|
-
* - the wizard's "Style" step `renderSummary`
|
|
11
|
-
* - the Styled Column module's `toView` (read-only summary popup)
|
|
12
8
|
*/
|
|
13
9
|
export declare const renderStyledColumnStyleSummary: (data: StyledColumn, _api?: AdaptableApi) => React.JSX.Element;
|
|
14
10
|
export declare const renderFormatColumnStyleWizardSummary: (data: StyledColumn) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StyledColumnWizardStyleSection = exports.renderFormatColumnStyleWizardSummary = exports.renderStyledColumnStyleSummary = exports.StyledColumnWizardRangesSection = exports.renderStyledColumnRangesSummary = void 0;
|
|
3
|
+
exports.StyledColumnWizardStyleSection = exports.renderFormatColumnStyleWizardSummary = exports.renderStyledColumnStyleSummary = exports.getStyledColumnPercentBarStyleViewValues = exports.StyledColumnWizardRangesSection = exports.renderStyledColumnRangesSummary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
@@ -16,6 +16,7 @@ const Radio_1 = tslib_1.__importStar(require("../../../../components/Radio"));
|
|
|
16
16
|
const Toggle_1 = require("../../../../components/Toggle");
|
|
17
17
|
const StyledColumnSliceStyleEditors_1 = require("../StyledColumnSliceStyleEditors");
|
|
18
18
|
const Card_1 = require("../../../../components/Card");
|
|
19
|
+
const StyledColumnPercentBarPreview_1 = require("./Components/StyledColumnPercentBarPreview");
|
|
19
20
|
// Re-export the Ranges section + summary for legacy import paths.
|
|
20
21
|
var StyledColumnWizardRangesSection_1 = require("./StyledColumnWizardRangesSection");
|
|
21
22
|
Object.defineProperty(exports, "renderStyledColumnRangesSummary", { enumerable: true, get: function () { return StyledColumnWizardRangesSection_1.renderStyledColumnRangesSummary; } });
|
|
@@ -24,47 +25,70 @@ Object.defineProperty(exports, "StyledColumnWizardRangesSection", { enumerable:
|
|
|
24
25
|
// Summary helpers
|
|
25
26
|
// ---------------------------------------------------------------------------
|
|
26
27
|
const formatOriginLabel = (origin) => {
|
|
27
|
-
if (origin == undefined)
|
|
28
|
+
if (origin == undefined) {
|
|
28
29
|
return 'Auto';
|
|
29
|
-
|
|
30
|
+
}
|
|
31
|
+
if (typeof origin === 'number') {
|
|
30
32
|
return `Custom (${origin})`;
|
|
33
|
+
}
|
|
31
34
|
return origin;
|
|
32
35
|
};
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
const formatPercentBarCellTextSummary = (cellText) => cellText
|
|
37
|
+
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
38
|
+
.join(' + ') ?? '';
|
|
39
|
+
const formatPercentBarToolTipSummary = (toolTipText) => toolTipText
|
|
40
|
+
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
41
|
+
.join(' + ') ?? '';
|
|
42
|
+
const buildStyledColumnPercentBarStyleSummaryStrings = (pb, options) => {
|
|
43
|
+
const items = [`Origin: ${formatOriginLabel(pb.Origin)}`];
|
|
44
|
+
if (pb.CellText?.length) {
|
|
45
|
+
items.push(`Cell Text: ${formatPercentBarCellTextSummary(pb.CellText)}`);
|
|
46
|
+
items.push(`Cell Text Position: ${pb.CellTextPosition ?? 'Below'}`);
|
|
47
|
+
if (pb.CellTextAlignment != null) {
|
|
48
|
+
items.push(`Cell Text Alignment: ${pb.CellTextAlignment}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else if (options.includeEmptyCellText) {
|
|
52
|
+
items.push('Cell Text: None');
|
|
53
|
+
}
|
|
54
|
+
if (pb.ToolTipText?.length) {
|
|
55
|
+
items.push(`Tooltip: ${formatPercentBarToolTipSummary(pb.ToolTipText)}`);
|
|
56
|
+
}
|
|
57
|
+
else if (options.includeEmptyTooltip) {
|
|
58
|
+
items.push('Tooltip: No Tooltip');
|
|
59
|
+
}
|
|
60
|
+
if (pb.BackColor) {
|
|
61
|
+
items.push(`Back Colour: ${pb.BackColor}`);
|
|
62
|
+
}
|
|
63
|
+
(0, StyledColumnSliceStyleEditors_1.getCellFontStyleSummaryItems)(pb.Font).forEach(({ label, value }) => {
|
|
64
|
+
items.push(`${label}: ${value}`);
|
|
65
|
+
});
|
|
66
|
+
return items;
|
|
37
67
|
};
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
68
|
+
const getStyledColumnPercentBarStyleViewValues = (data) => {
|
|
69
|
+
const pb = data.PercentBarStyle;
|
|
70
|
+
if (!pb) {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
return buildStyledColumnPercentBarStyleSummaryStrings(pb, {
|
|
74
|
+
includeEmptyCellText: false,
|
|
75
|
+
includeEmptyTooltip: false,
|
|
76
|
+
});
|
|
42
77
|
};
|
|
78
|
+
exports.getStyledColumnPercentBarStyleViewValues = getStyledColumnPercentBarStyleViewValues;
|
|
43
79
|
/**
|
|
44
80
|
* Compact summary of the *non-range* style properties of a Percent Bar.
|
|
45
|
-
* (Gradient uses `renderStyledColumnGradientStyleSummary`.)
|
|
46
|
-
*
|
|
47
|
-
* Used by:
|
|
48
|
-
* - the wizard's "Style" step `renderSummary`
|
|
49
|
-
* - the Styled Column module's `toView` (read-only summary popup)
|
|
50
81
|
*/
|
|
51
82
|
const renderStyledColumnStyleSummary = (data, _api) => {
|
|
52
83
|
const pb = data.PercentBarStyle;
|
|
53
84
|
if (!pb) {
|
|
54
85
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Styling Defined" });
|
|
55
86
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-2", children: ["Align: ", (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: formatAlignmentLabel(pb.CellTextAlignment) })] }, "align"));
|
|
62
|
-
}
|
|
63
|
-
const fontTags = (0, StyledColumnSliceStyleEditors_1.renderFontStyleSummaryTags)(pb.Font);
|
|
64
|
-
if (fontTags) {
|
|
65
|
-
parts.push((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-2", children: ["Font: ", fontTags] }, "font"));
|
|
66
|
-
}
|
|
67
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap", children: parts }));
|
|
87
|
+
const items = buildStyledColumnPercentBarStyleSummaryStrings(pb, {
|
|
88
|
+
includeEmptyCellText: true,
|
|
89
|
+
includeEmptyTooltip: true,
|
|
90
|
+
});
|
|
91
|
+
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))) }));
|
|
68
92
|
};
|
|
69
93
|
exports.renderStyledColumnStyleSummary = renderStyledColumnStyleSummary;
|
|
70
94
|
// Legacy wrapper kept for any external consumers; safe no-op here.
|
|
@@ -178,6 +202,6 @@ const StyledColumnWizardStyleSection = (props) => {
|
|
|
178
202
|
delete cleaned.Font;
|
|
179
203
|
props.onChange({ ...data, PercentBarStyle: cleaned });
|
|
180
204
|
}
|
|
181
|
-
} }) })] })] }), (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 Style" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure Tooltip and Background Colour" })] }), (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.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: pb.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: pb.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent Value" })] }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: !!pb.BackColor, onChange: onUseBackColorChanged, className: "twa:mr-2" }), pb.BackColor != undefined && ((0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: pb.BackColor, onChange: onBackColorChange }))] }) })] }) })] })] }));
|
|
205
|
+
} }) })] })] }), (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 Style" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure Tooltip and Background Colour" })] }), (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.jsxs)(FormLayout_1.FormRow, { label: "Tooltip Display:", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: pb.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, className: "twa:ml-3", checked: pb.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent Value" })] }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: disabled, checked: !!pb.BackColor, onChange: onUseBackColorChanged, className: "twa:mr-2" }), pb.BackColor != undefined && ((0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: pb.BackColor, onChange: onBackColorChange }))] }) })] }) })] }), (0, jsx_runtime_1.jsx)(StyledColumnPercentBarPreview_1.StyledColumnPercentBarPreviewCard, { data: data })] }));
|
|
182
206
|
};
|
|
183
207
|
exports.StyledColumnWizardStyleSection = StyledColumnWizardStyleSection;
|
|
@@ -7,7 +7,7 @@ const getStatusItemStyle = (systemStatusMessageInfo) => {
|
|
|
7
7
|
const background = UIHelper_1.default.getColorByMessageType(systemStatusMessageInfo?.statusType ?? 'Success');
|
|
8
8
|
const color = systemStatusMessageInfo
|
|
9
9
|
? UIHelper_1.default.getButtonTextColourForMessageType(systemStatusMessageInfo.statusType)
|
|
10
|
-
: 'var(--ab-color-
|
|
10
|
+
: 'var(--ab-color-primary-foreground)';
|
|
11
11
|
return {
|
|
12
12
|
background,
|
|
13
13
|
color,
|
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as ThemeRedux from '../../Redux/ActionsReducers/ThemeRedux';
|
|
3
2
|
import { ModuleViewPopupProps } from '../Components/SharedProps/ModuleViewPopupProps';
|
|
4
|
-
|
|
5
|
-
interface ThemePopupProps extends ModuleViewPopupProps<ThemePopupComponent> {
|
|
6
|
-
CurrentTheme: string;
|
|
7
|
-
UserThemes: AdaptableTheme[];
|
|
8
|
-
SelectTheme: (newTheme: string) => ThemeRedux.ThemeSelectAction;
|
|
9
|
-
hideShowInWindow?: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare class ThemePopupComponent extends React.Component<ThemePopupProps, {}> {
|
|
3
|
+
declare class ThemePopupComponent extends React.Component<ModuleViewPopupProps<ThemePopupComponent>, {}> {
|
|
12
4
|
render(): React.JSX.Element;
|
|
13
|
-
onChangeTheme(value: string): void;
|
|
14
|
-
handleCreateNewTheme: (variant: "dark" | "light") => void;
|
|
15
5
|
}
|
|
16
|
-
export declare let ThemePopup:
|
|
17
|
-
[x: string]: any;
|
|
18
|
-
}>;
|
|
6
|
+
export declare let ThemePopup: typeof ThemePopupComponent;
|
|
19
7
|
export {};
|
|
@@ -4,48 +4,13 @@ exports.ThemePopup = 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
|
-
const react_redux_1 = require("react-redux");
|
|
8
|
-
const ThemeRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ThemeRedux"));
|
|
9
7
|
const PopupPanel_1 = require("../Components/Popups/AdaptablePopup/PopupPanel");
|
|
10
8
|
const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout"));
|
|
11
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
|
|
12
|
-
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
13
9
|
const ThemeSelector_1 = require("./ThemeSelector");
|
|
14
10
|
const Flex_1 = require("../../components/Flex");
|
|
15
11
|
class ThemePopupComponent extends React.Component {
|
|
16
12
|
render() {
|
|
17
|
-
const isCustomTheme = this.props.api.themeApi
|
|
18
|
-
.getUserThemes()
|
|
19
|
-
.some((theme) => theme.Name === this.props.CurrentTheme);
|
|
20
|
-
const disabled = this.props.accessLevel === GeneralConstants_1.ACCESS_LEVEL_READ_ONLY;
|
|
21
13
|
return ((0, jsx_runtime_1.jsx)(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Select Current Theme:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[150px]", children: (0, jsx_runtime_1.jsx)(ThemeSelector_1.ThemeSelector, {}) }) }) }) }));
|
|
22
14
|
}
|
|
23
|
-
onChangeTheme(value) {
|
|
24
|
-
this.props.SelectTheme(value);
|
|
25
|
-
}
|
|
26
|
-
handleCreateNewTheme = (variant) => {
|
|
27
|
-
let nthItem = this.props.UserThemes.length + 1;
|
|
28
|
-
let name = 'Custom-Theme-' + nthItem;
|
|
29
|
-
// make sure it is unique
|
|
30
|
-
while (this.props.UserThemes.some((theme) => theme.Name === name)) {
|
|
31
|
-
nthItem++;
|
|
32
|
-
name = 'Custom-Theme-' + nthItem;
|
|
33
|
-
}
|
|
34
|
-
const newTheme = ObjectFactory_1.default.CreateEmptyTheme(name);
|
|
35
|
-
newTheme.Variant = variant;
|
|
36
|
-
this.props.api.themeApi.addUserTheme(newTheme);
|
|
37
|
-
this.props.api.themeApi.loadTheme(newTheme.Name);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function mapStateToProps(state, ownProps) {
|
|
41
|
-
return {
|
|
42
|
-
CurrentTheme: state.Theme.CurrentTheme,
|
|
43
|
-
UserThemes: state.Theme.UserThemes,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function mapDispatchToProps(dispatch) {
|
|
47
|
-
return {
|
|
48
|
-
SelectTheme: (newTheme) => dispatch(ThemeRedux.ThemeSelect(newTheme)),
|
|
49
|
-
};
|
|
50
15
|
}
|
|
51
|
-
exports.ThemePopup =
|
|
16
|
+
exports.ThemePopup = ThemePopupComponent;
|
package/src/View/UIHelper.js
CHANGED
|
@@ -350,7 +350,7 @@ function getButtonColourForAdaptableAlerts(adaptableAlerts, messageTypeColor) {
|
|
|
350
350
|
}
|
|
351
351
|
function getButtonTextColourForArrayandMessageType(adaptableAlerts, messageType) {
|
|
352
352
|
if (ArrayExtensions_1.default.IsNullOrEmpty(adaptableAlerts)) {
|
|
353
|
-
return '
|
|
353
|
+
return 'primary-foreground';
|
|
354
354
|
}
|
|
355
355
|
return this.getButtonTextColourForMessageType(messageType);
|
|
356
356
|
}
|
|
@@ -8,9 +8,9 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const react_redux_1 = require("react-redux");
|
|
10
10
|
const NamedQueryRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/NamedQueryRedux"));
|
|
11
|
-
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
12
11
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
13
|
-
const
|
|
12
|
+
const Card_1 = require("../../components/Card");
|
|
13
|
+
const ButtonEdit_1 = require("../Components/Buttons/ButtonEdit");
|
|
14
14
|
const NamedQueryContext_1 = require("../../components/ExpressionEditor/NamedQueryContext");
|
|
15
15
|
const OnePageWizards_1 = require("./OnePageWizards");
|
|
16
16
|
const kebabCase_1 = tslib_1.__importDefault(require("../../Utilities/utils/kebabCase"));
|
|
@@ -83,20 +83,9 @@ const OnePageAdaptableWizard = (props) => {
|
|
|
83
83
|
};
|
|
84
84
|
exports.OnePageAdaptableWizard = OnePageAdaptableWizard;
|
|
85
85
|
const OnePageWizardSummary = () => {
|
|
86
|
-
const {
|
|
87
|
-
const { setCurrentSection } = (0, OnePageWizards_1.useOnePageWizardContext)();
|
|
88
|
-
|
|
89
|
-
const renderEdit = (index) => ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { className: "twa:px-1 twa:inline-block twa:text-2 twa:underline", variant: "text", onClick: () => {
|
|
90
|
-
setCurrentSection(index);
|
|
91
|
-
}, children: "edit" }));
|
|
92
|
-
const extraContext = {
|
|
93
|
-
data,
|
|
94
|
-
api,
|
|
95
|
-
namedQuery,
|
|
96
|
-
moduleInfo: moduleInfo,
|
|
97
|
-
sections,
|
|
98
|
-
};
|
|
99
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizardSummary twa:flex twa:flex-col twa:gap-2", children: sections
|
|
86
|
+
const { data, api } = useOnePageAdaptableWizardContext();
|
|
87
|
+
const { sections: visibleSections, setCurrentSection } = (0, OnePageWizards_1.useOnePageWizardContext)();
|
|
88
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizardSummary twa:flex twa:flex-col twa:gap-3", children: visibleSections
|
|
100
89
|
.map((section, index) => {
|
|
101
90
|
if (section === '-') {
|
|
102
91
|
return null;
|
|
@@ -104,10 +93,7 @@ const OnePageWizardSummary = () => {
|
|
|
104
93
|
if (!section.renderSummary) {
|
|
105
94
|
return null;
|
|
106
95
|
}
|
|
107
|
-
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { keyboardNavigation: false, children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tabs.Tab, { children: [section.title, " ", renderEdit(index)] }), (0, jsx_runtime_1.jsx)(Tabs_1.Tabs.Content, { children: section.renderSummary(data, api) })] }, index) }));
|
|
96
|
+
return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { className: "twa:w-full", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium twa:flex-1", children: section.title }), (0, jsx_runtime_1.jsx)(ButtonEdit_1.ButtonEdit, { onClick: () => setCurrentSection(index) })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: section.renderSummary?.(data, api) })] }, `${section.title}-${index}`));
|
|
111
97
|
})
|
|
112
98
|
.filter(Boolean) }));
|
|
113
99
|
};
|
|
@@ -5,9 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const AdaptableContext_1 = tslib_1.__importDefault(require("./AdaptableContext"));
|
|
8
|
-
const AdaptableComputedCSSVarsContext_1 = require("./AdaptableComputedCSSVarsContext");
|
|
9
8
|
const tooltip_1 = require("../components/ui/tooltip");
|
|
10
9
|
const renderWithAdaptableContext = (children, adaptable) => {
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { delay: 300, children: (0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: adaptable.adaptableStore.TheStore, children: (0, jsx_runtime_1.jsx)(
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { delay: 300, children: (0, jsx_runtime_1.jsx)(react_redux_1.Provider, { store: adaptable.adaptableStore.TheStore, children: (0, jsx_runtime_1.jsx)(AdaptableContext_1.default.Provider, { value: adaptable, children: children }) }) }));
|
|
12
11
|
};
|
|
13
12
|
exports.renderWithAdaptableContext = renderWithAdaptableContext;
|
|
@@ -97,7 +97,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
97
97
|
private LicenseService;
|
|
98
98
|
private ChartingService;
|
|
99
99
|
private rowListeners;
|
|
100
|
-
private throttleFilterOnDataChange;
|
|
101
100
|
private debouncedSetSelectedRows;
|
|
102
101
|
private debouncedSetSelectedCells;
|
|
103
102
|
private agGridListenerKeydown;
|
|
@@ -361,6 +360,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
361
360
|
private hasFloatingFilterOnAtLeastOneColumn;
|
|
362
361
|
getChartRef(chartId: string): ChartRef;
|
|
363
362
|
updateLayoutInManagerAfterStoreHasChanged(layout?: Layout): void;
|
|
363
|
+
private getActiveAdaptableAggFuncForCol;
|
|
364
364
|
private onRowDataChanged;
|
|
365
365
|
private onCellDataChanged;
|
|
366
366
|
private isUndoChange;
|