@adaptabletools/adaptable 23.0.0-canary.7 → 23.0.0-canary.9
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 +98 -17
- package/package.json +1 -1
- package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +1 -1
- package/src/AdaptableState/Common/Enums.d.ts +0 -12
- package/src/AdaptableState/Common/Enums.js +0 -15
- package/src/{Utilities → AdaptableState/Common}/MenuItem.d.ts +4 -4
- package/src/{Utilities → AdaptableState/Common}/MenuItem.js +1 -1
- package/src/AdaptableState/StyledColumnState.d.ts +8 -850
- package/src/AdaptableState/StyledColumnState.js +1 -9
- package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +9 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.d.ts +84 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +5 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +6 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +9 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
- package/src/AdaptableState/StyledColumns/IconStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.js +1 -0
- package/src/Api/ColumnScopeApi.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +1 -1
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutHelpers.js +1 -1
- package/src/Api/Implementation/QuickSearchApiImpl.js +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +1 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +1 -1
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/ChartingInternalApi.js +1 -1
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/EventInternalApi.js +1 -1
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +1 -1
- package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
- package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +2 -4
- package/src/Redux/Store/AdaptableStore.js +3 -3
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +1 -1
- package/src/Strategy/AlertModule.d.ts +1 -1
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/ChartingModule.d.ts +1 -1
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/ExportModule.js +2 -2
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +1 -1
- package/src/Strategy/NoteModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +49 -0
- package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
- package/src/Utilities/Extensions/NumberExtensions.js +74 -0
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +271 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
- package/src/Utilities/Extensions/StringExtensions.js +44 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
- package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
- package/src/Utilities/Helpers/DateHelper.js +1 -1
- package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +1 -1
- package/src/Utilities/Helpers/Helper.d.ts +0 -6
- package/src/Utilities/Helpers/Helper.js +0 -35
- package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduleHelper.d.ts → Scheduling/ScheduleHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleHelper.js → Scheduling/ScheduleHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobManager.d.ts → Scheduling/ScheduleJobManager.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobRunner.d.ts → Scheduling/ScheduleJobRunner.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js} +4 -4
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.d.ts → Scheduling/ScheduledJobsMiddlewareHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.js → Scheduling/ScheduledJobsMiddlewareHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js} +1 -1
- package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +5 -0
- package/src/Utilities/{Defaults/DefaultSettingsPanel.js → Helpers/SettingsPanelHelper.js} +14 -0
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +317 -0
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -2
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +3 -3
- package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
- package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +15 -0
- package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -1
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +7 -12
- package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
- package/src/{agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js → Utilities/Helpers/StyledColumns/StyledColumnHelper.js} +64 -2
- package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
- package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +23 -9
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +114 -1
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
- package/src/Utilities/Services/RowSummaryService.js +4 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
- package/src/View/Alert/Utilities/getAlertType.js +1 -1
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +1 -1
- package/src/View/Alert/Utilities/mapAlertDefinition.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +160 -127
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -3
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +10 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +1 -1
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +1 -1
- package/src/View/Comments/CommentsEditor.js +1 -1
- package/src/View/Comments/CommentsPopup.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -2
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +2 -0
- package/src/View/Components/Buttons/EntityListActionButtons.js +1 -1
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +8 -8
- package/src/View/Components/ColumnFilter/ColumnFilter.js +14 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -1
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/Popups/Utilities.js +1 -1
- package/src/View/Components/RangesComponent.d.ts +4 -3
- package/src/View/Components/RangesComponent.js +3 -7
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Dashboard/CustomDashboardButton.js +1 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryTable.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
- package/src/View/Export/ExportSchedulesTab.js +3 -4
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +129 -103
- package/src/View/Note/NoteEditor.js +1 -1
- package/src/View/Note/NotePopup.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +36 -30
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +79 -68
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +39 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +92 -52
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +33 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.d.ts +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +57 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +2 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +16 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +20 -60
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/View/Wizard/OnePageWizards.js +3 -1
- package/src/agGrid/AdaptableAgGrid.js +6 -6
- package/src/agGrid/AgGridColumnAdapter.js +16 -14
- package/src/agGrid/AgGridExportAdapter.js +1 -1
- package/src/agGrid/AgGridMenuAdapter.js +127 -2
- package/src/agGrid/cellRenderers/BadgeRenderer.js +8 -6
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +45 -44
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
- package/src/agGrid/cellRenderers/IconRenderer.js +15 -14
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +26 -98
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +52 -50
- package/src/agGrid/cellRenderers/RatingRenderer.js +2 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/components/ColorPicker/ColorPicker.js +1 -1
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +118 -19
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.d.ts +27 -31
- package/src/migration/VersionUpgrade23.js +110 -29
- package/src/types.d.ts +12 -1
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -15
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -15
- package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
- package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -63
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -115
- package/src/Utilities/utils/chunk.d.ts +0 -6
- package/src/Utilities/utils/chunk.js +0 -17
- package/src/Utilities/utils/clamp.d.ts +0 -5
- package/src/Utilities/utils/clamp.js +0 -7
- package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
- package/src/Utilities/utils/cloneDeepWith.js +0 -67
- package/src/Utilities/utils/debounce.d.ts +0 -20
- package/src/Utilities/utils/flatten.d.ts +0 -5
- package/src/Utilities/utils/flatten.js +0 -7
- package/src/Utilities/utils/flattenDeep.d.ts +0 -5
- package/src/Utilities/utils/flattenDeep.js +0 -7
- package/src/Utilities/utils/get.d.ts +0 -6
- package/src/Utilities/utils/get.js +0 -35
- package/src/Utilities/utils/index.d.ts +0 -22
- package/src/Utilities/utils/index.js +0 -22
- package/src/Utilities/utils/isArray.d.ts +0 -6
- package/src/Utilities/utils/isArray.js +0 -6
- package/src/Utilities/utils/isEqual.d.ts +0 -5
- package/src/Utilities/utils/isEqual.js +0 -124
- package/src/Utilities/utils/isObject.d.ts +0 -6
- package/src/Utilities/utils/isObject.js +0 -9
- package/src/Utilities/utils/isPlainObject.d.ts +0 -6
- package/src/Utilities/utils/isPlainObject.js +0 -17
- package/src/Utilities/utils/kebabCase.d.ts +0 -5
- package/src/Utilities/utils/kebabCase.js +0 -8
- package/src/Utilities/utils/merge.d.ts +0 -11
- package/src/Utilities/utils/merge.js +0 -40
- package/src/Utilities/utils/mergeWith.d.ts +0 -7
- package/src/Utilities/utils/mergeWith.js +0 -46
- package/src/Utilities/utils/orderBy.d.ts +0 -8
- package/src/Utilities/utils/orderBy.js +0 -30
- package/src/Utilities/utils/parseInt.d.ts +0 -6
- package/src/Utilities/utils/parseInt.js +0 -9
- package/src/Utilities/utils/sentenceCase.d.ts +0 -6
- package/src/Utilities/utils/sentenceCase.js +0 -15
- package/src/Utilities/utils/startCase.d.ts +0 -5
- package/src/Utilities/utils/startCase.js +0 -11
- package/src/Utilities/utils/throttle.d.ts +0 -17
- package/src/Utilities/utils/throttle.js +0 -19
- package/src/Utilities/utils/toNumber.d.ts +0 -5
- package/src/Utilities/utils/toNumber.js +0 -39
- package/src/Utilities/utils/uniq.d.ts +0 -7
- package/src/Utilities/utils/uniq.js +0 -9
- package/src/Utilities/utils/uniqBy.d.ts +0 -8
- package/src/Utilities/utils/uniqBy.js +0 -22
- package/src/Utilities/utils/words.d.ts +0 -7
- package/src/Utilities/utils/words.js +0 -10
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
- package/src/agGrid/buildValueAggregationMenuItem.js +0 -111
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
- package/src/agGrid/createAgGridIcon.d.ts +0 -10
- package/src/agGrid/createAgGridIcon.js +0 -16
- /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
- /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
- /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
- /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
- /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
|
@@ -9,7 +9,6 @@ import { RangesComponent } from '../../Components/RangesComponent';
|
|
|
9
9
|
import { ColumnSelector } from '../../Components/Selectors/ColumnSelector';
|
|
10
10
|
import { getGraySwatchColor } from '../../UIHelper';
|
|
11
11
|
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
12
|
-
import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
|
|
13
12
|
import AdaptableInput from '../../Components/AdaptableInput';
|
|
14
13
|
import { Box, Flex } from '../../../components/Flex';
|
|
15
14
|
import { BulletRangesSummaryPreview } from './StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview';
|
|
@@ -18,10 +17,9 @@ import { SingleSelect } from '../../../components/NewSelect';
|
|
|
18
17
|
import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
19
18
|
import { Card } from '../../../components/Card';
|
|
20
19
|
import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
|
|
20
|
+
import { formatBarStyleCellTextLayoutSummary, getActiveBarStyleCellTextTokens, hasBarStyleCellTextConfigured, patchBarStyleCellTextPlacement, resolveBarStyleCellTextLayout, toggleBarStyleCellTextToken, } from '../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
21
|
+
import { BarStyleCellTextLayoutEditor } from './StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor';
|
|
21
22
|
const BULLET_STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
22
|
-
// ---------------------------------------------------------------------------
|
|
23
|
-
// Summary helpers
|
|
24
|
-
// ---------------------------------------------------------------------------
|
|
25
23
|
const getTargetSummary = (target) => {
|
|
26
24
|
if (target == undefined) {
|
|
27
25
|
return null;
|
|
@@ -53,12 +51,8 @@ const formatBulletOriginLabel = (origin) => {
|
|
|
53
51
|
}
|
|
54
52
|
return origin;
|
|
55
53
|
};
|
|
56
|
-
const formatBulletCellTextSummary = (cellText) => cellText
|
|
57
|
-
|
|
58
|
-
.join(' + ') ?? '';
|
|
59
|
-
const formatBulletToolTipSummary = (toolTipText) => toolTipText
|
|
60
|
-
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
61
|
-
.join(' + ') ?? '';
|
|
54
|
+
const formatBulletCellTextSummary = (cellText) => cellText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
|
|
55
|
+
const formatBulletToolTipSummary = (toolTipText) => toolTipText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
|
|
62
56
|
export const getStyledColumnBulletRangesViewValues = (data) => {
|
|
63
57
|
const bullet = data.BulletChartStyle;
|
|
64
58
|
if (!bullet) {
|
|
@@ -73,11 +67,12 @@ export const getStyledColumnBulletRangesViewValues = (data) => {
|
|
|
73
67
|
};
|
|
74
68
|
const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
|
|
75
69
|
const items = [];
|
|
76
|
-
const
|
|
70
|
+
const targetProperties = bullet.TargetProperties;
|
|
71
|
+
const targetSummary = getTargetSummary(targetProperties?.Target);
|
|
77
72
|
if (targetSummary) {
|
|
78
73
|
items.push(`Target: ${targetSummary}`);
|
|
79
74
|
}
|
|
80
|
-
const marker =
|
|
75
|
+
const marker = targetProperties?.Marker;
|
|
81
76
|
if (marker?.Shape && marker.Shape !== 'Line') {
|
|
82
77
|
items.push(`Target Marker Shape: ${marker.Shape}`);
|
|
83
78
|
}
|
|
@@ -90,19 +85,24 @@ const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
|
|
|
90
85
|
if (bullet.Orientation === 'Vertical') {
|
|
91
86
|
items.push('Orientation: Vertical');
|
|
92
87
|
}
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
const barProperties = bullet.Bar;
|
|
89
|
+
if (barProperties?.Color) {
|
|
90
|
+
items.push(`Bar Colour: ${barProperties.Color}`);
|
|
95
91
|
}
|
|
96
|
-
if (
|
|
97
|
-
items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${
|
|
92
|
+
if (barProperties?.Height != null) {
|
|
93
|
+
items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${barProperties.Height}px`);
|
|
98
94
|
}
|
|
99
95
|
items.push(`Origin: ${formatBulletOriginLabel(bullet.Origin)}`);
|
|
100
96
|
if (bullet.BackColor) {
|
|
101
97
|
items.push(`Back Colour: ${bullet.BackColor}`);
|
|
102
98
|
}
|
|
103
|
-
if (bullet.
|
|
104
|
-
|
|
105
|
-
items.push(`Cell Text
|
|
99
|
+
if (hasBarStyleCellTextConfigured(bullet.CellTextProperties)) {
|
|
100
|
+
const tokens = getActiveBarStyleCellTextTokens(bullet.CellTextProperties);
|
|
101
|
+
items.push(`Cell Text: ${formatBulletCellTextSummary(tokens)}`);
|
|
102
|
+
const layoutSummary = formatBarStyleCellTextLayoutSummary(resolveBarStyleCellTextLayout(bullet.CellTextProperties));
|
|
103
|
+
if (layoutSummary) {
|
|
104
|
+
items.push(`Placement: ${layoutSummary}`);
|
|
105
|
+
}
|
|
106
106
|
}
|
|
107
107
|
else if (options.includeEmptyCellText) {
|
|
108
108
|
items.push('Cell Text: None');
|
|
@@ -260,59 +260,70 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
260
260
|
});
|
|
261
261
|
}, [data, bullet]);
|
|
262
262
|
// -- Target ----------------------------------------------------------------
|
|
263
|
-
const currentMode = getSimpleTargetMode(bullet.Target);
|
|
263
|
+
const currentMode = getSimpleTargetMode(bullet.TargetProperties?.Target);
|
|
264
|
+
const updateTargetProperties = (patch) => {
|
|
265
|
+
const merged = {
|
|
266
|
+
...bullet.TargetProperties,
|
|
267
|
+
...patch,
|
|
268
|
+
};
|
|
269
|
+
// Strip the wrapper when nothing meaningful is left.
|
|
270
|
+
const isEmpty = merged.Target == undefined && merged.Marker == undefined;
|
|
271
|
+
update({ TargetProperties: isEmpty ? undefined : merged });
|
|
272
|
+
};
|
|
273
|
+
const setTarget = (target) => updateTargetProperties({ Target: target });
|
|
264
274
|
const handleTargetModeChange = (mode) => {
|
|
265
275
|
if (mode === 'None') {
|
|
266
|
-
|
|
267
|
-
delete next.Target;
|
|
268
|
-
props.onChange({ ...data, BulletChartStyle: next });
|
|
276
|
+
setTarget(undefined);
|
|
269
277
|
return;
|
|
270
278
|
}
|
|
271
279
|
if (mode === 'Col-Avg' || mode === 'Col-Median') {
|
|
272
|
-
|
|
280
|
+
setTarget(mode);
|
|
273
281
|
return;
|
|
274
282
|
}
|
|
275
283
|
if (mode === 'Number') {
|
|
276
|
-
|
|
284
|
+
setTarget(minMaxRangeValues?.max ?? 0);
|
|
277
285
|
return;
|
|
278
286
|
}
|
|
279
287
|
if (mode === 'Column') {
|
|
280
288
|
// Use the first available numeric column (excluding the styled column itself)
|
|
281
|
-
const candidate = api.columnApi
|
|
282
|
-
|
|
283
|
-
.find((c) => c.columnId !== data.ColumnId);
|
|
284
|
-
update({ Target: candidate?.columnId ?? '' });
|
|
289
|
+
const candidate = api.columnApi.getNumericColumns().find((c) => c.columnId !== data.ColumnId);
|
|
290
|
+
setTarget(candidate?.columnId ?? '');
|
|
285
291
|
return;
|
|
286
292
|
}
|
|
287
293
|
};
|
|
288
294
|
const handleNumericTargetChange = (value) => {
|
|
289
|
-
|
|
290
|
-
update({ Target: 0 });
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
update({ Target: value });
|
|
294
|
-
}
|
|
295
|
+
setTarget(value == undefined || isNaN(value) ? 0 : value);
|
|
295
296
|
};
|
|
296
297
|
const handleColumnTargetChange = (columnId) => {
|
|
297
|
-
|
|
298
|
+
setTarget(columnId);
|
|
299
|
+
};
|
|
300
|
+
// -- Bar -------------------------------------------------------------------
|
|
301
|
+
const updateBar = (patch) => {
|
|
302
|
+
const merged = {
|
|
303
|
+
...bullet.Bar,
|
|
304
|
+
...patch,
|
|
305
|
+
};
|
|
306
|
+
const isEmpty = merged.Color == undefined && merged.Height == undefined;
|
|
307
|
+
update({ Bar: isEmpty ? undefined : merged });
|
|
298
308
|
};
|
|
299
309
|
// -- Marker ----------------------------------------------------------------
|
|
300
310
|
const updateMarker = (patch) => {
|
|
301
|
-
|
|
302
|
-
|
|
311
|
+
updateTargetProperties({
|
|
312
|
+
Marker: {
|
|
303
313
|
Shape: 'Line',
|
|
304
|
-
...bullet.
|
|
314
|
+
...bullet.TargetProperties?.Marker,
|
|
305
315
|
...patch,
|
|
306
316
|
},
|
|
307
317
|
});
|
|
308
318
|
};
|
|
309
319
|
// -- Cell text -------------------------------------------------------------
|
|
310
|
-
const toggleCellText = (token,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
320
|
+
const toggleCellText = (token, show) => {
|
|
321
|
+
update(toggleBarStyleCellTextToken(bullet.CellTextProperties, token, show));
|
|
322
|
+
};
|
|
323
|
+
const onCellTextPlacementChange = (token, patch) => {
|
|
324
|
+
update({
|
|
325
|
+
CellTextProperties: patchBarStyleCellTextPlacement(bullet.CellTextProperties, token, patch),
|
|
326
|
+
});
|
|
316
327
|
};
|
|
317
328
|
const toggleToolTipText = (token, checked) => {
|
|
318
329
|
const current = bullet.ToolTipText ?? [];
|
|
@@ -321,9 +332,6 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
321
332
|
: current.filter((t) => t !== token);
|
|
322
333
|
update({ ToolTipText: next });
|
|
323
334
|
};
|
|
324
|
-
const handleCellTextPositionChange = (pos) => {
|
|
325
|
-
update({ CellTextPosition: pos });
|
|
326
|
-
};
|
|
327
335
|
// -------------------------------------------------------------------------
|
|
328
336
|
// Render
|
|
329
337
|
// -------------------------------------------------------------------------
|
|
@@ -336,22 +344,29 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
336
344
|
if (variant === 'ranges') {
|
|
337
345
|
return (_jsx(Box, { children: _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Ranges" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define qualitative bands for the bullet scale" })] }), _jsx(Card.Body, { children: _jsx(RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, ranges: bullet.CellRanges, rangeValueType: bullet.RangeValueType, onRangeValueTypeChange: onRangeValueTypeChange, columnComparison: bullet.ColumnComparison, updateRanges: onUpdateRanges, updateColumnComparison: onUpdateColumnComparison, hideColumnComparison: true }) })] }) }));
|
|
338
346
|
}
|
|
339
|
-
const
|
|
340
|
-
? bullet.Target
|
|
341
|
-
:
|
|
342
|
-
|
|
347
|
+
const primaryTarget = Array.isArray(bullet.TargetProperties?.Target)
|
|
348
|
+
? bullet.TargetProperties?.Target?.[0]
|
|
349
|
+
: bullet.TargetProperties?.Target;
|
|
350
|
+
const numericTargetValue = typeof primaryTarget === 'number'
|
|
351
|
+
? primaryTarget
|
|
352
|
+
: typeof primaryTarget?.Value === 'number'
|
|
353
|
+
? primaryTarget.Value
|
|
343
354
|
: undefined;
|
|
344
|
-
const columnTargetValue = typeof
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
355
|
+
const columnTargetValue = typeof primaryTarget === 'string' &&
|
|
356
|
+
primaryTarget !== 'Col-Avg' &&
|
|
357
|
+
primaryTarget !== 'Col-Median'
|
|
358
|
+
? primaryTarget
|
|
359
|
+
: typeof primaryTarget?.Value === 'string'
|
|
360
|
+
? primaryTarget.Value
|
|
348
361
|
: undefined;
|
|
362
|
+
const markerCfg = bullet.TargetProperties?.Marker;
|
|
349
363
|
const marker = {
|
|
350
|
-
Shape:
|
|
351
|
-
Color:
|
|
352
|
-
Size:
|
|
364
|
+
Shape: markerCfg?.Shape ?? 'Line',
|
|
365
|
+
Color: markerCfg?.Color ?? '',
|
|
366
|
+
Size: markerCfg?.Size ?? (markerCfg?.Shape === 'Line' ? 2 : 8),
|
|
353
367
|
};
|
|
354
|
-
const
|
|
368
|
+
const cellTextProperties = bullet.CellTextProperties;
|
|
369
|
+
const cellTextDisabled = !hasBarStyleCellTextConfigured(cellTextProperties) || disabled;
|
|
355
370
|
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Target" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Select a target value for the bullet scale" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Target:", children: _jsx(Box, { className: "twa:max-w-[180px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: currentMode, onValueChange: (v) => handleTargetModeChange(v), items: [
|
|
356
371
|
{ value: 'None', label: 'None' },
|
|
357
372
|
{ value: 'Number', label: 'Fixed Number' },
|
|
@@ -361,9 +376,9 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
361
376
|
] }) }) }), currentMode === 'Number' && (_jsx(FormRow, { label: "Target Value:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { type: "number", value: numericTargetValue ?? '', onChange: (e) => handleNumericTargetChange(e.target.value === '' ? undefined : Number(e.target.value)) }) }) })), currentMode === 'Column' && (_jsx(FormRow, { label: "Target Column:", children: _jsx(Box, { className: "twa:max-w-[220px]", children: _jsx(ColumnSelector, { type: "number", value: columnTargetValue ?? '', onChange: handleColumnTargetChange, filterColumn: (c) => c.columnId !== data.ColumnId, placeholder: "Select numeric column" }) }) })), currentMode !== 'None' && (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "Marker Shape:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: marker.Shape, onValueChange: (s) => updateMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), _jsx(FormRow, { label: "Marker Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: marker.Color || undefined, onChange: (c) => updateMarker({ Color: c }) }) }), _jsx(FormRow, { label: "Marker Size:", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: marker.Size, onChange: (e) => updateMarker({ Size: Number(e.target.value) }) }) }) })] }))] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the bar orientation and height" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Orientation:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: bullet.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
|
|
362
377
|
{ value: 'Horizontal', label: 'Horizontal' },
|
|
363
378
|
{ value: 'Vertical', label: 'Vertical' },
|
|
364
|
-
] }) }) }), bullet.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", _jsx("code", { children: "rowHeight" }), " on ", _jsx("code", { children: " gridOptions " }), " or use", ' ', _jsx("code", { children: "getRowHeight" }), "."] }) })), _jsx(FormRow, { label: "Bar Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: bullet.
|
|
365
|
-
|
|
366
|
-
}), placeholder: "8" }) }) }), _jsx(FormRow, { label: "Origin:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' :
|
|
379
|
+
] }) }) }), bullet.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", _jsx("code", { children: "rowHeight" }), " on ", _jsx("code", { children: " gridOptions " }), " or use", ' ', _jsx("code", { children: "getRowHeight" }), "."] }) })), _jsx(FormRow, { label: "Bar Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: bullet.Bar?.Color, onChange: (c) => updateBar({ Color: c }) }) }), _jsx(FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: bullet.Bar?.Height ?? '', onChange: (e) => updateBar({
|
|
380
|
+
Height: e.target.value === '' ? undefined : Number(e.target.value),
|
|
381
|
+
}), placeholder: "8" }) }) }), _jsx(FormRow, { label: "Origin:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : bullet.Origin ?? 'Auto', onValueChange: (v) => {
|
|
367
382
|
if (v === 'Auto' || v === 'Zero') {
|
|
368
383
|
update({ Origin: v });
|
|
369
384
|
}
|
|
@@ -373,11 +388,7 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
373
388
|
}, items: [
|
|
374
389
|
{ value: 'Auto', label: 'Auto' },
|
|
375
390
|
{ value: 'Zero', label: 'Zero' },
|
|
376
|
-
] }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "
|
|
377
|
-
{ value: 'Above', label: 'Above Bar' },
|
|
378
|
-
{ value: 'Below', label: 'Below Bar' },
|
|
379
|
-
{ value: 'Merged', label: 'Merged' },
|
|
380
|
-
] }) }) })] }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
|
|
391
|
+
] }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick which values to display and where each one sits around the bar" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: _jsx(BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
|
|
381
392
|
if (next) {
|
|
382
393
|
update({ Font: next });
|
|
383
394
|
}
|
|
@@ -7,7 +7,7 @@ import { Tag } from '../../../components/Tag';
|
|
|
7
7
|
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
8
8
|
import { Box, Flex } from '../../../components/Flex';
|
|
9
9
|
import { NumberInput } from '../../../components/Input/NumberInput';
|
|
10
|
-
import { DEFAULT_GRADIENT_MAX_ALPHA, DEFAULT_GRADIENT_MIN_ALPHA, } from '../../../Utilities/Helpers/
|
|
10
|
+
import { DEFAULT_GRADIENT_MAX_ALPHA, DEFAULT_GRADIENT_MIN_ALPHA, } from '../../../Utilities/Helpers/StyledColumns/GradientStyleHelper';
|
|
11
11
|
import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
12
12
|
import { Card } from '../../../components/Card';
|
|
13
13
|
import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
|
|
@@ -14,7 +14,7 @@ import { IconSelectorPanel } from '../../../components/IconSelector';
|
|
|
14
14
|
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
15
15
|
import { useAdaptable } from '../../AdaptableContext';
|
|
16
16
|
import { AdaptableIconComponent } from '../../Components/AdaptableIconComponent';
|
|
17
|
-
import { ICON_STYLE_PRESET_DESCRIPTIONS, ICON_STYLE_PRESET_LABELS, getIconStylePresetMappings, } from '../../../Utilities/Helpers/
|
|
17
|
+
import { ICON_STYLE_PRESET_DESCRIPTIONS, ICON_STYLE_PRESET_LABELS, getIconStylePresetMappings, } from '../../../Utilities/Helpers/StyledColumns/IconStyleHelper';
|
|
18
18
|
import { resolveEffectiveIconStyleMappings, resolveIconStyleMappingsForSummaryPreview } from '../../../agGrid/cellRenderers/IconRenderer';
|
|
19
19
|
import { Card } from '../../../components/Card';
|
|
20
20
|
import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
|
|
@@ -78,8 +78,9 @@ export const getStyledColumnIconMappingsViewValues = (data) => {
|
|
|
78
78
|
if (ic.MatchMode && ic.MatchMode !== 'Exact') {
|
|
79
79
|
items.push(`Match Mode: ${ic.MatchMode}`);
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
const fallbackMode = ic.FallbackProperties?.Mode;
|
|
82
|
+
if (fallbackMode && fallbackMode !== 'Hide') {
|
|
83
|
+
items.push(`Fallback: ${fallbackMode}`);
|
|
83
84
|
}
|
|
84
85
|
return items;
|
|
85
86
|
};
|
|
@@ -91,9 +92,10 @@ const buildStyledColumnIconStyleSummaryStrings = (ic, options) => {
|
|
|
91
92
|
if (ic.Gap != null) {
|
|
92
93
|
items.push(`Gap: ${ic.Gap}px`);
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
items.push(`Cell Text
|
|
95
|
+
const ctp = ic.CellTextProperties;
|
|
96
|
+
if (ctp?.CellText?.length) {
|
|
97
|
+
items.push(`Cell Text: ${formatIconCellTextSummary(ctp.CellText)}`);
|
|
98
|
+
items.push(`Cell Text Position: ${ctp.CellTextPosition ?? 'After'}`);
|
|
97
99
|
}
|
|
98
100
|
else if (options.includeEmptyCellText) {
|
|
99
101
|
items.push('Cell Text: None');
|
|
@@ -253,12 +255,35 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
253
255
|
// -----------------------------------------------------------------------
|
|
254
256
|
// CellText helpers
|
|
255
257
|
// -----------------------------------------------------------------------
|
|
258
|
+
const updateCellTextProperties = (patch) => {
|
|
259
|
+
const merged = {
|
|
260
|
+
...iconStyle.CellTextProperties,
|
|
261
|
+
...patch,
|
|
262
|
+
};
|
|
263
|
+
// Strip the wrapper when both inner properties are unset, so empty state
|
|
264
|
+
// serialises cleanly.
|
|
265
|
+
const isEmpty = !merged.CellText?.length && merged.CellTextPosition == undefined;
|
|
266
|
+
update({ CellTextProperties: isEmpty ? undefined : merged });
|
|
267
|
+
};
|
|
256
268
|
const toggleCellText = (token, checked) => {
|
|
257
|
-
const current = iconStyle.CellText ?? [];
|
|
269
|
+
const current = iconStyle.CellTextProperties?.CellText ?? [];
|
|
258
270
|
const next = checked
|
|
259
271
|
? Array.from(new Set([...current, token]))
|
|
260
272
|
: current.filter((t) => t !== token);
|
|
261
|
-
|
|
273
|
+
updateCellTextProperties({ CellText: next });
|
|
274
|
+
};
|
|
275
|
+
// -----------------------------------------------------------------------
|
|
276
|
+
// Fallback helpers
|
|
277
|
+
// -----------------------------------------------------------------------
|
|
278
|
+
const updateFallbackProperties = (patch) => {
|
|
279
|
+
const merged = {
|
|
280
|
+
...iconStyle.FallbackProperties,
|
|
281
|
+
...patch,
|
|
282
|
+
};
|
|
283
|
+
// Strip the wrapper when there's nothing to remember; the renderer
|
|
284
|
+
// already defaults to `Mode: 'Hide'` when `FallbackProperties` is unset.
|
|
285
|
+
const isEmpty = (merged.Mode == undefined || merged.Mode === 'Hide') && merged.Icon == undefined;
|
|
286
|
+
update({ FallbackProperties: isEmpty ? undefined : merged });
|
|
262
287
|
};
|
|
263
288
|
const toggleToolTipText = (token, checked) => {
|
|
264
289
|
const current = iconStyle.ToolTipText ?? [];
|
|
@@ -287,14 +312,14 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
287
312
|
}), placeholder: "Tooltip label (optional)" }) }), _jsx(Box, { className: "twa:w-8 twa:shrink-0 twa:flex twa:justify-center", children: _jsx(SimpleButton, { icon: "delete", variant: "text", tooltip: "Remove mapping", onClick: () => removeMapping(i) }) })] }, i)))] })), _jsx(Box, { className: "twa:mt-2", children: _jsx(ButtonNew, { onClick: addMapping, children: "Add Mapping" }) })] })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Matching" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "How keys are compared to cell values, and what to render when no mapping matches" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Match Mode:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.MatchMode ?? 'Exact', onValueChange: (v) => update({ MatchMode: v }), items: [
|
|
288
313
|
{ value: 'Exact', label: 'Exact Match Required' },
|
|
289
314
|
{ value: 'CaseInsensitive', label: 'Case-insensitive (strings)' },
|
|
290
|
-
] }) }) }), _jsx(FormRow, { label: "Fallback:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.
|
|
315
|
+
] }) }) }), _jsx(FormRow, { label: "Fallback:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.FallbackProperties?.Mode ?? 'Hide', onValueChange: (v) => updateFallbackProperties({ Mode: v }), items: [
|
|
291
316
|
{ value: 'Hide', label: 'Show No Value' },
|
|
292
317
|
{ value: 'ShowText', label: 'Show Raw Value' },
|
|
293
318
|
{ value: 'Icon', label: 'Show Fallback Icon' },
|
|
294
|
-
] }) }) }), iconStyle.
|
|
319
|
+
] }) }) }), iconStyle.FallbackProperties?.Mode === 'Icon' && (_jsx(FormRow, { label: "Fallback Icon:", children: _jsx(IconPickerButton, { value: iconStyle.FallbackProperties?.Icon, onChange: (next) => updateFallbackProperties({ Icon: next }) }) }))] }) })] })] }));
|
|
295
320
|
}
|
|
296
321
|
// ----- Style variant (wizard step title: "Style") ------------------------
|
|
297
|
-
const cellText = iconStyle.CellText ?? [];
|
|
322
|
+
const cellText = iconStyle.CellTextProperties?.CellText ?? [];
|
|
298
323
|
const toolTipText = iconStyle.ToolTipText ?? [];
|
|
299
324
|
const cellTextDisabled = cellText.length === 0;
|
|
300
325
|
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Sizing" }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Icon Size (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(Input, { type: "number", min: 8, step: 1, value: iconStyle.Size ?? '', placeholder: "18", className: "twa:w-full", onChange: (event) => {
|
|
@@ -307,7 +332,9 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
307
332
|
update({
|
|
308
333
|
Size: Number.isFinite(parsed) && parsed >= 8 ? parsed : undefined,
|
|
309
334
|
});
|
|
310
|
-
} }) }) }), _jsx(FormRow, { label: "Gap (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(NumberInput, { value: iconStyle.Gap ?? '', placeholder: "4", min: 0, step: 1, onChange: (value) => update({ Gap: typeof value === 'number' ? value : undefined }) }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optionally show the raw value or the matched description alongside the icon (e.g. flag plus label)." })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { checked: cellText.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: cellText.includes('IconDescription'), onChange: (checked) => toggleCellText('IconDescription', checked), children: "Description" })] }), _jsx(FormRow, { label: "Position:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.CellTextPosition ?? 'After', onValueChange: (v) =>
|
|
335
|
+
} }) }) }), _jsx(FormRow, { label: "Gap (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(NumberInput, { value: iconStyle.Gap ?? '', placeholder: "4", min: 0, step: 1, onChange: (value) => update({ Gap: typeof value === 'number' ? value : undefined }) }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optionally show the raw value or the matched description alongside the icon (e.g. flag plus label)." })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { checked: cellText.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: cellText.includes('IconDescription'), onChange: (checked) => toggleCellText('IconDescription', checked), children: "Description" })] }), _jsx(FormRow, { label: "Position:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.CellTextProperties?.CellTextPosition ?? 'After', onValueChange: (v) => updateCellTextProperties({
|
|
336
|
+
CellTextPosition: v,
|
|
337
|
+
}), items: [
|
|
311
338
|
{ value: 'Before', label: 'Before' },
|
|
312
339
|
{ value: 'After', label: 'After' },
|
|
313
340
|
{ value: 'Above', label: 'Above' },
|