@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
|
@@ -10,9 +10,6 @@ export declare function copyToClipboard(text: string): Promise<boolean>;
|
|
|
10
10
|
export declare function returnItemCount(items: any[], itemName: string): string;
|
|
11
11
|
export declare function isInputNullOrEmpty(itemToCheck: any): boolean;
|
|
12
12
|
export declare function isInputNotNullOrEmpty(itemToCheck: any): boolean;
|
|
13
|
-
export declare function roundNumber(numberToRound: any, decimalPlaces: number): number;
|
|
14
|
-
export declare function roundNumberTo4dp(numberToRound: any): number;
|
|
15
|
-
export declare function clamp(value: any, boundOne: number, boundTwo: number): number;
|
|
16
13
|
export declare function extractColsFromText(text: string): string[];
|
|
17
14
|
export declare function replaceAll(text: string, toReplace: string, replaceWith: string): string;
|
|
18
15
|
export declare function extractContextKeysFromText(text: string): string[];
|
|
@@ -28,9 +25,6 @@ export declare const Helper: {
|
|
|
28
25
|
returnItemCount: typeof returnItemCount;
|
|
29
26
|
isInputNullOrEmpty: typeof isInputNullOrEmpty;
|
|
30
27
|
isInputNotNullOrEmpty: typeof isInputNotNullOrEmpty;
|
|
31
|
-
roundNumber: typeof roundNumber;
|
|
32
|
-
roundNumberTo4dp: typeof roundNumberTo4dp;
|
|
33
|
-
clamp: typeof clamp;
|
|
34
28
|
extractColsFromText: typeof extractColsFromText;
|
|
35
29
|
replaceAll: typeof replaceAll;
|
|
36
30
|
extractContextKeysFromText: typeof extractContextKeysFromText;
|
|
@@ -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;
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/** Default placement applied to a value whose Horizontal/Vertical were omitted. */
|
|
2
|
+
const DEFAULT_PLACEMENT = {
|
|
3
|
+
Horizontal: 'Left',
|
|
4
|
+
Vertical: 'Below',
|
|
5
|
+
};
|
|
6
|
+
const HORIZONTAL_VALUES = ['Left', 'Center', 'Right'];
|
|
7
|
+
const VERTICAL_VALUES = ['Above', 'Below', 'Merged'];
|
|
8
|
+
const isHorizontal = (value) => typeof value === 'string' && HORIZONTAL_VALUES.includes(value);
|
|
9
|
+
const isVertical = (value) => typeof value === 'string' && VERTICAL_VALUES.includes(value);
|
|
10
|
+
/** Normalise a placement, applying defaults for missing axes. */
|
|
11
|
+
const sanitizePlacement = (placement) => ({
|
|
12
|
+
Horizontal: isHorizontal(placement?.Horizontal)
|
|
13
|
+
? placement.Horizontal
|
|
14
|
+
: DEFAULT_PLACEMENT.Horizontal,
|
|
15
|
+
Vertical: isVertical(placement?.Vertical) ? placement.Vertical : DEFAULT_PLACEMENT.Vertical,
|
|
16
|
+
});
|
|
17
|
+
/** Returns a layout with only the values that are actually present, defaults filled in. */
|
|
18
|
+
const sanitizeCellTextLayout = (layout) => {
|
|
19
|
+
const result = {};
|
|
20
|
+
if (layout?.CellValue) {
|
|
21
|
+
result.CellValue = sanitizePlacement(layout.CellValue);
|
|
22
|
+
}
|
|
23
|
+
if (layout?.PercentValue) {
|
|
24
|
+
result.PercentValue = sanitizePlacement(layout.PercentValue);
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
export const resolveBarStyleCellTextLayout = (props) => sanitizeCellTextLayout(props?.CellTextLayout);
|
|
29
|
+
/** True when any value is configured for display. */
|
|
30
|
+
export const hasBarStyleCellTextConfigured = (props) => {
|
|
31
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
32
|
+
return Boolean(layout.CellValue || layout.PercentValue);
|
|
33
|
+
};
|
|
34
|
+
/** Set of value tokens that currently have a placement. */
|
|
35
|
+
export const getActiveBarStyleCellTextTokens = (props) => {
|
|
36
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
37
|
+
const tokens = [];
|
|
38
|
+
if (layout.CellValue) {
|
|
39
|
+
tokens.push('CellValue');
|
|
40
|
+
}
|
|
41
|
+
if (layout.PercentValue) {
|
|
42
|
+
tokens.push('PercentageValue');
|
|
43
|
+
}
|
|
44
|
+
return tokens;
|
|
45
|
+
};
|
|
46
|
+
export const mergeBarStyleCellTextProperties = (current, patch) => {
|
|
47
|
+
const merged = { ...current, ...patch };
|
|
48
|
+
if (merged.CellTextLayout) {
|
|
49
|
+
merged.CellTextLayout = sanitizeCellTextLayout(merged.CellTextLayout);
|
|
50
|
+
if (!merged.CellTextLayout.CellValue && !merged.CellTextLayout.PercentValue) {
|
|
51
|
+
delete merged.CellTextLayout;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (!merged.CellTextLayout) {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
return merged;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Set or clear a value's placement. Passing `placement: undefined` removes the value.
|
|
61
|
+
*/
|
|
62
|
+
export const setBarStyleCellTextPlacement = (current, token, placement) => {
|
|
63
|
+
const layout = resolveBarStyleCellTextLayout(current);
|
|
64
|
+
const next = { ...layout };
|
|
65
|
+
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
66
|
+
if (placement) {
|
|
67
|
+
next[key] = sanitizePlacement(placement);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
delete next[key];
|
|
71
|
+
}
|
|
72
|
+
return mergeBarStyleCellTextProperties(current, { CellTextLayout: next });
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Patch a single axis of a value's placement (creating the value with defaults if
|
|
76
|
+
* needed). Used by the wizard's placement pickers.
|
|
77
|
+
*/
|
|
78
|
+
export const patchBarStyleCellTextPlacement = (current, token, patch) => {
|
|
79
|
+
const layout = resolveBarStyleCellTextLayout(current);
|
|
80
|
+
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
81
|
+
const existing = layout[key];
|
|
82
|
+
const nextPlacement = {
|
|
83
|
+
...(existing ?? DEFAULT_PLACEMENT),
|
|
84
|
+
...patch,
|
|
85
|
+
};
|
|
86
|
+
return setBarStyleCellTextPlacement(current, token, nextPlacement);
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Toggle whether a value is displayed. When turning on a previously-hidden
|
|
90
|
+
* value we use the default placement (Left / Below).
|
|
91
|
+
*/
|
|
92
|
+
export const toggleBarStyleCellTextToken = (current, token, show) => {
|
|
93
|
+
const layout = resolveBarStyleCellTextLayout(current);
|
|
94
|
+
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
95
|
+
if (show && !layout[key]) {
|
|
96
|
+
return {
|
|
97
|
+
CellTextProperties: setBarStyleCellTextPlacement(current, token, DEFAULT_PLACEMENT),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
if (!show && layout[key]) {
|
|
101
|
+
return {
|
|
102
|
+
CellTextProperties: setBarStyleCellTextPlacement(current, token, undefined),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return { CellTextProperties: current };
|
|
106
|
+
};
|
|
107
|
+
export const buildBarStyleCellTextLabels = (props, cellValueLabel, percentageLabel) => {
|
|
108
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
109
|
+
const labels = {};
|
|
110
|
+
if (layout.CellValue && cellValueLabel != undefined) {
|
|
111
|
+
labels.cellValue = cellValueLabel;
|
|
112
|
+
}
|
|
113
|
+
if (layout.PercentValue && percentageLabel != undefined) {
|
|
114
|
+
labels.percentage = percentageLabel;
|
|
115
|
+
}
|
|
116
|
+
return labels;
|
|
117
|
+
};
|
|
118
|
+
export const hasBarStyleCellTextLabels = (labels) => Boolean(labels.cellValue || labels.percentage);
|
|
119
|
+
/** Join active labels with a space, Cell Value first then Percent Value. */
|
|
120
|
+
export const joinBarStyleCellTextLabels = (labels) => {
|
|
121
|
+
const parts = [];
|
|
122
|
+
if (labels.cellValue)
|
|
123
|
+
parts.push(labels.cellValue);
|
|
124
|
+
if (labels.percentage)
|
|
125
|
+
parts.push(labels.percentage);
|
|
126
|
+
return parts.join(' ');
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Resolve which placements are populated and what text goes in each cell of
|
|
130
|
+
* the 3 × 3 grid. Empty slots are omitted. Two values landing on the same
|
|
131
|
+
* (vertical, horizontal) slot are concatenated with a single space, Cell
|
|
132
|
+
* Value before Percent Value.
|
|
133
|
+
*/
|
|
134
|
+
export const resolveBarStyleCellTextSlots = (props, labels) => {
|
|
135
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
136
|
+
// Iteration order matters when both values share a slot: Cell Value first,
|
|
137
|
+
// then Percent Value (matches the legacy "joined" behaviour).
|
|
138
|
+
const candidates = [];
|
|
139
|
+
if (layout.CellValue && labels.cellValue) {
|
|
140
|
+
candidates.push({
|
|
141
|
+
placement: sanitizePlacement(layout.CellValue),
|
|
142
|
+
text: labels.cellValue,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
if (layout.PercentValue && labels.percentage) {
|
|
146
|
+
candidates.push({
|
|
147
|
+
placement: sanitizePlacement(layout.PercentValue),
|
|
148
|
+
text: labels.percentage,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
const slotMap = new Map();
|
|
152
|
+
for (const { placement, text } of candidates) {
|
|
153
|
+
const key = `${placement.Vertical}|${placement.Horizontal}`;
|
|
154
|
+
const existing = slotMap.get(key);
|
|
155
|
+
if (existing) {
|
|
156
|
+
existing.parts.push(text);
|
|
157
|
+
existing.text = existing.parts.join(' ');
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
slotMap.set(key, {
|
|
161
|
+
vertical: placement.Vertical,
|
|
162
|
+
horizontal: placement.Horizontal,
|
|
163
|
+
parts: [text],
|
|
164
|
+
text,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return Array.from(slotMap.values());
|
|
169
|
+
};
|
|
170
|
+
export const getBarStyleCellTextSlotPresence = (props) => {
|
|
171
|
+
const layout = resolveBarStyleCellTextLayout(props);
|
|
172
|
+
const verticals = new Set();
|
|
173
|
+
if (layout.CellValue)
|
|
174
|
+
verticals.add(sanitizePlacement(layout.CellValue).Vertical);
|
|
175
|
+
if (layout.PercentValue)
|
|
176
|
+
verticals.add(sanitizePlacement(layout.PercentValue).Vertical);
|
|
177
|
+
return {
|
|
178
|
+
hasAbove: verticals.has('Above'),
|
|
179
|
+
hasBelow: verticals.has('Below'),
|
|
180
|
+
hasMerged: verticals.has('Merged'),
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
// Summary formatting
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
const HORIZONTAL_LABEL = {
|
|
187
|
+
Left: 'Left',
|
|
188
|
+
Center: 'Center',
|
|
189
|
+
Right: 'Right',
|
|
190
|
+
};
|
|
191
|
+
const VERTICAL_LABEL = {
|
|
192
|
+
Above: 'Above',
|
|
193
|
+
Below: 'Below',
|
|
194
|
+
Merged: 'Merged',
|
|
195
|
+
};
|
|
196
|
+
const formatTokenLabel = (token) => token === 'CellValue' ? 'Cell Value' : 'Percent Value';
|
|
197
|
+
const formatPlacementSummary = (placement) => {
|
|
198
|
+
const { Horizontal, Vertical } = sanitizePlacement(placement);
|
|
199
|
+
return `${VERTICAL_LABEL[Vertical]}-${HORIZONTAL_LABEL[Horizontal]}`;
|
|
200
|
+
};
|
|
201
|
+
export const formatBarStyleCellTextLayoutSummary = (layout) => {
|
|
202
|
+
const parts = [];
|
|
203
|
+
if (layout.CellValue) {
|
|
204
|
+
parts.push(`${formatTokenLabel('CellValue')}: ${formatPlacementSummary(layout.CellValue)}`);
|
|
205
|
+
}
|
|
206
|
+
if (layout.PercentValue) {
|
|
207
|
+
parts.push(`${formatTokenLabel('PercentageValue')}: ${formatPlacementSummary(layout.PercentValue)}`);
|
|
208
|
+
}
|
|
209
|
+
return parts.length ? parts.join('; ') : undefined;
|
|
210
|
+
};
|
|
211
|
+
// ---------------------------------------------------------------------------
|
|
212
|
+
// DOM mount
|
|
213
|
+
// ---------------------------------------------------------------------------
|
|
214
|
+
const HORIZONTAL_FLEX_JUSTIFY = {
|
|
215
|
+
Left: 'flex-start',
|
|
216
|
+
Center: 'center',
|
|
217
|
+
Right: 'flex-end',
|
|
218
|
+
};
|
|
219
|
+
const HORIZONTAL_TEXT_ALIGN = {
|
|
220
|
+
Left: 'left',
|
|
221
|
+
Center: 'center',
|
|
222
|
+
Right: 'right',
|
|
223
|
+
};
|
|
224
|
+
const createCellTextRow = (slots, textClassName, compact) => {
|
|
225
|
+
const row = document.createElement('div');
|
|
226
|
+
row.className = textClassName;
|
|
227
|
+
row.style.display = 'flex';
|
|
228
|
+
row.style.flexDirection = 'row';
|
|
229
|
+
row.style.alignItems = 'center';
|
|
230
|
+
row.style.width = '100%';
|
|
231
|
+
// When `Above` AND `Below` are both populated, two default-size text rows
|
|
232
|
+
// would squeeze the bar to 0 on a standard ~28-40px cell, so the caller
|
|
233
|
+
// asks for a compact band (smaller font + tighter line-height).
|
|
234
|
+
// Otherwise we render at the inherited cell font for legibility.
|
|
235
|
+
if (compact) {
|
|
236
|
+
row.style.fontSize = '0.75em';
|
|
237
|
+
row.style.lineHeight = '1';
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
row.style.lineHeight = '1.2';
|
|
241
|
+
}
|
|
242
|
+
row.style.flex = '0 0 auto';
|
|
243
|
+
row.style.gap = '4px';
|
|
244
|
+
// Render fixed Left / Center / Right cells so spacing is stable even when
|
|
245
|
+
// only one or two slots are present.
|
|
246
|
+
for (const horizontal of HORIZONTAL_VALUES) {
|
|
247
|
+
const slot = slots.find((s) => s.horizontal === horizontal);
|
|
248
|
+
const cell = document.createElement('span');
|
|
249
|
+
cell.style.flex = '1';
|
|
250
|
+
cell.style.minWidth = '0';
|
|
251
|
+
cell.style.textAlign = HORIZONTAL_TEXT_ALIGN[horizontal];
|
|
252
|
+
cell.style.display = 'flex';
|
|
253
|
+
cell.style.justifyContent = HORIZONTAL_FLEX_JUSTIFY[horizontal];
|
|
254
|
+
cell.style.alignItems = 'center';
|
|
255
|
+
if (slot) {
|
|
256
|
+
cell.textContent = slot.text;
|
|
257
|
+
}
|
|
258
|
+
row.append(cell);
|
|
259
|
+
}
|
|
260
|
+
// Suppress the dummy row in the rare case where every slot for this band is
|
|
261
|
+
// empty (e.g. the only label is empty string). `String(...)` because text
|
|
262
|
+
// may arrive as a number when `params.formatValue` is undefined for a
|
|
263
|
+
// numeric column — `(11).length` is `undefined`, which would otherwise
|
|
264
|
+
// wrongly trip the empty-row branch.
|
|
265
|
+
if (!slots.some((s) => String(s.text ?? '').length)) {
|
|
266
|
+
row.style.display = 'none';
|
|
267
|
+
}
|
|
268
|
+
return row;
|
|
269
|
+
};
|
|
270
|
+
export const mountBarStyleCellText = (args) => {
|
|
271
|
+
const { cellTextProperties, labels, wrapperEl, textClassName } = args;
|
|
272
|
+
if (!hasBarStyleCellTextConfigured(cellTextProperties) || !hasBarStyleCellTextLabels(labels)) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
const slots = resolveBarStyleCellTextSlots(cellTextProperties, labels);
|
|
276
|
+
if (!slots.length) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const mergedOverlayEl = args.mergedOverlayEl ?? wrapperEl;
|
|
280
|
+
const mergedPointerEventsNone = args.mergedPointerEventsNone ?? mergedOverlayEl === wrapperEl;
|
|
281
|
+
const slotsByVertical = {
|
|
282
|
+
Above: slots.filter((s) => s.vertical === 'Above'),
|
|
283
|
+
Below: slots.filter((s) => s.vertical === 'Below'),
|
|
284
|
+
Merged: slots.filter((s) => s.vertical === 'Merged'),
|
|
285
|
+
};
|
|
286
|
+
// Compact when Cell Value and Percent Value have *different* verticals
|
|
287
|
+
// (i.e. the two tokens claim two separate bands of vertical space). When
|
|
288
|
+
// they share a vertical band — or when only one token is configured —
|
|
289
|
+
// we have room for the full-size font.
|
|
290
|
+
const layout = resolveBarStyleCellTextLayout(cellTextProperties);
|
|
291
|
+
const compact = Boolean(layout.CellValue &&
|
|
292
|
+
layout.PercentValue &&
|
|
293
|
+
sanitizePlacement(layout.CellValue).Vertical !==
|
|
294
|
+
sanitizePlacement(layout.PercentValue).Vertical);
|
|
295
|
+
if (slotsByVertical.Above.length) {
|
|
296
|
+
const row = createCellTextRow(slotsByVertical.Above, textClassName, compact);
|
|
297
|
+
wrapperEl.prepend(row);
|
|
298
|
+
}
|
|
299
|
+
if (slotsByVertical.Below.length) {
|
|
300
|
+
const row = createCellTextRow(slotsByVertical.Below, textClassName, compact);
|
|
301
|
+
wrapperEl.append(row);
|
|
302
|
+
}
|
|
303
|
+
if (slotsByVertical.Merged.length) {
|
|
304
|
+
const row = createCellTextRow(slotsByVertical.Merged, textClassName, compact);
|
|
305
|
+
row.style.position = 'absolute';
|
|
306
|
+
row.style.top = '50%';
|
|
307
|
+
row.style.transform = 'translateY(-50%)';
|
|
308
|
+
row.style.left = '0';
|
|
309
|
+
row.style.right = '0';
|
|
310
|
+
row.style.paddingLeft = '5px';
|
|
311
|
+
row.style.paddingRight = '5px';
|
|
312
|
+
if (mergedPointerEventsNone) {
|
|
313
|
+
row.style.pointerEvents = 'none';
|
|
314
|
+
}
|
|
315
|
+
mergedOverlayEl.append(row);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { IRowNode } from 'ag-grid-community';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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';
|
|
5
7
|
/**
|
|
6
8
|
* Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
|
|
7
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,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
2
|
+
import { PercentBarStyle } from '../../../AdaptableState/StyledColumns/PercentBarStyle';
|
|
2
3
|
export declare const hasPercentBarRangesConfigured: (pb: PercentBarStyle | undefined) => boolean;
|
|
3
4
|
/** Illustrative scale for preview — shows negatives when origin is Auto or Zero. */
|
|
4
5
|
export declare const getPercentBarPreviewScale: (pb: PercentBarStyle) => {
|