@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Badge } from '../../View/Components/Badge';
|
|
2
2
|
import { renderWithAdaptableContext } from '../../View/renderWithAdaptableContext';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
4
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
5
5
|
const OVERFLOW_CLASS = {
|
|
6
6
|
Truncate: 'ab-Badge__wrapper--truncate',
|
|
7
7
|
Wrap: 'ab-Badge__wrapper--wrap',
|
|
@@ -83,7 +83,9 @@ export const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
83
83
|
...adaptableApi.internalApi.buildBaseContext(),
|
|
84
84
|
};
|
|
85
85
|
const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
|
|
86
|
-
const formattedValue = badge?.IconOnly
|
|
86
|
+
const formattedValue = badge?.IconProperties?.IconOnly
|
|
87
|
+
? ''
|
|
88
|
+
: params.formatValue?.(value) ?? value ?? '';
|
|
87
89
|
const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
|
|
88
90
|
if (!isNullValue) {
|
|
89
91
|
const config = { value: formattedValue };
|
|
@@ -113,7 +115,7 @@ export const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
113
115
|
this.eGui.innerHTML = formattedValue;
|
|
114
116
|
return;
|
|
115
117
|
}
|
|
116
|
-
if (badge.IconOnly) {
|
|
118
|
+
if (badge.IconProperties?.IconOnly) {
|
|
117
119
|
formattedValue = '';
|
|
118
120
|
}
|
|
119
121
|
this.renderBadges([
|
|
@@ -137,11 +139,11 @@ export const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
137
139
|
key: index,
|
|
138
140
|
pillStyle: badge.PillStyle,
|
|
139
141
|
children: value,
|
|
140
|
-
icon: badge.Icon,
|
|
141
|
-
iconPosition: badge.
|
|
142
|
+
icon: badge.IconProperties?.Icon,
|
|
143
|
+
iconPosition: badge.IconProperties?.Position ?? 'start',
|
|
142
144
|
shape: badge.Shape,
|
|
143
145
|
density: badgeStyle.Density ?? 'Normal',
|
|
144
|
-
iconGap: badge.
|
|
146
|
+
iconGap: badge.IconProperties?.Gap,
|
|
145
147
|
});
|
|
146
148
|
});
|
|
147
149
|
this.unmountReactRoot = api.internalApi
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
2
|
-
import clamp from '../../Utilities/
|
|
3
|
-
import {
|
|
2
|
+
import { clamp } from '../../Utilities/Extensions/NumberExtensions';
|
|
3
|
+
import { buildBarStyleCellTextLabels, hasBarStyleCellTextConfigured, mountBarStyleCellText, } from '../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
4
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
4
5
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
5
6
|
const DEFAULT_BAR_HEIGHT = 8;
|
|
6
7
|
const DEFAULT_BAND_HEIGHT = 14;
|
|
@@ -52,19 +53,18 @@ const normaliseMarker = (override, base) => {
|
|
|
52
53
|
};
|
|
53
54
|
};
|
|
54
55
|
const resolveTargets = (bulletStyle, styledColumn, abColumn, rowNode, api) => {
|
|
55
|
-
|
|
56
|
+
const targetSpec = bulletStyle.TargetProperties?.Target;
|
|
57
|
+
if (targetSpec == undefined) {
|
|
56
58
|
return [];
|
|
57
59
|
}
|
|
58
|
-
const targets = Array.isArray(
|
|
59
|
-
? bulletStyle.Target
|
|
60
|
-
: [bulletStyle.Target];
|
|
60
|
+
const targets = Array.isArray(targetSpec) ? targetSpec : [targetSpec];
|
|
61
61
|
const resolved = [];
|
|
62
62
|
for (const target of targets) {
|
|
63
63
|
const value = resolveTargetValue(target, styledColumn, abColumn, rowNode, api);
|
|
64
64
|
if (value == undefined || isNaN(value)) {
|
|
65
65
|
continue;
|
|
66
66
|
}
|
|
67
|
-
const marker = normaliseMarker(isTargetDefinition(target) ? target.Marker : undefined, bulletStyle.
|
|
67
|
+
const marker = normaliseMarker(isTargetDefinition(target) ? target.Marker : undefined, bulletStyle.TargetProperties?.Marker);
|
|
68
68
|
resolved.push({
|
|
69
69
|
value,
|
|
70
70
|
marker,
|
|
@@ -152,10 +152,10 @@ export const getBulletChartRendererForColumn = (styledColumn, abColumn, api) =>
|
|
|
152
152
|
// `BarThickness` is the bar's *short* axis (height in horizontal,
|
|
153
153
|
// width in vertical). `BandThickness` is the matching short-axis
|
|
154
154
|
// size of the surrounding bands.
|
|
155
|
-
const barThickness = bulletStyle.
|
|
155
|
+
const barThickness = bulletStyle.Bar?.Height ?? DEFAULT_BAR_HEIGHT;
|
|
156
156
|
const bandThickness = Math.max(barThickness + 6, DEFAULT_BAND_HEIGHT);
|
|
157
|
-
const
|
|
158
|
-
const
|
|
157
|
+
const cellTextProperties = bulletStyle.CellTextProperties;
|
|
158
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties);
|
|
159
159
|
// Map a 0..1 value fraction onto the long-axis viewBox (0..100).
|
|
160
160
|
// In horizontal: 0 -> left, 1 -> right.
|
|
161
161
|
// In vertical: 0 -> bottom, 1 -> top (SVG y origin is at the top so
|
|
@@ -172,7 +172,7 @@ export const getBulletChartRendererForColumn = (styledColumn, abColumn, api) =>
|
|
|
172
172
|
this.eGui.style.alignItems = isVertical ? 'center' : 'stretch';
|
|
173
173
|
this.eGui.style.justifyContent = 'center';
|
|
174
174
|
this.eGui.style.position = 'relative';
|
|
175
|
-
this.eGui.style.height =
|
|
175
|
+
this.eGui.style.height = '100%';
|
|
176
176
|
// SVG chart - we let `preserveAspectRatio="none"` stretch the long axis
|
|
177
177
|
// (viewBox 0..100) to fill the cell while the short axis stays fixed
|
|
178
178
|
// in pixels.
|
|
@@ -243,7 +243,7 @@ export const getBulletChartRendererForColumn = (styledColumn, abColumn, api) =>
|
|
|
243
243
|
const barCrossOffset = (bandThickness - barThickness) / 2;
|
|
244
244
|
const bar = document.createElementNS(SVG_NS, 'rect');
|
|
245
245
|
setRectAxes(bar, Math.min(valueCoord, originCoord), Math.abs(valueCoord - originCoord), barCrossOffset, barThickness);
|
|
246
|
-
bar.setAttribute('fill', bulletStyle.
|
|
246
|
+
bar.setAttribute('fill', bulletStyle.Bar?.Color ?? DEFAULT_BAR_COLOR);
|
|
247
247
|
bar.setAttribute('class', 'ab-BulletChart__bar');
|
|
248
248
|
svg.appendChild(bar);
|
|
249
249
|
// Target markers
|
|
@@ -255,39 +255,40 @@ export const getBulletChartRendererForColumn = (styledColumn, abColumn, api) =>
|
|
|
255
255
|
svg.appendChild(marker);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
|
|
258
|
+
// Wrap the SVG in a positioned container so a `Merged` text row can
|
|
259
|
+
// be absolute-positioned to the centre of the *bar* (matching Percent
|
|
260
|
+
// Bar's behaviour) instead of falling through to the wrapper centre,
|
|
261
|
+
// which would otherwise overlap an `Above` / `Below` band.
|
|
262
|
+
const svgContainer = document.createElement('div');
|
|
263
|
+
svgContainer.style.position = 'relative';
|
|
264
|
+
svgContainer.style.display = 'flex';
|
|
265
|
+
svgContainer.style.alignItems = 'center';
|
|
266
|
+
svgContainer.style.justifyContent = 'center';
|
|
267
|
+
// Horizontal: take the SVG's natural (bandThickness) height.
|
|
268
|
+
// Vertical: stretch to fill the wrapper so the SVG's `height: 100%`
|
|
269
|
+
// resolves against a real size.
|
|
270
|
+
if (isVertical) {
|
|
271
|
+
svgContainer.style.flex = '1 1 auto';
|
|
272
|
+
svgContainer.style.minHeight = '0';
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
svgContainer.style.flex = '0 0 auto';
|
|
276
|
+
}
|
|
277
|
+
svgContainer.appendChild(svg);
|
|
278
|
+
this.eGui.appendChild(svgContainer);
|
|
259
279
|
if (hasCellText) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
case 'Above':
|
|
273
|
-
this.eGui.prepend(textEl);
|
|
274
|
-
break;
|
|
275
|
-
case 'Merged':
|
|
276
|
-
textEl.style.position = 'absolute';
|
|
277
|
-
textEl.style.top = '50%';
|
|
278
|
-
textEl.style.transform = 'translateY(-50%)';
|
|
279
|
-
textEl.style.left = '0';
|
|
280
|
-
textEl.style.right = '0';
|
|
281
|
-
textEl.style.paddingLeft = '5px';
|
|
282
|
-
textEl.style.paddingRight = '5px';
|
|
283
|
-
textEl.style.pointerEvents = 'none';
|
|
284
|
-
this.eGui.appendChild(textEl);
|
|
285
|
-
break;
|
|
286
|
-
case 'Below':
|
|
287
|
-
default:
|
|
288
|
-
this.eGui.appendChild(textEl);
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
280
|
+
// See PercentBarRenderer: `params.formatValue` on a column without a
|
|
281
|
+
// `valueFormatter` returns the raw value (a number here), so coerce
|
|
282
|
+
// to string before it flows into the helpers.
|
|
283
|
+
const formattedCellValue = String(params.formatValue?.(cellValue) ?? cellValue);
|
|
284
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, formattedCellValue, `${(valueFraction * 100).toFixed(0)}%`);
|
|
285
|
+
mountBarStyleCellText({
|
|
286
|
+
wrapperEl: this.eGui,
|
|
287
|
+
mergedOverlayEl: svgContainer,
|
|
288
|
+
textClassName: 'ab-BulletChart__text',
|
|
289
|
+
cellTextProperties,
|
|
290
|
+
labels,
|
|
291
|
+
});
|
|
291
292
|
}
|
|
292
293
|
}
|
|
293
294
|
getGui() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyledColumn } from '../../AdaptableState/StyledColumnState';
|
|
2
|
+
import { IconStyle, IconStyleMapping } from '../../AdaptableState/StyledColumns/IconStyle';
|
|
2
3
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
4
|
import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
|
|
4
5
|
/**
|
|
@@ -2,9 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { IconComponent, isAdaptableSystemIcon, isAdaptableCustomIcon, isAdaptableElementIcon, } from '../../components/Icon';
|
|
3
3
|
import { renderWithAdaptableContext } from '../../View/renderWithAdaptableContext';
|
|
4
4
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
5
|
-
import { getIconStylePresetMappings } from '../../Utilities/Helpers/
|
|
6
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
7
|
-
import { isUnsupportedColumnDataTypeForIconStyle } from '../../Utilities/Helpers/iconStyledColumnColumnSupport';
|
|
5
|
+
import { getIconStylePresetMappings, isUnsupportedColumnDataTypeForIconStyle, } from '../../Utilities/Helpers/StyledColumns/IconStyleHelper';
|
|
6
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
8
7
|
import { errorOnce } from '../AdaptableLogger';
|
|
9
8
|
const DEFAULT_SIZE = 18;
|
|
10
9
|
const DEFAULT_GAP = 4;
|
|
@@ -193,7 +192,9 @@ export const getIconRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
193
192
|
const iconStyle = styledColumn.IconStyle;
|
|
194
193
|
const size = iconStyle.Size ?? DEFAULT_SIZE;
|
|
195
194
|
const gap = iconStyle.Gap ?? DEFAULT_GAP;
|
|
196
|
-
const
|
|
195
|
+
const cellTextProperties = iconStyle.CellTextProperties;
|
|
196
|
+
const textPosition = cellTextProperties?.CellTextPosition ?? 'After';
|
|
197
|
+
const cellTextTokens = cellTextProperties?.CellText ?? [];
|
|
197
198
|
const matchMode = iconStyle.MatchMode ?? 'Exact';
|
|
198
199
|
// Resolve once at column-setup time. Cheap; recomputed when the column
|
|
199
200
|
// is reconfigured (which is when this factory is re-invoked anyway).
|
|
@@ -230,16 +231,15 @@ export const getIconRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
230
231
|
const formatted = params.formatValue?.(cellValue) ??
|
|
231
232
|
(cellValue != undefined ? String(cellValue) : '');
|
|
232
233
|
// `CellText` describes the *companion text alongside a matched icon*.
|
|
233
|
-
// `
|
|
234
|
-
// independent: when there is no match,
|
|
235
|
-
// — `CellText` does not get to override `
|
|
234
|
+
// `FallbackProperties.Mode` describes *what to do when no mapping matches*.
|
|
235
|
+
// They are independent: when there is no match, the fallback decides
|
|
236
|
+
// on its own — `CellText` does not get to override `Mode: 'Hide'`.
|
|
236
237
|
let iconSpec;
|
|
237
238
|
let text;
|
|
238
239
|
let descriptionForTooltip;
|
|
239
240
|
if (matched) {
|
|
240
241
|
iconSpec = matched.Icon;
|
|
241
242
|
descriptionForTooltip = matched.Description;
|
|
242
|
-
const cellTextTokens = iconStyle.CellText ?? [];
|
|
243
243
|
const textParts = [];
|
|
244
244
|
if (cellTextTokens.includes('CellValue') && formatted) {
|
|
245
245
|
textParts.push(formatted);
|
|
@@ -250,17 +250,18 @@ export const getIconRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
250
250
|
text = textParts.length > 0 ? textParts.join(' · ') : undefined;
|
|
251
251
|
}
|
|
252
252
|
else if (!cellValueIsEmpty) {
|
|
253
|
-
// Unmatched, non-empty cell: defer entirely to
|
|
254
|
-
const
|
|
255
|
-
|
|
253
|
+
// Unmatched, non-empty cell: defer entirely to the fallback config.
|
|
254
|
+
const fallbackMode = iconStyle.FallbackProperties?.Mode ?? 'Hide';
|
|
255
|
+
const fallbackIcon = iconStyle.FallbackProperties?.Icon;
|
|
256
|
+
if (fallbackMode === 'ShowText') {
|
|
256
257
|
text = formatted || undefined;
|
|
257
258
|
}
|
|
258
|
-
else if (
|
|
259
|
-
iconSpec =
|
|
259
|
+
else if (fallbackMode === 'Icon' && fallbackIcon) {
|
|
260
|
+
iconSpec = fallbackIcon;
|
|
260
261
|
}
|
|
261
262
|
// 'Hide' (and the unsupported permutations) render nothing.
|
|
262
263
|
}
|
|
263
|
-
// else: empty cell → render nothing, regardless of
|
|
264
|
+
// else: empty cell → render nothing, regardless of fallback config.
|
|
264
265
|
// If we have nothing to draw, leave the cell empty (and skip mounting
|
|
265
266
|
// a React root for this row).
|
|
266
267
|
if (!iconSpec && !text) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
2
|
-
import clamp from '../../Utilities/
|
|
3
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
2
|
+
import { clamp } from '../../Utilities/Extensions/NumberExtensions';
|
|
3
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
4
|
+
import { buildBarStyleCellTextLabels, hasBarStyleCellTextConfigured, mountBarStyleCellText, } from '../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
4
5
|
/**
|
|
5
6
|
* Resolve the origin value (in the same numeric space as `min`/`max`) the bar
|
|
6
7
|
* should grow from.
|
|
@@ -41,58 +42,6 @@ const columnComparisonUsesCentredAxis = (origin) => {
|
|
|
41
42
|
}
|
|
42
43
|
return o === 'Zero' || o === 'Auto';
|
|
43
44
|
};
|
|
44
|
-
/**
|
|
45
|
-
* Linear (non-comparison) mode: bar grows from an interior point of the scale
|
|
46
|
-
* (so positives / negatives can diverge left and right).
|
|
47
|
-
*/
|
|
48
|
-
const linearScaleUsesCentredAxis = (percentBarStyle, cellValue, min, max) => {
|
|
49
|
-
const origin = percentBarStyle.Origin ?? 'Auto';
|
|
50
|
-
if (origin === 'Zero') {
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
if (origin === 'Min') {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
if (typeof origin === 'number') {
|
|
57
|
-
if (max === min) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
const f = toFraction(origin, min, max);
|
|
61
|
-
return f > 0 && f < 1;
|
|
62
|
-
}
|
|
63
|
-
// Auto — same condition as resolveOrigin using 0 as the pivot.
|
|
64
|
-
return min < 0 || max < 0 || cellValue < 0;
|
|
65
|
-
};
|
|
66
|
-
const resolveCellTextAlignCss = (percentBarStyle, args) => {
|
|
67
|
-
const mode = percentBarStyle.CellTextAlignment;
|
|
68
|
-
if (mode == undefined) {
|
|
69
|
-
return undefined;
|
|
70
|
-
}
|
|
71
|
-
if (mode === 'Left') {
|
|
72
|
-
return 'left';
|
|
73
|
-
}
|
|
74
|
-
if (mode === 'Right') {
|
|
75
|
-
return 'right';
|
|
76
|
-
}
|
|
77
|
-
if (mode === 'Center') {
|
|
78
|
-
return 'center';
|
|
79
|
-
}
|
|
80
|
-
// Auto
|
|
81
|
-
const centred = args.hasColumnComparison
|
|
82
|
-
? columnComparisonUsesCentredAxis(percentBarStyle.Origin)
|
|
83
|
-
: linearScaleUsesCentredAxis(percentBarStyle, args.numericValue, args.min, args.max);
|
|
84
|
-
if (!centred) {
|
|
85
|
-
return undefined;
|
|
86
|
-
}
|
|
87
|
-
const v = args.hasColumnComparison ? args.percentageValue : args.numericValue;
|
|
88
|
-
if (v > 0) {
|
|
89
|
-
return 'right';
|
|
90
|
-
}
|
|
91
|
-
if (v < 0) {
|
|
92
|
-
return 'left';
|
|
93
|
-
}
|
|
94
|
-
return 'center';
|
|
95
|
-
};
|
|
96
45
|
export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
97
46
|
if (!styledColumn.PercentBarStyle) {
|
|
98
47
|
return;
|
|
@@ -191,11 +140,14 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
191
140
|
}
|
|
192
141
|
}
|
|
193
142
|
// ----- Build the DOM -------------------------------------------------
|
|
194
|
-
const
|
|
195
|
-
const
|
|
143
|
+
const cellTextProperties = percentBarStyle.CellTextProperties;
|
|
144
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties);
|
|
145
|
+
// Wrapper always fills the cell. The bar is the flex-grow child so it
|
|
146
|
+
// claims whatever space the (compact) text rows leave, with a small
|
|
147
|
+
// floor to stay visible even on short rows.
|
|
196
148
|
this.eGui = document.createElement('div');
|
|
197
149
|
this.eGui.className = 'ab-PercentBar__wrapper';
|
|
198
|
-
this.eGui.style.height =
|
|
150
|
+
this.eGui.style.height = '100%';
|
|
199
151
|
this.eGui.style.display = 'flex';
|
|
200
152
|
this.eGui.style.flexDirection = 'column';
|
|
201
153
|
this.eGui.style.justifyContent = 'center';
|
|
@@ -208,7 +160,10 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
208
160
|
if (percentBarStyle.BackColor) {
|
|
209
161
|
barEl.style.background = percentBarStyle.BackColor;
|
|
210
162
|
}
|
|
211
|
-
barEl.style.flex = '1';
|
|
163
|
+
barEl.style.flex = '1 1 0';
|
|
164
|
+
// Floor so the bar can't be squeezed out of existence when both
|
|
165
|
+
// `Above` and `Below` bands are populated on a short row.
|
|
166
|
+
barEl.style.minHeight = '6px';
|
|
212
167
|
// Render the inside bar whenever a colour has been resolved, even at
|
|
213
168
|
// 0% width. A zero-width div is visually identical to skipping the
|
|
214
169
|
// element but keeps the DOM consistent so tests / tooling can still
|
|
@@ -229,47 +184,20 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
229
184
|
}
|
|
230
185
|
this.eGui.append(barEl);
|
|
231
186
|
if (hasCellText) {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
percentageValue,
|
|
246
|
-
min,
|
|
247
|
-
max,
|
|
248
|
-
hasColumnComparison: !!percentBarStyle.ColumnComparison,
|
|
187
|
+
// Coerce to string: when no `valueFormatter` is set on the column,
|
|
188
|
+
// `params.formatValue` returns the raw value (a number for numeric
|
|
189
|
+
// columns), which then propagates through the helpers as a non-string
|
|
190
|
+
// and breaks string-only operations (e.g. `.length` checks).
|
|
191
|
+
const formattedCellValue = String(params.formatValue?.(rawCellValue) ?? rawCellValue);
|
|
192
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, formattedCellValue, `${percentageValue.toFixed(0)}%`);
|
|
193
|
+
mountBarStyleCellText({
|
|
194
|
+
wrapperEl: this.eGui,
|
|
195
|
+
mergedOverlayEl: barEl,
|
|
196
|
+
textClassName: 'ab-PercentBar__text',
|
|
197
|
+
cellTextProperties,
|
|
198
|
+
labels,
|
|
199
|
+
mergedPointerEventsNone: false,
|
|
249
200
|
});
|
|
250
|
-
if (textAlignCss) {
|
|
251
|
-
textEl.style.textAlign = textAlignCss;
|
|
252
|
-
}
|
|
253
|
-
switch (percentBarStyle.CellTextPosition) {
|
|
254
|
-
case 'Above':
|
|
255
|
-
this.eGui.prepend(textEl);
|
|
256
|
-
break;
|
|
257
|
-
case 'Merged':
|
|
258
|
-
textEl.style.position = 'absolute';
|
|
259
|
-
// Centre vertically without knowing the row height
|
|
260
|
-
textEl.style.top = '50%';
|
|
261
|
-
textEl.style.transform = 'translateY(-50%)';
|
|
262
|
-
textEl.style.left = '0';
|
|
263
|
-
textEl.style.right = '0';
|
|
264
|
-
textEl.style.paddingLeft = '5px';
|
|
265
|
-
textEl.style.paddingRight = '5px';
|
|
266
|
-
barEl.append(textEl);
|
|
267
|
-
break;
|
|
268
|
-
case 'Below':
|
|
269
|
-
default:
|
|
270
|
-
this.eGui.append(textEl);
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
201
|
}
|
|
274
202
|
}
|
|
275
203
|
getGui() {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
2
|
-
import clamp from '../../Utilities/
|
|
3
|
-
import {
|
|
2
|
+
import { clamp } from '../../Utilities/Extensions/NumberExtensions';
|
|
3
|
+
import { buildBarStyleCellTextLabels, hasBarStyleCellTextConfigured, mountBarStyleCellText, } from '../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
4
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
4
5
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
5
6
|
const DEFAULT_TRACK_HEIGHT = 4;
|
|
6
7
|
const DEFAULT_BAND_HEIGHT = 14;
|
|
@@ -46,8 +47,7 @@ const normaliseMarker = (override, defaults) => {
|
|
|
46
47
|
return {
|
|
47
48
|
Shape: shape,
|
|
48
49
|
Color: override?.Color ?? defaults.Color,
|
|
49
|
-
Size: override?.Size ??
|
|
50
|
-
(shape === 'Line' ? DEFAULT_LINE_MARKER_THICKNESS : defaults.Size),
|
|
50
|
+
Size: override?.Size ?? (shape === 'Line' ? DEFAULT_LINE_MARKER_THICKNESS : defaults.Size),
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
@@ -96,8 +96,9 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
96
96
|
this.eGui.append(params.formatValue?.(rawCellValue) ?? String(rawCellValue));
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
99
|
+
const referenceProperties = rangeStyle.Reference;
|
|
100
|
+
const referenceValue = referenceProperties?.Value != undefined
|
|
101
|
+
? resolveBoundValue(referenceProperties.Value, abColumn, params.node, api)
|
|
101
102
|
: undefined;
|
|
102
103
|
// Markers - resolve user overrides against per-marker defaults.
|
|
103
104
|
const valueMarker = normaliseMarker(rangeStyle.Marker, {
|
|
@@ -105,21 +106,24 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
105
106
|
Color: DEFAULT_VALUE_MARKER_COLOR,
|
|
106
107
|
Size: DEFAULT_VALUE_MARKER_SIZE,
|
|
107
108
|
});
|
|
108
|
-
const referenceMarker = normaliseMarker(
|
|
109
|
+
const referenceMarker = normaliseMarker(referenceProperties?.Marker, {
|
|
109
110
|
Shape: 'Line',
|
|
110
111
|
Color: DEFAULT_REFERENCE_MARKER_COLOR,
|
|
111
112
|
Size: DEFAULT_LINE_MARKER_THICKNESS,
|
|
112
113
|
});
|
|
113
114
|
// Out-of-range handling
|
|
114
|
-
const
|
|
115
|
+
const outOfRangeProperties = rangeStyle.OutOfRange;
|
|
116
|
+
const outOfRangeMode = outOfRangeProperties?.Mode ?? 'Clamp';
|
|
117
|
+
const outOfRangeColor = outOfRangeProperties?.Color;
|
|
115
118
|
const isOutOfRange = numericValue < min || numericValue > max;
|
|
116
119
|
const hideValueMarker = isOutOfRange && outOfRangeMode === 'Hide';
|
|
117
120
|
// Layout
|
|
118
121
|
const isVertical = rangeStyle.Orientation === 'Vertical';
|
|
119
|
-
const
|
|
122
|
+
const trackProperties = rangeStyle.Track;
|
|
123
|
+
const trackThickness = trackProperties?.Height ?? DEFAULT_TRACK_HEIGHT;
|
|
120
124
|
const bandThickness = Math.max(trackThickness + 6, DEFAULT_BAND_HEIGHT);
|
|
121
|
-
const
|
|
122
|
-
const
|
|
125
|
+
const cellTextProperties = rangeStyle.CellTextProperties;
|
|
126
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties);
|
|
123
127
|
// Map a 0..1 fraction onto the long-axis viewBox (0..100). Vertical
|
|
124
128
|
// orientation inverts so that lower values appear at the bottom of
|
|
125
129
|
// the cell, matching user expectation.
|
|
@@ -132,7 +136,7 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
132
136
|
this.eGui.style.alignItems = isVertical ? 'center' : 'stretch';
|
|
133
137
|
this.eGui.style.justifyContent = 'center';
|
|
134
138
|
this.eGui.style.position = 'relative';
|
|
135
|
-
this.eGui.style.height =
|
|
139
|
+
this.eGui.style.height = '100%';
|
|
136
140
|
const svg = document.createElementNS(SVG_NS, 'svg');
|
|
137
141
|
svg.setAttribute('class', 'ab-RangeBar__svg');
|
|
138
142
|
svg.setAttribute('preserveAspectRatio', 'none');
|
|
@@ -191,11 +195,11 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
191
195
|
const trackCrossOffset = (bandThickness - trackThickness) / 2;
|
|
192
196
|
const track = document.createElementNS(SVG_NS, 'rect');
|
|
193
197
|
setRectAxes(track, 0, 100, trackCrossOffset, trackThickness);
|
|
194
|
-
track.setAttribute('fill',
|
|
198
|
+
track.setAttribute('fill', trackProperties?.Color ?? DEFAULT_TRACK_COLOR);
|
|
195
199
|
track.setAttribute('class', 'ab-RangeBar__track');
|
|
196
200
|
// Slight transparency by default so the track doesn't drown out the
|
|
197
|
-
// band colours; honour explicit user
|
|
198
|
-
if (
|
|
201
|
+
// band colours; honour explicit user Track.Color as-is.
|
|
202
|
+
if (trackProperties?.Color == undefined) {
|
|
199
203
|
// With no bands the cell background is often plain — the same muted
|
|
200
204
|
// foreground at 0.35 opacity can disappear (only the accent marker reads).
|
|
201
205
|
// Bands provide contrast underneath, so keep the subtle blend there.
|
|
@@ -224,8 +228,8 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
224
228
|
valueFraction = toFraction(numericValue, min, max);
|
|
225
229
|
}
|
|
226
230
|
const valueCoord = valueAxisCoord(valueFraction);
|
|
227
|
-
const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' &&
|
|
228
|
-
? { ...valueMarker, Color:
|
|
231
|
+
const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' && outOfRangeColor
|
|
232
|
+
? { ...valueMarker, Color: outOfRangeColor }
|
|
229
233
|
: valueMarker;
|
|
230
234
|
const markerEl = createMarkerElement(effectiveMarker, valueCoord, bandThickness, isVertical);
|
|
231
235
|
if (markerEl) {
|
|
@@ -233,40 +237,38 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
233
237
|
svg.appendChild(markerEl);
|
|
234
238
|
}
|
|
235
239
|
}
|
|
236
|
-
|
|
240
|
+
// Wrap the SVG in a positioned container so a `Merged` text row sits
|
|
241
|
+
// centred on the *bar*, not on the cell — see BulletChartRenderer for
|
|
242
|
+
// the same fix and Percent Bar for the matching behaviour via its
|
|
243
|
+
// `barEl`.
|
|
244
|
+
const svgContainer = document.createElement('div');
|
|
245
|
+
svgContainer.style.position = 'relative';
|
|
246
|
+
svgContainer.style.display = 'flex';
|
|
247
|
+
svgContainer.style.alignItems = 'center';
|
|
248
|
+
svgContainer.style.justifyContent = 'center';
|
|
249
|
+
if (isVertical) {
|
|
250
|
+
svgContainer.style.flex = '1 1 auto';
|
|
251
|
+
svgContainer.style.minHeight = '0';
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
svgContainer.style.flex = '0 0 auto';
|
|
255
|
+
}
|
|
256
|
+
svgContainer.appendChild(svg);
|
|
257
|
+
this.eGui.appendChild(svgContainer);
|
|
237
258
|
if (hasCellText) {
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
case 'Above':
|
|
252
|
-
this.eGui.prepend(textEl);
|
|
253
|
-
break;
|
|
254
|
-
case 'Merged':
|
|
255
|
-
textEl.style.position = 'absolute';
|
|
256
|
-
textEl.style.top = '50%';
|
|
257
|
-
textEl.style.transform = 'translateY(-50%)';
|
|
258
|
-
textEl.style.left = '0';
|
|
259
|
-
textEl.style.right = '0';
|
|
260
|
-
textEl.style.paddingLeft = '5px';
|
|
261
|
-
textEl.style.paddingRight = '5px';
|
|
262
|
-
textEl.style.pointerEvents = 'none';
|
|
263
|
-
this.eGui.appendChild(textEl);
|
|
264
|
-
break;
|
|
265
|
-
case 'Below':
|
|
266
|
-
default:
|
|
267
|
-
this.eGui.appendChild(textEl);
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
259
|
+
const pct = clamp((numericValue - min) / (max - min), 0, 1) * 100;
|
|
260
|
+
// See PercentBarRenderer: `params.formatValue` on a column without a
|
|
261
|
+
// `valueFormatter` returns the raw value (a number here), so coerce
|
|
262
|
+
// to string before it flows into the helpers.
|
|
263
|
+
const formattedCellValue = String(params.formatValue?.(numericValue) ?? numericValue);
|
|
264
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, formattedCellValue, `${pct.toFixed(0)}%`);
|
|
265
|
+
mountBarStyleCellText({
|
|
266
|
+
wrapperEl: this.eGui,
|
|
267
|
+
mergedOverlayEl: svgContainer,
|
|
268
|
+
textClassName: 'ab-RangeBar__text',
|
|
269
|
+
cellTextProperties,
|
|
270
|
+
labels,
|
|
271
|
+
});
|
|
270
272
|
}
|
|
271
273
|
}
|
|
272
274
|
getGui() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
2
|
-
import clamp from '../../Utilities/
|
|
3
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
2
|
+
import { clamp } from '../../Utilities/Extensions/NumberExtensions';
|
|
3
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
4
4
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
5
5
|
const DEFAULT_MAX = 5;
|
|
6
6
|
const DEFAULT_SIZE = 14;
|
|
@@ -3,7 +3,7 @@ import { renderWithAdaptableContext } from '../../../View/renderWithAdaptableCon
|
|
|
3
3
|
import { InternalAdaptableDateEditor, } from './InternalAdaptableDateEditor';
|
|
4
4
|
import { KeyCode } from 'ag-grid-enterprise';
|
|
5
5
|
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
6
|
-
import { DateFormatter } from '../../../Utilities/Helpers/
|
|
6
|
+
import { DateFormatter } from '../../../Utilities/Helpers/DisplayFormatHelper';
|
|
7
7
|
function shouldClearExistingValue(params) {
|
|
8
8
|
return params.eventKey === KeyCode.BACKSPACE || params.eventKey === KeyCode.DELETE;
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useCallback, useEffect } from 'react';
|
|
4
|
-
import debounce from '../../Utilities/
|
|
4
|
+
import { debounce } from '../../Utilities/Helpers/TimingHelper';
|
|
5
5
|
import { cn } from '../../lib/utils';
|
|
6
6
|
import Input from '../Input';
|
|
7
7
|
import { getVariableColor } from '../../Utilities/Helpers/StyleHelper';
|
|
@@ -4,7 +4,7 @@ import { useEffect, useLayoutEffect, useState } from 'react';
|
|
|
4
4
|
import useProperty from '../utils/useProperty';
|
|
5
5
|
import SimpleButton from '../SimpleButton';
|
|
6
6
|
import { ACCESS_LEVEL_FULL } from '../../Utilities/Constants/GeneralConstants';
|
|
7
|
-
import { DateFormatter } from '../../Utilities/Helpers/
|
|
7
|
+
import { DateFormatter } from '../../Utilities/Helpers/DisplayFormatHelper';
|
|
8
8
|
import { useDatepickerContext } from './DatepickerContext';
|
|
9
9
|
import { AdaptableDateInlineInput } from '../../View/Components/AdaptableInput/AdaptableDateInlineInput';
|
|
10
10
|
import { isValid, addYears, endOfYear, startOfYear, addDays, addBusinessDays, } from 'date-fns';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { createContext, useContext } from 'react';
|
|
4
|
-
import merge from '../../Utilities/
|
|
4
|
+
import { merge } from '../../Utilities/Extensions/ObjectExtensions';
|
|
5
5
|
import join from '../utils/join';
|
|
6
6
|
import { Box } from '../Flex';
|
|
7
7
|
const FormLayoutContext = createContext(null);
|