@adaptabletools/adaptable 23.0.0-canary.8 → 23.0.0
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 +42 -53
- 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/StyledColumns/BulletChartStyle.d.ts +5 -5
- package/src/AdaptableState/StyledColumns/Common/{BarChartCellText.d.ts → BarStyleProperties.d.ts} +34 -10
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +2 -2
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +2 -2
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +5 -5
- package/src/Api/Implementation/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +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.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/{barChartCellText.js → StyledColumns/BarStylesHelper.js} +33 -32
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -4
- 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 -2
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +7 -7
- 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 +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +2 -2
- 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 +1 -1
- 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/AdaptableObjectList.js +4 -6
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +1 -1
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +2 -2
- 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/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 +3 -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/Components/ToolPanel/ToolPanelPopupSections.js +5 -2
- 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/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/LayoutCloneButton.js +2 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +5 -5
- 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/StatusBar/StatusBarPopup.js +4 -0
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +1 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +40 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +17 -22
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +14 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextLayoutEditor.d.ts → BarStyleCellTextLayoutEditor.d.ts} +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +33 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.d.ts → BarStyleCellTextPreview.d.ts} +6 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.js → BarStyleCellTextPreview.js} +6 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +2 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +7 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +2 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +1 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +11 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +7 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +3 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +2 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +12 -17
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/CollapsibleWizardCard.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +7 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/View/Wizard/OnePageWizards.d.ts +8 -0
- package/src/View/Wizard/OnePageWizards.js +6 -4
- package/src/agGrid/AdaptableAgGrid.js +6 -6
- package/src/agGrid/AgGridColumnAdapter.js +16 -15
- package/src/agGrid/AgGridExportAdapter.js +1 -1
- package/src/agGrid/AgGridMenuAdapter.js +127 -2
- package/src/agGrid/cellRenderers/BadgeRenderer.js +1 -1
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +6 -6
- package/src/agGrid/cellRenderers/IconRenderer.js +2 -3
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +6 -6
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +7 -8
- 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/DragAndDropContext/ModuleManager.js +5 -2
- package/src/components/DragAndDropContext/types.d.ts +7 -0
- 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 +41 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.js +2 -2
- package/src/types.d.ts +3 -3
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +0 -6
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +0 -24
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
- package/src/Utilities/Helpers/barChartCellText.d.ts +0 -63
- 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/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +0 -35
- 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/AdaptableState/StyledColumns/Common/{BarChartMarker.js → BarStyleProperties.js} +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
|
@@ -140,38 +140,6 @@ export function isInputNullOrEmpty(itemToCheck) {
|
|
|
140
140
|
export function isInputNotNullOrEmpty(itemToCheck) {
|
|
141
141
|
return !isInputNullOrEmpty(itemToCheck);
|
|
142
142
|
}
|
|
143
|
-
export function roundNumber(numberToRound, decimalPlaces) {
|
|
144
|
-
switch (decimalPlaces) {
|
|
145
|
-
case 1:
|
|
146
|
-
return Math.round(numberToRound * 10) / 10;
|
|
147
|
-
case 2:
|
|
148
|
-
return Math.round(numberToRound * 100) / 100;
|
|
149
|
-
case 3:
|
|
150
|
-
return Math.round(numberToRound * 1000) / 1000;
|
|
151
|
-
case 4:
|
|
152
|
-
return Math.round(numberToRound * 10000) / 10000;
|
|
153
|
-
case 5:
|
|
154
|
-
return Math.round(numberToRound * 100000) / 100000;
|
|
155
|
-
case 6:
|
|
156
|
-
return Math.round(numberToRound * 1000000) / 1000000;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
export function roundNumberTo4dp(numberToRound) {
|
|
160
|
-
return roundNumber(numberToRound, 4);
|
|
161
|
-
}
|
|
162
|
-
// putting this here to remove lodash clamp which seems to cause an issue
|
|
163
|
-
export function clamp(value, boundOne, boundTwo) {
|
|
164
|
-
if (!boundTwo) {
|
|
165
|
-
return Math.max(value, boundOne) === boundOne ? value : boundOne;
|
|
166
|
-
}
|
|
167
|
-
else if (Math.min(value, boundOne) === value) {
|
|
168
|
-
return boundOne;
|
|
169
|
-
}
|
|
170
|
-
else if (Math.max(value, boundTwo) === value) {
|
|
171
|
-
return boundTwo;
|
|
172
|
-
}
|
|
173
|
-
return value;
|
|
174
|
-
}
|
|
175
143
|
export function extractColsFromText(text) {
|
|
176
144
|
// rowData.columnName => columnName
|
|
177
145
|
const regex = /\[rowData\.(.*?)\]/g;
|
|
@@ -212,9 +180,6 @@ export const Helper = {
|
|
|
212
180
|
returnItemCount,
|
|
213
181
|
isInputNullOrEmpty,
|
|
214
182
|
isInputNotNullOrEmpty,
|
|
215
|
-
roundNumber,
|
|
216
|
-
roundNumberTo4dp,
|
|
217
|
-
clamp,
|
|
218
183
|
extractColsFromText,
|
|
219
184
|
replaceAll,
|
|
220
185
|
extractContextKeysFromText,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QUICK_SEARCH_DEFAULT_CURRENT_TEXT_MATCH_STYLE, QUICK_SEARCH_DEFAULT_TEXT_MATCH_STYLE, } from '../../Redux/ActionsReducers/QuickSearchRedux';
|
|
2
2
|
import { convertAdaptableStyleToCSS } from './StyleHelper';
|
|
3
|
-
import kebabCase from '../
|
|
3
|
+
import { kebabCase } from '../Extensions/StringExtensions';
|
|
4
4
|
const QUICK_SEARCH_FIND_CSS_KEYS = [
|
|
5
5
|
'backgroundColor',
|
|
6
6
|
'color',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schedule, Weekday } from '
|
|
1
|
+
import { Schedule, Weekday } from '../../../AdaptableState/Common/Schedule';
|
|
2
2
|
export type ScheduleRecurrencePreset = 'daily' | 'weekdays' | 'selectedDays' | 'monthly' | 'custom';
|
|
3
3
|
export declare function buildCronExpression(preset: ScheduleRecurrencePreset, hour: number, minute: number, options?: {
|
|
4
4
|
days?: Weekday[];
|
package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlertButtonForm, AlertDefinition, RuleAlertProperties, RuleBasedAlertDefinition, ScheduledAlertDefinition } from '
|
|
1
|
+
import { AlertButtonForm, AlertDefinition, RuleAlertProperties, RuleBasedAlertDefinition, ScheduledAlertDefinition } from '../../../AdaptableState/AlertState';
|
|
2
2
|
export declare function isScheduledAlertDefinition(alert: AlertDefinition | undefined | null): alert is ScheduledAlertDefinition;
|
|
3
3
|
export declare function isRuleBasedAlertDefinition(alert: AlertDefinition | undefined | null): alert is RuleBasedAlertDefinition;
|
|
4
4
|
export declare function getRuleAlertProperties(alert: AlertDefinition | undefined | null): RuleAlertProperties | undefined;
|
package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import ObjectFactory from '
|
|
2
|
-
import { EMPTY_STRING } from '
|
|
3
|
-
import { ALERT_DEFAULT_MESSAGE_TYPE } from '
|
|
4
|
-
import { createUuid } from '
|
|
1
|
+
import ObjectFactory from '../../ObjectFactory';
|
|
2
|
+
import { EMPTY_STRING } from '../../Constants/GeneralConstants';
|
|
3
|
+
import { ALERT_DEFAULT_MESSAGE_TYPE } from '../../Constants/ObjectDefaultConstants';
|
|
4
|
+
import { createUuid } from '../../../AdaptableState/Uuid';
|
|
5
5
|
export function isScheduledAlertDefinition(alert) {
|
|
6
6
|
return alert != null && 'Schedule' in alert;
|
|
7
7
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IAdaptable } from '
|
|
1
|
+
import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
|
|
2
2
|
export declare function refreshScheduledAlertJobs(adaptable: IAdaptable): void;
|
|
3
3
|
export declare function refreshScheduledReportJobs(adaptable: IAdaptable): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as ModuleConstants from '
|
|
1
|
+
import * as ModuleConstants from '../../Constants/ModuleConstants';
|
|
2
2
|
export function refreshScheduledAlertJobs(adaptable) {
|
|
3
3
|
const alertModule = adaptable.adaptableModules.get(ModuleConstants.AlertModuleId);
|
|
4
4
|
alertModule?.setUpScheduledAlertJobs?.();
|
package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExportState, ReportNameType, ReportSchedule } from '
|
|
1
|
+
import { ExportState, ReportNameType, ReportSchedule } from '../../../AdaptableState/ExportState';
|
|
2
2
|
export declare function reportScheduleToSchedule(reportSchedule: {
|
|
3
3
|
ReportName?: string;
|
|
4
4
|
ScheduleType?: string;
|
package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createUuid } from '
|
|
1
|
+
import { createUuid } from '../../../AdaptableState/Uuid';
|
|
2
2
|
export function reportScheduleToSchedule(reportSchedule) {
|
|
3
3
|
const { ReportName: reportName, ScheduleType: _scheduleType, ...schedule } = reportSchedule;
|
|
4
4
|
return {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
2
|
+
import { SettingsPanelNavigation, SettingsPanelNavigationGroup, SettingsPanelOptions } from '../../AdaptableOptions/SettingsPanelOptions';
|
|
3
|
+
export declare const DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS: SettingsPanelNavigationGroup[];
|
|
4
|
+
export declare const buildDefaultSettingsPanelNavigation: (customPanelNames?: string[]) => SettingsPanelNavigation;
|
|
5
|
+
export declare const resolveSettingsPanelNavigation: (api: AdaptableApi, settingsPanelOptions: SettingsPanelOptions) => SettingsPanelNavigation;
|
|
@@ -45,3 +45,17 @@ export const buildDefaultSettingsPanelNavigation = (customPanelNames = []) => {
|
|
|
45
45
|
}
|
|
46
46
|
return { groups };
|
|
47
47
|
};
|
|
48
|
+
const cloneSettingsPanelNavigation = (navigation) => ({
|
|
49
|
+
groups: navigation.groups.map((group) => ({
|
|
50
|
+
label: group.label,
|
|
51
|
+
items: [...group.items],
|
|
52
|
+
})),
|
|
53
|
+
});
|
|
54
|
+
export const resolveSettingsPanelNavigation = (api, settingsPanelOptions) => {
|
|
55
|
+
const defaultNavigation = buildDefaultSettingsPanelNavigation(settingsPanelOptions.customSettingsPanels?.map((panel) => panel.name) ?? []);
|
|
56
|
+
if (!settingsPanelOptions.navigation) {
|
|
57
|
+
return defaultNavigation;
|
|
58
|
+
}
|
|
59
|
+
const context = api.internalApi.buildBaseContext();
|
|
60
|
+
return settingsPanelOptions.navigation(context, cloneSettingsPanelNavigation(defaultNavigation));
|
|
61
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BarStyleCellTextHorizontalAlignment, BarStyleCellTextLayout, BarStyleCellTextPlacement, BarStyleCellTextProperties, BarStyleCellTextVerticalAlignment } from '../../../AdaptableState/StyledColumns/Common/BarStyleProperties';
|
|
2
|
+
import { CellTextOption, CellTextOptions } from '../../../AdaptableState/StyledColumns/Common/CellTextOptions';
|
|
3
|
+
export type BarStyleCellTextLabels = {
|
|
4
|
+
cellValue?: string;
|
|
5
|
+
percentage?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const resolveBarStyleCellTextLayout: (props: BarStyleCellTextProperties | undefined) => BarStyleCellTextLayout;
|
|
8
|
+
/** True when any value is configured for display. */
|
|
9
|
+
export declare const hasBarStyleCellTextConfigured: (props: BarStyleCellTextProperties | undefined) => boolean;
|
|
10
|
+
/** Set of value tokens that currently have a placement. */
|
|
11
|
+
export declare const getActiveBarStyleCellTextTokens: (props: BarStyleCellTextProperties | undefined) => CellTextOptions;
|
|
12
|
+
export declare const mergeBarStyleCellTextProperties: (current: BarStyleCellTextProperties | undefined, patch: Partial<BarStyleCellTextProperties>) => BarStyleCellTextProperties | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Set or clear a value's placement. Passing `placement: undefined` removes the value.
|
|
15
|
+
*/
|
|
16
|
+
export declare const setBarStyleCellTextPlacement: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, placement: BarStyleCellTextPlacement | undefined) => BarStyleCellTextProperties | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Patch a single axis of a value's placement (creating the value with defaults if
|
|
19
|
+
* needed). Used by the wizard's placement pickers.
|
|
20
|
+
*/
|
|
21
|
+
export declare const patchBarStyleCellTextPlacement: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, patch: Partial<BarStyleCellTextPlacement>) => BarStyleCellTextProperties | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Toggle whether a value is displayed. When turning on a previously-hidden
|
|
24
|
+
* value we use the default placement (Left / Below).
|
|
25
|
+
*/
|
|
26
|
+
export declare const toggleBarStyleCellTextToken: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, show: boolean) => {
|
|
27
|
+
CellTextProperties: BarStyleCellTextProperties | undefined;
|
|
28
|
+
};
|
|
29
|
+
export declare const buildBarStyleCellTextLabels: (props: BarStyleCellTextProperties | undefined, cellValueLabel: string | undefined, percentageLabel: string | undefined) => BarStyleCellTextLabels;
|
|
30
|
+
export declare const hasBarStyleCellTextLabels: (labels: BarStyleCellTextLabels) => boolean;
|
|
31
|
+
/** Join active labels with a space, Cell Value first then Percent Value. */
|
|
32
|
+
export declare const joinBarStyleCellTextLabels: (labels: BarStyleCellTextLabels) => string;
|
|
33
|
+
export type BarStyleCellTextSlotEntry = {
|
|
34
|
+
vertical: BarStyleCellTextVerticalAlignment;
|
|
35
|
+
horizontal: BarStyleCellTextHorizontalAlignment;
|
|
36
|
+
/** Labels in render order (Cell Value first, then Percent Value). */
|
|
37
|
+
parts: string[];
|
|
38
|
+
/** The joined text, ready to render. */
|
|
39
|
+
text: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Resolve which placements are populated and what text goes in each cell of
|
|
43
|
+
* the 3 × 3 grid. Empty slots are omitted. Two values landing on the same
|
|
44
|
+
* (vertical, horizontal) slot are concatenated with a single space, Cell
|
|
45
|
+
* Value before Percent Value.
|
|
46
|
+
*/
|
|
47
|
+
export declare const resolveBarStyleCellTextSlots: (props: BarStyleCellTextProperties | undefined, labels: BarStyleCellTextLabels) => BarStyleCellTextSlotEntry[];
|
|
48
|
+
export type BarStyleCellTextSlotPresence = {
|
|
49
|
+
hasAbove: boolean;
|
|
50
|
+
hasBelow: boolean;
|
|
51
|
+
hasMerged: boolean;
|
|
52
|
+
};
|
|
53
|
+
export declare const getBarStyleCellTextSlotPresence: (props: BarStyleCellTextProperties | undefined) => BarStyleCellTextSlotPresence;
|
|
54
|
+
export declare const formatBarStyleCellTextLayoutSummary: (layout: BarStyleCellTextLayout) => string | undefined;
|
|
55
|
+
export type MountBarStyleCellTextArgs = {
|
|
56
|
+
wrapperEl: HTMLElement;
|
|
57
|
+
mergedOverlayEl?: HTMLElement;
|
|
58
|
+
textClassName: string;
|
|
59
|
+
cellTextProperties?: BarStyleCellTextProperties;
|
|
60
|
+
labels: BarStyleCellTextLabels;
|
|
61
|
+
mergedPointerEventsNone?: boolean;
|
|
62
|
+
};
|
|
63
|
+
export declare const mountBarStyleCellText: (args: MountBarStyleCellTextArgs) => void;
|
|
@@ -5,12 +5,13 @@ const DEFAULT_PLACEMENT = {
|
|
|
5
5
|
};
|
|
6
6
|
const HORIZONTAL_VALUES = ['Left', 'Center', 'Right'];
|
|
7
7
|
const VERTICAL_VALUES = ['Above', 'Below', 'Merged'];
|
|
8
|
-
const isHorizontal = (value) => typeof value === 'string' &&
|
|
9
|
-
HORIZONTAL_VALUES.includes(value);
|
|
8
|
+
const isHorizontal = (value) => typeof value === 'string' && HORIZONTAL_VALUES.includes(value);
|
|
10
9
|
const isVertical = (value) => typeof value === 'string' && VERTICAL_VALUES.includes(value);
|
|
11
10
|
/** Normalise a placement, applying defaults for missing axes. */
|
|
12
11
|
const sanitizePlacement = (placement) => ({
|
|
13
|
-
Horizontal: isHorizontal(placement?.Horizontal)
|
|
12
|
+
Horizontal: isHorizontal(placement?.Horizontal)
|
|
13
|
+
? placement.Horizontal
|
|
14
|
+
: DEFAULT_PLACEMENT.Horizontal,
|
|
14
15
|
Vertical: isVertical(placement?.Vertical) ? placement.Vertical : DEFAULT_PLACEMENT.Vertical,
|
|
15
16
|
});
|
|
16
17
|
/** Returns a layout with only the values that are actually present, defaults filled in. */
|
|
@@ -24,15 +25,15 @@ const sanitizeCellTextLayout = (layout) => {
|
|
|
24
25
|
}
|
|
25
26
|
return result;
|
|
26
27
|
};
|
|
27
|
-
export const
|
|
28
|
+
export const resolveBarStyleCellTextLayout = (props) => sanitizeCellTextLayout(props?.CellTextLayout);
|
|
28
29
|
/** True when any value is configured for display. */
|
|
29
|
-
export const
|
|
30
|
-
const layout =
|
|
30
|
+
export const hasBarStyleCellTextConfigured = (props) => {
|
|
31
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
31
32
|
return Boolean(layout.CellValue || layout.PercentValue);
|
|
32
33
|
};
|
|
33
34
|
/** Set of value tokens that currently have a placement. */
|
|
34
|
-
export const
|
|
35
|
-
const layout =
|
|
35
|
+
export const getActiveBarStyleCellTextTokens = (props) => {
|
|
36
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
36
37
|
const tokens = [];
|
|
37
38
|
if (layout.CellValue) {
|
|
38
39
|
tokens.push('CellValue');
|
|
@@ -42,7 +43,7 @@ export const getActiveBarChartCellTextTokens = (props) => {
|
|
|
42
43
|
}
|
|
43
44
|
return tokens;
|
|
44
45
|
};
|
|
45
|
-
export const
|
|
46
|
+
export const mergeBarStyleCellTextProperties = (current, patch) => {
|
|
46
47
|
const merged = { ...current, ...patch };
|
|
47
48
|
if (merged.CellTextLayout) {
|
|
48
49
|
merged.CellTextLayout = sanitizeCellTextLayout(merged.CellTextLayout);
|
|
@@ -58,8 +59,8 @@ export const mergeBarChartCellTextProperties = (current, patch) => {
|
|
|
58
59
|
/**
|
|
59
60
|
* Set or clear a value's placement. Passing `placement: undefined` removes the value.
|
|
60
61
|
*/
|
|
61
|
-
export const
|
|
62
|
-
const layout =
|
|
62
|
+
export const setBarStyleCellTextPlacement = (current, token, placement) => {
|
|
63
|
+
const layout = resolveBarStyleCellTextLayout(current);
|
|
63
64
|
const next = { ...layout };
|
|
64
65
|
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
65
66
|
if (placement) {
|
|
@@ -68,43 +69,43 @@ export const setBarChartCellTextPlacement = (current, token, placement) => {
|
|
|
68
69
|
else {
|
|
69
70
|
delete next[key];
|
|
70
71
|
}
|
|
71
|
-
return
|
|
72
|
+
return mergeBarStyleCellTextProperties(current, { CellTextLayout: next });
|
|
72
73
|
};
|
|
73
74
|
/**
|
|
74
75
|
* Patch a single axis of a value's placement (creating the value with defaults if
|
|
75
76
|
* needed). Used by the wizard's placement pickers.
|
|
76
77
|
*/
|
|
77
|
-
export const
|
|
78
|
-
const layout =
|
|
78
|
+
export const patchBarStyleCellTextPlacement = (current, token, patch) => {
|
|
79
|
+
const layout = resolveBarStyleCellTextLayout(current);
|
|
79
80
|
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
80
81
|
const existing = layout[key];
|
|
81
82
|
const nextPlacement = {
|
|
82
83
|
...(existing ?? DEFAULT_PLACEMENT),
|
|
83
84
|
...patch,
|
|
84
85
|
};
|
|
85
|
-
return
|
|
86
|
+
return setBarStyleCellTextPlacement(current, token, nextPlacement);
|
|
86
87
|
};
|
|
87
88
|
/**
|
|
88
89
|
* Toggle whether a value is displayed. When turning on a previously-hidden
|
|
89
90
|
* value we use the default placement (Left / Below).
|
|
90
91
|
*/
|
|
91
|
-
export const
|
|
92
|
-
const layout =
|
|
92
|
+
export const toggleBarStyleCellTextToken = (current, token, show) => {
|
|
93
|
+
const layout = resolveBarStyleCellTextLayout(current);
|
|
93
94
|
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
94
95
|
if (show && !layout[key]) {
|
|
95
96
|
return {
|
|
96
|
-
CellTextProperties:
|
|
97
|
+
CellTextProperties: setBarStyleCellTextPlacement(current, token, DEFAULT_PLACEMENT),
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
if (!show && layout[key]) {
|
|
100
101
|
return {
|
|
101
|
-
CellTextProperties:
|
|
102
|
+
CellTextProperties: setBarStyleCellTextPlacement(current, token, undefined),
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
105
|
return { CellTextProperties: current };
|
|
105
106
|
};
|
|
106
|
-
export const
|
|
107
|
-
const layout =
|
|
107
|
+
export const buildBarStyleCellTextLabels = (props, cellValueLabel, percentageLabel) => {
|
|
108
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
108
109
|
const labels = {};
|
|
109
110
|
if (layout.CellValue && cellValueLabel != undefined) {
|
|
110
111
|
labels.cellValue = cellValueLabel;
|
|
@@ -114,9 +115,9 @@ export const buildBarChartCellTextLabels = (props, cellValueLabel, percentageLab
|
|
|
114
115
|
}
|
|
115
116
|
return labels;
|
|
116
117
|
};
|
|
117
|
-
export const
|
|
118
|
+
export const hasBarStyleCellTextLabels = (labels) => Boolean(labels.cellValue || labels.percentage);
|
|
118
119
|
/** Join active labels with a space, Cell Value first then Percent Value. */
|
|
119
|
-
export const
|
|
120
|
+
export const joinBarStyleCellTextLabels = (labels) => {
|
|
120
121
|
const parts = [];
|
|
121
122
|
if (labels.cellValue)
|
|
122
123
|
parts.push(labels.cellValue);
|
|
@@ -130,8 +131,8 @@ export const joinBarChartCellTextLabels = (labels) => {
|
|
|
130
131
|
* (vertical, horizontal) slot are concatenated with a single space, Cell
|
|
131
132
|
* Value before Percent Value.
|
|
132
133
|
*/
|
|
133
|
-
export const
|
|
134
|
-
const layout =
|
|
134
|
+
export const resolveBarStyleCellTextSlots = (props, labels) => {
|
|
135
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
135
136
|
// Iteration order matters when both values share a slot: Cell Value first,
|
|
136
137
|
// then Percent Value (matches the legacy "joined" behaviour).
|
|
137
138
|
const candidates = [];
|
|
@@ -166,8 +167,8 @@ export const resolveBarChartCellTextSlots = (props, labels) => {
|
|
|
166
167
|
}
|
|
167
168
|
return Array.from(slotMap.values());
|
|
168
169
|
};
|
|
169
|
-
export const
|
|
170
|
-
const layout =
|
|
170
|
+
export const getBarStyleCellTextSlotPresence = (props) => {
|
|
171
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
171
172
|
const verticals = new Set();
|
|
172
173
|
if (layout.CellValue)
|
|
173
174
|
verticals.add(sanitizePlacement(layout.CellValue).Vertical);
|
|
@@ -197,7 +198,7 @@ const formatPlacementSummary = (placement) => {
|
|
|
197
198
|
const { Horizontal, Vertical } = sanitizePlacement(placement);
|
|
198
199
|
return `${VERTICAL_LABEL[Vertical]}-${HORIZONTAL_LABEL[Horizontal]}`;
|
|
199
200
|
};
|
|
200
|
-
export const
|
|
201
|
+
export const formatBarStyleCellTextLayoutSummary = (layout) => {
|
|
201
202
|
const parts = [];
|
|
202
203
|
if (layout.CellValue) {
|
|
203
204
|
parts.push(`${formatTokenLabel('CellValue')}: ${formatPlacementSummary(layout.CellValue)}`);
|
|
@@ -266,12 +267,12 @@ const createCellTextRow = (slots, textClassName, compact) => {
|
|
|
266
267
|
}
|
|
267
268
|
return row;
|
|
268
269
|
};
|
|
269
|
-
export const
|
|
270
|
+
export const mountBarStyleCellText = (args) => {
|
|
270
271
|
const { cellTextProperties, labels, wrapperEl, textClassName } = args;
|
|
271
|
-
if (!
|
|
272
|
+
if (!hasBarStyleCellTextConfigured(cellTextProperties) || !hasBarStyleCellTextLabels(labels)) {
|
|
272
273
|
return;
|
|
273
274
|
}
|
|
274
|
-
const slots =
|
|
275
|
+
const slots = resolveBarStyleCellTextSlots(cellTextProperties, labels);
|
|
275
276
|
if (!slots.length) {
|
|
276
277
|
return;
|
|
277
278
|
}
|
|
@@ -286,7 +287,7 @@ export const mountBarChartCellText = (args) => {
|
|
|
286
287
|
// (i.e. the two tokens claim two separate bands of vertical space). When
|
|
287
288
|
// they share a vertical band — or when only one token is configured —
|
|
288
289
|
// we have room for the full-size font.
|
|
289
|
-
const layout =
|
|
290
|
+
const layout = resolveBarStyleCellTextLayout(cellTextProperties);
|
|
290
291
|
const compact = Boolean(layout.CellValue &&
|
|
291
292
|
layout.PercentValue &&
|
|
292
293
|
sanitizePlacement(layout.CellValue).Vertical !==
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { IRowNode } from 'ag-grid-community';
|
|
3
|
-
import { StyledColumn } from '
|
|
4
|
-
import { CellColorRange, NumericStyledColumn } from '
|
|
5
|
-
import { GradientStyle } from '
|
|
6
|
-
import { AdaptableApi } from '
|
|
3
|
+
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
4
|
+
import { CellColorRange, NumericStyledColumn } from '../../../AdaptableState/StyledColumns/Common/NumericStyledColumn';
|
|
5
|
+
import { GradientStyle } from '../../../AdaptableState/StyledColumns/GradientStyle';
|
|
6
|
+
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
7
7
|
/**
|
|
8
8
|
* Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
|
|
9
9
|
* Slightly above zero so the bottom-edge value of every range still shows its
|
package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import tinycolor from 'tinycolor2';
|
|
2
|
-
import { convertAdaptableStyleToCSS } from '
|
|
3
|
-
import { getAutoContrastTextColor, getVariableColor } from '
|
|
4
|
-
import clamp from '
|
|
2
|
+
import { convertAdaptableStyleToCSS } from '../StyleHelper';
|
|
3
|
+
import { getAutoContrastTextColor, getVariableColor } from '../StyleHelper';
|
|
4
|
+
import { clamp } from '../../Extensions/NumberExtensions';
|
|
5
5
|
/**
|
|
6
6
|
* Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
|
|
7
7
|
* Slightly above zero so the bottom-edge value of every range still shows its
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { IconStyleBuiltInPreset, IconStyleMapping } from '
|
|
1
|
+
import { IconStyleBuiltInPreset, IconStyleMapping } from '../../../AdaptableState/StyledColumns/IconStyle';
|
|
2
|
+
/**
|
|
3
|
+
* Icon Column Style resolves one key → glyph per scalar cell value; AdapTable
|
|
4
|
+
* array column types are not supported (use Badge Style for per-element visuals).
|
|
5
|
+
*/
|
|
6
|
+
export declare function isUnsupportedColumnDataTypeForIconStyle(dataType?: string): boolean;
|
|
2
7
|
export declare const ICON_STYLE_PRESETS: Record<IconStyleBuiltInPreset, IconStyleMapping[]>;
|
|
3
8
|
/** Returns a fresh copy of the mappings for a given preset. */
|
|
4
9
|
export declare const getIconStylePresetMappings: (preset: IconStyleBuiltInPreset) => IconStyleMapping[];
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon Column Style resolves one key → glyph per scalar cell value; AdapTable
|
|
3
|
+
* array column types are not supported (use Badge Style for per-element visuals).
|
|
4
|
+
*/
|
|
5
|
+
export function isUnsupportedColumnDataTypeForIconStyle(dataType) {
|
|
6
|
+
switch (dataType) {
|
|
7
|
+
case 'textArray':
|
|
8
|
+
case 'numberArray':
|
|
9
|
+
case 'tupleArray':
|
|
10
|
+
case 'objectArray':
|
|
11
|
+
return true;
|
|
12
|
+
default:
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
1
16
|
/**
|
|
2
17
|
* Built-in {@link IconStyle} mapping presets.
|
|
3
18
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { StyledColumn } from '
|
|
2
|
-
import { PercentBarStyle } from '
|
|
1
|
+
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
2
|
+
import { PercentBarStyle } from '../../../AdaptableState/StyledColumns/PercentBarStyle';
|
|
3
3
|
export declare const hasPercentBarRangesConfigured: (pb: PercentBarStyle | undefined) => boolean;
|
|
4
4
|
/** Illustrative scale for preview — shows negatives when origin is Auto or Zero. */
|
|
5
5
|
export declare const getPercentBarPreviewScale: (pb: PercentBarStyle) => {
|
package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getVariableColor } from '
|
|
2
|
-
import clamp from '
|
|
3
|
-
import { STYLED_COLUMN_PREVIEW_SAMPLE_COUNT, ZERO_CENTRED_PREVIEW_SCALE_MAX, ZERO_CENTRED_PREVIEW_SCALE_MIN, } from './
|
|
4
|
-
import {
|
|
1
|
+
import { getVariableColor } from '../StyleHelper';
|
|
2
|
+
import { clamp } from '../../Extensions/NumberExtensions';
|
|
3
|
+
import { STYLED_COLUMN_PREVIEW_SAMPLE_COUNT, ZERO_CENTRED_PREVIEW_SCALE_MAX, ZERO_CENTRED_PREVIEW_SCALE_MIN, } from './GradientStyleHelper';
|
|
4
|
+
import { buildBarStyleCellTextLabels, joinBarStyleCellTextLabels } from './BarStylesHelper';
|
|
5
5
|
const evenlySpacedValues = (min, max, count) => {
|
|
6
6
|
if (count <= 1) {
|
|
7
7
|
return [min];
|
|
@@ -125,8 +125,8 @@ export const getPercentBarPreviewGeometry = (numericValue, pb, min, max) => {
|
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
127
|
export const formatPercentBarPreviewCellText = (numericValue, percentageValue, pb) => {
|
|
128
|
-
const labels =
|
|
129
|
-
return
|
|
128
|
+
const labels = buildBarStyleCellTextLabels(pb.CellTextProperties, Number.isInteger(numericValue) ? String(numericValue) : numericValue.toFixed(1), `${percentageValue.toFixed(0)}%`);
|
|
129
|
+
return joinBarStyleCellTextLabels(labels);
|
|
130
130
|
};
|
|
131
131
|
export const getPercentBarPreviewTrackColor = (pb) => {
|
|
132
132
|
if (pb.ColumnComparison) {
|
|
@@ -134,5 +134,5 @@ export const getPercentBarPreviewTrackColor = (pb) => {
|
|
|
134
134
|
}
|
|
135
135
|
return pb.BackColor ?? undefined;
|
|
136
136
|
};
|
|
137
|
-
export const getPercentBarPreviewResolvedBarColor = (color) => color ? getVariableColor(color) : undefined;
|
|
137
|
+
export const getPercentBarPreviewResolvedBarColor = (color) => (color ? getVariableColor(color) : undefined);
|
|
138
138
|
export const hasPercentBarStylePreview = (styledColumn) => hasPercentBarRangesConfigured(styledColumn.PercentBarStyle);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { IRowNode } from 'ag-grid-enterprise';
|
|
2
|
+
import type { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
3
|
+
import type { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
4
|
+
import type { RowScope } from '../../../AdaptableState/Common/RowScope';
|
|
5
|
+
/**
|
|
6
|
+
* Row kinds used by {@link RowScope} and the Styled Column Scope wizard.
|
|
7
|
+
* All are available to all Styled Columns with exception of Sparkline (which is data rows only)
|
|
8
|
+
*/
|
|
9
|
+
export type StyledColumnRowKind = 'Data' | 'Group' | 'Summary' | 'Total';
|
|
10
|
+
export declare const STYLED_COLUMN_ROW_KINDS: StyledColumnRowKind[];
|
|
11
|
+
export declare const STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY: Record<StyledColumnRowKind, keyof RowScope>;
|
|
12
|
+
export declare const isStyledColumnRowKindSupported: (styledColumn: StyledColumn, kind: StyledColumnRowKind) => boolean;
|
|
13
|
+
export declare const getStyledColumnRowKindDisabledReason: (styledColumn: StyledColumn, kind: StyledColumnRowKind) => string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Classifies the AG Grid row node into a single {@link StyledColumnRowKind}.
|
|
16
|
+
* Order matches {@link shouldRenderStyledColumnOnRow}: total before summary,
|
|
17
|
+
* summary before group.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getStyledColumnRowKindForNode: (node: IRowNode, api: AdaptableApi) => StyledColumnRowKind;
|
|
20
|
+
/**
|
|
21
|
+
* Forces `Exclude*` to `true` for row kinds that do not apply to the current
|
|
22
|
+
* Styled Column type, so persisted state cannot contradict the capability
|
|
23
|
+
* matrix. Returns `undefined` when no change is needed.
|
|
24
|
+
*/
|
|
25
|
+
export declare const sanitizeStyledColumnRowScope: (styledColumn: StyledColumn) => RowScope | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Returns `true` when the Styled Column should render on the given row.
|
|
28
|
+
*
|
|
29
|
+
* Single source of truth consulted by every styled-column cell renderer
|
|
30
|
+
* (Badge / Icon / Rating / Percent Bar / Bullet Chart / Range Bar) and
|
|
31
|
+
* by `getStyledColumnStyle` (Gradient / Percent Bar cellStyle).
|
|
32
|
+
*
|
|
33
|
+
* Semantics:
|
|
34
|
+
* - **Type capabilities** first: some types never target certain row kinds
|
|
35
|
+
* (see {@link isStyledColumnRowKindSupported}). Unsupported kinds always
|
|
36
|
+
* return `false` regardless of `RowScope`.
|
|
37
|
+
* - When `StyledColumn.RowScope` is **set**, the explicit `Exclude*`
|
|
38
|
+
* flags win. Unset flags default to "include" — i.e. `RowScope: {}`
|
|
39
|
+
* means "render on every *supported* row kind".
|
|
40
|
+
* - When `StyledColumn.RowScope` is **unset**, the historical per-type
|
|
41
|
+
* default applies:
|
|
42
|
+
* - Badge: render on every row kind (that the type supports).
|
|
43
|
+
* - All other types: render on every row kind *except* group rows
|
|
44
|
+
* (matches the hardcoded "isGroupRowNode → plain text" check that
|
|
45
|
+
* every other styled-column renderer used to carry), again
|
|
46
|
+
* intersected with type capabilities (e.g. Sparkline → data only).
|
|
47
|
+
*
|
|
48
|
+
* The per-type default lets us promote `RowScope` cleanly without
|
|
49
|
+
* altering existing user-visible behaviour: state that doesn't mention
|
|
50
|
+
* `RowScope` keeps rendering exactly as before.
|
|
51
|
+
*/
|
|
52
|
+
export declare const shouldRenderStyledColumnOnRow: (styledColumn: StyledColumn, node: IRowNode, api: AdaptableApi) => boolean;
|