@adaptabletools/adaptable-cjs 23.0.0-canary.7 → 23.0.0-canary.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.css +98 -17
- package/package.json +1 -1
- package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +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/StyledColumnState.d.ts +8 -850
- package/src/AdaptableState/StyledColumnState.js +0 -10
- package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +12 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.d.ts +84 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +6 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +7 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +10 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
- package/src/AdaptableState/StyledColumns/IconStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.js +2 -0
- package/src/Api/ColumnScopeApi.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +5 -5
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
- 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.d.ts +3 -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/StyledColumns/BarStylesHelper.js +334 -0
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -2
- 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 -1
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +11 -17
- 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 +159 -126
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -4
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +10 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +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/AdaptableObjectCompactList.js +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -2
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +6 -0
- package/src/View/Components/Buttons/EntityListActionButtons.js +1 -1
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +8 -8
- package/src/View/Components/ColumnFilter/ColumnFilter.js +14 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +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/AdaptablePopupModuleView.js +1 -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 +4 -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/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/Export/ExportSchedulesTab.js +3 -4
- package/src/View/Filter/FilterViewPanel.js +1 -1
- 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/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +128 -102
- 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/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +36 -30
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +79 -68
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +8 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +42 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +92 -52
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +14 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +37 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.d.ts +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +62 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +24 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +20 -60
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/View/Wizard/OnePageWizards.js +3 -1
- package/src/agGrid/AdaptableAgGrid.js +11 -11
- package/src/agGrid/AgGridColumnAdapter.js +30 -28
- package/src/agGrid/AgGridExportAdapter.js +3 -3
- package/src/agGrid/AgGridMenuAdapter.js +129 -4
- package/src/agGrid/cellRenderers/BadgeRenderer.js +9 -7
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +47 -46
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
- package/src/agGrid/cellRenderers/IconRenderer.js +20 -19
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +29 -101
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +54 -52
- 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/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 +118 -19
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.d.ts +27 -31
- package/src/migration/VersionUpgrade23.js +110 -29
- package/src/types.d.ts +12 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -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/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/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
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shouldShowBarStyleCellTextOutsideBar = exports.BarStyleCellTextPreview = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
6
|
+
const Flex_1 = require("../../../../../components/Flex");
|
|
7
|
+
const HORIZONTAL_ORDER = ['Left', 'Center', 'Right'];
|
|
8
|
+
const HORIZONTAL_JUSTIFY = {
|
|
9
|
+
Left: 'flex-start',
|
|
10
|
+
Center: 'center',
|
|
11
|
+
Right: 'flex-end',
|
|
12
|
+
};
|
|
13
|
+
const HORIZONTAL_TEXT_ALIGN = {
|
|
14
|
+
Left: 'left',
|
|
15
|
+
Center: 'center',
|
|
16
|
+
Right: 'right',
|
|
17
|
+
};
|
|
18
|
+
const CellTextRow = ({ className, style, slots }) => ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: className, alignItems: "center", style: { ...style, width: '100%', gap: 4 }, children: HORIZONTAL_ORDER.map((horizontal) => {
|
|
19
|
+
const slot = slots.find((s) => s.horizontal === horizontal);
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:truncate", style: {
|
|
21
|
+
flex: 1,
|
|
22
|
+
minWidth: 0,
|
|
23
|
+
display: 'flex',
|
|
24
|
+
justifyContent: HORIZONTAL_JUSTIFY[horizontal],
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
textAlign: HORIZONTAL_TEXT_ALIGN[horizontal],
|
|
27
|
+
}, children: slot?.text ?? '' }, horizontal));
|
|
28
|
+
}) }));
|
|
29
|
+
/**
|
|
30
|
+
* Preview of the per-value cell-text layout. Renders three potential bands:
|
|
31
|
+
* - `Above` slots (above the bar)
|
|
32
|
+
* - `Merged` slots (overlay on top of the bar — uses `mergedOverlayClassName`)
|
|
33
|
+
* - `Below` slots (below the bar)
|
|
34
|
+
*
|
|
35
|
+
* Each band has three horizontal slots (Left/Center/Right) so the spacing is
|
|
36
|
+
* stable. When `vertical` is provided, only the band matching that value is
|
|
37
|
+
* rendered (used by the preview cards to position bands around the bar).
|
|
38
|
+
*/
|
|
39
|
+
const BarStyleCellTextPreview = ({ className, style, cellTextProperties, labels, mergedOverlayClassName, vertical }) => {
|
|
40
|
+
if (!labels.cellValue && !labels.percentage) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const slots = (0, BarStylesHelper_1.resolveBarStyleCellTextSlots)(cellTextProperties, labels);
|
|
44
|
+
if (!slots.length) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
const bandSlots = vertical ? slots.filter((s) => s.vertical === vertical) : slots;
|
|
48
|
+
if (!bandSlots.length) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const usedClassName = vertical === 'Merged' ? mergedOverlayClassName ?? className : className;
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(CellTextRow, { className: usedClassName, style: style, slots: bandSlots.map((s) => ({ horizontal: s.horizontal, text: s.text })) }));
|
|
53
|
+
};
|
|
54
|
+
exports.BarStyleCellTextPreview = BarStyleCellTextPreview;
|
|
55
|
+
const shouldShowBarStyleCellTextOutsideBar = (cellTextProperties, hasCellText) => {
|
|
56
|
+
if (!hasCellText || !(0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties)) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const { hasAbove, hasBelow } = (0, BarStylesHelper_1.getBarStyleCellTextSlotPresence)(cellTextProperties);
|
|
60
|
+
return hasAbove || hasBelow;
|
|
61
|
+
};
|
|
62
|
+
exports.shouldShowBarStyleCellTextOutsideBar = shouldShowBarStyleCellTextOutsideBar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BulletChartStyle } from '../../../../../AdaptableState/
|
|
2
|
+
import { BulletChartStyle } from '../../../../../AdaptableState/StyledColumns/BulletChartStyle';
|
|
3
3
|
export declare const BulletRangesSummaryPreview: React.FunctionComponent<{
|
|
4
4
|
bulletStyle: BulletChartStyle;
|
|
5
5
|
}>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { CellColorRange, ColumnComparison,
|
|
2
|
+
import { CellColorRange, ColumnComparison, NumericStyledColumn } from '../../../../../AdaptableState/StyledColumns/Common/NumericStyledColumn';
|
|
3
|
+
import { GradientStyle, ZeroCentredColors } from '../../../../../AdaptableState/StyledColumns/GradientStyle';
|
|
3
4
|
import { AdaptableApi } from '../../../../../types';
|
|
4
5
|
export declare function gradientRangeStripCss(color: string, reverseGradient: boolean, minAlpha: number, maxAlpha: number): string;
|
|
5
6
|
export interface GradientRangesSummaryPreviewProps {
|
|
6
7
|
ranges?: CellColorRange[];
|
|
7
|
-
zeroCentred?:
|
|
8
|
+
zeroCentred?: ZeroCentredColors;
|
|
8
9
|
rangeValueType: NumericStyledColumn['RangeValueType'];
|
|
9
10
|
gradientStyle?: Pick<GradientStyle, 'MinAlpha' | 'MaxAlpha'>;
|
|
10
11
|
}
|
|
@@ -8,7 +8,7 @@ const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
|
8
8
|
const Flex_1 = require("../../../../../components/Flex");
|
|
9
9
|
const Tag_1 = require("../../../../../components/Tag");
|
|
10
10
|
const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
|
|
11
|
-
const
|
|
11
|
+
const GradientStyleHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/GradientStyleHelper");
|
|
12
12
|
function clamp01(n) {
|
|
13
13
|
if (Number.isNaN(n)) {
|
|
14
14
|
return 0;
|
|
@@ -39,14 +39,14 @@ function zeroCentredSplitPreview(negativeColor, positiveColor, postfix, minA, ma
|
|
|
39
39
|
* `Col-Min..0` + `0..Col-Max` pairs render as a single split strip.
|
|
40
40
|
*/
|
|
41
41
|
const GradientRangesSummaryPreview = (props) => {
|
|
42
|
-
const minA = props.gradientStyle?.MinAlpha ??
|
|
43
|
-
const maxA = props.gradientStyle?.MaxAlpha ??
|
|
42
|
+
const minA = props.gradientStyle?.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
43
|
+
const maxA = props.gradientStyle?.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
44
44
|
const postfix = (props.rangeValueType ?? 'Number') === 'Percentage' ? '%' : '';
|
|
45
45
|
if (props.zeroCentred) {
|
|
46
46
|
return zeroCentredSplitPreview(props.zeroCentred.NegativeColor, props.zeroCentred.PositiveColor, postfix, minA, maxA);
|
|
47
47
|
}
|
|
48
48
|
const ranges = props.ranges ?? [];
|
|
49
|
-
if ((0,
|
|
49
|
+
if ((0, GradientStyleHelper_1.isDivergingZeroCellRanges)(ranges)) {
|
|
50
50
|
const [r0, r1] = ranges;
|
|
51
51
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:flex-wrap twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: [r0.Min, postfix, " \u2192 ", r0.Max, postfix] }), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: [r1.Min, postfix, " \u2192 ", r1.Max, postfix] })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: `${stripClassName} twa:w-[200px]`, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1", style: {
|
|
52
52
|
background: gradientRangeStripCss(r0.Color, !!r0.ReverseGradient, minA, maxA),
|
|
@@ -60,11 +60,9 @@ const GradientRangesSummaryPreview = (props) => {
|
|
|
60
60
|
};
|
|
61
61
|
exports.GradientRangesSummaryPreview = GradientRangesSummaryPreview;
|
|
62
62
|
const GradientColumnComparisonSummaryPreview = (props) => {
|
|
63
|
-
const minA = props.gradientStyle?.MinAlpha ??
|
|
64
|
-
const maxA = props.gradientStyle?.MaxAlpha ??
|
|
65
|
-
const fmt = (v) => isNaN(Number(v))
|
|
66
|
-
? `[${props.api.columnApi.getFriendlyNameForColumnId(String(v))}]`
|
|
67
|
-
: v;
|
|
63
|
+
const minA = props.gradientStyle?.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
64
|
+
const maxA = props.gradientStyle?.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
65
|
+
const fmt = (v) => isNaN(Number(v)) ? `[${props.api.columnApi.getFriendlyNameForColumnId(String(v))}]` : v;
|
|
68
66
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2", children: [(0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Min: ", fmt(props.columnComparison.MinValue), " \u2014 Max: ", fmt(props.columnComparison.MaxValue)] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `${stripClassName} twa:w-[200px]`, style: {
|
|
69
67
|
background: gradientRangeStripCss(props.columnComparison.Color, false, minA, maxA),
|
|
70
68
|
} })] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { RangeBarStyle } from '../../../../../AdaptableState/
|
|
2
|
+
import { RangeBarStyle } from '../../../../../AdaptableState/StyledColumns/RangeBarStyle';
|
|
3
3
|
export declare const RangeBarRangesSummaryPreview: React.FunctionComponent<{
|
|
4
4
|
rangeStyle: RangeBarStyle;
|
|
5
5
|
}>;
|
|
@@ -54,12 +54,13 @@ const StyledColumnBadgePreview = ({ data }) => {
|
|
|
54
54
|
: {}),
|
|
55
55
|
};
|
|
56
56
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: PREVIEW_CELL_CLASS, style: cellStyle, children: (0, jsx_runtime_1.jsx)("div", { className: wrapperClassName, style: wrapperStyle, children: badgeStyle.Badges.map((badge, index) => {
|
|
57
|
-
const
|
|
57
|
+
const iconProps = badge.IconProperties;
|
|
58
|
+
const badgeValue = iconProps?.IconOnly
|
|
58
59
|
? ''
|
|
59
60
|
: dataType === 'number'
|
|
60
61
|
? GeneralConstants_1.DEFAULT_INTEGER_DISPLAY_VALUE
|
|
61
62
|
: GeneralConstants_1.DEFAULT_STRING_DISPLAY_VALUE;
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)(Badge_1.Badge, { icon:
|
|
63
|
+
return ((0, jsx_runtime_1.jsx)(Badge_1.Badge, { icon: iconProps?.Icon, pillStyle: badge.PillStyle, iconPosition: iconProps?.Position, shape: badge.Shape, density: badgeStyle.Density ?? 'Normal', iconGap: iconProps?.Gap, children: badgeValue }, index));
|
|
63
64
|
}) }) }));
|
|
64
65
|
};
|
|
65
66
|
exports.StyledColumnBadgePreview = StyledColumnBadgePreview;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { StyledColumn } from '../../../../../AdaptableState/StyledColumnState';
|
|
3
|
+
import { BulletChartStyle } from '../../../../../AdaptableState/StyledColumns/BulletChartStyle';
|
|
3
4
|
export declare const StyledColumnBulletPreview: React.FunctionComponent<React.PropsWithChildren<{
|
|
4
5
|
data: StyledColumn;
|
|
5
6
|
}>>;
|
|
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.hasBulletChartRangesConfigured = exports.StyledColumnBulletPreviewCard = exports.StyledColumnBulletPreview = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
|
|
6
|
+
const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
6
7
|
const Flex_1 = require("../../../../../components/Flex");
|
|
7
8
|
const Card_1 = require("../../../../../components/Card");
|
|
8
9
|
const Tag_1 = require("../../../../../components/Tag");
|
|
9
10
|
const StyledColumnChartListPreviews_1 = require("./StyledColumnChartListPreviews");
|
|
11
|
+
const BarStyleCellTextPreview_1 = require("./BarStyleCellTextPreview");
|
|
10
12
|
const PREVIEW_CELL_CLASS = 'ab-BulletPreviewCell 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)]';
|
|
11
13
|
const getBulletPreviewSample = (bullet) => {
|
|
12
14
|
const ranges = bullet.CellRanges ?? [];
|
|
@@ -26,29 +28,23 @@ const getBulletPreviewSample = (bullet) => {
|
|
|
26
28
|
valueFraction: Math.max(0, Math.min(1, valueFraction)),
|
|
27
29
|
};
|
|
28
30
|
};
|
|
29
|
-
const formatBulletPreviewCellText = (sampleValue, valueFraction, bullet) => {
|
|
30
|
-
const parts = [];
|
|
31
|
-
if (bullet.CellText?.includes('CellValue')) {
|
|
32
|
-
parts.push(Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1));
|
|
33
|
-
}
|
|
34
|
-
if (bullet.CellText?.includes('PercentageValue')) {
|
|
35
|
-
parts.push(`${(valueFraction * 100).toFixed(0)}%`);
|
|
36
|
-
}
|
|
37
|
-
return parts.join(' ');
|
|
38
|
-
};
|
|
39
31
|
const BulletChartPreviewContent = ({ bullet, }) => {
|
|
40
32
|
const { sampleValue, valueFraction } = getBulletPreviewSample(bullet);
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
33
|
+
const cellTextProperties = bullet.CellTextProperties;
|
|
34
|
+
const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1), `${(valueFraction * 100).toFixed(0)}%`);
|
|
35
|
+
const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) &&
|
|
36
|
+
Boolean(labels.cellValue || labels.percentage);
|
|
37
|
+
const presence = (0, BarStylesHelper_1.getBarStyleCellTextSlotPresence)(cellTextProperties);
|
|
44
38
|
const fontStyle = bullet.Font ? (0, StyleHelper_1.convertAdaptableStyleToCSS)(bullet.Font) : undefined;
|
|
45
39
|
const isVertical = bullet.Orientation === 'Vertical';
|
|
40
|
+
const cellTextClassName = 'ab-BulletChart__text twa:text-2 twa:leading-tight twa:truncate twa:max-w-full';
|
|
46
41
|
const chartEl = (0, jsx_runtime_1.jsx)(StyledColumnChartListPreviews_1.StyledColumnBulletChartListPreview, { bullet: bullet });
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
// Merged-only with no outside bands → relative container so the overlay sits
|
|
43
|
+
// on top of the chart, matching the runtime renderer's behaviour.
|
|
44
|
+
if (hasCellText && presence.hasMerged && !presence.hasAbove && !presence.hasBelow) {
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-BulletChart__wrapper twa:relative twa:inline-flex", children: [chartEl, (0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { mergedOverlayClassName: "ab-BulletChart__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", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" })] }));
|
|
50
46
|
}
|
|
51
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-BulletChart__wrapper", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText &&
|
|
47
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-BulletChart__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:relative twa:w-full", style: { display: 'inline-flex' }, children: [chartEl, hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { mergedOverlayClassName: "ab-BulletChart__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", style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }), hasCellText && presence.hasBelow && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
|
|
52
48
|
};
|
|
53
49
|
const StyledColumnBulletPreview = ({ data }) => {
|
|
54
50
|
const bullet = data.BulletChartStyle;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { BulletChartStyle
|
|
2
|
+
import { BulletChartStyle } from '../../../../../AdaptableState/StyledColumns/BulletChartStyle';
|
|
3
|
+
import { RangeBarStyle } from '../../../../../AdaptableState/StyledColumns/RangeBarStyle';
|
|
3
4
|
/**
|
|
4
5
|
* Compact schematic of a Range Bar (bands + track + value / reference markers)
|
|
5
6
|
* for the Styled Columns object list and wizard step summaries.
|
|
@@ -44,10 +44,10 @@ const DEFAULT_MARKER = 'var(--ab-color-foreground, #333)';
|
|
|
44
44
|
const StyledColumnRangeBarListPreview = (props) => {
|
|
45
45
|
const { range } = props;
|
|
46
46
|
const segments = bandSegmentsForPreview(range.CellRanges);
|
|
47
|
-
const trackFill = range.
|
|
47
|
+
const trackFill = range.Track?.Color ?? DEFAULT_TRACK;
|
|
48
48
|
const valueColor = range.Marker?.Color || DEFAULT_BAR;
|
|
49
|
-
const refColor = range.
|
|
50
|
-
const hasRef = range.Reference != undefined;
|
|
49
|
+
const refColor = range.Reference?.Marker?.Color || DEFAULT_MARKER;
|
|
50
|
+
const hasRef = range.Reference?.Value != undefined;
|
|
51
51
|
const isVertical = range.Orientation === 'Vertical';
|
|
52
52
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:rounded twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_12%,transparent)] twa:bg-[color-mix(in_srgb,var(--ab-color-primary)_40%,transparent)] twa:px-1 twa:py-0.5", style: { width: PREVIEW_WIDTH, height: PREVIEW_HEIGHT }, children: (0, jsx_runtime_1.jsxs)("svg", { width: "100%", height: "100%", viewBox: `0 0 ${VB_W} ${VB_H}`, preserveAspectRatio: "none", "aria-hidden": true, children: [segments.length === 0 ? ((0, jsx_runtime_1.jsx)("rect", { x: "0", y: "0", width: VB_W, height: VB_H, fill: range.BackColor ?? 'transparent' })) : (segments.map((s, i) => ((0, jsx_runtime_1.jsx)("rect", { x: s.x0 * VB_W, y: "0", width: (s.x1 - s.x0) * VB_W, height: VB_H, fill: s.color, opacity: 0.55 }, i)))), isVertical ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("rect", { x: VB_W * 0.42, y: "2", width: "5", height: VB_H - 4, rx: "1", fill: trackFill }), hasRef && ((0, jsx_runtime_1.jsx)("line", { x1: VB_W * 0.46, y1: "3", x2: VB_W * 0.46, y2: VB_H - 3, stroke: refColor, strokeWidth: "2", vectorEffect: "non-scaling-stroke" })), (0, jsx_runtime_1.jsx)("polygon", { points: `${VB_W * 0.52},${VB_H * 0.35} ${VB_W * 0.62},${VB_H * 0.5} ${VB_W * 0.52},${VB_H * 0.65}`, fill: valueColor })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("rect", { x: "2", y: VB_H * 0.38, width: VB_W - 4, height: "5", rx: "1", fill: trackFill }), hasRef && ((0, jsx_runtime_1.jsx)("line", { x1: VB_W * 0.38, y1: VB_H * 0.2, x2: VB_W * 0.38, y2: VB_H * 0.8, stroke: refColor, strokeWidth: "2", vectorEffect: "non-scaling-stroke" })), (0, jsx_runtime_1.jsx)("polygon", { points: `${VB_W * 0.72},${VB_H * 0.2} ${VB_W * 0.82},${VB_H * 0.5} ${VB_W * 0.72},${VB_H * 0.8}`, fill: valueColor })] }))] }) }));
|
|
53
53
|
};
|
|
@@ -59,8 +59,8 @@ exports.StyledColumnRangeBarListPreview = StyledColumnRangeBarListPreview;
|
|
|
59
59
|
const StyledColumnBulletChartListPreview = (props) => {
|
|
60
60
|
const { bullet } = props;
|
|
61
61
|
const segments = bandSegmentsForPreview(bullet.CellRanges);
|
|
62
|
-
const barColor = bullet.
|
|
63
|
-
const markerColor = bullet.
|
|
62
|
+
const barColor = bullet.Bar?.Color ?? DEFAULT_BAR;
|
|
63
|
+
const markerColor = bullet.TargetProperties?.Marker?.Color || DEFAULT_MARKER;
|
|
64
64
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:rounded twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_12%,transparent)] twa:bg-[color-mix(in_srgb,var(--ab-color-primary)_40%,transparent)] twa:px-1 twa:py-0.5", style: { width: PREVIEW_WIDTH, height: PREVIEW_HEIGHT }, children: (0, jsx_runtime_1.jsxs)("svg", { width: "100%", height: "100%", viewBox: `0 0 ${VB_W} ${VB_H}`, preserveAspectRatio: "none", "aria-hidden": true, children: [segments.length === 0 ? ((0, jsx_runtime_1.jsx)("rect", { x: "0", y: "0", width: VB_W, height: VB_H, fill: bullet.BackColor ?? 'transparent' })) : (segments.map((s, i) => ((0, jsx_runtime_1.jsx)("rect", { x: s.x0 * VB_W, y: "2", width: (s.x1 - s.x0) * VB_W, height: VB_H - 4, fill: s.color, opacity: 0.5 }, i)))), (0, jsx_runtime_1.jsx)("rect", { x: VB_W * 0.04, y: VB_H * 0.35, width: VB_W * 0.58, height: VB_H * 0.3, rx: "1", fill: barColor }), (0, jsx_runtime_1.jsx)("line", { x1: VB_W * 0.78, y1: VB_H * 0.12, x2: VB_W * 0.78, y2: VB_H * 0.88, stroke: markerColor, strokeWidth: "2.5", vectorEffect: "non-scaling-stroke" })] }) }));
|
|
65
65
|
};
|
|
66
66
|
exports.StyledColumnBulletChartListPreview = StyledColumnBulletChartListPreview;
|
|
@@ -6,7 +6,7 @@ const Flex_1 = require("../../../../../components/Flex");
|
|
|
6
6
|
const Card_1 = require("../../../../../components/Card");
|
|
7
7
|
const Tag_1 = require("../../../../../components/Tag");
|
|
8
8
|
const AdaptableContext_1 = require("../../../../AdaptableContext");
|
|
9
|
-
const
|
|
9
|
+
const GradientStyleHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/GradientStyleHelper");
|
|
10
10
|
const formatPreviewValue = (value) => {
|
|
11
11
|
if (Number.isInteger(value)) {
|
|
12
12
|
return value.toLocaleString();
|
|
@@ -20,15 +20,15 @@ const StyledColumnGradientPreview = ({ data, api: apiProp }) => {
|
|
|
20
20
|
if (!gs) {
|
|
21
21
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Gradient Style" });
|
|
22
22
|
}
|
|
23
|
-
if (!(0,
|
|
23
|
+
if (!(0, GradientStyleHelper_1.hasGradientRangesConfigured)(gs)) {
|
|
24
24
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Define ranges before previewing" });
|
|
25
25
|
}
|
|
26
|
-
const sampleValues = (0,
|
|
26
|
+
const sampleValues = (0, GradientStyleHelper_1.getGradientPreviewSampleValues)(data, api);
|
|
27
27
|
if (!sampleValues.length) {
|
|
28
28
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No preview available" });
|
|
29
29
|
}
|
|
30
30
|
const rowNode = api.gridApi?.getRowNodeForIndex(0) ?? null;
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "stretch", className: "twa:flex-wrap twa:gap-2", children: sampleValues.map((value) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-GradientPreviewCell twa:px-2 twa:py-1 twa:min-w-[56px] twa:text-2 twa:text-center twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]", style: (0,
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "stretch", className: "twa:flex-wrap twa:gap-2", children: sampleValues.map((value) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-GradientPreviewCell twa:px-2 twa:py-1 twa:min-w-[56px] twa:text-2 twa:text-center twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]", style: (0, GradientStyleHelper_1.getGradientPreviewCellStyle)(value, data, api, rowNode), children: formatPreviewValue(value) }, value))) }));
|
|
32
32
|
};
|
|
33
33
|
exports.StyledColumnGradientPreview = StyledColumnGradientPreview;
|
|
34
34
|
const StyledColumnGradientPreviewCard = ({ data }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Preview" }) }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(exports.StyledColumnGradientPreview, { data: data }) })] }));
|
|
@@ -39,7 +39,7 @@ const renderIconSpecForPreview = (spec, size) => {
|
|
|
39
39
|
return null;
|
|
40
40
|
};
|
|
41
41
|
const buildPreviewText = (mapping, iconStyle) => {
|
|
42
|
-
const cellTextTokens = iconStyle.CellText ?? [];
|
|
42
|
+
const cellTextTokens = iconStyle.CellTextProperties?.CellText ?? [];
|
|
43
43
|
const formatted = String(mapping.Key);
|
|
44
44
|
const textParts = [];
|
|
45
45
|
if (cellTextTokens.includes('CellValue') && formatted) {
|
|
@@ -53,7 +53,7 @@ const buildPreviewText = (mapping, iconStyle) => {
|
|
|
53
53
|
const IconCellPreviewTree = ({ iconStyle, mapping }) => {
|
|
54
54
|
const size = iconStyle.Size ?? exports.DEFAULT_ICON_STYLE_SIZE;
|
|
55
55
|
const gap = iconStyle.Gap ?? exports.DEFAULT_ICON_STYLE_GAP;
|
|
56
|
-
const textPosition = iconStyle.CellTextPosition ?? 'After';
|
|
56
|
+
const textPosition = iconStyle.CellTextProperties?.CellTextPosition ?? 'After';
|
|
57
57
|
const text = buildPreviewText(mapping, iconStyle);
|
|
58
58
|
const fontStyle = iconStyle.Font ? (0, StyleHelper_1.convertAdaptableStyleToCSS)(iconStyle.Font) : undefined;
|
|
59
59
|
const iconNode = renderIconSpecForPreview(mapping.Icon, size);
|
|
@@ -3,34 +3,43 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StyledColumnPercentBarPreviewCard = exports.StyledColumnPercentBarPreview = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
|
|
6
|
-
const
|
|
6
|
+
const PercentBarStyleHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/PercentBarStyleHelper");
|
|
7
|
+
const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
7
8
|
const Flex_1 = require("../../../../../components/Flex");
|
|
8
9
|
const Card_1 = require("../../../../../components/Card");
|
|
9
10
|
const Tag_1 = require("../../../../../components/Tag");
|
|
11
|
+
const BarStyleCellTextPreview_1 = require("./BarStyleCellTextPreview");
|
|
10
12
|
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)]';
|
|
11
13
|
const PercentBarPreviewCell = ({ styledColumn, value, min, max }) => {
|
|
12
14
|
const pb = styledColumn.PercentBarStyle;
|
|
13
|
-
const { barLeftPercent, barWidthPercent, percentageValue, barColor } = (0,
|
|
14
|
-
const trackColor = (0,
|
|
15
|
-
const fillColor = (0,
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
15
|
+
const { barLeftPercent, barWidthPercent, percentageValue, barColor } = (0, PercentBarStyleHelper_1.getPercentBarPreviewGeometry)(value, pb, min, max);
|
|
16
|
+
const trackColor = (0, PercentBarStyleHelper_1.getPercentBarPreviewTrackColor)(pb);
|
|
17
|
+
const fillColor = (0, PercentBarStyleHelper_1.getPercentBarPreviewResolvedBarColor)(barColor);
|
|
18
|
+
const cellTextProperties = pb.CellTextProperties;
|
|
19
|
+
const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, Number.isInteger(value) ? String(value) : value.toFixed(1), `${percentageValue.toFixed(0)}%`);
|
|
20
|
+
const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) &&
|
|
21
|
+
Boolean(labels.cellValue || labels.percentage);
|
|
22
|
+
const presence = (0, BarStylesHelper_1.getBarStyleCellTextSlotPresence)(cellTextProperties);
|
|
19
23
|
const fontStyle = pb.Font ? (0, StyleHelper_1.convertAdaptableStyleToCSS)(pb.Font) : undefined;
|
|
20
|
-
const
|
|
21
|
-
const barEl = ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-PercentBar__bar twa:relative twa:flex-1 twa:min-h-[6px]", style: trackColor ? { background: (0,
|
|
24
|
+
const cellTextClassName = 'ab-PercentBar__text twa:text-2 twa:leading-tight twa:truncate';
|
|
25
|
+
const barEl = ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-PercentBar__bar twa:relative twa:flex-1 twa:min-h-[6px]", style: trackColor ? { background: (0, PercentBarStyleHelper_1.getPercentBarPreviewResolvedBarColor)(trackColor) } : undefined, children: [fillColor && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "ab-PercentBar__barInside twa:absolute twa:top-0 twa:h-full", style: {
|
|
22
26
|
background: fillColor,
|
|
23
27
|
left: `${barLeftPercent.toFixed(2)}%`,
|
|
24
28
|
width: `${barWidthPercent.toFixed(2)}%`,
|
|
25
|
-
} })), hasCellText &&
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: `ab-PercentBar__wrapper ${PREVIEW_CELL_CLASS}`, flexDirection: "column", style: {
|
|
29
|
+
} })), hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.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" }))] }));
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: `ab-PercentBar__wrapper ${PREVIEW_CELL_CLASS}`, flexDirection: "column", style: {
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
height: (0, BarStyleCellTextPreview_1.shouldShowBarStyleCellTextOutsideBar)(cellTextProperties, hasCellText)
|
|
33
|
+
? '100%'
|
|
34
|
+
: undefined,
|
|
35
|
+
}, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), barEl, hasCellText && presence.hasBelow && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, style: fontStyle, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
|
|
27
36
|
};
|
|
28
37
|
const StyledColumnPercentBarPreview = ({ data }) => {
|
|
29
38
|
const pb = data.PercentBarStyle;
|
|
30
39
|
if (!pb) {
|
|
31
40
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Percent Bar Style" });
|
|
32
41
|
}
|
|
33
|
-
if (!(0,
|
|
42
|
+
if (!(0, PercentBarStyleHelper_1.hasPercentBarRangesConfigured)(pb)) {
|
|
34
43
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Define ranges before previewing" });
|
|
35
44
|
}
|
|
36
45
|
let min;
|
|
@@ -43,13 +52,13 @@ const StyledColumnPercentBarPreview = ({ data }) => {
|
|
|
43
52
|
max = cmpMax;
|
|
44
53
|
}
|
|
45
54
|
else {
|
|
46
|
-
({ min, max } = (0,
|
|
55
|
+
({ min, max } = (0, PercentBarStyleHelper_1.getPercentBarPreviewScale)(pb));
|
|
47
56
|
}
|
|
48
57
|
}
|
|
49
58
|
else {
|
|
50
|
-
({ min, max } = (0,
|
|
59
|
+
({ min, max } = (0, PercentBarStyleHelper_1.getPercentBarPreviewScale)(pb));
|
|
51
60
|
}
|
|
52
|
-
const sampleValues = (0,
|
|
61
|
+
const sampleValues = (0, PercentBarStyleHelper_1.getPercentBarPreviewSampleValues)(pb);
|
|
53
62
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "stretch", className: "twa:flex-wrap twa:gap-2", children: sampleValues.map((value) => ((0, jsx_runtime_1.jsx)(PercentBarPreviewCell, { styledColumn: data, value: value, min: min, max: max }, value))) }));
|
|
54
63
|
};
|
|
55
64
|
exports.StyledColumnPercentBarPreview = StyledColumnPercentBarPreview;
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StyledColumnRangeBarPreviewCard = exports.StyledColumnRangeBarPreview = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const BarStylesHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
5
6
|
const Flex_1 = require("../../../../../components/Flex");
|
|
6
7
|
const Card_1 = require("../../../../../components/Card");
|
|
7
8
|
const Tag_1 = require("../../../../../components/Tag");
|
|
8
9
|
const StyledColumnChartListPreviews_1 = require("./StyledColumnChartListPreviews");
|
|
10
|
+
const BarStyleCellTextPreview_1 = require("./BarStyleCellTextPreview");
|
|
9
11
|
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)]';
|
|
10
12
|
const getRangeBarPreviewSample = (range) => {
|
|
11
13
|
let min = 0;
|
|
@@ -23,28 +25,20 @@ const getRangeBarPreviewSample = (range) => {
|
|
|
23
25
|
valueFraction: Math.max(0, Math.min(1, valueFraction)),
|
|
24
26
|
};
|
|
25
27
|
};
|
|
26
|
-
const formatRangeBarPreviewCellText = (sampleValue, valueFraction, range) => {
|
|
27
|
-
const parts = [];
|
|
28
|
-
if (range.CellText?.includes('CellValue')) {
|
|
29
|
-
parts.push(Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1));
|
|
30
|
-
}
|
|
31
|
-
if (range.CellText?.includes('PercentageValue')) {
|
|
32
|
-
parts.push(`${(valueFraction * 100).toFixed(0)}%`);
|
|
33
|
-
}
|
|
34
|
-
return parts.join(' ');
|
|
35
|
-
};
|
|
36
28
|
const RangeBarPreviewContent = ({ range }) => {
|
|
37
29
|
const { sampleValue, valueFraction } = getRangeBarPreviewSample(range);
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
30
|
+
const cellTextProperties = range.CellTextProperties;
|
|
31
|
+
const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1), `${(valueFraction * 100).toFixed(0)}%`);
|
|
32
|
+
const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) &&
|
|
33
|
+
Boolean(labels.cellValue || labels.percentage);
|
|
34
|
+
const presence = (0, BarStylesHelper_1.getBarStyleCellTextSlotPresence)(cellTextProperties);
|
|
41
35
|
const isVertical = range.Orientation === 'Vertical';
|
|
36
|
+
const cellTextClassName = 'ab-RangeBar__text twa:text-2 twa:leading-tight twa:truncate twa:max-w-full';
|
|
42
37
|
const chartEl = (0, jsx_runtime_1.jsx)(StyledColumnChartListPreviews_1.StyledColumnRangeBarListPreview, { range: range });
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-RangeBar__wrapper twa:relative twa:inline-flex", children: [chartEl, (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "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", children: cellText })] }));
|
|
38
|
+
if (hasCellText && presence.hasMerged && !presence.hasAbove && !presence.hasBelow) {
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "ab-RangeBar__wrapper twa:relative twa:inline-flex", children: [chartEl, (0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.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" })] }));
|
|
46
40
|
}
|
|
47
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-RangeBar__wrapper", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText &&
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "ab-RangeBar__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:relative twa:w-full", style: { display: 'inline-flex' }, children: [chartEl, hasCellText && presence.hasMerged && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.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 && ((0, jsx_runtime_1.jsx)(BarStyleCellTextPreview_1.BarStyleCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
|
|
48
42
|
};
|
|
49
43
|
const StyledColumnRangeBarPreview = ({ data }) => {
|
|
50
44
|
const range = data.RangeBarStyle;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { CellBoxStyle } from '../../../../../AdaptableState/Common/AdaptableStyle';
|
|
3
|
-
import {
|
|
3
|
+
import { StyledColumn } from '../../../../../AdaptableState/StyledColumnState';
|
|
4
|
+
import { RatingIconShape, RatingStyle } from '../../../../../AdaptableState/StyledColumns/RatingStyle';
|
|
4
5
|
export declare const DEFAULT_RATING_MAX = 5;
|
|
5
6
|
export declare const DEFAULT_RATING_SIZE = 14;
|
|
6
7
|
export declare const DEFAULT_RATING_GAP = 2;
|
|
@@ -7,7 +7,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const React = tslib_1.__importStar(require("react"));
|
|
8
8
|
const ag_charts_enterprise_1 = require("ag-charts-enterprise");
|
|
9
9
|
const AdaptableHelper_1 = require("../../../../../Utilities/Helpers/AdaptableHelper");
|
|
10
|
-
const
|
|
10
|
+
const SparklineStyleHelper_1 = require("../../../../../Utilities/Helpers/StyledColumns/SparklineStyleHelper");
|
|
11
11
|
const StyleHelper_1 = require("../../../../../Utilities/Helpers/StyleHelper");
|
|
12
12
|
const Flex_1 = require("../../../../../components/Flex");
|
|
13
13
|
const Card_1 = require("../../../../../components/Card");
|
|
@@ -44,7 +44,7 @@ const buildSparklinePreviewOptions = (sparklineStyle, container, data, width, he
|
|
|
44
44
|
const sanitized = AdaptableHelper_1.AdaptableHelper.removeAdaptableObjectPrimitives({
|
|
45
45
|
...persisted,
|
|
46
46
|
});
|
|
47
|
-
const options = (0,
|
|
47
|
+
const options = (0, SparklineStyleHelper_1.resolveSparklineOptionsForRender)({
|
|
48
48
|
...sanitized,
|
|
49
49
|
type: sanitized.type ?? 'line',
|
|
50
50
|
container,
|