@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
|
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getPercentBarRendererForColumn = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const NumberExtensions_1 = require("../../Utilities/Extensions/NumberExtensions");
|
|
7
|
+
const StyledColumnHelper_1 = require("../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
|
|
8
|
+
const BarStylesHelper_1 = require("../../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
8
9
|
/**
|
|
9
10
|
* Resolve the origin value (in the same numeric space as `min`/`max`) the bar
|
|
10
11
|
* should grow from.
|
|
@@ -35,7 +36,7 @@ const toFraction = (value, min, max) => {
|
|
|
35
36
|
if (max === min) {
|
|
36
37
|
return 0;
|
|
37
38
|
}
|
|
38
|
-
return (0,
|
|
39
|
+
return (0, NumberExtensions_1.clamp)((value - min) / (max - min), 0, 1);
|
|
39
40
|
};
|
|
40
41
|
/** Column-comparison mode: centred 50% axis when Origin is Auto or Zero. */
|
|
41
42
|
const columnComparisonUsesCentredAxis = (origin) => {
|
|
@@ -45,58 +46,6 @@ const columnComparisonUsesCentredAxis = (origin) => {
|
|
|
45
46
|
}
|
|
46
47
|
return o === 'Zero' || o === 'Auto';
|
|
47
48
|
};
|
|
48
|
-
/**
|
|
49
|
-
* Linear (non-comparison) mode: bar grows from an interior point of the scale
|
|
50
|
-
* (so positives / negatives can diverge left and right).
|
|
51
|
-
*/
|
|
52
|
-
const linearScaleUsesCentredAxis = (percentBarStyle, cellValue, min, max) => {
|
|
53
|
-
const origin = percentBarStyle.Origin ?? 'Auto';
|
|
54
|
-
if (origin === 'Zero') {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
if (origin === 'Min') {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
if (typeof origin === 'number') {
|
|
61
|
-
if (max === min) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
const f = toFraction(origin, min, max);
|
|
65
|
-
return f > 0 && f < 1;
|
|
66
|
-
}
|
|
67
|
-
// Auto — same condition as resolveOrigin using 0 as the pivot.
|
|
68
|
-
return min < 0 || max < 0 || cellValue < 0;
|
|
69
|
-
};
|
|
70
|
-
const resolveCellTextAlignCss = (percentBarStyle, args) => {
|
|
71
|
-
const mode = percentBarStyle.CellTextAlignment;
|
|
72
|
-
if (mode == undefined) {
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
if (mode === 'Left') {
|
|
76
|
-
return 'left';
|
|
77
|
-
}
|
|
78
|
-
if (mode === 'Right') {
|
|
79
|
-
return 'right';
|
|
80
|
-
}
|
|
81
|
-
if (mode === 'Center') {
|
|
82
|
-
return 'center';
|
|
83
|
-
}
|
|
84
|
-
// Auto
|
|
85
|
-
const centred = args.hasColumnComparison
|
|
86
|
-
? columnComparisonUsesCentredAxis(percentBarStyle.Origin)
|
|
87
|
-
: linearScaleUsesCentredAxis(percentBarStyle, args.numericValue, args.min, args.max);
|
|
88
|
-
if (!centred) {
|
|
89
|
-
return undefined;
|
|
90
|
-
}
|
|
91
|
-
const v = args.hasColumnComparison ? args.percentageValue : args.numericValue;
|
|
92
|
-
if (v > 0) {
|
|
93
|
-
return 'right';
|
|
94
|
-
}
|
|
95
|
-
if (v < 0) {
|
|
96
|
-
return 'left';
|
|
97
|
-
}
|
|
98
|
-
return 'center';
|
|
99
|
-
};
|
|
100
49
|
const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
101
50
|
if (!styledColumn.PercentBarStyle) {
|
|
102
51
|
return;
|
|
@@ -107,7 +56,7 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
107
56
|
// Defer to the shared row-scope helper. Default behaviour
|
|
108
57
|
// ("group rows fall back to plain text") is preserved when
|
|
109
58
|
// `RowScope` is unset.
|
|
110
|
-
if (!(0,
|
|
59
|
+
if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, api)) {
|
|
111
60
|
if (params.value != undefined) {
|
|
112
61
|
this.eGui = document.createElement('div');
|
|
113
62
|
this.eGui.append(String(params.value));
|
|
@@ -174,7 +123,7 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
174
123
|
}
|
|
175
124
|
else {
|
|
176
125
|
// Linear value-on-scale.
|
|
177
|
-
percentageValue = (((0,
|
|
126
|
+
percentageValue = (((0, NumberExtensions_1.clamp)(numericValue, min, max) - min) / (max - min)) * 100;
|
|
178
127
|
const origin = resolveOrigin(percentBarStyle, numericValue, min, max);
|
|
179
128
|
const valueFrac = toFraction(numericValue, min, max);
|
|
180
129
|
const originFrac = toFraction(origin, min, max);
|
|
@@ -195,11 +144,14 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
195
144
|
}
|
|
196
145
|
}
|
|
197
146
|
// ----- Build the DOM -------------------------------------------------
|
|
198
|
-
const
|
|
199
|
-
const
|
|
147
|
+
const cellTextProperties = percentBarStyle.CellTextProperties;
|
|
148
|
+
const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties);
|
|
149
|
+
// Wrapper always fills the cell. The bar is the flex-grow child so it
|
|
150
|
+
// claims whatever space the (compact) text rows leave, with a small
|
|
151
|
+
// floor to stay visible even on short rows.
|
|
200
152
|
this.eGui = document.createElement('div');
|
|
201
153
|
this.eGui.className = 'ab-PercentBar__wrapper';
|
|
202
|
-
this.eGui.style.height =
|
|
154
|
+
this.eGui.style.height = '100%';
|
|
203
155
|
this.eGui.style.display = 'flex';
|
|
204
156
|
this.eGui.style.flexDirection = 'column';
|
|
205
157
|
this.eGui.style.justifyContent = 'center';
|
|
@@ -212,7 +164,10 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
212
164
|
if (percentBarStyle.BackColor) {
|
|
213
165
|
barEl.style.background = percentBarStyle.BackColor;
|
|
214
166
|
}
|
|
215
|
-
barEl.style.flex = '1';
|
|
167
|
+
barEl.style.flex = '1 1 0';
|
|
168
|
+
// Floor so the bar can't be squeezed out of existence when both
|
|
169
|
+
// `Above` and `Below` bands are populated on a short row.
|
|
170
|
+
barEl.style.minHeight = '6px';
|
|
216
171
|
// Render the inside bar whenever a colour has been resolved, even at
|
|
217
172
|
// 0% width. A zero-width div is visually identical to skipping the
|
|
218
173
|
// element but keeps the DOM consistent so tests / tooling can still
|
|
@@ -233,47 +188,20 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
233
188
|
}
|
|
234
189
|
this.eGui.append(barEl);
|
|
235
190
|
if (hasCellText) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
percentageValue,
|
|
250
|
-
min,
|
|
251
|
-
max,
|
|
252
|
-
hasColumnComparison: !!percentBarStyle.ColumnComparison,
|
|
191
|
+
// Coerce to string: when no `valueFormatter` is set on the column,
|
|
192
|
+
// `params.formatValue` returns the raw value (a number for numeric
|
|
193
|
+
// columns), which then propagates through the helpers as a non-string
|
|
194
|
+
// and breaks string-only operations (e.g. `.length` checks).
|
|
195
|
+
const formattedCellValue = String(params.formatValue?.(rawCellValue) ?? rawCellValue);
|
|
196
|
+
const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, formattedCellValue, `${percentageValue.toFixed(0)}%`);
|
|
197
|
+
(0, BarStylesHelper_1.mountBarStyleCellText)({
|
|
198
|
+
wrapperEl: this.eGui,
|
|
199
|
+
mergedOverlayEl: barEl,
|
|
200
|
+
textClassName: 'ab-PercentBar__text',
|
|
201
|
+
cellTextProperties,
|
|
202
|
+
labels,
|
|
203
|
+
mergedPointerEventsNone: false,
|
|
253
204
|
});
|
|
254
|
-
if (textAlignCss) {
|
|
255
|
-
textEl.style.textAlign = textAlignCss;
|
|
256
|
-
}
|
|
257
|
-
switch (percentBarStyle.CellTextPosition) {
|
|
258
|
-
case 'Above':
|
|
259
|
-
this.eGui.prepend(textEl);
|
|
260
|
-
break;
|
|
261
|
-
case 'Merged':
|
|
262
|
-
textEl.style.position = 'absolute';
|
|
263
|
-
// Centre vertically without knowing the row height
|
|
264
|
-
textEl.style.top = '50%';
|
|
265
|
-
textEl.style.transform = 'translateY(-50%)';
|
|
266
|
-
textEl.style.left = '0';
|
|
267
|
-
textEl.style.right = '0';
|
|
268
|
-
textEl.style.paddingLeft = '5px';
|
|
269
|
-
textEl.style.paddingRight = '5px';
|
|
270
|
-
barEl.append(textEl);
|
|
271
|
-
break;
|
|
272
|
-
case 'Below':
|
|
273
|
-
default:
|
|
274
|
-
this.eGui.append(textEl);
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
205
|
}
|
|
278
206
|
}
|
|
279
207
|
getGui() {
|
|
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getRangeBarRendererForColumn = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const NumberExtensions_1 = require("../../Utilities/Extensions/NumberExtensions");
|
|
7
|
+
const BarStylesHelper_1 = require("../../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
8
|
+
const StyledColumnHelper_1 = require("../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
|
|
8
9
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
9
10
|
const DEFAULT_TRACK_HEIGHT = 4;
|
|
10
11
|
const DEFAULT_BAND_HEIGHT = 14;
|
|
@@ -50,8 +51,7 @@ const normaliseMarker = (override, defaults) => {
|
|
|
50
51
|
return {
|
|
51
52
|
Shape: shape,
|
|
52
53
|
Color: override?.Color ?? defaults.Color,
|
|
53
|
-
Size: override?.Size ??
|
|
54
|
-
(shape === 'Line' ? DEFAULT_LINE_MARKER_THICKNESS : defaults.Size),
|
|
54
|
+
Size: override?.Size ?? (shape === 'Line' ? DEFAULT_LINE_MARKER_THICKNESS : defaults.Size),
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
@@ -63,7 +63,7 @@ const toFraction = (value, min, max) => {
|
|
|
63
63
|
if (max === min) {
|
|
64
64
|
return 0;
|
|
65
65
|
}
|
|
66
|
-
return (0,
|
|
66
|
+
return (0, NumberExtensions_1.clamp)((value - min) / (max - min), 0, 1);
|
|
67
67
|
};
|
|
68
68
|
const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
69
69
|
if (!styledColumn.RangeBarStyle) {
|
|
@@ -74,7 +74,7 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
74
74
|
eGui;
|
|
75
75
|
init(params) {
|
|
76
76
|
// Defer to the shared row-scope helper.
|
|
77
|
-
if (!(0,
|
|
77
|
+
if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, api)) {
|
|
78
78
|
if (params.value != undefined) {
|
|
79
79
|
this.eGui = document.createElement('div');
|
|
80
80
|
this.eGui.append(String(params.value));
|
|
@@ -100,8 +100,9 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
100
100
|
this.eGui.append(params.formatValue?.(rawCellValue) ?? String(rawCellValue));
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
103
|
+
const referenceProperties = rangeStyle.Reference;
|
|
104
|
+
const referenceValue = referenceProperties?.Value != undefined
|
|
105
|
+
? resolveBoundValue(referenceProperties.Value, abColumn, params.node, api)
|
|
105
106
|
: undefined;
|
|
106
107
|
// Markers - resolve user overrides against per-marker defaults.
|
|
107
108
|
const valueMarker = normaliseMarker(rangeStyle.Marker, {
|
|
@@ -109,21 +110,24 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
109
110
|
Color: DEFAULT_VALUE_MARKER_COLOR,
|
|
110
111
|
Size: DEFAULT_VALUE_MARKER_SIZE,
|
|
111
112
|
});
|
|
112
|
-
const referenceMarker = normaliseMarker(
|
|
113
|
+
const referenceMarker = normaliseMarker(referenceProperties?.Marker, {
|
|
113
114
|
Shape: 'Line',
|
|
114
115
|
Color: DEFAULT_REFERENCE_MARKER_COLOR,
|
|
115
116
|
Size: DEFAULT_LINE_MARKER_THICKNESS,
|
|
116
117
|
});
|
|
117
118
|
// Out-of-range handling
|
|
118
|
-
const
|
|
119
|
+
const outOfRangeProperties = rangeStyle.OutOfRange;
|
|
120
|
+
const outOfRangeMode = outOfRangeProperties?.Mode ?? 'Clamp';
|
|
121
|
+
const outOfRangeColor = outOfRangeProperties?.Color;
|
|
119
122
|
const isOutOfRange = numericValue < min || numericValue > max;
|
|
120
123
|
const hideValueMarker = isOutOfRange && outOfRangeMode === 'Hide';
|
|
121
124
|
// Layout
|
|
122
125
|
const isVertical = rangeStyle.Orientation === 'Vertical';
|
|
123
|
-
const
|
|
126
|
+
const trackProperties = rangeStyle.Track;
|
|
127
|
+
const trackThickness = trackProperties?.Height ?? DEFAULT_TRACK_HEIGHT;
|
|
124
128
|
const bandThickness = Math.max(trackThickness + 6, DEFAULT_BAND_HEIGHT);
|
|
125
|
-
const
|
|
126
|
-
const
|
|
129
|
+
const cellTextProperties = rangeStyle.CellTextProperties;
|
|
130
|
+
const hasCellText = (0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties);
|
|
127
131
|
// Map a 0..1 fraction onto the long-axis viewBox (0..100). Vertical
|
|
128
132
|
// orientation inverts so that lower values appear at the bottom of
|
|
129
133
|
// the cell, matching user expectation.
|
|
@@ -136,7 +140,7 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
136
140
|
this.eGui.style.alignItems = isVertical ? 'center' : 'stretch';
|
|
137
141
|
this.eGui.style.justifyContent = 'center';
|
|
138
142
|
this.eGui.style.position = 'relative';
|
|
139
|
-
this.eGui.style.height =
|
|
143
|
+
this.eGui.style.height = '100%';
|
|
140
144
|
const svg = document.createElementNS(SVG_NS, 'svg');
|
|
141
145
|
svg.setAttribute('class', 'ab-RangeBar__svg');
|
|
142
146
|
svg.setAttribute('preserveAspectRatio', 'none');
|
|
@@ -195,11 +199,11 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
195
199
|
const trackCrossOffset = (bandThickness - trackThickness) / 2;
|
|
196
200
|
const track = document.createElementNS(SVG_NS, 'rect');
|
|
197
201
|
setRectAxes(track, 0, 100, trackCrossOffset, trackThickness);
|
|
198
|
-
track.setAttribute('fill',
|
|
202
|
+
track.setAttribute('fill', trackProperties?.Color ?? DEFAULT_TRACK_COLOR);
|
|
199
203
|
track.setAttribute('class', 'ab-RangeBar__track');
|
|
200
204
|
// Slight transparency by default so the track doesn't drown out the
|
|
201
|
-
// band colours; honour explicit user
|
|
202
|
-
if (
|
|
205
|
+
// band colours; honour explicit user Track.Color as-is.
|
|
206
|
+
if (trackProperties?.Color == undefined) {
|
|
203
207
|
// With no bands the cell background is often plain — the same muted
|
|
204
208
|
// foreground at 0.35 opacity can disappear (only the accent marker reads).
|
|
205
209
|
// Bands provide contrast underneath, so keep the subtle blend there.
|
|
@@ -228,8 +232,8 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
228
232
|
valueFraction = toFraction(numericValue, min, max);
|
|
229
233
|
}
|
|
230
234
|
const valueCoord = valueAxisCoord(valueFraction);
|
|
231
|
-
const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' &&
|
|
232
|
-
? { ...valueMarker, Color:
|
|
235
|
+
const effectiveMarker = isOutOfRange && outOfRangeMode === 'Clamp' && outOfRangeColor
|
|
236
|
+
? { ...valueMarker, Color: outOfRangeColor }
|
|
233
237
|
: valueMarker;
|
|
234
238
|
const markerEl = createMarkerElement(effectiveMarker, valueCoord, bandThickness, isVertical);
|
|
235
239
|
if (markerEl) {
|
|
@@ -237,40 +241,38 @@ const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
237
241
|
svg.appendChild(markerEl);
|
|
238
242
|
}
|
|
239
243
|
}
|
|
240
|
-
|
|
244
|
+
// Wrap the SVG in a positioned container so a `Merged` text row sits
|
|
245
|
+
// centred on the *bar*, not on the cell — see BulletChartRenderer for
|
|
246
|
+
// the same fix and Percent Bar for the matching behaviour via its
|
|
247
|
+
// `barEl`.
|
|
248
|
+
const svgContainer = document.createElement('div');
|
|
249
|
+
svgContainer.style.position = 'relative';
|
|
250
|
+
svgContainer.style.display = 'flex';
|
|
251
|
+
svgContainer.style.alignItems = 'center';
|
|
252
|
+
svgContainer.style.justifyContent = 'center';
|
|
253
|
+
if (isVertical) {
|
|
254
|
+
svgContainer.style.flex = '1 1 auto';
|
|
255
|
+
svgContainer.style.minHeight = '0';
|
|
256
|
+
}
|
|
257
|
+
else {
|
|
258
|
+
svgContainer.style.flex = '0 0 auto';
|
|
259
|
+
}
|
|
260
|
+
svgContainer.appendChild(svg);
|
|
261
|
+
this.eGui.appendChild(svgContainer);
|
|
241
262
|
if (hasCellText) {
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
case 'Above':
|
|
256
|
-
this.eGui.prepend(textEl);
|
|
257
|
-
break;
|
|
258
|
-
case 'Merged':
|
|
259
|
-
textEl.style.position = 'absolute';
|
|
260
|
-
textEl.style.top = '50%';
|
|
261
|
-
textEl.style.transform = 'translateY(-50%)';
|
|
262
|
-
textEl.style.left = '0';
|
|
263
|
-
textEl.style.right = '0';
|
|
264
|
-
textEl.style.paddingLeft = '5px';
|
|
265
|
-
textEl.style.paddingRight = '5px';
|
|
266
|
-
textEl.style.pointerEvents = 'none';
|
|
267
|
-
this.eGui.appendChild(textEl);
|
|
268
|
-
break;
|
|
269
|
-
case 'Below':
|
|
270
|
-
default:
|
|
271
|
-
this.eGui.appendChild(textEl);
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
263
|
+
const pct = (0, NumberExtensions_1.clamp)((numericValue - min) / (max - min), 0, 1) * 100;
|
|
264
|
+
// See PercentBarRenderer: `params.formatValue` on a column without a
|
|
265
|
+
// `valueFormatter` returns the raw value (a number here), so coerce
|
|
266
|
+
// to string before it flows into the helpers.
|
|
267
|
+
const formattedCellValue = String(params.formatValue?.(numericValue) ?? numericValue);
|
|
268
|
+
const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(cellTextProperties, formattedCellValue, `${pct.toFixed(0)}%`);
|
|
269
|
+
(0, BarStylesHelper_1.mountBarStyleCellText)({
|
|
270
|
+
wrapperEl: this.eGui,
|
|
271
|
+
mergedOverlayEl: svgContainer,
|
|
272
|
+
textClassName: 'ab-RangeBar__text',
|
|
273
|
+
cellTextProperties,
|
|
274
|
+
labels,
|
|
275
|
+
});
|
|
274
276
|
}
|
|
275
277
|
}
|
|
276
278
|
getGui() {
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getRatingRendererForColumn = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const NumberExtensions_1 = require("../../Utilities/Extensions/NumberExtensions");
|
|
7
|
+
const StyledColumnHelper_1 = require("../../Utilities/Helpers/StyledColumns/StyledColumnHelper");
|
|
8
8
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
9
9
|
const DEFAULT_MAX = 5;
|
|
10
10
|
const DEFAULT_SIZE = 14;
|
|
@@ -71,7 +71,7 @@ const createIconElement = (shape, fill, filledColor, emptyColor, size, uid) => {
|
|
|
71
71
|
const clipRect = document.createElementNS(SVG_NS, 'rect');
|
|
72
72
|
clipRect.setAttribute('x', '0');
|
|
73
73
|
clipRect.setAttribute('y', '0');
|
|
74
|
-
clipRect.setAttribute('width', String(24 * (0,
|
|
74
|
+
clipRect.setAttribute('width', String(24 * (0, NumberExtensions_1.clamp)(fill, 0, 1)));
|
|
75
75
|
clipRect.setAttribute('height', '24');
|
|
76
76
|
clipPath.appendChild(clipRect);
|
|
77
77
|
defs.appendChild(clipPath);
|
|
@@ -95,7 +95,7 @@ const getRatingRendererForColumn = (styledColumn, _abColumn, api) => {
|
|
|
95
95
|
// Defer to the shared row-scope helper. Default (no `RowScope`)
|
|
96
96
|
// matches the previous "group rows only fall back to plain text"
|
|
97
97
|
// behaviour; users can opt other row kinds in / out explicitly.
|
|
98
|
-
if (!(0,
|
|
98
|
+
if (!(0, StyledColumnHelper_1.shouldRenderStyledColumnOnRow)(styledColumn, params.node, api)) {
|
|
99
99
|
this.eGui = document.createElement('div');
|
|
100
100
|
if (params.value != undefined) {
|
|
101
101
|
this.eGui.append(String(params.value));
|
|
@@ -118,7 +118,7 @@ const getRatingRendererForColumn = (styledColumn, _abColumn, api) => {
|
|
|
118
118
|
const emptyColor = ratingStyle.EmptyColor ?? DEFAULT_EMPTY_COLOR;
|
|
119
119
|
const showValue = ratingStyle.ShowValue ?? false;
|
|
120
120
|
// Quantise the value if half-icons aren't allowed.
|
|
121
|
-
const clampedValue = (0,
|
|
121
|
+
const clampedValue = (0, NumberExtensions_1.clamp)(value, 0, max);
|
|
122
122
|
const effectiveValue = allowHalf
|
|
123
123
|
? clampedValue
|
|
124
124
|
: Math.round(clampedValue);
|
|
@@ -136,7 +136,7 @@ const getRatingRendererForColumn = (styledColumn, _abColumn, api) => {
|
|
|
136
136
|
for (let i = 0; i < max; i++) {
|
|
137
137
|
// Fill ratio for icon `i`: full when value >= i+1, partial when
|
|
138
138
|
// value falls between i and i+1, empty otherwise.
|
|
139
|
-
const fill = (0,
|
|
139
|
+
const fill = (0, NumberExtensions_1.clamp)(effectiveValue - i, 0, 1);
|
|
140
140
|
const iconEl = createIconElement(icon, fill, filledColor, emptyColor, size, `${uid}-${i}`);
|
|
141
141
|
iconEl.setAttribute('class', 'ab-Rating__icon');
|
|
142
142
|
this.eGui.appendChild(iconEl);
|
|
@@ -6,7 +6,7 @@ const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableC
|
|
|
6
6
|
const InternalAdaptableDateEditor_1 = require("./InternalAdaptableDateEditor");
|
|
7
7
|
const ag_grid_enterprise_1 = require("ag-grid-enterprise");
|
|
8
8
|
const react_1 = require("react");
|
|
9
|
-
const
|
|
9
|
+
const DisplayFormatHelper_1 = require("../../../Utilities/Helpers/DisplayFormatHelper");
|
|
10
10
|
function shouldClearExistingValue(params) {
|
|
11
11
|
return params.eventKey === ag_grid_enterprise_1.KeyCode.BACKSPACE || params.eventKey === ag_grid_enterprise_1.KeyCode.DELETE;
|
|
12
12
|
}
|
|
@@ -56,7 +56,7 @@ exports.AdaptableReactDateEditor = (0, react_1.forwardRef)((props, ref) => {
|
|
|
56
56
|
if (!Pattern) {
|
|
57
57
|
return value;
|
|
58
58
|
}
|
|
59
|
-
return (0,
|
|
59
|
+
return (0, DisplayFormatHelper_1.DateFormatter)(value, {
|
|
60
60
|
Pattern,
|
|
61
61
|
});
|
|
62
62
|
},
|
|
@@ -149,7 +149,7 @@ class AdaptableDateEditor {
|
|
|
149
149
|
if (!Pattern) {
|
|
150
150
|
return value;
|
|
151
151
|
}
|
|
152
|
-
return (0,
|
|
152
|
+
return (0, DisplayFormatHelper_1.DateFormatter)(value, {
|
|
153
153
|
Pattern,
|
|
154
154
|
});
|
|
155
155
|
},
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const
|
|
8
|
+
const TimingHelper_1 = require("../../Utilities/Helpers/TimingHelper");
|
|
9
9
|
const utils_1 = require("../../lib/utils");
|
|
10
10
|
const Input_1 = tslib_1.__importDefault(require("../Input"));
|
|
11
11
|
const StyleHelper_1 = require("../../Utilities/Helpers/StyleHelper");
|
|
@@ -17,7 +17,7 @@ exports.ColorPicker = React.forwardRef((props, ref) => {
|
|
|
17
17
|
let { value, includeAlpha = true, className, ...restProps } = props;
|
|
18
18
|
// Create a debounced version of onChange
|
|
19
19
|
// we need this because moving the mouse A LOT in the custom color picker can break the React rendering
|
|
20
|
-
const debouncedOnChange = (0, react_1.useCallback)((0,
|
|
20
|
+
const debouncedOnChange = (0, react_1.useCallback)((0, TimingHelper_1.debounce)((color) => {
|
|
21
21
|
props.onChange(color);
|
|
22
22
|
}, 30), [props.onChange]);
|
|
23
23
|
// Clean up the debounce on unmount
|
|
@@ -8,7 +8,7 @@ const react_1 = require("react");
|
|
|
8
8
|
const useProperty_1 = tslib_1.__importDefault(require("../utils/useProperty"));
|
|
9
9
|
const SimpleButton_1 = tslib_1.__importDefault(require("../SimpleButton"));
|
|
10
10
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
11
|
-
const
|
|
11
|
+
const DisplayFormatHelper_1 = require("../../Utilities/Helpers/DisplayFormatHelper");
|
|
12
12
|
const DatepickerContext_1 = require("./DatepickerContext");
|
|
13
13
|
const AdaptableDateInlineInput_1 = require("../../View/Components/AdaptableInput/AdaptableDateInlineInput");
|
|
14
14
|
const date_fns_1 = require("date-fns");
|
|
@@ -66,7 +66,7 @@ exports.Datepicker = React.forwardRef((props, ref) => {
|
|
|
66
66
|
setValue(next);
|
|
67
67
|
setMonth(next ?? new Date());
|
|
68
68
|
};
|
|
69
|
-
const inputValue = (0,
|
|
69
|
+
const inputValue = (0, DisplayFormatHelper_1.DateFormatter)(value, { Pattern: dateProps.format }) ?? '';
|
|
70
70
|
// ── DOM refs for focus ownership ────────────────────────────────
|
|
71
71
|
const triggerRef = React.useRef(null);
|
|
72
72
|
const popupRef = React.useRef(null);
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const
|
|
8
|
+
const ObjectExtensions_1 = require("../../Utilities/Extensions/ObjectExtensions");
|
|
9
9
|
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
10
10
|
const Flex_1 = require("../Flex");
|
|
11
11
|
const FormLayoutContext = (0, react_1.createContext)(null);
|
|
@@ -27,7 +27,7 @@ const FormLayout = (props) => {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
if (defaultColumns[c.name]) {
|
|
30
|
-
c = (0,
|
|
30
|
+
c = (0, ObjectExtensions_1.merge)({}, defaultColumns[c.name], c);
|
|
31
31
|
}
|
|
32
32
|
c.component = c.component === undefined ? defaultComponent : c.component;
|
|
33
33
|
return c;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const
|
|
8
|
+
const TimingHelper_1 = require("../../Utilities/Helpers/TimingHelper");
|
|
9
9
|
const batchUpdate_1 = tslib_1.__importDefault(require("../utils/batchUpdate"));
|
|
10
10
|
const selectParent_1 = tslib_1.__importDefault(require("../utils/selectParent"));
|
|
11
11
|
const useProperty_1 = tslib_1.__importDefault(require("../utils/useProperty"));
|
|
@@ -100,7 +100,7 @@ const OverlayTrigger = React.forwardRef((givenProps, ref) => {
|
|
|
100
100
|
// visible state may quickly change from true -> false -> true
|
|
101
101
|
// when moving the mouse cursor from the trigger to the overlay
|
|
102
102
|
// for this case we debounce the visible change for a very small amount of time
|
|
103
|
-
(0,
|
|
103
|
+
(0, TimingHelper_1.debounce)((visible) => {
|
|
104
104
|
// if (!visible) {
|
|
105
105
|
// return;
|
|
106
106
|
// }
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "23.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1782138914072 || Date.now(),
|
|
6
|
+
VERSION: "23.0.0-canary.9" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -4,8 +4,7 @@ exports.logChanges = exports.getChanges = void 0;
|
|
|
4
4
|
exports.isTableLayoutEqual = isTableLayoutEqual;
|
|
5
5
|
exports.isPivotLayoutEqual = isPivotLayoutEqual;
|
|
6
6
|
exports.isLayoutEqual = isLayoutEqual;
|
|
7
|
-
const
|
|
8
|
-
const isEqual_1 = tslib_1.__importDefault(require("../../Utilities/utils/isEqual"));
|
|
7
|
+
const ObjectExtensions_1 = require("../../Utilities/Extensions/ObjectExtensions");
|
|
9
8
|
const infinite_react_1 = require("@infinite-table/infinite-react");
|
|
10
9
|
const isPivotLayoutModel_1 = require("./isPivotLayoutModel");
|
|
11
10
|
const normalizeLayoutModel_1 = require("./normalizeLayoutModel");
|
|
@@ -25,7 +24,7 @@ const getChanges = (l1, l2) => {
|
|
|
25
24
|
const allKeys = new Set([...k1, ...k2]);
|
|
26
25
|
const changes = [];
|
|
27
26
|
for (const key of allKeys) {
|
|
28
|
-
if (!(0,
|
|
27
|
+
if (!(0, ObjectExtensions_1.isEqual)(l1[key], l2[key])) {
|
|
29
28
|
changes.push({ key, value1: l1[key], value2: l2[key] });
|
|
30
29
|
}
|
|
31
30
|
}
|
|
@@ -48,7 +47,7 @@ function isTableLayoutEqual(l1, l2) {
|
|
|
48
47
|
l2 = (0, normalizeLayoutModel_1.normalizeTableLayoutModel)(l2);
|
|
49
48
|
clearIgnoredProperties(l1);
|
|
50
49
|
clearIgnoredProperties(l2);
|
|
51
|
-
const res = (0,
|
|
50
|
+
const res = (0, ObjectExtensions_1.isEqual)(l1, l2);
|
|
52
51
|
if (!res) {
|
|
53
52
|
(0, exports.logChanges)(l1, l2);
|
|
54
53
|
}
|
|
@@ -73,7 +72,7 @@ function isPivotLayoutEqual(l1, l2) {
|
|
|
73
72
|
l2 = (0, normalizeLayoutModel_1.normalizePivotLayoutModel)(l2);
|
|
74
73
|
clearIgnoredProperties(l1);
|
|
75
74
|
clearIgnoredProperties(l2);
|
|
76
|
-
const res = (0,
|
|
75
|
+
const res = (0, ObjectExtensions_1.isEqual)(l1, l2);
|
|
77
76
|
if (!res) {
|
|
78
77
|
(0, exports.logChanges)(l1, l2);
|
|
79
78
|
}
|