@adaptabletools/adaptable-cjs 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 +2 -3
- package/src/AdaptableState/Common/Enums.d.ts +0 -12
- package/src/AdaptableState/Common/Enums.js +1 -16
- 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 +5 -5
- package/src/Api/Implementation/ExportApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutHelpers.js +2 -3
- package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
- package/src/Api/Implementation/ThemeApiImpl.js +2 -2
- package/src/Api/Internal/ActionColumnInternalApi.js +2 -2
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/ChartingInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +2 -2
- package/src/Api/Internal/EventInternalApi.js +3 -4
- package/src/Api/Internal/ExportInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +4 -4
- package/src/Api/Internal/GridInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
- package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
- package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +2 -3
- package/src/Redux/Store/AdaptableReduxMerger.js +7 -9
- package/src/Redux/Store/AdaptableStore.js +5 -5
- 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 +4 -4
- 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 +2 -2
- package/src/Strategy/NoteModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +8 -8
- 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 +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +54 -1
- package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
- package/src/Utilities/Extensions/NumberExtensions.js +78 -0
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +277 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
- package/src/Utilities/Extensions/StringExtensions.js +49 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +7 -7
- package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
- package/src/Utilities/Helpers/DateHelper.js +2 -2
- package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +5 -5
- package/src/Utilities/Helpers/Helper.d.ts +0 -6
- package/src/Utilities/Helpers/Helper.js +0 -38
- package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +2 -3
- 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} +16 -1
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
- package/src/Utilities/Helpers/{barChartCellText.js → StyledColumns/BarStylesHelper.js} +48 -47
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -4
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +9 -9
- package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
- package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +16 -0
- package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -2
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +11 -12
- package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +124 -0
- package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
- package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +25 -9
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +118 -2
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
- package/src/Utilities/Services/RowSummaryService.js +6 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- 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 +3 -3
- 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 +1 -1
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +2 -2
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Comments/CommentsEditor.js +2 -2
- package/src/View/Comments/CommentsPopup.js +2 -2
- 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 +2 -2
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -2
- package/src/View/Components/Popups/Utilities.js +5 -5
- package/src/View/Components/RangesComponent.d.ts +3 -3
- package/src/View/Components/RangesComponent.js +5 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -3
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -3
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +5 -2
- package/src/View/Dashboard/CustomDashboardButton.js +2 -3
- package/src/View/Dashboard/Dashboard.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryTable.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +2 -2
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +13 -13
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +4 -4
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +2 -2
- package/src/View/Layout/LayoutCloneButton.js +2 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +5 -5
- package/src/View/Note/NoteEditor.js +2 -2
- package/src/View/Note/NotePopup.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -4
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +2 -2
- 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 +31 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +17 -22
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +9 -10
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +5 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +14 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +14 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextLayoutEditor.d.ts → BarStyleCellTextLayoutEditor.d.ts} +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +37 -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} +9 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +5 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +8 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +5 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +1 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +20 -21
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +8 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +4 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +3 -6
- 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 +2 -2
- package/src/View/Wizard/OnePageWizards.d.ts +8 -0
- package/src/View/Wizard/OnePageWizards.js +5 -3
- package/src/agGrid/AdaptableAgGrid.js +11 -11
- package/src/agGrid/AgGridColumnAdapter.js +30 -29
- package/src/agGrid/AgGridExportAdapter.js +3 -3
- package/src/agGrid/AgGridMenuAdapter.js +129 -4
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -2
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +8 -8
- package/src/agGrid/cellRenderers/IconRenderer.js +7 -8
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +9 -9
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +10 -11
- package/src/agGrid/cellRenderers/RatingRenderer.js +6 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/components/ColorPicker/ColorPicker.js +2 -2
- package/src/components/Datepicker/index.js +2 -2
- package/src/components/DragAndDropContext/ModuleManager.js +5 -2
- package/src/components/DragAndDropContext/types.d.ts +7 -0
- package/src/components/FormLayout/index.js +2 -2
- package/src/components/OverlayTrigger/index.js +2 -2
- package/src/env.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +4 -5
- 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.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +0 -7
- 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 -18
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -19
- package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
- package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -70
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -120
- package/src/Utilities/utils/chunk.d.ts +0 -6
- package/src/Utilities/utils/chunk.js +0 -20
- package/src/Utilities/utils/clamp.d.ts +0 -5
- package/src/Utilities/utils/clamp.js +0 -10
- package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
- package/src/Utilities/utils/cloneDeepWith.js +0 -70
- 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 -10
- package/src/Utilities/utils/flattenDeep.d.ts +0 -5
- package/src/Utilities/utils/flattenDeep.js +0 -10
- package/src/Utilities/utils/get.d.ts +0 -6
- package/src/Utilities/utils/get.js +0 -38
- package/src/Utilities/utils/index.d.ts +0 -22
- package/src/Utilities/utils/index.js +0 -48
- package/src/Utilities/utils/isArray.d.ts +0 -6
- package/src/Utilities/utils/isArray.js +0 -8
- package/src/Utilities/utils/isEqual.d.ts +0 -5
- package/src/Utilities/utils/isEqual.js +0 -127
- package/src/Utilities/utils/isObject.d.ts +0 -6
- package/src/Utilities/utils/isObject.js +0 -12
- package/src/Utilities/utils/isPlainObject.d.ts +0 -6
- package/src/Utilities/utils/isPlainObject.js +0 -20
- package/src/Utilities/utils/kebabCase.d.ts +0 -5
- package/src/Utilities/utils/kebabCase.js +0 -12
- package/src/Utilities/utils/merge.d.ts +0 -11
- package/src/Utilities/utils/merge.js +0 -44
- package/src/Utilities/utils/mergeWith.d.ts +0 -7
- package/src/Utilities/utils/mergeWith.js +0 -50
- package/src/Utilities/utils/orderBy.d.ts +0 -8
- package/src/Utilities/utils/orderBy.js +0 -33
- package/src/Utilities/utils/parseInt.d.ts +0 -6
- package/src/Utilities/utils/parseInt.js +0 -12
- package/src/Utilities/utils/sentenceCase.d.ts +0 -6
- package/src/Utilities/utils/sentenceCase.js +0 -19
- package/src/Utilities/utils/startCase.d.ts +0 -5
- package/src/Utilities/utils/startCase.js +0 -15
- package/src/Utilities/utils/throttle.d.ts +0 -17
- package/src/Utilities/utils/throttle.js +0 -23
- package/src/Utilities/utils/toNumber.d.ts +0 -5
- package/src/Utilities/utils/toNumber.js +0 -42
- package/src/Utilities/utils/uniq.d.ts +0 -7
- package/src/Utilities/utils/uniq.js +0 -12
- package/src/Utilities/utils/uniqBy.d.ts +0 -8
- package/src/Utilities/utils/uniqBy.js +0 -25
- package/src/Utilities/utils/words.d.ts +0 -7
- package/src/Utilities/utils/words.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +0 -40
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
- package/src/agGrid/buildValueAggregationMenuItem.js +0 -114
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js +0 -58
- package/src/agGrid/createAgGridIcon.d.ts +0 -10
- package/src/agGrid/createAgGridIcon.js +0 -19
- /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
|
@@ -55,7 +55,7 @@ const CollapsibleWizardCard = (props) => {
|
|
|
55
55
|
// inset so it stays inside the element and is always visible.
|
|
56
56
|
twUtils_1.targetOwn.focusOutline, 'twa:focus-visible:ring-inset'), "data-name": dataName, onClick: toggleExpanded, onKeyDown: handleTitleKeyDown, tabIndex: 0, "aria-expanded": expanded, role: "button", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-row twa:items-center twa:gap-2 twa:shrink-0 twa:cursor-pointer twa:select-none", children: [(0, jsx_runtime_1.jsx)(Icon_1.IconComponent, { icon: { name: expanded ? 'collapse' : 'expand' } }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: title })] }), headerVisual ? ((0, jsx_runtime_1.jsx)(Flex_1.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 ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, utils_1.cn)('twa:flex-1 twa:min-w-0 twa:font-normal', isInteractiveCompactSummary
|
|
57
57
|
? 'twa:flex twa:justify-end twa:items-center twa:overflow-visible'
|
|
58
|
-
: (0, utils_1.cn)('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', compact ? 'twa:overflow-hidden' : 'twa:truncate')), children: headerInline })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-0" })), headerActions ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:shrink-0", onClick: (event) => event.stopPropagation(), children: headerActions })) : null] }) }), expanded ? ((0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: (0, utils_1.cn)('twa:p-1', bodyClassName, fillAvailable && 'twa:max-h-none! twa:flex-1 twa:min-h-0'), children: children })) : showSummary ? ((0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", gap: 1, children: summary })) : null] }));
|
|
58
|
+
: (0, utils_1.cn)('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', compact ? 'twa:overflow-hidden' : 'twa:truncate')), children: headerInline })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-0" })), headerActions ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:shrink-0 twa:gap-2 twa:flex", onClick: (event) => event.stopPropagation(), children: headerActions })) : null] }) }), expanded ? ((0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: (0, utils_1.cn)('twa:p-1', bodyClassName, fillAvailable && 'twa:max-h-none! twa:flex-1 twa:min-h-0'), children: children })) : showSummary ? ((0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", gap: 1, children: summary })) : null] }));
|
|
59
59
|
};
|
|
60
60
|
exports.CollapsibleWizardCard = CollapsibleWizardCard;
|
|
61
61
|
function useWizardCardAccordion(initialExpandedId, options) {
|
|
@@ -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;
|
|
@@ -13,7 +13,7 @@ const Card_1 = require("../../components/Card");
|
|
|
13
13
|
const ButtonEdit_1 = require("../Components/Buttons/ButtonEdit");
|
|
14
14
|
const NamedQueryContext_1 = require("../../components/ExpressionEditor/NamedQueryContext");
|
|
15
15
|
const OnePageWizards_1 = require("./OnePageWizards");
|
|
16
|
-
const
|
|
16
|
+
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
17
17
|
const Flex_1 = require("../../components/Flex");
|
|
18
18
|
const twMerge_1 = require("../../twMerge");
|
|
19
19
|
const SummaryTag = (props) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...props }));
|
|
@@ -38,7 +38,7 @@ const OnePageAdaptableWizard = (props) => {
|
|
|
38
38
|
const saveNamedQuery = React.useCallback((namedQuery) => dispatch(NamedQueryRedux.NamedQueryAdd(namedQuery)), []);
|
|
39
39
|
const [namedQuery, setNamedQuery] = (0, react_1.useState)(false);
|
|
40
40
|
const name = props.moduleInfo.FriendlyName
|
|
41
|
-
? `${(0,
|
|
41
|
+
? `${(0, StringExtensions_1.kebabCase)(props.moduleInfo.FriendlyName)}-wizard`
|
|
42
42
|
: '';
|
|
43
43
|
const extraContext = {
|
|
44
44
|
data: props.data,
|
|
@@ -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 {};
|
|
@@ -86,7 +86,7 @@ const OnePageWizard = (props) => {
|
|
|
86
86
|
if (section === '-') {
|
|
87
87
|
return (0, jsx_runtime_1.jsx)(React.Fragment, {}, index);
|
|
88
88
|
}
|
|
89
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", "data-name": `section-${index}`, className: "twa:
|
|
89
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", "data-name": `section-${index}`, className: "twa:flex-1 twa:overflow-hidden", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__section twa:flex-1 twa:rounded-standard twa:overflow-auto twa:bg-background", children: section.render(props.data, index) }) }, index));
|
|
90
90
|
};
|
|
91
91
|
const handleNavigation = (0, useKeyboardNavigation_1.useKeyboardNavigation)(setCurrentSection, visibleSections);
|
|
92
92
|
const selectedNodeRef = (0, react_1.useRef)(null);
|
|
@@ -171,7 +171,9 @@ const OnePageWizard = (props) => {
|
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
setCurrentSection(index);
|
|
174
|
-
}, children: [(0, jsx_runtime_1.jsx)(KeyHint_1.KeyHint, { className:
|
|
175
|
-
|
|
174
|
+
}, children: [(0, jsx_runtime_1.jsx)(KeyHint_1.KeyHint, { className: (0, utils_1.cn)('twa:mr-2 twa:inline-block', {
|
|
175
|
+
'twa:text-accent-foreground': active,
|
|
176
|
+
}), children: navIndex }), (0, jsx_runtime_1.jsx)("div", { className: "twa:flex-1", children: section.title }), (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "error", className: (0, utils_1.cn)('twa:ml-2', validSectionsMap.get(index) !== true ? 'twa:visible' : 'twa:invisible') })] }, section.title));
|
|
177
|
+
}), selectedFeedback, (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsxs)(KeyHint_1.KeyHint, { className: "ab-OnePageWizard__key-hint twa:leading-normal", children: [(0, isMacLike_1.isMacLike)() ? 'Cmd' : 'Ctrl', " + #", (0, jsx_runtime_1.jsx)("br", {}), "or arrow keys", (0, jsx_runtime_1.jsx)("br", {}), "to navigate"] })] }), (0, jsx_runtime_1.jsxs)(Flex_1.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 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__header-preview", children: props.headerPreview }), (0, jsx_runtime_1.jsx)(Flex_1.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)] })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2", children: [(0, jsx_runtime_1.jsx)(SimpleButton_1.default, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: props.closeText ?? 'CLOSE' }), (0, jsx_runtime_1.jsx)(KeyHint_1.KeyHint, { className: "twa:ml-2", children: "Esc" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-OnePageWizard__error twa:text-2 twa:mr-3 twa:flex-1 twa:text-destructive twa:text-end", children: firstErrorMessage }), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: props.finishText ?? 'Finish' })] })] }) }) }) }));
|
|
176
178
|
};
|
|
177
179
|
exports.OnePageWizard = OnePageWizard;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdaptableAgGrid = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const TimingHelper_1 = require("../Utilities/Helpers/TimingHelper");
|
|
6
6
|
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
7
7
|
const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
8
8
|
const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
|
|
9
9
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
10
|
-
const
|
|
10
|
+
const QuickSearchHelper_1 = require("../Utilities/Helpers/QuickSearchHelper");
|
|
11
11
|
const Emitter_1 = tslib_1.__importDefault(require("../Utilities/Emitter"));
|
|
12
12
|
const DefaultAdaptableOptions_1 = require("../AdaptableOptions/DefaultAdaptableOptions");
|
|
13
13
|
const resolveContainerElement_1 = require("../Utilities/resolveContainerElement");
|
|
@@ -24,7 +24,7 @@ const ThemeService_1 = require("../Utilities/Services/ThemeService");
|
|
|
24
24
|
const ValidationService_1 = require("../Utilities/Services/ValidationService");
|
|
25
25
|
const ModuleService_1 = require("../Utilities/Services/ModuleService");
|
|
26
26
|
const CalculatedColumnExpressionService_1 = require("../Utilities/Services/CalculatedColumnExpressionService");
|
|
27
|
-
const
|
|
27
|
+
const CalculatedColumnExpressionService_2 = require("../Utilities/Services/CalculatedColumnExpressionService");
|
|
28
28
|
const QueryLanguageService_1 = require("../Utilities/Services/QueryLanguageService");
|
|
29
29
|
const AlertService_1 = require("../Utilities/Services/AlertService");
|
|
30
30
|
const TeamSharingService_1 = require("../Utilities/Services/TeamSharingService");
|
|
@@ -90,8 +90,8 @@ const Modal_1 = require("../components/Modal");
|
|
|
90
90
|
const AdaptableLoadingScreen_1 = require("../View/Components/Popups/AdaptableLoadingScreen");
|
|
91
91
|
const react_1 = require("react");
|
|
92
92
|
const createAgStatusPanelComponent_1 = require("../Utilities/createAgStatusPanelComponent");
|
|
93
|
-
const only_1 = require("../
|
|
94
|
-
const weightedAverage_1 = require("../
|
|
93
|
+
const only_1 = require("../AdaptableState/Aggregations/only");
|
|
94
|
+
const weightedAverage_1 = require("../AdaptableState/Aggregations/weightedAverage");
|
|
95
95
|
const RowSummary_1 = require("../AdaptableState/Common/RowSummary");
|
|
96
96
|
const FlashingCellService_1 = require("../Utilities/Services/FlashingCellService");
|
|
97
97
|
const AgGridExportAdapter_1 = require("./AgGridExportAdapter");
|
|
@@ -107,7 +107,7 @@ const adaptableOverrideCheck_1 = require("../Utilities/adaptableOverrideCheck");
|
|
|
107
107
|
const AgGridModulesAdapter_1 = require("./AgGridModulesAdapter");
|
|
108
108
|
const devTools_1 = require("../devTools");
|
|
109
109
|
const infinite_react_1 = require("@infinite-table/infinite-react");
|
|
110
|
-
const
|
|
110
|
+
const DisplayFormatHelper_1 = require("../Utilities/Helpers/DisplayFormatHelper");
|
|
111
111
|
const PredicateApiImpl_1 = require("../Api/Implementation/PredicateApiImpl");
|
|
112
112
|
const AgGridFilterAdapter_1 = require("./AgGridFilterAdapter");
|
|
113
113
|
const AdaptableFilterHandler_1 = require("./AdaptableFilterHandler");
|
|
@@ -1742,7 +1742,7 @@ class AdaptableAgGrid {
|
|
|
1742
1742
|
* Use Case: User has selected Rows or opened a Row Group
|
|
1743
1743
|
* Action: Set Selected Rows (on a debounce of 500ms)
|
|
1744
1744
|
*/
|
|
1745
|
-
this.debouncedSetSelectedRows = (0,
|
|
1745
|
+
this.debouncedSetSelectedRows = (0, TimingHelper_1.debounce)(() => {
|
|
1746
1746
|
if (!this.isReady) {
|
|
1747
1747
|
return;
|
|
1748
1748
|
}
|
|
@@ -1762,7 +1762,7 @@ class AdaptableAgGrid {
|
|
|
1762
1762
|
* Use Case: User has selected a range of cells
|
|
1763
1763
|
* Action: Set Selected Cells (on a debounce of 250ms)
|
|
1764
1764
|
*/
|
|
1765
|
-
this.debouncedSetSelectedCells = (0,
|
|
1765
|
+
this.debouncedSetSelectedCells = (0, TimingHelper_1.debounce)(() => {
|
|
1766
1766
|
if (!this.isReady) {
|
|
1767
1767
|
return;
|
|
1768
1768
|
}
|
|
@@ -3013,7 +3013,7 @@ class AdaptableAgGrid {
|
|
|
3013
3013
|
const monthCells = treeDeepMap.get([year, month]) || [];
|
|
3014
3014
|
const monthCell = this.createGridCell(rowNode, colId, {
|
|
3015
3015
|
rawValue: monthRawValue,
|
|
3016
|
-
displayValue: (0,
|
|
3016
|
+
displayValue: (0, DisplayFormatHelper_1.DateFormatter)(`${monthRawValue}-01`, { Pattern: 'LLLL' }),
|
|
3017
3017
|
normalisedValue: monthRawValue,
|
|
3018
3018
|
});
|
|
3019
3019
|
monthCells.push(monthCell);
|
|
@@ -3585,7 +3585,7 @@ class AdaptableAgGrid {
|
|
|
3585
3585
|
this.agGridAdapter.setGridOption('findSearchValue', searchText);
|
|
3586
3586
|
}
|
|
3587
3587
|
applyQuickSearchFindCssVars() {
|
|
3588
|
-
(0,
|
|
3588
|
+
(0, QuickSearchHelper_1.applyQuickSearchFindCssVars)(this.getAgGridContainerElement(), this.api.stateApi.getQuickSearchState());
|
|
3589
3589
|
}
|
|
3590
3590
|
refreshAgGridFind() {
|
|
3591
3591
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('FindModule')) {
|
|
@@ -4138,7 +4138,7 @@ class AdaptableAgGrid {
|
|
|
4138
4138
|
* There are a few things we need to do AFTER we edit a cell and it makes sense to put them in one place
|
|
4139
4139
|
*/
|
|
4140
4140
|
performPostEditChecks(rowNode, cellDataChangedInfos) {
|
|
4141
|
-
cellDataChangedInfos = (0,
|
|
4141
|
+
cellDataChangedInfos = (0, CalculatedColumnExpressionService_2.expandCellDataChangedInfosWithCalculatedColumns)(this.api, cellDataChangedInfos);
|
|
4142
4142
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
4143
4143
|
// if a Cell Data Change is undone, log to the Console
|
|
4144
4144
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AgGridColumnAdapter = void 0;
|
|
4
4
|
exports.getEditorForColumnDataType = getEditorForColumnDataType;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const
|
|
6
|
+
const StringExtensions_1 = require("../Utilities/Extensions/StringExtensions");
|
|
7
7
|
const AdaptableFormatPresets_1 = require("../AdaptableState/Common/AdaptableFormatPresets");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const ObjectExtensions_1 = require("../Utilities/Extensions/ObjectExtensions");
|
|
9
|
+
const SparklineStyleHelper_1 = require("../Utilities/Helpers/StyledColumns/SparklineStyleHelper");
|
|
10
|
+
const BarStylesHelper_1 = require("../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
11
11
|
const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
12
|
-
const
|
|
12
|
+
const StringExtensions_2 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
13
13
|
const AdaptableColumn_1 = require("../AdaptableState/Common/AdaptableColumn");
|
|
14
14
|
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
15
15
|
const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
|
|
@@ -18,11 +18,11 @@ const BadgeRenderer_1 = require("./cellRenderers/BadgeRenderer");
|
|
|
18
18
|
const BulletChartRenderer_1 = require("./cellRenderers/BulletChartRenderer");
|
|
19
19
|
const RangeBarRenderer_1 = require("./cellRenderers/RangeBarRenderer");
|
|
20
20
|
const RatingRenderer_1 = require("./cellRenderers/RatingRenderer");
|
|
21
|
-
const
|
|
21
|
+
const StyledColumnHelper_1 = require("../Utilities/Helpers/StyledColumns/StyledColumnHelper");
|
|
22
22
|
const IconRenderer_1 = require("./cellRenderers/IconRenderer");
|
|
23
|
-
const
|
|
24
|
-
const ScheduledAlertHelper_1 = require("../Utilities/Helpers/ScheduledAlertHelper");
|
|
25
|
-
const
|
|
23
|
+
const NumberExtensions_1 = require("../Utilities/Extensions/NumberExtensions");
|
|
24
|
+
const ScheduledAlertHelper_1 = require("../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
25
|
+
const GradientStyleHelper_1 = require("../Utilities/Helpers/StyledColumns/GradientStyleHelper");
|
|
26
26
|
const AdaptableNumberEditor_1 = require("./editors/AdaptableNumberEditor");
|
|
27
27
|
const AdaptableDateEditor_1 = require("./editors/AdaptableDateEditor");
|
|
28
28
|
const AgGridExportAdapter_1 = require("./AgGridExportAdapter");
|
|
@@ -32,7 +32,7 @@ const AdaptableFilterHandler_1 = require("./AdaptableFilterHandler");
|
|
|
32
32
|
const AgGridFilterAdapter_1 = require("./AgGridFilterAdapter");
|
|
33
33
|
const AgGridFloatingFilterAdapter_1 = require("./AgGridFloatingFilterAdapter");
|
|
34
34
|
const AdaptableLogger_1 = require("./AdaptableLogger");
|
|
35
|
-
const
|
|
35
|
+
const IconStyleHelper_1 = require("../Utilities/Helpers/StyledColumns/IconStyleHelper");
|
|
36
36
|
const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
|
|
37
37
|
/**
|
|
38
38
|
* CSS property keys produced by `convertAdaptableStyleToCSS` from a
|
|
@@ -376,7 +376,7 @@ class AgGridColumnAdapter {
|
|
|
376
376
|
return Object.entries(style).reduce((acc, [key, value]) => {
|
|
377
377
|
// needed as AG-Grid vanilla turns all CSS props to kebab, while AG Grid React does not
|
|
378
378
|
// @ts-ignore
|
|
379
|
-
acc[`--ab-dynamic-${(0,
|
|
379
|
+
acc[`--ab-dynamic-${(0, StringExtensions_1.kebabCase)(key)}`] = value;
|
|
380
380
|
return acc;
|
|
381
381
|
}, {});
|
|
382
382
|
}
|
|
@@ -559,7 +559,7 @@ class AgGridColumnAdapter {
|
|
|
559
559
|
if (styledColumn && !styledColumn.IsSuspended) {
|
|
560
560
|
if (styledColumn.SparklineStyle) {
|
|
561
561
|
const sanitizedSparklineOptions = AdaptableHelper_1.AdaptableHelper.removeAdaptableObjectPrimitives(styledColumn.SparklineStyle.options);
|
|
562
|
-
const sparklineOptions = (0,
|
|
562
|
+
const sparklineOptions = (0, SparklineStyleHelper_1.resolveSparklineOptionsForRender)((0, ObjectExtensions_1.merge)({}, userDefined?.sparklineOptions, sanitizedSparklineOptions));
|
|
563
563
|
return {
|
|
564
564
|
...userDefined,
|
|
565
565
|
sparklineOptions,
|
|
@@ -578,7 +578,7 @@ class AgGridColumnAdapter {
|
|
|
578
578
|
// Icon Style has its own tooltip vocabulary (`'CellValue'` /
|
|
579
579
|
// `'IconDescription'`) so we handle it before falling through to the
|
|
580
580
|
// numeric tooltip branch.
|
|
581
|
-
if (styledColumn.IconStyle && !(0,
|
|
581
|
+
if (styledColumn.IconStyle && !(0, IconStyleHelper_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType)) {
|
|
582
582
|
const iconTokens = styledColumn.IconStyle.ToolTipText ?? [];
|
|
583
583
|
if (iconTokens.length === 0) {
|
|
584
584
|
return undefined;
|
|
@@ -616,7 +616,7 @@ class AgGridColumnAdapter {
|
|
|
616
616
|
if (ratingToolTip.includes('PercentageValue') && ratingMax > 0) {
|
|
617
617
|
const n = Number(params.value);
|
|
618
618
|
if (!isNaN(n)) {
|
|
619
|
-
const clamped =
|
|
619
|
+
const clamped = (0, NumberExtensions_1.clamp)(n, 0, ratingMax);
|
|
620
620
|
const percentageValue = (clamped / ratingMax) * 100;
|
|
621
621
|
const pct = `${percentageValue.toFixed(0)}%`;
|
|
622
622
|
returnValue = returnValue ? `${returnValue} (${pct})` : pct;
|
|
@@ -664,7 +664,7 @@ class AgGridColumnAdapter {
|
|
|
664
664
|
}
|
|
665
665
|
else {
|
|
666
666
|
const scaleSpan = max - min;
|
|
667
|
-
const clamped =
|
|
667
|
+
const clamped = (0, NumberExtensions_1.clamp)(Number(params.value), min, max);
|
|
668
668
|
percentageValue = scaleSpan === 0 ? 0 : ((clamped - min) / scaleSpan) * 100;
|
|
669
669
|
}
|
|
670
670
|
returnValue += ` (${percentageValue.toFixed(0)}%)`;
|
|
@@ -1261,7 +1261,7 @@ class AgGridColumnAdapter {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
getQuickSearchCellStyle() {
|
|
1263
1263
|
const quickSearchStyle = this.adaptableApi.quickSearchApi.getQuickSearchCellMatchStyle();
|
|
1264
|
-
if (!quickSearchStyle ||
|
|
1264
|
+
if (!quickSearchStyle || StringExtensions_2.default.IsNotNullOrEmpty(quickSearchStyle.ClassName)) {
|
|
1265
1265
|
return undefined;
|
|
1266
1266
|
}
|
|
1267
1267
|
return (0, StyleHelper_1.convertAdaptableStyleToCSS)(quickSearchStyle);
|
|
@@ -1364,7 +1364,7 @@ class AgGridColumnAdapter {
|
|
|
1364
1364
|
*/
|
|
1365
1365
|
styledColumnClaimsFontStyle(styledColumn, abColumn) {
|
|
1366
1366
|
const iconFontClaims = !!styledColumn?.IconStyle &&
|
|
1367
|
-
!(0,
|
|
1367
|
+
!(0, IconStyleHelper_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType) &&
|
|
1368
1368
|
(0, StyleHelper_1.hasCellFontStyle)(styledColumn.IconStyle.Font);
|
|
1369
1369
|
return ((0, StyleHelper_1.hasCellFontStyle)(styledColumn?.GradientStyle?.Font) ||
|
|
1370
1370
|
(0, StyleHelper_1.hasCellFontStyle)(styledColumn?.PercentBarStyle?.Font) ||
|
|
@@ -1378,7 +1378,7 @@ class AgGridColumnAdapter {
|
|
|
1378
1378
|
*/
|
|
1379
1379
|
styledColumnClaimsCellBoxStyle(styledColumn, abColumn) {
|
|
1380
1380
|
const iconCellClaims = !!styledColumn?.IconStyle &&
|
|
1381
|
-
!(0,
|
|
1381
|
+
!(0, IconStyleHelper_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType) &&
|
|
1382
1382
|
(0, StyleHelper_1.hasCellBoxStyle)(styledColumn.IconStyle.Cell);
|
|
1383
1383
|
return ((0, StyleHelper_1.hasCellBoxStyle)(styledColumn?.RatingStyle?.Cell) ||
|
|
1384
1384
|
(0, StyleHelper_1.hasCellBoxStyle)(styledColumn?.SparklineStyle?.Cell) ||
|
|
@@ -1406,7 +1406,7 @@ class AgGridColumnAdapter {
|
|
|
1406
1406
|
// Row-kind filtering: defer to the shared row-scope helper so the
|
|
1407
1407
|
// cellStyle path (Gradient background, Font/Cell slots) follows the
|
|
1408
1408
|
// same `StyledColumn.RowScope` rules as every cellRenderer.
|
|
1409
|
-
if (!(0,
|
|
1409
|
+
if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, this.adaptableApi)) {
|
|
1410
1410
|
return style;
|
|
1411
1411
|
}
|
|
1412
1412
|
let colValue = params.value;
|
|
@@ -1419,24 +1419,24 @@ class AgGridColumnAdapter {
|
|
|
1419
1419
|
cellBackColor = gradientStyle.ColumnComparison.Color;
|
|
1420
1420
|
}
|
|
1421
1421
|
else {
|
|
1422
|
-
const matchingRange = this.adaptableApi.styledColumnApi.internalApi.findRangeForColumn((0,
|
|
1422
|
+
const matchingRange = this.adaptableApi.styledColumnApi.internalApi.findRangeForColumn((0, GradientStyleHelper_1.expandGradientCellRanges)(gradientStyle), abColumn, (0, GradientStyleHelper_1.gradientStyleRangeLookupValueType)(gradientStyle), colValue);
|
|
1423
1423
|
if (matchingRange) {
|
|
1424
1424
|
cellBackColor = matchingRange.Color;
|
|
1425
1425
|
// Flip the alpha ramp when (a) it's the negative band of a
|
|
1426
1426
|
// ZeroCentred diverging gradient, OR (b) the user has explicitly
|
|
1427
1427
|
// marked this band as `ReverseGradient` (lower-is-darker).
|
|
1428
1428
|
reverseGradient =
|
|
1429
|
-
(!!gradientStyle.ZeroCentred && (0,
|
|
1429
|
+
(!!gradientStyle.ZeroCentred && (0, GradientStyleHelper_1.isNegativeZeroCentredBand)(matchingRange)) ||
|
|
1430
1430
|
!!matchingRange.ReverseGradient;
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
1433
|
-
const minAlphaBound = gradientStyle.MinAlpha ??
|
|
1434
|
-
const maxAlphaBound = gradientStyle.MaxAlpha ??
|
|
1435
|
-
const lo = Math.min(
|
|
1436
|
-
const hi = Math.max(
|
|
1433
|
+
const minAlphaBound = gradientStyle.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
1434
|
+
const maxAlphaBound = gradientStyle.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
1435
|
+
const lo = Math.min((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
1436
|
+
const hi = Math.max((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
1437
1437
|
const span = Math.abs(max - min);
|
|
1438
1438
|
let t = span === 0 ? 0.5 : (Number(colValue) - min) / span;
|
|
1439
|
-
t =
|
|
1439
|
+
t = (0, NumberExtensions_1.clamp)(t, 0, 1);
|
|
1440
1440
|
if (reverseGradient) {
|
|
1441
1441
|
t = 1 - t;
|
|
1442
1442
|
}
|
|
@@ -1451,7 +1451,8 @@ class AgGridColumnAdapter {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
|
-
if (styledColumn.PercentBarStyle &&
|
|
1454
|
+
if (styledColumn.PercentBarStyle &&
|
|
1455
|
+
(0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(styledColumn.PercentBarStyle.CellTextProperties)) {
|
|
1455
1456
|
style.paddingTop = 0;
|
|
1456
1457
|
style.paddingBottom = 0;
|
|
1457
1458
|
}
|
|
@@ -1465,7 +1466,7 @@ class AgGridColumnAdapter {
|
|
|
1465
1466
|
// basis when a Gradient cell has a tinted background, even if the user
|
|
1466
1467
|
// also set `Font.ForeColor` as a baseline.
|
|
1467
1468
|
const autoContrastColor = gradientStyle?.AutoContrastText && style.color ? style.color : undefined;
|
|
1468
|
-
const iconStyleFontApplies = styledColumn.IconStyle && !(0,
|
|
1469
|
+
const iconStyleFontApplies = styledColumn.IconStyle && !(0, IconStyleHelper_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType);
|
|
1469
1470
|
const fontSlot = styledColumn.GradientStyle?.Font ??
|
|
1470
1471
|
styledColumn.PercentBarStyle?.Font ??
|
|
1471
1472
|
styledColumn.BulletChartStyle?.Font ??
|
|
@@ -1477,7 +1478,7 @@ class AgGridColumnAdapter {
|
|
|
1477
1478
|
if (fontSlot) {
|
|
1478
1479
|
style = { ...style, ...(0, StyleHelper_1.convertAdaptableStyleToCSS)(fontSlot) };
|
|
1479
1480
|
}
|
|
1480
|
-
const iconStyleCellApplies = styledColumn.IconStyle && !(0,
|
|
1481
|
+
const iconStyleCellApplies = styledColumn.IconStyle && !(0, IconStyleHelper_1.isUnsupportedColumnDataTypeForIconStyle)(abColumn.dataType);
|
|
1481
1482
|
const cellSlot = styledColumn.RatingStyle?.Cell ??
|
|
1482
1483
|
styledColumn.SparklineStyle?.Cell ??
|
|
1483
1484
|
styledColumn.BadgeStyle?.Cell ??
|
|
@@ -9,7 +9,7 @@ const Uuid_1 = require("../AdaptableState/Uuid");
|
|
|
9
9
|
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
10
10
|
const ModuleConstants_1 = require("../Utilities/Constants/ModuleConstants");
|
|
11
11
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
12
|
-
const
|
|
12
|
+
const DisplayFormatHelper_1 = tslib_1.__importStar(require("../Utilities/Helpers/DisplayFormatHelper"));
|
|
13
13
|
const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
14
14
|
const waitForTimeout_1 = require("../Utilities/waitForTimeout");
|
|
15
15
|
class AgGridExportAdapter {
|
|
@@ -661,7 +661,7 @@ class AgGridExportAdapter {
|
|
|
661
661
|
// we have to pass the date in the ISO format to Excel
|
|
662
662
|
// see https://www.ag-grid.com/javascript-data-grid/excel-export-data-types/#dates
|
|
663
663
|
// we can NOT use Date.toISOString() because we don't want the timezone corrections to kick in
|
|
664
|
-
const isoFormattedValue = (0,
|
|
664
|
+
const isoFormattedValue = (0, DisplayFormatHelper_1.DateFormatter)(normalisedValue, {
|
|
665
665
|
Pattern: `yyyy-MM-dd'T'HH:mm:ss.SSS`,
|
|
666
666
|
});
|
|
667
667
|
if (isoFormattedValue) {
|
|
@@ -900,7 +900,7 @@ class AgGridExportAdapter {
|
|
|
900
900
|
if (isDateColumn) {
|
|
901
901
|
const customExportDateFormat = this.getCustomExportDateFormat(column, exportContext);
|
|
902
902
|
if (!!customExportDateFormat) {
|
|
903
|
-
return
|
|
903
|
+
return DisplayFormatHelper_1.default.DateFormatter(cellRawValue, {
|
|
904
904
|
Pattern: customExportDateFormat,
|
|
905
905
|
});
|
|
906
906
|
}
|
|
@@ -6,8 +6,133 @@ const Icon_1 = require("../components/Icon");
|
|
|
6
6
|
const icons_1 = require("../components/icons");
|
|
7
7
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
8
8
|
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
9
|
-
const
|
|
10
|
-
|
|
9
|
+
const AggregationColumns_1 = require("../AdaptableState/Common/AggregationColumns");
|
|
10
|
+
/**
|
|
11
|
+
* Creates an AG Grid icon element for the given icon name.
|
|
12
|
+
*
|
|
13
|
+
* Mimics AG Grid's internal icon creation, producing a
|
|
14
|
+
* `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
|
|
15
|
+
* so the icon picks up AG Grid's own icon font/theme styling.
|
|
16
|
+
*
|
|
17
|
+
* @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
|
|
18
|
+
*/
|
|
19
|
+
function createAgGridIcon(name) {
|
|
20
|
+
const element = document.createElement('span');
|
|
21
|
+
element.className = `ag-icon ag-icon-${name}`;
|
|
22
|
+
element.setAttribute('role', 'presentation');
|
|
23
|
+
element.setAttribute('unselectable', 'on');
|
|
24
|
+
return element;
|
|
25
|
+
}
|
|
26
|
+
const toFuncLabel = (funcName) => {
|
|
27
|
+
if (funcName === 'avg') {
|
|
28
|
+
return 'Average';
|
|
29
|
+
}
|
|
30
|
+
if (funcName === 'weightedAvg') {
|
|
31
|
+
return 'Weighted Average';
|
|
32
|
+
}
|
|
33
|
+
return funcName ? funcName.charAt(0).toUpperCase() + funcName.slice(1) : funcName;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Builds the replacement for AG Grid's built-in `valueAggSubMenu` column menu item.
|
|
37
|
+
*
|
|
38
|
+
* AG Grid does not allow customizing the built-in submenu, so we rebuild an
|
|
39
|
+
* equivalent one: the column's existing aggregation functions plus a
|
|
40
|
+
* `Weighted Average` item whose submenu lists the numeric columns that can be
|
|
41
|
+
* used as the weight parameter.
|
|
42
|
+
*
|
|
43
|
+
* Both standard and weighted selections persist through the current Layout
|
|
44
|
+
* (`updateCurrentLayout`), so the existing `weightedAvg` aggFunc can read the
|
|
45
|
+
* chosen `weightedColumnId` back from the Layout.
|
|
46
|
+
*
|
|
47
|
+
* Weighted Average is never used in Pivot Layouts, so this only deals with the
|
|
48
|
+
* Table Layout aggregations and the caller skips it entirely in Pivot mode.
|
|
49
|
+
*/
|
|
50
|
+
function buildValueAggregationMenuItem(adaptableApi, menuContext) {
|
|
51
|
+
const column = menuContext.adaptableColumn;
|
|
52
|
+
const columnId = column.columnId;
|
|
53
|
+
const currentLayout = adaptableApi.layoutApi.getCurrentLayout();
|
|
54
|
+
const aggregationColumns = currentLayout.TableAggregationColumns || [];
|
|
55
|
+
const currentAggFunc = aggregationColumns.find((agg) => agg.ColumnId === columnId)?.AggFunc;
|
|
56
|
+
let activeAggFuncName;
|
|
57
|
+
if (currentAggFunc != null) {
|
|
58
|
+
const aggFuncName = (0, AggregationColumns_1.getAggFuncName)(currentAggFunc);
|
|
59
|
+
activeAggFuncName = aggFuncName === true ? column.aggregationFunction : aggFuncName;
|
|
60
|
+
}
|
|
61
|
+
const activeWeightColumnId = (0, AggregationColumns_1.isWeightedAverageAggregation)(currentAggFunc)
|
|
62
|
+
? currentAggFunc.weightedColumnId
|
|
63
|
+
: undefined;
|
|
64
|
+
const applyAggregation = (aggFuncValue) => {
|
|
65
|
+
const upsert = (cols) => {
|
|
66
|
+
const list = cols ? [...cols] : [];
|
|
67
|
+
const index = list.findIndex((col) => col.ColumnId === columnId);
|
|
68
|
+
if (index >= 0) {
|
|
69
|
+
list[index] = { ...list[index], AggFunc: aggFuncValue };
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
list.push({ ColumnId: columnId, AggFunc: aggFuncValue });
|
|
73
|
+
}
|
|
74
|
+
return list;
|
|
75
|
+
};
|
|
76
|
+
adaptableApi.layoutApi.updateCurrentLayout((layout) => {
|
|
77
|
+
const tableLayout = layout;
|
|
78
|
+
return {
|
|
79
|
+
...tableLayout,
|
|
80
|
+
TableAggregationColumns: upsert(tableLayout.TableAggregationColumns),
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
const removeAggregation = () => {
|
|
85
|
+
adaptableApi.layoutApi.updateCurrentLayout((layout) => {
|
|
86
|
+
const tableLayout = layout;
|
|
87
|
+
return {
|
|
88
|
+
...tableLayout,
|
|
89
|
+
TableAggregationColumns: (tableLayout.TableAggregationColumns || []).filter((col) => col.ColumnId !== columnId),
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
// 'None' clears any aggregation for the column and is checked when none is set
|
|
94
|
+
const subMenu = [
|
|
95
|
+
{
|
|
96
|
+
name: 'None',
|
|
97
|
+
checked: activeAggFuncName == null,
|
|
98
|
+
action: () => removeAggregation(),
|
|
99
|
+
},
|
|
100
|
+
];
|
|
101
|
+
// getDisplayAggFuncNames already positions weightedAvg right after 'avg'
|
|
102
|
+
// (and only includes it when the column is eligible)
|
|
103
|
+
const aggFuncItems = (0, AggregationColumns_1.getDisplayAggFuncNames)(column).map((funcName) => {
|
|
104
|
+
// Weighted Average needs a weight column parameter, so instead of a plain
|
|
105
|
+
// action it gets a submenu listing the numeric columns usable as the weight.
|
|
106
|
+
if (funcName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME) {
|
|
107
|
+
const weightColumnItems = adaptableApi.columnApi
|
|
108
|
+
.getNumericColumns()
|
|
109
|
+
.filter((numericColumn) => numericColumn.columnId !== columnId)
|
|
110
|
+
.map((numericColumn) => ({
|
|
111
|
+
name: numericColumn.friendlyName ?? numericColumn.columnId,
|
|
112
|
+
checked: activeWeightColumnId === numericColumn.columnId,
|
|
113
|
+
action: () => applyAggregation({
|
|
114
|
+
type: 'weightedAverage',
|
|
115
|
+
weightedColumnId: numericColumn.columnId,
|
|
116
|
+
}),
|
|
117
|
+
}));
|
|
118
|
+
return {
|
|
119
|
+
name: 'Weighted Average',
|
|
120
|
+
checked: activeAggFuncName === AggregationColumns_1.WEIGHTED_AVERAGE_AGG_FN_NAME,
|
|
121
|
+
subMenu: weightColumnItems,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
name: toFuncLabel(funcName),
|
|
126
|
+
checked: activeAggFuncName === funcName,
|
|
127
|
+
action: () => applyAggregation(funcName),
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
subMenu.push(...aggFuncItems);
|
|
131
|
+
return {
|
|
132
|
+
name: 'Value Aggregation',
|
|
133
|
+
subMenu,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
11
136
|
class AgGridMenuAdapter {
|
|
12
137
|
_adaptableInstance;
|
|
13
138
|
constructor(_adaptableInstance) {
|
|
@@ -67,8 +192,8 @@ class AgGridMenuAdapter {
|
|
|
67
192
|
const isPivotLayout = this.adaptableApi.layoutApi.isCurrentLayoutPivot();
|
|
68
193
|
const mappedAgGridMenuItems = agGridMenuItems.map((itemName) => itemName === 'valueAggSubMenu' && !isPivotLayout
|
|
69
194
|
? {
|
|
70
|
-
...
|
|
71
|
-
icon:
|
|
195
|
+
...buildValueAggregationMenuItem(this.adaptableApi, menuContext),
|
|
196
|
+
icon: createAgGridIcon('aggregation'),
|
|
72
197
|
}
|
|
73
198
|
: itemName);
|
|
74
199
|
const defaultContextMenu = [
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Badge_1 = require("../../View/Components/Badge");
|
|
6
6
|
const renderWithAdaptableContext_1 = require("../../View/renderWithAdaptableContext");
|
|
7
7
|
const React = tslib_1.__importStar(require("react"));
|
|
8
|
-
const
|
|
8
|
+
const StyledColumnHelper_1 = require("../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
|
|
9
9
|
const OVERFLOW_CLASS = {
|
|
10
10
|
Truncate: 'ab-Badge__wrapper--truncate',
|
|
11
11
|
Wrap: 'ab-Badge__wrapper--wrap',
|
|
@@ -56,7 +56,7 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
56
56
|
this.eGui.style.setProperty('justify-content', rowJustify);
|
|
57
57
|
this.eGui.style.setProperty('width', '100%');
|
|
58
58
|
}
|
|
59
|
-
if (!(0,
|
|
59
|
+
if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, adaptableApi)) {
|
|
60
60
|
const formattedValue = params.formatValue?.(params.value) ?? params.value ?? '';
|
|
61
61
|
this.eGui.innerHTML = formattedValue;
|
|
62
62
|
return;
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getBulletChartRendererForColumn = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const NumberExtensions_1 = require("../../Utilities/Extensions/NumberExtensions");
|
|
7
|
+
const BarStylesHelper_1 = require("../../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
8
|
+
const StyledColumnHelper_1 = require("../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
|
|
9
9
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
10
10
|
const DEFAULT_BAR_HEIGHT = 8;
|
|
11
11
|
const DEFAULT_BAND_HEIGHT = 14;
|
|
@@ -106,7 +106,7 @@ const toFraction = (value, min, max) => {
|
|
|
106
106
|
if (max === min) {
|
|
107
107
|
return 0;
|
|
108
108
|
}
|
|
109
|
-
return (0,
|
|
109
|
+
return (0, NumberExtensions_1.clamp)((value - min) / (max - min), 0, 1);
|
|
110
110
|
};
|
|
111
111
|
const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
|
|
112
112
|
if (!styledColumn.BulletChartStyle) {
|
|
@@ -117,7 +117,7 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
117
117
|
eGui;
|
|
118
118
|
init(params) {
|
|
119
119
|
// Defer to the shared row-scope helper.
|
|
120
|
-
if (!(0,
|
|
120
|
+
if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, api)) {
|
|
121
121
|
if (params.value != undefined) {
|
|
122
122
|
this.eGui = document.createElement('div');
|
|
123
123
|
this.eGui.append(String(params.value));
|
|
@@ -159,7 +159,7 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
159
159
|
const barThickness = bulletStyle.Bar?.Height ?? DEFAULT_BAR_HEIGHT;
|
|
160
160
|
const bandThickness = Math.max(barThickness + 6, DEFAULT_BAND_HEIGHT);
|
|
161
161
|
const cellTextProperties = bulletStyle.CellTextProperties;
|
|
162
|
-
const hasCellText = (0,
|
|
162
|
+
const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties);
|
|
163
163
|
// Map a 0..1 value fraction onto the long-axis viewBox (0..100).
|
|
164
164
|
// In horizontal: 0 -> left, 1 -> right.
|
|
165
165
|
// In vertical: 0 -> bottom, 1 -> top (SVG y origin is at the top so
|
|
@@ -285,8 +285,8 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
285
285
|
// `valueFormatter` returns the raw value (a number here), so coerce
|
|
286
286
|
// to string before it flows into the helpers.
|
|
287
287
|
const formattedCellValue = String(params.formatValue?.(cellValue) ?? cellValue);
|
|
288
|
-
const labels = (0,
|
|
289
|
-
(0,
|
|
288
|
+
const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, formattedCellValue, `${(valueFraction * 100).toFixed(0)}%`);
|
|
289
|
+
(0, BarStylesHelper_1.mountBarStyleCellText)({
|
|
290
290
|
wrapperEl: this.eGui,
|
|
291
291
|
mergedOverlayEl: svgContainer,
|
|
292
292
|
textClassName: 'ab-BulletChart__text',
|