@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
package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js}
RENAMED
|
@@ -8,10 +8,10 @@ exports.getScheduledAlertNotificationForm = getScheduledAlertNotificationForm;
|
|
|
8
8
|
exports.scheduledAlertIncludeSuspendButton = scheduledAlertIncludeSuspendButton;
|
|
9
9
|
exports.CreateEmptyScheduledAlertDefinition = CreateEmptyScheduledAlertDefinition;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
|
-
const ObjectFactory_1 = tslib_1.__importDefault(require("
|
|
12
|
-
const GeneralConstants_1 = require("
|
|
13
|
-
const ObjectDefaultConstants_1 = require("
|
|
14
|
-
const Uuid_1 = require("
|
|
11
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../../ObjectFactory"));
|
|
12
|
+
const GeneralConstants_1 = require("../../Constants/GeneralConstants");
|
|
13
|
+
const ObjectDefaultConstants_1 = require("../../Constants/ObjectDefaultConstants");
|
|
14
|
+
const Uuid_1 = require("../../../AdaptableState/Uuid");
|
|
15
15
|
function isScheduledAlertDefinition(alert) {
|
|
16
16
|
return alert != null && 'Schedule' in alert;
|
|
17
17
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IAdaptable } from '
|
|
1
|
+
import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
|
|
2
2
|
export declare function refreshScheduledAlertJobs(adaptable: IAdaptable): void;
|
|
3
3
|
export declare function refreshScheduledReportJobs(adaptable: IAdaptable): void;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.refreshScheduledAlertJobs = refreshScheduledAlertJobs;
|
|
4
4
|
exports.refreshScheduledReportJobs = refreshScheduledReportJobs;
|
|
5
5
|
const tslib_1 = require("tslib");
|
|
6
|
-
const ModuleConstants = tslib_1.__importStar(require("
|
|
6
|
+
const ModuleConstants = tslib_1.__importStar(require("../../Constants/ModuleConstants"));
|
|
7
7
|
function refreshScheduledAlertJobs(adaptable) {
|
|
8
8
|
const alertModule = adaptable.adaptableModules.get(ModuleConstants.AlertModuleId);
|
|
9
9
|
alertModule?.setUpScheduledAlertJobs?.();
|
package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExportState, ReportNameType, ReportSchedule } from '
|
|
1
|
+
import { ExportState, ReportNameType, ReportSchedule } from '../../../AdaptableState/ExportState';
|
|
2
2
|
export declare function reportScheduleToSchedule(reportSchedule: {
|
|
3
3
|
ReportName?: string;
|
|
4
4
|
ScheduleType?: string;
|
package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js}
RENAMED
|
@@ -8,7 +8,7 @@ exports.exportStateNeedsScheduleUuids = exportStateNeedsScheduleUuids;
|
|
|
8
8
|
exports.ensureExportStateSchedulesUuids = ensureExportStateSchedulesUuids;
|
|
9
9
|
exports.replaceScheduledReportScheduleInList = replaceScheduledReportScheduleInList;
|
|
10
10
|
exports.countSchedulesForReport = countSchedulesForReport;
|
|
11
|
-
const Uuid_1 = require("
|
|
11
|
+
const Uuid_1 = require("../../../AdaptableState/Uuid");
|
|
12
12
|
function reportScheduleToSchedule(reportSchedule) {
|
|
13
13
|
const { ReportName: reportName, ScheduleType: _scheduleType, ...schedule } = reportSchedule;
|
|
14
14
|
return {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
2
|
+
import { SettingsPanelNavigation, SettingsPanelNavigationGroup, SettingsPanelOptions } from '../../AdaptableOptions/SettingsPanelOptions';
|
|
3
|
+
export declare const DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS: SettingsPanelNavigationGroup[];
|
|
4
|
+
export declare const buildDefaultSettingsPanelNavigation: (customPanelNames?: string[]) => SettingsPanelNavigation;
|
|
5
|
+
export declare const resolveSettingsPanelNavigation: (api: AdaptableApi, settingsPanelOptions: SettingsPanelOptions) => SettingsPanelNavigation;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildDefaultSettingsPanelNavigation = exports.DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS = void 0;
|
|
3
|
+
exports.resolveSettingsPanelNavigation = exports.buildDefaultSettingsPanelNavigation = exports.DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS = void 0;
|
|
4
4
|
exports.DEFAULT_SETTINGS_PANEL_NAVIGATION_GROUPS = [
|
|
5
5
|
{
|
|
6
6
|
label: 'Grid & UI',
|
|
@@ -49,3 +49,18 @@ const buildDefaultSettingsPanelNavigation = (customPanelNames = []) => {
|
|
|
49
49
|
return { groups };
|
|
50
50
|
};
|
|
51
51
|
exports.buildDefaultSettingsPanelNavigation = buildDefaultSettingsPanelNavigation;
|
|
52
|
+
const cloneSettingsPanelNavigation = (navigation) => ({
|
|
53
|
+
groups: navigation.groups.map((group) => ({
|
|
54
|
+
label: group.label,
|
|
55
|
+
items: [...group.items],
|
|
56
|
+
})),
|
|
57
|
+
});
|
|
58
|
+
const resolveSettingsPanelNavigation = (api, settingsPanelOptions) => {
|
|
59
|
+
const defaultNavigation = (0, exports.buildDefaultSettingsPanelNavigation)(settingsPanelOptions.customSettingsPanels?.map((panel) => panel.name) ?? []);
|
|
60
|
+
if (!settingsPanelOptions.navigation) {
|
|
61
|
+
return defaultNavigation;
|
|
62
|
+
}
|
|
63
|
+
const context = api.internalApi.buildBaseContext();
|
|
64
|
+
return settingsPanelOptions.navigation(context, cloneSettingsPanelNavigation(defaultNavigation));
|
|
65
|
+
};
|
|
66
|
+
exports.resolveSettingsPanelNavigation = resolveSettingsPanelNavigation;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BarStyleCellTextHorizontalAlignment, BarStyleCellTextLayout, BarStyleCellTextPlacement, BarStyleCellTextProperties, BarStyleCellTextVerticalAlignment } from '../../../AdaptableState/StyledColumns/Common/BarStyleProperties';
|
|
2
|
+
import { CellTextOption, CellTextOptions } from '../../../AdaptableState/StyledColumns/Common/CellTextOptions';
|
|
3
|
+
export type BarStyleCellTextLabels = {
|
|
4
|
+
cellValue?: string;
|
|
5
|
+
percentage?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const resolveBarStyleCellTextLayout: (props: BarStyleCellTextProperties | undefined) => BarStyleCellTextLayout;
|
|
8
|
+
/** True when any value is configured for display. */
|
|
9
|
+
export declare const hasBarStyleCellTextConfigured: (props: BarStyleCellTextProperties | undefined) => boolean;
|
|
10
|
+
/** Set of value tokens that currently have a placement. */
|
|
11
|
+
export declare const getActiveBarStyleCellTextTokens: (props: BarStyleCellTextProperties | undefined) => CellTextOptions;
|
|
12
|
+
export declare const mergeBarStyleCellTextProperties: (current: BarStyleCellTextProperties | undefined, patch: Partial<BarStyleCellTextProperties>) => BarStyleCellTextProperties | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Set or clear a value's placement. Passing `placement: undefined` removes the value.
|
|
15
|
+
*/
|
|
16
|
+
export declare const setBarStyleCellTextPlacement: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, placement: BarStyleCellTextPlacement | undefined) => BarStyleCellTextProperties | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Patch a single axis of a value's placement (creating the value with defaults if
|
|
19
|
+
* needed). Used by the wizard's placement pickers.
|
|
20
|
+
*/
|
|
21
|
+
export declare const patchBarStyleCellTextPlacement: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, patch: Partial<BarStyleCellTextPlacement>) => BarStyleCellTextProperties | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Toggle whether a value is displayed. When turning on a previously-hidden
|
|
24
|
+
* value we use the default placement (Left / Below).
|
|
25
|
+
*/
|
|
26
|
+
export declare const toggleBarStyleCellTextToken: (current: BarStyleCellTextProperties | undefined, token: CellTextOption, show: boolean) => {
|
|
27
|
+
CellTextProperties: BarStyleCellTextProperties | undefined;
|
|
28
|
+
};
|
|
29
|
+
export declare const buildBarStyleCellTextLabels: (props: BarStyleCellTextProperties | undefined, cellValueLabel: string | undefined, percentageLabel: string | undefined) => BarStyleCellTextLabels;
|
|
30
|
+
export declare const hasBarStyleCellTextLabels: (labels: BarStyleCellTextLabels) => boolean;
|
|
31
|
+
/** Join active labels with a space, Cell Value first then Percent Value. */
|
|
32
|
+
export declare const joinBarStyleCellTextLabels: (labels: BarStyleCellTextLabels) => string;
|
|
33
|
+
export type BarStyleCellTextSlotEntry = {
|
|
34
|
+
vertical: BarStyleCellTextVerticalAlignment;
|
|
35
|
+
horizontal: BarStyleCellTextHorizontalAlignment;
|
|
36
|
+
/** Labels in render order (Cell Value first, then Percent Value). */
|
|
37
|
+
parts: string[];
|
|
38
|
+
/** The joined text, ready to render. */
|
|
39
|
+
text: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Resolve which placements are populated and what text goes in each cell of
|
|
43
|
+
* the 3 × 3 grid. Empty slots are omitted. Two values landing on the same
|
|
44
|
+
* (vertical, horizontal) slot are concatenated with a single space, Cell
|
|
45
|
+
* Value before Percent Value.
|
|
46
|
+
*/
|
|
47
|
+
export declare const resolveBarStyleCellTextSlots: (props: BarStyleCellTextProperties | undefined, labels: BarStyleCellTextLabels) => BarStyleCellTextSlotEntry[];
|
|
48
|
+
export type BarStyleCellTextSlotPresence = {
|
|
49
|
+
hasAbove: boolean;
|
|
50
|
+
hasBelow: boolean;
|
|
51
|
+
hasMerged: boolean;
|
|
52
|
+
};
|
|
53
|
+
export declare const getBarStyleCellTextSlotPresence: (props: BarStyleCellTextProperties | undefined) => BarStyleCellTextSlotPresence;
|
|
54
|
+
export declare const formatBarStyleCellTextLayoutSummary: (layout: BarStyleCellTextLayout) => string | undefined;
|
|
55
|
+
export type MountBarStyleCellTextArgs = {
|
|
56
|
+
wrapperEl: HTMLElement;
|
|
57
|
+
mergedOverlayEl?: HTMLElement;
|
|
58
|
+
textClassName: string;
|
|
59
|
+
cellTextProperties?: BarStyleCellTextProperties;
|
|
60
|
+
labels: BarStyleCellTextLabels;
|
|
61
|
+
mergedPointerEventsNone?: boolean;
|
|
62
|
+
};
|
|
63
|
+
export declare const mountBarStyleCellText: (args: MountBarStyleCellTextArgs) => void;
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mountBarStyleCellText = exports.formatBarStyleCellTextLayoutSummary = exports.getBarStyleCellTextSlotPresence = exports.resolveBarStyleCellTextSlots = exports.joinBarStyleCellTextLabels = exports.hasBarStyleCellTextLabels = exports.buildBarStyleCellTextLabels = exports.toggleBarStyleCellTextToken = exports.patchBarStyleCellTextPlacement = exports.setBarStyleCellTextPlacement = exports.mergeBarStyleCellTextProperties = exports.getActiveBarStyleCellTextTokens = exports.hasBarStyleCellTextConfigured = exports.resolveBarStyleCellTextLayout = void 0;
|
|
4
|
+
/** Default placement applied to a value whose Horizontal/Vertical were omitted. */
|
|
5
|
+
const DEFAULT_PLACEMENT = {
|
|
6
|
+
Horizontal: 'Left',
|
|
7
|
+
Vertical: 'Below',
|
|
8
|
+
};
|
|
9
|
+
const HORIZONTAL_VALUES = ['Left', 'Center', 'Right'];
|
|
10
|
+
const VERTICAL_VALUES = ['Above', 'Below', 'Merged'];
|
|
11
|
+
const isHorizontal = (value) => typeof value === 'string' && HORIZONTAL_VALUES.includes(value);
|
|
12
|
+
const isVertical = (value) => typeof value === 'string' && VERTICAL_VALUES.includes(value);
|
|
13
|
+
/** Normalise a placement, applying defaults for missing axes. */
|
|
14
|
+
const sanitizePlacement = (placement) => ({
|
|
15
|
+
Horizontal: isHorizontal(placement?.Horizontal)
|
|
16
|
+
? placement.Horizontal
|
|
17
|
+
: DEFAULT_PLACEMENT.Horizontal,
|
|
18
|
+
Vertical: isVertical(placement?.Vertical) ? placement.Vertical : DEFAULT_PLACEMENT.Vertical,
|
|
19
|
+
});
|
|
20
|
+
/** Returns a layout with only the values that are actually present, defaults filled in. */
|
|
21
|
+
const sanitizeCellTextLayout = (layout) => {
|
|
22
|
+
const result = {};
|
|
23
|
+
if (layout?.CellValue) {
|
|
24
|
+
result.CellValue = sanitizePlacement(layout.CellValue);
|
|
25
|
+
}
|
|
26
|
+
if (layout?.PercentValue) {
|
|
27
|
+
result.PercentValue = sanitizePlacement(layout.PercentValue);
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
const resolveBarStyleCellTextLayout = (props) => sanitizeCellTextLayout(props?.CellTextLayout);
|
|
32
|
+
exports.resolveBarStyleCellTextLayout = resolveBarStyleCellTextLayout;
|
|
33
|
+
/** True when any value is configured for display. */
|
|
34
|
+
const hasBarStyleCellTextConfigured = (props) => {
|
|
35
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
36
|
+
return Boolean(layout.CellValue || layout.PercentValue);
|
|
37
|
+
};
|
|
38
|
+
exports.hasBarStyleCellTextConfigured = hasBarStyleCellTextConfigured;
|
|
39
|
+
/** Set of value tokens that currently have a placement. */
|
|
40
|
+
const getActiveBarStyleCellTextTokens = (props) => {
|
|
41
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
42
|
+
const tokens = [];
|
|
43
|
+
if (layout.CellValue) {
|
|
44
|
+
tokens.push('CellValue');
|
|
45
|
+
}
|
|
46
|
+
if (layout.PercentValue) {
|
|
47
|
+
tokens.push('PercentageValue');
|
|
48
|
+
}
|
|
49
|
+
return tokens;
|
|
50
|
+
};
|
|
51
|
+
exports.getActiveBarStyleCellTextTokens = getActiveBarStyleCellTextTokens;
|
|
52
|
+
const mergeBarStyleCellTextProperties = (current, patch) => {
|
|
53
|
+
const merged = { ...current, ...patch };
|
|
54
|
+
if (merged.CellTextLayout) {
|
|
55
|
+
merged.CellTextLayout = sanitizeCellTextLayout(merged.CellTextLayout);
|
|
56
|
+
if (!merged.CellTextLayout.CellValue && !merged.CellTextLayout.PercentValue) {
|
|
57
|
+
delete merged.CellTextLayout;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (!merged.CellTextLayout) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
return merged;
|
|
64
|
+
};
|
|
65
|
+
exports.mergeBarStyleCellTextProperties = mergeBarStyleCellTextProperties;
|
|
66
|
+
/**
|
|
67
|
+
* Set or clear a value's placement. Passing `placement: undefined` removes the value.
|
|
68
|
+
*/
|
|
69
|
+
const setBarStyleCellTextPlacement = (current, token, placement) => {
|
|
70
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
71
|
+
const next = { ...layout };
|
|
72
|
+
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
73
|
+
if (placement) {
|
|
74
|
+
next[key] = sanitizePlacement(placement);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
delete next[key];
|
|
78
|
+
}
|
|
79
|
+
return (0, exports.mergeBarStyleCellTextProperties)(current, { CellTextLayout: next });
|
|
80
|
+
};
|
|
81
|
+
exports.setBarStyleCellTextPlacement = setBarStyleCellTextPlacement;
|
|
82
|
+
/**
|
|
83
|
+
* Patch a single axis of a value's placement (creating the value with defaults if
|
|
84
|
+
* needed). Used by the wizard's placement pickers.
|
|
85
|
+
*/
|
|
86
|
+
const patchBarStyleCellTextPlacement = (current, token, patch) => {
|
|
87
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
88
|
+
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
89
|
+
const existing = layout[key];
|
|
90
|
+
const nextPlacement = {
|
|
91
|
+
...(existing ?? DEFAULT_PLACEMENT),
|
|
92
|
+
...patch,
|
|
93
|
+
};
|
|
94
|
+
return (0, exports.setBarStyleCellTextPlacement)(current, token, nextPlacement);
|
|
95
|
+
};
|
|
96
|
+
exports.patchBarStyleCellTextPlacement = patchBarStyleCellTextPlacement;
|
|
97
|
+
/**
|
|
98
|
+
* Toggle whether a value is displayed. When turning on a previously-hidden
|
|
99
|
+
* value we use the default placement (Left / Below).
|
|
100
|
+
*/
|
|
101
|
+
const toggleBarStyleCellTextToken = (current, token, show) => {
|
|
102
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
103
|
+
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
104
|
+
if (show && !layout[key]) {
|
|
105
|
+
return {
|
|
106
|
+
CellTextProperties: (0, exports.setBarStyleCellTextPlacement)(current, token, DEFAULT_PLACEMENT),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
if (!show && layout[key]) {
|
|
110
|
+
return {
|
|
111
|
+
CellTextProperties: (0, exports.setBarStyleCellTextPlacement)(current, token, undefined),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return { CellTextProperties: current };
|
|
115
|
+
};
|
|
116
|
+
exports.toggleBarStyleCellTextToken = toggleBarStyleCellTextToken;
|
|
117
|
+
const buildBarStyleCellTextLabels = (props, cellValueLabel, percentageLabel) => {
|
|
118
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
119
|
+
const labels = {};
|
|
120
|
+
if (layout.CellValue && cellValueLabel != undefined) {
|
|
121
|
+
labels.cellValue = cellValueLabel;
|
|
122
|
+
}
|
|
123
|
+
if (layout.PercentValue && percentageLabel != undefined) {
|
|
124
|
+
labels.percentage = percentageLabel;
|
|
125
|
+
}
|
|
126
|
+
return labels;
|
|
127
|
+
};
|
|
128
|
+
exports.buildBarStyleCellTextLabels = buildBarStyleCellTextLabels;
|
|
129
|
+
const hasBarStyleCellTextLabels = (labels) => Boolean(labels.cellValue || labels.percentage);
|
|
130
|
+
exports.hasBarStyleCellTextLabels = hasBarStyleCellTextLabels;
|
|
131
|
+
/** Join active labels with a space, Cell Value first then Percent Value. */
|
|
132
|
+
const joinBarStyleCellTextLabels = (labels) => {
|
|
133
|
+
const parts = [];
|
|
134
|
+
if (labels.cellValue)
|
|
135
|
+
parts.push(labels.cellValue);
|
|
136
|
+
if (labels.percentage)
|
|
137
|
+
parts.push(labels.percentage);
|
|
138
|
+
return parts.join(' ');
|
|
139
|
+
};
|
|
140
|
+
exports.joinBarStyleCellTextLabels = joinBarStyleCellTextLabels;
|
|
141
|
+
/**
|
|
142
|
+
* Resolve which placements are populated and what text goes in each cell of
|
|
143
|
+
* the 3 × 3 grid. Empty slots are omitted. Two values landing on the same
|
|
144
|
+
* (vertical, horizontal) slot are concatenated with a single space, Cell
|
|
145
|
+
* Value before Percent Value.
|
|
146
|
+
*/
|
|
147
|
+
const resolveBarStyleCellTextSlots = (props, labels) => {
|
|
148
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
149
|
+
// Iteration order matters when both values share a slot: Cell Value first,
|
|
150
|
+
// then Percent Value (matches the legacy "joined" behaviour).
|
|
151
|
+
const candidates = [];
|
|
152
|
+
if (layout.CellValue && labels.cellValue) {
|
|
153
|
+
candidates.push({
|
|
154
|
+
placement: sanitizePlacement(layout.CellValue),
|
|
155
|
+
text: labels.cellValue,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
if (layout.PercentValue && labels.percentage) {
|
|
159
|
+
candidates.push({
|
|
160
|
+
placement: sanitizePlacement(layout.PercentValue),
|
|
161
|
+
text: labels.percentage,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
const slotMap = new Map();
|
|
165
|
+
for (const { placement, text } of candidates) {
|
|
166
|
+
const key = `${placement.Vertical}|${placement.Horizontal}`;
|
|
167
|
+
const existing = slotMap.get(key);
|
|
168
|
+
if (existing) {
|
|
169
|
+
existing.parts.push(text);
|
|
170
|
+
existing.text = existing.parts.join(' ');
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
slotMap.set(key, {
|
|
174
|
+
vertical: placement.Vertical,
|
|
175
|
+
horizontal: placement.Horizontal,
|
|
176
|
+
parts: [text],
|
|
177
|
+
text,
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return Array.from(slotMap.values());
|
|
182
|
+
};
|
|
183
|
+
exports.resolveBarStyleCellTextSlots = resolveBarStyleCellTextSlots;
|
|
184
|
+
const getBarStyleCellTextSlotPresence = (props) => {
|
|
185
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
186
|
+
const verticals = new Set();
|
|
187
|
+
if (layout.CellValue)
|
|
188
|
+
verticals.add(sanitizePlacement(layout.CellValue).Vertical);
|
|
189
|
+
if (layout.PercentValue)
|
|
190
|
+
verticals.add(sanitizePlacement(layout.PercentValue).Vertical);
|
|
191
|
+
return {
|
|
192
|
+
hasAbove: verticals.has('Above'),
|
|
193
|
+
hasBelow: verticals.has('Below'),
|
|
194
|
+
hasMerged: verticals.has('Merged'),
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
exports.getBarStyleCellTextSlotPresence = getBarStyleCellTextSlotPresence;
|
|
198
|
+
// ---------------------------------------------------------------------------
|
|
199
|
+
// Summary formatting
|
|
200
|
+
// ---------------------------------------------------------------------------
|
|
201
|
+
const HORIZONTAL_LABEL = {
|
|
202
|
+
Left: 'Left',
|
|
203
|
+
Center: 'Center',
|
|
204
|
+
Right: 'Right',
|
|
205
|
+
};
|
|
206
|
+
const VERTICAL_LABEL = {
|
|
207
|
+
Above: 'Above',
|
|
208
|
+
Below: 'Below',
|
|
209
|
+
Merged: 'Merged',
|
|
210
|
+
};
|
|
211
|
+
const formatTokenLabel = (token) => token === 'CellValue' ? 'Cell Value' : 'Percent Value';
|
|
212
|
+
const formatPlacementSummary = (placement) => {
|
|
213
|
+
const { Horizontal, Vertical } = sanitizePlacement(placement);
|
|
214
|
+
return `${VERTICAL_LABEL[Vertical]}-${HORIZONTAL_LABEL[Horizontal]}`;
|
|
215
|
+
};
|
|
216
|
+
const formatBarStyleCellTextLayoutSummary = (layout) => {
|
|
217
|
+
const parts = [];
|
|
218
|
+
if (layout.CellValue) {
|
|
219
|
+
parts.push(`${formatTokenLabel('CellValue')}: ${formatPlacementSummary(layout.CellValue)}`);
|
|
220
|
+
}
|
|
221
|
+
if (layout.PercentValue) {
|
|
222
|
+
parts.push(`${formatTokenLabel('PercentageValue')}: ${formatPlacementSummary(layout.PercentValue)}`);
|
|
223
|
+
}
|
|
224
|
+
return parts.length ? parts.join('; ') : undefined;
|
|
225
|
+
};
|
|
226
|
+
exports.formatBarStyleCellTextLayoutSummary = formatBarStyleCellTextLayoutSummary;
|
|
227
|
+
// ---------------------------------------------------------------------------
|
|
228
|
+
// DOM mount
|
|
229
|
+
// ---------------------------------------------------------------------------
|
|
230
|
+
const HORIZONTAL_FLEX_JUSTIFY = {
|
|
231
|
+
Left: 'flex-start',
|
|
232
|
+
Center: 'center',
|
|
233
|
+
Right: 'flex-end',
|
|
234
|
+
};
|
|
235
|
+
const HORIZONTAL_TEXT_ALIGN = {
|
|
236
|
+
Left: 'left',
|
|
237
|
+
Center: 'center',
|
|
238
|
+
Right: 'right',
|
|
239
|
+
};
|
|
240
|
+
const createCellTextRow = (slots, textClassName, compact) => {
|
|
241
|
+
const row = document.createElement('div');
|
|
242
|
+
row.className = textClassName;
|
|
243
|
+
row.style.display = 'flex';
|
|
244
|
+
row.style.flexDirection = 'row';
|
|
245
|
+
row.style.alignItems = 'center';
|
|
246
|
+
row.style.width = '100%';
|
|
247
|
+
// When `Above` AND `Below` are both populated, two default-size text rows
|
|
248
|
+
// would squeeze the bar to 0 on a standard ~28-40px cell, so the caller
|
|
249
|
+
// asks for a compact band (smaller font + tighter line-height).
|
|
250
|
+
// Otherwise we render at the inherited cell font for legibility.
|
|
251
|
+
if (compact) {
|
|
252
|
+
row.style.fontSize = '0.75em';
|
|
253
|
+
row.style.lineHeight = '1';
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
row.style.lineHeight = '1.2';
|
|
257
|
+
}
|
|
258
|
+
row.style.flex = '0 0 auto';
|
|
259
|
+
row.style.gap = '4px';
|
|
260
|
+
// Render fixed Left / Center / Right cells so spacing is stable even when
|
|
261
|
+
// only one or two slots are present.
|
|
262
|
+
for (const horizontal of HORIZONTAL_VALUES) {
|
|
263
|
+
const slot = slots.find((s) => s.horizontal === horizontal);
|
|
264
|
+
const cell = document.createElement('span');
|
|
265
|
+
cell.style.flex = '1';
|
|
266
|
+
cell.style.minWidth = '0';
|
|
267
|
+
cell.style.textAlign = HORIZONTAL_TEXT_ALIGN[horizontal];
|
|
268
|
+
cell.style.display = 'flex';
|
|
269
|
+
cell.style.justifyContent = HORIZONTAL_FLEX_JUSTIFY[horizontal];
|
|
270
|
+
cell.style.alignItems = 'center';
|
|
271
|
+
if (slot) {
|
|
272
|
+
cell.textContent = slot.text;
|
|
273
|
+
}
|
|
274
|
+
row.append(cell);
|
|
275
|
+
}
|
|
276
|
+
// Suppress the dummy row in the rare case where every slot for this band is
|
|
277
|
+
// empty (e.g. the only label is empty string). `String(...)` because text
|
|
278
|
+
// may arrive as a number when `params.formatValue` is undefined for a
|
|
279
|
+
// numeric column — `(11).length` is `undefined`, which would otherwise
|
|
280
|
+
// wrongly trip the empty-row branch.
|
|
281
|
+
if (!slots.some((s) => String(s.text ?? '').length)) {
|
|
282
|
+
row.style.display = 'none';
|
|
283
|
+
}
|
|
284
|
+
return row;
|
|
285
|
+
};
|
|
286
|
+
const mountBarStyleCellText = (args) => {
|
|
287
|
+
const { cellTextProperties, labels, wrapperEl, textClassName } = args;
|
|
288
|
+
if (!(0, exports.hasBarStyleCellTextConfigured)(cellTextProperties) || !(0, exports.hasBarStyleCellTextLabels)(labels)) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const slots = (0, exports.resolveBarStyleCellTextSlots)(cellTextProperties, labels);
|
|
292
|
+
if (!slots.length) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
const mergedOverlayEl = args.mergedOverlayEl ?? wrapperEl;
|
|
296
|
+
const mergedPointerEventsNone = args.mergedPointerEventsNone ?? mergedOverlayEl === wrapperEl;
|
|
297
|
+
const slotsByVertical = {
|
|
298
|
+
Above: slots.filter((s) => s.vertical === 'Above'),
|
|
299
|
+
Below: slots.filter((s) => s.vertical === 'Below'),
|
|
300
|
+
Merged: slots.filter((s) => s.vertical === 'Merged'),
|
|
301
|
+
};
|
|
302
|
+
// Compact when Cell Value and Percent Value have *different* verticals
|
|
303
|
+
// (i.e. the two tokens claim two separate bands of vertical space). When
|
|
304
|
+
// they share a vertical band — or when only one token is configured —
|
|
305
|
+
// we have room for the full-size font.
|
|
306
|
+
const layout = (0, exports.resolveBarStyleCellTextLayout)(cellTextProperties);
|
|
307
|
+
const compact = Boolean(layout.CellValue &&
|
|
308
|
+
layout.PercentValue &&
|
|
309
|
+
sanitizePlacement(layout.CellValue).Vertical !==
|
|
310
|
+
sanitizePlacement(layout.PercentValue).Vertical);
|
|
311
|
+
if (slotsByVertical.Above.length) {
|
|
312
|
+
const row = createCellTextRow(slotsByVertical.Above, textClassName, compact);
|
|
313
|
+
wrapperEl.prepend(row);
|
|
314
|
+
}
|
|
315
|
+
if (slotsByVertical.Below.length) {
|
|
316
|
+
const row = createCellTextRow(slotsByVertical.Below, textClassName, compact);
|
|
317
|
+
wrapperEl.append(row);
|
|
318
|
+
}
|
|
319
|
+
if (slotsByVertical.Merged.length) {
|
|
320
|
+
const row = createCellTextRow(slotsByVertical.Merged, textClassName, compact);
|
|
321
|
+
row.style.position = 'absolute';
|
|
322
|
+
row.style.top = '50%';
|
|
323
|
+
row.style.transform = 'translateY(-50%)';
|
|
324
|
+
row.style.left = '0';
|
|
325
|
+
row.style.right = '0';
|
|
326
|
+
row.style.paddingLeft = '5px';
|
|
327
|
+
row.style.paddingRight = '5px';
|
|
328
|
+
if (mergedPointerEventsNone) {
|
|
329
|
+
row.style.pointerEvents = 'none';
|
|
330
|
+
}
|
|
331
|
+
mergedOverlayEl.append(row);
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
exports.mountBarStyleCellText = mountBarStyleCellText;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { IRowNode } from 'ag-grid-community';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
4
|
+
import { CellColorRange, NumericStyledColumn } from '../../../AdaptableState/StyledColumns/Common/NumericStyledColumn';
|
|
5
|
+
import { GradientStyle } from '../../../AdaptableState/StyledColumns/GradientStyle';
|
|
6
|
+
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
5
7
|
/**
|
|
6
8
|
* Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
|
|
7
9
|
* Slightly above zero so the bottom-edge value of every range still shows its
|
package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js}
RENAMED
|
@@ -8,9 +8,9 @@ exports.gradientStyleRangeLookupValueType = gradientStyleRangeLookupValueType;
|
|
|
8
8
|
exports.isNegativeZeroCentredBand = isNegativeZeroCentredBand;
|
|
9
9
|
const tslib_1 = require("tslib");
|
|
10
10
|
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
11
|
-
const StyleHelper_1 = require("
|
|
12
|
-
const StyleHelper_2 = require("
|
|
13
|
-
const
|
|
11
|
+
const StyleHelper_1 = require("../StyleHelper");
|
|
12
|
+
const StyleHelper_2 = require("../StyleHelper");
|
|
13
|
+
const NumberExtensions_1 = require("../../Extensions/NumberExtensions");
|
|
14
14
|
/**
|
|
15
15
|
* Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
|
|
16
16
|
* Slightly above zero so the bottom-edge value of every range still shows its
|
|
@@ -131,11 +131,11 @@ const getZeroCentredGradientPreviewCellStyle = (cellValue, gradientStyle) => {
|
|
|
131
131
|
const reverseGradient = matchingRange.Min === previewMin && matchingRange.Max === 0;
|
|
132
132
|
const minAlphaBound = gradientStyle.MinAlpha ?? exports.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
133
133
|
const maxAlphaBound = gradientStyle.MaxAlpha ?? exports.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
134
|
-
const lo = Math.min((0,
|
|
135
|
-
const hi = Math.max((0,
|
|
134
|
+
const lo = Math.min((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
135
|
+
const hi = Math.max((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
136
136
|
const span = Math.abs(max - min);
|
|
137
137
|
let t = span === 0 ? 0.5 : (Number(cellValue) - min) / span;
|
|
138
|
-
t = (0,
|
|
138
|
+
t = (0, NumberExtensions_1.clamp)(t, 0, 1);
|
|
139
139
|
if (reverseGradient) {
|
|
140
140
|
t = 1 - t;
|
|
141
141
|
}
|
|
@@ -197,11 +197,11 @@ const getGradientPreviewCellStyle = (cellValue, styledColumn, api, rowNode) => {
|
|
|
197
197
|
}
|
|
198
198
|
const minAlphaBound = gradientStyle.MinAlpha ?? exports.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
199
199
|
const maxAlphaBound = gradientStyle.MaxAlpha ?? exports.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
200
|
-
const lo = Math.min((0,
|
|
201
|
-
const hi = Math.max((0,
|
|
200
|
+
const lo = Math.min((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
201
|
+
const hi = Math.max((0, NumberExtensions_1.clamp)(minAlphaBound, 0, 1), (0, NumberExtensions_1.clamp)(maxAlphaBound, 0, 1));
|
|
202
202
|
const span = Math.abs(max - min);
|
|
203
203
|
let t = span === 0 ? 0.5 : (Number(cellValue) - min) / span;
|
|
204
|
-
t = (0,
|
|
204
|
+
t = (0, NumberExtensions_1.clamp)(t, 0, 1);
|
|
205
205
|
if (reverseGradient) {
|
|
206
206
|
t = 1 - t;
|
|
207
207
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { IconStyleBuiltInPreset, IconStyleMapping } from '
|
|
1
|
+
import { IconStyleBuiltInPreset, IconStyleMapping } from '../../../AdaptableState/StyledColumns/IconStyle';
|
|
2
|
+
/**
|
|
3
|
+
* Icon Column Style resolves one key → glyph per scalar cell value; AdapTable
|
|
4
|
+
* array column types are not supported (use Badge Style for per-element visuals).
|
|
5
|
+
*/
|
|
6
|
+
export declare function isUnsupportedColumnDataTypeForIconStyle(dataType?: string): boolean;
|
|
2
7
|
export declare const ICON_STYLE_PRESETS: Record<IconStyleBuiltInPreset, IconStyleMapping[]>;
|
|
3
8
|
/** Returns a fresh copy of the mappings for a given preset. */
|
|
4
9
|
export declare const getIconStylePresetMappings: (preset: IconStyleBuiltInPreset) => IconStyleMapping[];
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICON_STYLE_PRESET_DESCRIPTIONS = exports.ICON_STYLE_PRESET_LABELS = exports.getIconStylePresetMappings = exports.ICON_STYLE_PRESETS = void 0;
|
|
4
|
+
exports.isUnsupportedColumnDataTypeForIconStyle = isUnsupportedColumnDataTypeForIconStyle;
|
|
5
|
+
/**
|
|
6
|
+
* Icon Column Style resolves one key → glyph per scalar cell value; AdapTable
|
|
7
|
+
* array column types are not supported (use Badge Style for per-element visuals).
|
|
8
|
+
*/
|
|
9
|
+
function isUnsupportedColumnDataTypeForIconStyle(dataType) {
|
|
10
|
+
switch (dataType) {
|
|
11
|
+
case 'textArray':
|
|
12
|
+
case 'numberArray':
|
|
13
|
+
case 'tupleArray':
|
|
14
|
+
case 'objectArray':
|
|
15
|
+
return true;
|
|
16
|
+
default:
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
4
20
|
/**
|
|
5
21
|
* Built-in {@link IconStyle} mapping presets.
|
|
6
22
|
*
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
2
|
+
import { PercentBarStyle } from '../../../AdaptableState/StyledColumns/PercentBarStyle';
|
|
2
3
|
export declare const hasPercentBarRangesConfigured: (pb: PercentBarStyle | undefined) => boolean;
|
|
3
4
|
/** Illustrative scale for preview — shows negatives when origin is Auto or Zero. */
|
|
4
5
|
export declare const getPercentBarPreviewScale: (pb: PercentBarStyle) => {
|