@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
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { isAdaptableCustomIcon, isAdaptableElementIcon, isAdaptableSystemIcon, } from '../../../../../components/Icon';
|
|
3
3
|
import { resolveEffectiveIconStyleMappings } from '../../../../../agGrid/cellRenderers/IconRenderer';
|
|
4
4
|
import { AdaptableIconComponent } from '../../../../Components/AdaptableIconComponent';
|
|
5
5
|
import { Box } from '../../../../../components/Flex';
|
|
6
|
-
import { Card } from '../../../../../components/Card';
|
|
7
6
|
import { Tag } from '../../../../../components/Tag';
|
|
8
7
|
import { convertAdaptableStyleToCSS, hasCellBoxStyle, } from '../../../../../Utilities/Helpers/StyleHelper';
|
|
9
8
|
export const DEFAULT_ICON_STYLE_SIZE = 18;
|
|
@@ -88,4 +87,3 @@ export const StyledColumnIconPreview = ({ data }) => {
|
|
|
88
87
|
const previewCellChrome = getIconCellChromeCss(iconStyle.Cell);
|
|
89
88
|
return (_jsx(Box, { className: PREVIEW_CELL_CLASS, style: previewCellChrome, children: _jsx(IconCellPreviewTree, { iconStyle: iconStyle, mapping: effectiveMappings[0] }) }));
|
|
90
89
|
};
|
|
91
|
-
export const StyledColumnIconPreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: _jsx(Box, { className: "twa:font-medium", children: "Preview" }) }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnIconPreview, { data: data }) })] }));
|
|
@@ -3,6 +3,3 @@ import { StyledColumn } from '../../../../../AdaptableState/StyledColumnState';
|
|
|
3
3
|
export declare const StyledColumnPercentBarPreview: React.FunctionComponent<React.PropsWithChildren<{
|
|
4
4
|
data: StyledColumn;
|
|
5
5
|
}>>;
|
|
6
|
-
export declare const StyledColumnPercentBarPreviewCard: React.FunctionComponent<React.PropsWithChildren<{
|
|
7
|
-
data: StyledColumn;
|
|
8
|
-
}>>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { convertAdaptableStyleToCSS } from '../../../../../Utilities/Helpers/StyleHelper';
|
|
3
|
-
import { getPercentBarPreviewGeometry, getPercentBarPreviewResolvedBarColor, getPercentBarPreviewSampleValues, getPercentBarPreviewScale, getPercentBarPreviewTrackColor, hasPercentBarRangesConfigured, } from '../../../../../Utilities/Helpers/
|
|
4
|
-
import {
|
|
3
|
+
import { getPercentBarPreviewGeometry, getPercentBarPreviewResolvedBarColor, getPercentBarPreviewSampleValues, getPercentBarPreviewScale, getPercentBarPreviewTrackColor, hasPercentBarRangesConfigured, } from '../../../../../Utilities/Helpers/StyledColumns/PercentBarStyleHelper';
|
|
4
|
+
import { buildBarStyleCellTextLabels, getBarStyleCellTextSlotPresence, hasBarStyleCellTextConfigured, } from '../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
5
5
|
import { Box, Flex } from '../../../../../components/Flex';
|
|
6
|
-
import { Card } from '../../../../../components/Card';
|
|
7
6
|
import { Tag } from '../../../../../components/Tag';
|
|
8
|
-
import {
|
|
7
|
+
import { BarStyleCellTextPreview, shouldShowBarStyleCellTextOutsideBar, } from './BarStyleCellTextPreview';
|
|
9
8
|
const PREVIEW_CELL_CLASS = 'ab-PercentBarPreviewCell twa:w-[72px] twa:min-h-[32px] twa:px-1 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
|
|
10
9
|
const PercentBarPreviewCell = ({ styledColumn, value, min, max }) => {
|
|
11
10
|
const pb = styledColumn.PercentBarStyle;
|
|
@@ -13,21 +12,23 @@ const PercentBarPreviewCell = ({ styledColumn, value, min, max }) => {
|
|
|
13
12
|
const trackColor = getPercentBarPreviewTrackColor(pb);
|
|
14
13
|
const fillColor = getPercentBarPreviewResolvedBarColor(barColor);
|
|
15
14
|
const cellTextProperties = pb.CellTextProperties;
|
|
16
|
-
const labels =
|
|
17
|
-
const hasCellText =
|
|
15
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, Number.isInteger(value) ? String(value) : value.toFixed(1), `${percentageValue.toFixed(0)}%`);
|
|
16
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties) &&
|
|
18
17
|
Boolean(labels.cellValue || labels.percentage);
|
|
19
|
-
const presence =
|
|
18
|
+
const presence = getBarStyleCellTextSlotPresence(cellTextProperties);
|
|
20
19
|
const fontStyle = pb.Font ? convertAdaptableStyleToCSS(pb.Font) : undefined;
|
|
21
20
|
const cellTextClassName = 'ab-PercentBar__text twa:text-2 twa:leading-tight twa:truncate';
|
|
22
21
|
const barEl = (_jsxs(Box, { className: "ab-PercentBar__bar twa:relative twa:flex-1 twa:min-h-[6px]", style: trackColor ? { background: getPercentBarPreviewResolvedBarColor(trackColor) } : undefined, children: [fillColor && (_jsx(Box, { className: "ab-PercentBar__barInside twa:absolute twa:top-0 twa:h-full", style: {
|
|
23
22
|
background: fillColor,
|
|
24
23
|
left: `${barLeftPercent.toFixed(2)}%`,
|
|
25
24
|
width: `${barWidthPercent.toFixed(2)}%`,
|
|
26
|
-
} })), hasCellText && presence.hasMerged && (_jsx(
|
|
25
|
+
} })), hasCellText && presence.hasMerged && (_jsx(BarStyleCellTextPreview, { mergedOverlayClassName: "ab-PercentBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }));
|
|
27
26
|
return (_jsxs(Flex, { className: `ab-PercentBar__wrapper ${PREVIEW_CELL_CLASS}`, flexDirection: "column", style: {
|
|
28
27
|
justifyContent: 'center',
|
|
29
|
-
height:
|
|
30
|
-
|
|
28
|
+
height: shouldShowBarStyleCellTextOutsideBar(cellTextProperties, hasCellText)
|
|
29
|
+
? '100%'
|
|
30
|
+
: undefined,
|
|
31
|
+
}, children: [hasCellText && presence.hasAbove && (_jsx(BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), barEl, hasCellText && presence.hasBelow && (_jsx(BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
|
|
31
32
|
};
|
|
32
33
|
export const StyledColumnPercentBarPreview = ({ data }) => {
|
|
33
34
|
const pb = data.PercentBarStyle;
|
|
@@ -56,4 +57,3 @@ export const StyledColumnPercentBarPreview = ({ data }) => {
|
|
|
56
57
|
const sampleValues = getPercentBarPreviewSampleValues(pb);
|
|
57
58
|
return (_jsx(Flex, { alignItems: "stretch", className: "twa:flex-wrap twa:gap-2", children: sampleValues.map((value) => (_jsx(PercentBarPreviewCell, { styledColumn: data, value: value, min: min, max: max }, value))) }));
|
|
58
59
|
};
|
|
59
|
-
export const StyledColumnPercentBarPreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: _jsx(Box, { className: "twa:font-medium", children: "Preview" }) }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnPercentBarPreview, { data: data }) })] }));
|
|
@@ -3,6 +3,3 @@ import { StyledColumn } from '../../../../../AdaptableState/StyledColumnState';
|
|
|
3
3
|
export declare const StyledColumnRangeBarPreview: React.FunctionComponent<React.PropsWithChildren<{
|
|
4
4
|
data: StyledColumn;
|
|
5
5
|
}>>;
|
|
6
|
-
export declare const StyledColumnRangeBarPreviewCard: React.FunctionComponent<React.PropsWithChildren<{
|
|
7
|
-
data: StyledColumn;
|
|
8
|
-
}>>;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { buildBarStyleCellTextLabels, getBarStyleCellTextSlotPresence, hasBarStyleCellTextConfigured, } from '../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
3
3
|
import { Box, Flex } from '../../../../../components/Flex';
|
|
4
|
-
import { Card } from '../../../../../components/Card';
|
|
5
4
|
import { Tag } from '../../../../../components/Tag';
|
|
6
5
|
import { StyledColumnRangeBarListPreview } from './StyledColumnChartListPreviews';
|
|
7
|
-
import {
|
|
6
|
+
import { BarStyleCellTextPreview } from './BarStyleCellTextPreview';
|
|
8
7
|
const PREVIEW_CELL_CLASS = 'ab-RangeBarPreviewCell twa:inline-flex twa:items-center twa:min-w-[180px] twa:min-h-[36px] twa:px-2 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
|
|
9
8
|
const getRangeBarPreviewSample = (range) => {
|
|
10
9
|
let min = 0;
|
|
@@ -25,17 +24,17 @@ const getRangeBarPreviewSample = (range) => {
|
|
|
25
24
|
const RangeBarPreviewContent = ({ range }) => {
|
|
26
25
|
const { sampleValue, valueFraction } = getRangeBarPreviewSample(range);
|
|
27
26
|
const cellTextProperties = range.CellTextProperties;
|
|
28
|
-
const labels =
|
|
29
|
-
const hasCellText =
|
|
27
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1), `${(valueFraction * 100).toFixed(0)}%`);
|
|
28
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties) &&
|
|
30
29
|
Boolean(labels.cellValue || labels.percentage);
|
|
31
|
-
const presence =
|
|
30
|
+
const presence = getBarStyleCellTextSlotPresence(cellTextProperties);
|
|
32
31
|
const isVertical = range.Orientation === 'Vertical';
|
|
33
32
|
const cellTextClassName = 'ab-RangeBar__text twa:text-2 twa:leading-tight twa:truncate twa:max-w-full';
|
|
34
33
|
const chartEl = _jsx(StyledColumnRangeBarListPreview, { range: range });
|
|
35
34
|
if (hasCellText && presence.hasMerged && !presence.hasAbove && !presence.hasBelow) {
|
|
36
|
-
return (_jsxs(Box, { className: "ab-RangeBar__wrapper twa:relative twa:inline-flex", children: [chartEl, _jsx(
|
|
35
|
+
return (_jsxs(Box, { className: "ab-RangeBar__wrapper twa:relative twa:inline-flex", children: [chartEl, _jsx(BarStyleCellTextPreview, { mergedOverlayClassName: "ab-RangeBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" })] }));
|
|
37
36
|
}
|
|
38
|
-
return (_jsxs(Flex, { className: "ab-RangeBar__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && (_jsx(
|
|
37
|
+
return (_jsxs(Flex, { className: "ab-RangeBar__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && (_jsx(BarStyleCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), _jsxs(Box, { className: "twa:relative twa:w-full", style: { display: 'inline-flex' }, children: [chartEl, hasCellText && presence.hasMerged && (_jsx(BarStyleCellTextPreview, { mergedOverlayClassName: "ab-RangeBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }), hasCellText && presence.hasBelow && (_jsx(BarStyleCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
|
|
39
38
|
};
|
|
40
39
|
export const StyledColumnRangeBarPreview = ({ data }) => {
|
|
41
40
|
const range = data.RangeBarStyle;
|
|
@@ -44,4 +43,3 @@ export const StyledColumnRangeBarPreview = ({ data }) => {
|
|
|
44
43
|
}
|
|
45
44
|
return (_jsx(Box, { className: PREVIEW_CELL_CLASS, children: _jsx(RangeBarPreviewContent, { range: range }) }));
|
|
46
45
|
};
|
|
47
|
-
export const StyledColumnRangeBarPreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: _jsx(Box, { className: "twa:font-medium", children: "Preview" }) }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnRangeBarPreview, { data: data }) })] }));
|
|
@@ -14,6 +14,3 @@ export declare const RatingPreview: React.FC<{
|
|
|
14
14
|
export declare const StyledColumnRatingPreview: React.FunctionComponent<React.PropsWithChildren<{
|
|
15
15
|
data: StyledColumn;
|
|
16
16
|
}>>;
|
|
17
|
-
export declare const StyledColumnRatingPreviewCard: React.FunctionComponent<React.PropsWithChildren<{
|
|
18
|
-
data: StyledColumn;
|
|
19
|
-
}>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Box } from '../../../../../components/Flex';
|
|
4
|
-
import { Card } from '../../../../../components/Card';
|
|
5
4
|
import { Tag } from '../../../../../components/Tag';
|
|
6
5
|
import { convertAdaptableStyleToCSS, hasCellBoxStyle, } from '../../../../../Utilities/Helpers/StyleHelper';
|
|
7
6
|
export const DEFAULT_RATING_MAX = 5;
|
|
@@ -35,6 +34,8 @@ export const RatingPreview = ({ rating, value, }) => {
|
|
|
35
34
|
const allowHalf = rating.AllowHalf ?? true;
|
|
36
35
|
const previewValue = value ?? Math.max(1, Math.min(max, max * 0.7));
|
|
37
36
|
const effective = allowHalf ? previewValue : Math.round(previewValue);
|
|
37
|
+
// Display rounded to 1 dp so e.g. 3 * 0.7 doesn't surface as 2.0999999999999996.
|
|
38
|
+
const displayValue = Math.round(previewValue * 10) / 10;
|
|
38
39
|
const d = ICON_PATHS[icon];
|
|
39
40
|
return (_jsxs("span", { style: {
|
|
40
41
|
display: 'inline-flex',
|
|
@@ -45,7 +46,7 @@ export const RatingPreview = ({ rating, value, }) => {
|
|
|
45
46
|
const fill = clamp(effective - i, 0, 1);
|
|
46
47
|
const clipId = `ab-rating-preview-clip-${instanceId}-${i}`;
|
|
47
48
|
return (_jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", children: [_jsx("path", { d: d, fill: emptyColor }), fill > 0 && (_jsxs(_Fragment, { children: [_jsx("defs", { children: _jsx("clipPath", { id: clipId, children: _jsx("rect", { x: 0, y: 0, width: 24 * fill, height: 24 }) }) }), _jsx("path", { d: d, fill: filledColor, clipPath: `url(#${clipId})` })] }))] }, i));
|
|
48
|
-
}), rating.ShowValue && (_jsx("span", { style: { marginLeft: 6, fontVariantNumeric: 'tabular-nums' }, children:
|
|
49
|
+
}), rating.ShowValue && (_jsx("span", { style: { marginLeft: 6, fontVariantNumeric: 'tabular-nums' }, children: displayValue }))] }));
|
|
49
50
|
};
|
|
50
51
|
export const StyledColumnRatingPreview = ({ data }) => {
|
|
51
52
|
const rating = data.RatingStyle;
|
|
@@ -55,4 +56,3 @@ export const StyledColumnRatingPreview = ({ data }) => {
|
|
|
55
56
|
const previewCellChrome = getRatingCellChromeCss(rating.Cell);
|
|
56
57
|
return (_jsx(Box, { className: PREVIEW_CELL_CLASS, style: previewCellChrome, children: _jsx(RatingPreview, { rating: rating }) }));
|
|
57
58
|
};
|
|
58
|
-
export const StyledColumnRatingPreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: _jsx(Box, { className: "twa:font-medium", children: "Preview" }) }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnRatingPreview, { data: data }) })] }));
|
|
@@ -5,6 +5,3 @@ export declare function getSparklineCellChromeCss(cell: CellBoxStyle | undefined
|
|
|
5
5
|
export declare const StyledColumnSparklinePreview: React.FunctionComponent<React.PropsWithChildren<{
|
|
6
6
|
data: StyledColumn;
|
|
7
7
|
}>>;
|
|
8
|
-
export declare const StyledColumnSparklinePreviewCard: React.FunctionComponent<React.PropsWithChildren<{
|
|
9
|
-
data: StyledColumn;
|
|
10
|
-
}>>;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
4
4
|
import { AdaptableHelper } from '../../../../../Utilities/Helpers/AdaptableHelper';
|
|
5
|
-
import { resolveSparklineOptionsForRender } from '../../../../../Utilities/Helpers/
|
|
5
|
+
import { resolveSparklineOptionsForRender } from '../../../../../Utilities/Helpers/StyledColumns/SparklineStyleHelper';
|
|
6
6
|
import { convertAdaptableStyleToCSS, hasCellBoxStyle, } from '../../../../../Utilities/Helpers/StyleHelper';
|
|
7
7
|
import { Box } from '../../../../../components/Flex';
|
|
8
|
-
import { Card } from '../../../../../components/Card';
|
|
9
8
|
import { Tag } from '../../../../../components/Tag';
|
|
10
9
|
import { useAdaptable } from '../../../../AdaptableContext';
|
|
11
10
|
const FALLBACK_NUMBER_ARRAY = [12, 18, 9, 22, 15, 28, 19, 24, 17, 21];
|
|
@@ -123,4 +122,3 @@ export const StyledColumnSparklinePreview = ({ data }) => {
|
|
|
123
122
|
const previewCellChrome = getSparklineCellChromeCss(sparklineStyle.Cell);
|
|
124
123
|
return (_jsx(Box, { className: PREVIEW_CELL_CLASS, style: previewCellChrome, children: _jsx(SparklinePreviewCanvas, { sparklineStyle: sparklineStyle, columnId: data.ColumnId }) }));
|
|
125
124
|
};
|
|
126
|
-
export const StyledColumnSparklinePreviewCard = ({ data }) => (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Preview" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[500px]", children: "Sample sparkline using first non-empty cell in Column (or demo data when unavailable)" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyledColumnSparklinePreview, { data: data }) })] }));
|
|
@@ -3,8 +3,8 @@ import { CheckBox } from '../../../../components/CheckBox';
|
|
|
3
3
|
import ErrorBox from '../../../../components/ErrorBox';
|
|
4
4
|
import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
5
5
|
import { Tag } from '../../../../components/Tag';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { formatBarStyleCellTextLayoutSummary, getActiveBarStyleCellTextTokens, hasBarStyleCellTextConfigured, patchBarStyleCellTextPlacement, resolveBarStyleCellTextLayout, toggleBarStyleCellTextToken, } from '../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
7
|
+
import { BarStyleCellTextLayoutEditor } from './Components/BarStyleCellTextLayoutEditor';
|
|
8
8
|
import { OptionalColorPicker } from '../../../../components/ColorPicker';
|
|
9
9
|
import { getGraySwatchColor } from '../../../UIHelper';
|
|
10
10
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
@@ -13,7 +13,6 @@ import Radio, { RadioGroup } from '../../../../components/Radio';
|
|
|
13
13
|
import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from '../StyledColumnSliceStyleEditors';
|
|
14
14
|
import { Card } from '../../../../components/Card';
|
|
15
15
|
import { renderSummaryStringTags } from '../../../Wizard/SummaryColorTag';
|
|
16
|
-
import { StyledColumnPercentBarPreviewCard } from './Components/StyledColumnPercentBarPreview';
|
|
17
16
|
// Re-export the Ranges section + summary for legacy import paths.
|
|
18
17
|
export { renderStyledColumnRangesSummary, StyledColumnWizardRangesSection, } from './StyledColumnWizardRangesSection';
|
|
19
18
|
// ---------------------------------------------------------------------------
|
|
@@ -28,18 +27,14 @@ const formatOriginLabel = (origin) => {
|
|
|
28
27
|
}
|
|
29
28
|
return origin;
|
|
30
29
|
};
|
|
31
|
-
const formatPercentBarCellTextSummary = (cellText) => cellText
|
|
32
|
-
|
|
33
|
-
.join(' + ') ?? '';
|
|
34
|
-
const formatPercentBarToolTipSummary = (toolTipText) => toolTipText
|
|
35
|
-
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
36
|
-
.join(' + ') ?? '';
|
|
30
|
+
const formatPercentBarCellTextSummary = (cellText) => cellText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
|
|
31
|
+
const formatPercentBarToolTipSummary = (toolTipText) => toolTipText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
|
|
37
32
|
const buildStyledColumnPercentBarStyleSummaryStrings = (pb, options) => {
|
|
38
33
|
const items = [`Origin: ${formatOriginLabel(pb.Origin)}`];
|
|
39
|
-
if (
|
|
40
|
-
const tokens =
|
|
34
|
+
if (hasBarStyleCellTextConfigured(pb.CellTextProperties)) {
|
|
35
|
+
const tokens = getActiveBarStyleCellTextTokens(pb.CellTextProperties);
|
|
41
36
|
items.push(`Cell Text: ${formatPercentBarCellTextSummary(tokens)}`);
|
|
42
|
-
const layoutSummary =
|
|
37
|
+
const layoutSummary = formatBarStyleCellTextLayoutSummary(resolveBarStyleCellTextLayout(pb.CellTextProperties));
|
|
43
38
|
if (layoutSummary) {
|
|
44
39
|
items.push(`Placement: ${layoutSummary}`);
|
|
45
40
|
}
|
|
@@ -126,11 +121,11 @@ export const StyledColumnWizardStyleSection = (props) => {
|
|
|
126
121
|
});
|
|
127
122
|
};
|
|
128
123
|
const onCellTextLayoutToggle = (token, show) => {
|
|
129
|
-
update(
|
|
124
|
+
update(toggleBarStyleCellTextToken(cellTextProperties, token, show));
|
|
130
125
|
};
|
|
131
126
|
const onCellTextPlacementChange = (token, patch) => {
|
|
132
127
|
update({
|
|
133
|
-
CellTextProperties:
|
|
128
|
+
CellTextProperties: patchBarStyleCellTextPlacement(cellTextProperties, token, patch),
|
|
134
129
|
});
|
|
135
130
|
};
|
|
136
131
|
const onToolTipTextChanged = (token, checked) => {
|
|
@@ -149,11 +144,11 @@ export const StyledColumnWizardStyleSection = (props) => {
|
|
|
149
144
|
const { BackColor: _removed, ...rest } = pb;
|
|
150
145
|
props.onChange({ ...data, PercentBarStyle: rest });
|
|
151
146
|
};
|
|
152
|
-
const cellTextDisabled = !
|
|
147
|
+
const cellTextDisabled = !hasBarStyleCellTextConfigured(cellTextProperties) || disabled;
|
|
153
148
|
const currentOrigin = typeof pb.Origin === 'number'
|
|
154
149
|
? 'Min' // numeric origin doesn't fit the radio set; treat as Min for selection state
|
|
155
150
|
: pb.Origin ?? 'Auto';
|
|
156
|
-
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar Position" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the position of the cell text relative to the bar" })] }), _jsx(Card.Body, { children: _jsx(RadioGroup, { orientation: "vertical", name: "ab-percentbar-origin", value: currentOrigin, onRadioChange: handleOriginChange, children: ORIGIN_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, disabled: disabled, children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:min-w-[60px]", children: choice.label }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: choice.hint })] }) }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[540px]", children: "Pick which values to display and where each one sits around the bar (font properties take precedence over Format Column)" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsx(
|
|
151
|
+
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar Position" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the position of the cell text relative to the bar" })] }), _jsx(Card.Body, { children: _jsx(RadioGroup, { orientation: "vertical", name: "ab-percentbar-origin", value: currentOrigin, onRadioChange: handleOriginChange, children: ORIGIN_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, disabled: disabled, children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:min-w-[60px]", children: choice.label }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: choice.hint })] }) }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[540px]", children: "Pick which values to display and where each one sits around the bar (font properties take precedence over Format Column)" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsx(BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: onCellTextLayoutToggle, onPlacementChange: onCellTextPlacementChange }) }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: pb.Font, onChange: (next) => {
|
|
157
152
|
if (next) {
|
|
158
153
|
update({ Font: next });
|
|
159
154
|
}
|
|
@@ -162,5 +157,5 @@ export const StyledColumnWizardStyleSection = (props) => {
|
|
|
162
157
|
delete cleaned.Font;
|
|
163
158
|
props.onChange({ ...data, PercentBarStyle: cleaned });
|
|
164
159
|
}
|
|
165
|
-
} }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure Tooltip and Background Colour" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: pb.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: pb.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent Value" })] }), _jsx(FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(OptionalColorPicker, { disabled: disabled, api: api, value: pb.BackColor ?? undefined, defaultColor: getGraySwatchColor(), onChange: onBackColorChange }) })] }) })] })
|
|
160
|
+
} }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure Tooltip and Background Colour" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: pb.ToolTipText?.includes('CellValue'), onChange: (checked) => onToolTipTextChanged('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: pb.ToolTipText?.includes('PercentageValue'), onChange: (checked) => onToolTipTextChanged('PercentageValue', checked), children: "Percent Value" })] }), _jsx(FormRow, { label: `Back ${api.internalApi.getCorrectEnglishVariant('Colour')}:`, children: _jsx(OptionalColorPicker, { disabled: disabled, api: api, value: pb.BackColor ?? undefined, defaultColor: getGraySwatchColor(), onChange: onBackColorChange }) })] }) })] })] }));
|
|
166
161
|
};
|
package/src/View/UIHelper.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WizardStatus, } from './Components/SharedProps/EditableConfigEntityState';
|
|
2
2
|
import { FontWeight, FontStyle, StatusColour } from '../AdaptableState/Common/Enums';
|
|
3
3
|
import { StringExtensions } from '../Utilities/Extensions/StringExtensions';
|
|
4
|
-
import { getScheduleDescription as getScheduleDescriptionFromHelper } from '../Utilities/Helpers/ScheduleHelper';
|
|
4
|
+
import { getScheduleDescription as getScheduleDescriptionFromHelper } from '../Utilities/Helpers/Scheduling/ScheduleHelper';
|
|
5
5
|
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
6
6
|
import { resolveContainerElement } from '../Utilities/resolveContainerElement';
|
|
7
7
|
/** Generic swatch entries for the Colour Picker (resolved at runtime per active theme). */
|
|
@@ -48,7 +48,7 @@ export const CollapsibleWizardCard = (props) => {
|
|
|
48
48
|
// inset so it stays inside the element and is always visible.
|
|
49
49
|
targetOwn.focusOutline, 'twa:focus-visible:ring-inset'), "data-name": dataName, onClick: toggleExpanded, onKeyDown: handleTitleKeyDown, tabIndex: 0, "aria-expanded": expanded, role: "button", children: [_jsxs(Box, { className: "twa:flex twa:flex-row twa:items-center twa:gap-2 twa:shrink-0 twa:cursor-pointer twa:select-none", children: [_jsx(IconComponent, { icon: { name: expanded ? 'collapse' : 'expand' } }), _jsx(Box, { className: "twa:font-medium", children: title })] }), headerVisual ? (_jsx(Box, { className: "twa:flex-1 twa:min-w-0 twa:flex twa:justify-end twa:items-center twa:overflow-hidden twa:pointer-events-none", children: headerVisual })) : headerInline ? (_jsx(Box, { className: cn('twa:flex-1 twa:min-w-0 twa:font-normal', isInteractiveCompactSummary
|
|
50
50
|
? 'twa:flex twa:justify-end twa:items-center twa:overflow-visible'
|
|
51
|
-
: cn('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', compact ? 'twa:overflow-hidden' : 'twa:truncate')), children: headerInline })) : (_jsx(Box, { className: "twa:flex-1 twa:min-w-0" })), headerActions ? (_jsx(Box, { className: "twa:shrink-0", onClick: (event) => event.stopPropagation(), children: headerActions })) : null] }) }), expanded ? (_jsx(Card.Body, { className: cn('twa:p-1', bodyClassName, fillAvailable && 'twa:max-h-none! twa:flex-1 twa:min-h-0'), children: children })) : showSummary ? (_jsx(Card.Body, { className: "twa:p-1", gap: 1, children: summary })) : null] }));
|
|
51
|
+
: cn('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', compact ? 'twa:overflow-hidden' : 'twa:truncate')), children: headerInline })) : (_jsx(Box, { className: "twa:flex-1 twa:min-w-0" })), headerActions ? (_jsx(Box, { className: "twa:shrink-0 twa:gap-2 twa:flex", onClick: (event) => event.stopPropagation(), children: headerActions })) : null] }) }), expanded ? (_jsx(Card.Body, { className: cn('twa:p-1', bodyClassName, fillAvailable && 'twa:max-h-none! twa:flex-1 twa:min-h-0'), children: children })) : showSummary ? (_jsx(Card.Body, { className: "twa:p-1", gap: 1, children: summary })) : null] }));
|
|
52
52
|
};
|
|
53
53
|
export function useWizardCardAccordion(initialExpandedId, options) {
|
|
54
54
|
const fillExpandedCard = options?.fillExpandedCard ?? false;
|
|
@@ -57,6 +57,13 @@ export interface OnePageAdaptableWizardProps<ENTITY> {
|
|
|
57
57
|
* `FriendlyName`.
|
|
58
58
|
*/
|
|
59
59
|
moduleName?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Persistent preview rendered as a full-width band beneath the wizard
|
|
62
|
+
* header — visible on every step. Used by wizards (e.g. Styled Column)
|
|
63
|
+
* that want users to see a live preview of the object they're building
|
|
64
|
+
* as they progress.
|
|
65
|
+
*/
|
|
66
|
+
headerPreview?: React.ReactNode;
|
|
60
67
|
}
|
|
61
68
|
export declare const OnePageAdaptableWizard: <ENTITY extends unknown>(props: OnePageAdaptableWizardProps<ENTITY>) => React.JSX.Element;
|
|
62
69
|
export declare const OnePageWizardSummary: <ENTITY extends unknown>() => React.JSX.Element;
|
|
@@ -8,7 +8,7 @@ import { Card } from '../../components/Card';
|
|
|
8
8
|
import { ButtonEdit } from '../Components/Buttons/ButtonEdit';
|
|
9
9
|
import { NamedQueryContext, } from '../../components/ExpressionEditor/NamedQueryContext';
|
|
10
10
|
import { OnePageWizard, useOnePageWizardContext } from './OnePageWizards';
|
|
11
|
-
import kebabCase from '../../Utilities/
|
|
11
|
+
import { kebabCase } from '../../Utilities/Extensions/StringExtensions';
|
|
12
12
|
import { Box } from '../../components/Flex';
|
|
13
13
|
import { twMerge } from '../../twMerge';
|
|
14
14
|
export const SummaryTag = (props) => (_jsx(Box, { ...props }));
|
|
@@ -41,6 +41,14 @@ export interface OnePageWizardProps<ENTITY> {
|
|
|
41
41
|
closeTooltip?: string;
|
|
42
42
|
finishText?: React.ReactNode;
|
|
43
43
|
moduleName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Optional persistent preview rendered as a full-width band beneath the
|
|
46
|
+
* header. Used by wizards (e.g. Styled Column) that want users to see a
|
|
47
|
+
* live preview of the object they're building on every step — the same
|
|
48
|
+
* card the existing Style / Summary steps render, hoisted so it is
|
|
49
|
+
* always visible.
|
|
50
|
+
*/
|
|
51
|
+
headerPreview?: React.ReactNode;
|
|
44
52
|
}
|
|
45
53
|
export declare const OnePageWizard: <ENTITY extends unknown>(props: OnePageWizardProps<ENTITY>) => React.JSX.Element;
|
|
46
54
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useState, useRef } from 'react';
|
|
4
4
|
import { cn } from '../../lib/utils';
|
|
@@ -78,7 +78,7 @@ export const OnePageWizard = (props) => {
|
|
|
78
78
|
if (section === '-') {
|
|
79
79
|
return _jsx(React.Fragment, {}, index);
|
|
80
80
|
}
|
|
81
|
-
return (_jsx(Flex, { flexDirection: "column", "data-name": `section-${index}`, className: "twa:
|
|
81
|
+
return (_jsx(Flex, { flexDirection: "column", "data-name": `section-${index}`, className: "twa:flex-1 twa:overflow-hidden", children: _jsx(Box, { className: "ab-OnePageWizard__section twa:flex-1 twa:rounded-standard twa:overflow-auto twa:bg-background", children: section.render(props.data, index) }) }, index));
|
|
82
82
|
};
|
|
83
83
|
const handleNavigation = useKeyboardNavigation(setCurrentSection, visibleSections);
|
|
84
84
|
const selectedNodeRef = useRef(null);
|
|
@@ -163,6 +163,8 @@ export const OnePageWizard = (props) => {
|
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
165
|
setCurrentSection(index);
|
|
166
|
-
}, children: [_jsx(KeyHint, { className:
|
|
167
|
-
|
|
166
|
+
}, children: [_jsx(KeyHint, { className: cn('twa:mr-2 twa:inline-block', {
|
|
167
|
+
'twa:text-accent-foreground': active,
|
|
168
|
+
}), children: navIndex }), _jsx("div", { className: "twa:flex-1", children: section.title }), _jsx(Icon, { name: "error", className: cn('twa:ml-2', validSectionsMap.get(index) !== true ? 'twa:visible' : 'twa:invisible') })] }, section.title));
|
|
169
|
+
}), selectedFeedback, _jsx(Box, { className: "twa:flex-1" }), _jsxs(KeyHint, { className: "ab-OnePageWizard__key-hint twa:leading-normal", children: [isMacLike() ? 'Cmd' : 'Ctrl', " + #", _jsx("br", {}), "or arrow keys", _jsx("br", {}), "to navigate"] })] }), _jsxs(Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:overflow-hidden twa:min-w-0 twa:flex-1 twa:gap-2 twa:mr-2", children: [props.headerPreview ? (_jsxs(_Fragment, { children: [_jsx(Box, { className: "ab-OnePageWizard__header-preview", children: props.headerPreview }), _jsx(Box, { as: "hr", className: "ab-OnePageWizard__header-preview-separator twa:w-full twa:border-0 twa:border-t twa:my-0 twa:border-t-input-border" })] })) : null, renderSection(currentSection)] })] }), _jsxs(Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2", children: [_jsx(SimpleButton, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: ACCESS_LEVEL_FULL, children: props.closeText ?? 'CLOSE' }), _jsx(KeyHint, { className: "twa:ml-2", children: "Esc" }), _jsx(Box, { className: "ab-OnePageWizard__error twa:text-2 twa:mr-3 twa:flex-1 twa:text-destructive twa:text-end", children: firstErrorMessage }), _jsx(SimpleButton, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: ACCESS_LEVEL_FULL, children: props.finishText ?? 'Finish' })] })] }) }) }) }));
|
|
168
170
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import debounce from '../Utilities/
|
|
1
|
+
import { debounce } from '../Utilities/Helpers/TimingHelper';
|
|
2
2
|
import { createGrid, LocalEventService, } from 'ag-grid-enterprise';
|
|
3
3
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
4
4
|
import { PrimaryKeyDocsLink } from '../Utilities/Constants/DocumentationLinkConstants';
|
|
5
5
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
6
|
-
import { applyQuickSearchFindCssVars } from '../Utilities/Helpers/
|
|
6
|
+
import { applyQuickSearchFindCssVars } from '../Utilities/Helpers/QuickSearchHelper';
|
|
7
7
|
import Emitter from '../Utilities/Emitter';
|
|
8
8
|
import { applyDefaultAdaptableOptions } from '../AdaptableOptions/DefaultAdaptableOptions';
|
|
9
9
|
import { resolveContainerElement } from '../Utilities/resolveContainerElement';
|
|
@@ -20,7 +20,7 @@ import { ThemeService } from '../Utilities/Services/ThemeService';
|
|
|
20
20
|
import { ValidationService } from '../Utilities/Services/ValidationService';
|
|
21
21
|
import { ModuleService } from '../Utilities/Services/ModuleService';
|
|
22
22
|
import { CalculatedColumnExpressionService } from '../Utilities/Services/CalculatedColumnExpressionService';
|
|
23
|
-
import { expandCellDataChangedInfosWithCalculatedColumns } from '../Utilities/Services/
|
|
23
|
+
import { expandCellDataChangedInfosWithCalculatedColumns } from '../Utilities/Services/CalculatedColumnExpressionService';
|
|
24
24
|
import { QueryLanguageService } from '../Utilities/Services/QueryLanguageService';
|
|
25
25
|
import { AlertService } from '../Utilities/Services/AlertService';
|
|
26
26
|
import { TeamSharingService } from '../Utilities/Services/TeamSharingService';
|
|
@@ -86,8 +86,8 @@ import { ensureLoadingScreenPortalElement } from '../components/Modal';
|
|
|
86
86
|
import { AdaptableLoadingScreen } from '../View/Components/Popups/AdaptableLoadingScreen';
|
|
87
87
|
import { createElement } from 'react';
|
|
88
88
|
import { createAgStatusPanelComponent } from '../Utilities/createAgStatusPanelComponent';
|
|
89
|
-
import { only } from '../
|
|
90
|
-
import { weightedAverage } from '../
|
|
89
|
+
import { only } from '../AdaptableState/Aggregations/only';
|
|
90
|
+
import { weightedAverage } from '../AdaptableState/Aggregations/weightedAverage';
|
|
91
91
|
import { ROW_SUMMARY_ROW_ID } from '../AdaptableState/Common/RowSummary';
|
|
92
92
|
import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
|
|
93
93
|
import { AgGridExportAdapter } from './AgGridExportAdapter';
|
|
@@ -103,7 +103,7 @@ import { tagProvidedByAdaptable } from '../Utilities/adaptableOverrideCheck';
|
|
|
103
103
|
import { AgGridModulesAdapter } from './AgGridModulesAdapter';
|
|
104
104
|
import { getMarker } from '../devTools';
|
|
105
105
|
import { DeepMap } from '@infinite-table/infinite-react';
|
|
106
|
-
import { DateFormatter } from '../Utilities/Helpers/
|
|
106
|
+
import { DateFormatter } from '../Utilities/Helpers/DisplayFormatHelper';
|
|
107
107
|
import { clearPredicateDefMapMemo } from '../Api/Implementation/PredicateApiImpl';
|
|
108
108
|
import { AgGridFilterAdapterFactory } from './AgGridFilterAdapter';
|
|
109
109
|
import { AdaptableFilterHandler } from './AdaptableFilterHandler';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import kebabCase from '../Utilities/
|
|
1
|
+
import { kebabCase } from '../Utilities/Extensions/StringExtensions';
|
|
2
2
|
import { resolveDisplayFormat } from '../AdaptableState/Common/AdaptableFormatPresets';
|
|
3
|
-
import merge from '../Utilities/
|
|
4
|
-
import { resolveSparklineOptionsForRender } from '../Utilities/Helpers/
|
|
5
|
-
import {
|
|
3
|
+
import { merge } from '../Utilities/Extensions/ObjectExtensions';
|
|
4
|
+
import { resolveSparklineOptionsForRender } from '../Utilities/Helpers/StyledColumns/SparklineStyleHelper';
|
|
5
|
+
import { hasBarStyleCellTextConfigured } from '../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
6
6
|
import { convertAdaptableStyleToCSS, getAutoContrastTextColor, getVariableColor, hasCellBoxStyle, hasCellFontStyle, normalizeStyleForAgGrid, } from '../Utilities/Helpers/StyleHelper';
|
|
7
7
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
8
8
|
import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
|
|
@@ -13,11 +13,11 @@ import { getBadgeRendererForColumn } from './cellRenderers/BadgeRenderer';
|
|
|
13
13
|
import { getBulletChartRendererForColumn } from './cellRenderers/BulletChartRenderer';
|
|
14
14
|
import { getRangeBarRendererForColumn } from './cellRenderers/RangeBarRenderer';
|
|
15
15
|
import { getRatingRendererForColumn } from './cellRenderers/RatingRenderer';
|
|
16
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
16
|
+
import { shouldRenderStyledColumnOnRow } from '../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
17
17
|
import { findIconStyleMappingForValue, getIconRendererForColumn, } from './cellRenderers/IconRenderer';
|
|
18
|
-
import
|
|
19
|
-
import { getRuleAlertProperties } from '../Utilities/Helpers/ScheduledAlertHelper';
|
|
20
|
-
import { isNegativeZeroCentredBand, expandGradientCellRanges, gradientStyleRangeLookupValueType, DEFAULT_GRADIENT_MIN_ALPHA, DEFAULT_GRADIENT_MAX_ALPHA, } from '../Utilities/Helpers/
|
|
18
|
+
import { clamp } from '../Utilities/Extensions/NumberExtensions';
|
|
19
|
+
import { getRuleAlertProperties } from '../Utilities/Helpers/Scheduling/ScheduledAlertHelper';
|
|
20
|
+
import { isNegativeZeroCentredBand, expandGradientCellRanges, gradientStyleRangeLookupValueType, DEFAULT_GRADIENT_MIN_ALPHA, DEFAULT_GRADIENT_MAX_ALPHA, } from '../Utilities/Helpers/StyledColumns/GradientStyleHelper';
|
|
21
21
|
import { AdaptableNumberEditor, AdaptableReactNumberEditor } from './editors/AdaptableNumberEditor';
|
|
22
22
|
import { AdaptableDateEditor, AdaptableReactDateEditor } from './editors/AdaptableDateEditor';
|
|
23
23
|
import { AgGridExportAdapter } from './AgGridExportAdapter';
|
|
@@ -27,7 +27,7 @@ import { AdaptableFilterHandler } from './AdaptableFilterHandler';
|
|
|
27
27
|
import { AgGridFilterAdapterFactory } from './AgGridFilterAdapter';
|
|
28
28
|
import { AgGridFloatingFilterAdapterFactory } from './AgGridFloatingFilterAdapter';
|
|
29
29
|
import { errorOnce } from './AdaptableLogger';
|
|
30
|
-
import { isUnsupportedColumnDataTypeForIconStyle } from '../Utilities/Helpers/
|
|
30
|
+
import { isUnsupportedColumnDataTypeForIconStyle } from '../Utilities/Helpers/StyledColumns/IconStyleHelper';
|
|
31
31
|
import { isWeightedAverageAggFuncName, } from '../AdaptableState/Common/AggregationColumns';
|
|
32
32
|
/**
|
|
33
33
|
* CSS property keys produced by `convertAdaptableStyleToCSS` from a
|
|
@@ -611,7 +611,7 @@ export class AgGridColumnAdapter {
|
|
|
611
611
|
if (ratingToolTip.includes('PercentageValue') && ratingMax > 0) {
|
|
612
612
|
const n = Number(params.value);
|
|
613
613
|
if (!isNaN(n)) {
|
|
614
|
-
const clamped =
|
|
614
|
+
const clamped = clamp(n, 0, ratingMax);
|
|
615
615
|
const percentageValue = (clamped / ratingMax) * 100;
|
|
616
616
|
const pct = `${percentageValue.toFixed(0)}%`;
|
|
617
617
|
returnValue = returnValue ? `${returnValue} (${pct})` : pct;
|
|
@@ -659,7 +659,7 @@ export class AgGridColumnAdapter {
|
|
|
659
659
|
}
|
|
660
660
|
else {
|
|
661
661
|
const scaleSpan = max - min;
|
|
662
|
-
const clamped =
|
|
662
|
+
const clamped = clamp(Number(params.value), min, max);
|
|
663
663
|
percentageValue = scaleSpan === 0 ? 0 : ((clamped - min) / scaleSpan) * 100;
|
|
664
664
|
}
|
|
665
665
|
returnValue += ` (${percentageValue.toFixed(0)}%)`;
|
|
@@ -1427,11 +1427,11 @@ export class AgGridColumnAdapter {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
const minAlphaBound = gradientStyle.MinAlpha ?? DEFAULT_GRADIENT_MIN_ALPHA;
|
|
1429
1429
|
const maxAlphaBound = gradientStyle.MaxAlpha ?? DEFAULT_GRADIENT_MAX_ALPHA;
|
|
1430
|
-
const lo = Math.min(
|
|
1431
|
-
const hi = Math.max(
|
|
1430
|
+
const lo = Math.min(clamp(minAlphaBound, 0, 1), clamp(maxAlphaBound, 0, 1));
|
|
1431
|
+
const hi = Math.max(clamp(minAlphaBound, 0, 1), clamp(maxAlphaBound, 0, 1));
|
|
1432
1432
|
const span = Math.abs(max - min);
|
|
1433
1433
|
let t = span === 0 ? 0.5 : (Number(colValue) - min) / span;
|
|
1434
|
-
t =
|
|
1434
|
+
t = clamp(t, 0, 1);
|
|
1435
1435
|
if (reverseGradient) {
|
|
1436
1436
|
t = 1 - t;
|
|
1437
1437
|
}
|
|
@@ -1446,7 +1446,8 @@ export class AgGridColumnAdapter {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
|
-
if (styledColumn.PercentBarStyle &&
|
|
1449
|
+
if (styledColumn.PercentBarStyle &&
|
|
1450
|
+
hasBarStyleCellTextConfigured(styledColumn.PercentBarStyle.CellTextProperties)) {
|
|
1450
1451
|
style.paddingTop = 0;
|
|
1451
1452
|
style.paddingBottom = 0;
|
|
1452
1453
|
}
|
|
@@ -5,7 +5,7 @@ import { createUuid } from '../AdaptableState/Uuid';
|
|
|
5
5
|
import { AG_GRID_GROUPED_COLUMN, AG_GRID_SELECTION_COLUMN, } from '../Utilities/Constants/GeneralConstants';
|
|
6
6
|
import { ExportModuleId } from '../Utilities/Constants/ModuleConstants';
|
|
7
7
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
8
|
-
import FormatHelper, { DateFormatter } from '../Utilities/Helpers/
|
|
8
|
+
import FormatHelper, { DateFormatter } from '../Utilities/Helpers/DisplayFormatHelper';
|
|
9
9
|
import { convertCSSAbsoluteFontSizeToPt, getVariableColor, sanitizeStyle, } from '../Utilities/Helpers/StyleHelper';
|
|
10
10
|
import { waitForTimeout } from '../Utilities/waitForTimeout';
|
|
11
11
|
export class AgGridExportAdapter {
|