@adaptabletools/adaptable 23.0.0-canary.8 → 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 +29 -14
- package/package.json +1 -1
- package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +1 -1
- package/src/AdaptableState/Common/Enums.d.ts +0 -12
- package/src/AdaptableState/Common/Enums.js +0 -15
- package/src/{Utilities → AdaptableState/Common}/MenuItem.d.ts +4 -4
- package/src/{Utilities → AdaptableState/Common}/MenuItem.js +1 -1
- package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +5 -5
- package/src/AdaptableState/StyledColumns/Common/{BarChartCellText.d.ts → BarStyleProperties.d.ts} +34 -10
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +2 -2
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +2 -2
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +5 -5
- package/src/Api/Implementation/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutHelpers.js +1 -1
- package/src/Api/Implementation/QuickSearchApiImpl.js +1 -1
- package/src/Api/Implementation/ThemeApiImpl.js +1 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +1 -1
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/ChartingInternalApi.js +1 -1
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/EventInternalApi.js +1 -1
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -1
- package/src/Api/Internal/GridInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +1 -1
- package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
- package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +2 -4
- package/src/Redux/Store/AdaptableStore.js +3 -3
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +1 -1
- package/src/Strategy/AlertModule.d.ts +1 -1
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/ChartingModule.d.ts +1 -1
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/ExportModule.js +2 -2
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +1 -1
- package/src/Strategy/NoteModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/TeamSharingModule.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +49 -0
- package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
- package/src/Utilities/Extensions/NumberExtensions.js +74 -0
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +271 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
- package/src/Utilities/Extensions/StringExtensions.js +44 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
- package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
- package/src/Utilities/Helpers/DateHelper.js +1 -1
- package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +1 -1
- package/src/Utilities/Helpers/Helper.d.ts +0 -6
- package/src/Utilities/Helpers/Helper.js +0 -35
- package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduleHelper.d.ts → Scheduling/ScheduleHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleHelper.js → Scheduling/ScheduleHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobManager.d.ts → Scheduling/ScheduleJobManager.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobRunner.d.ts → Scheduling/ScheduleJobRunner.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js} +4 -4
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.d.ts → Scheduling/ScheduledJobsMiddlewareHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.js → Scheduling/ScheduledJobsMiddlewareHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js} +1 -1
- package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +5 -0
- package/src/Utilities/{Defaults/DefaultSettingsPanel.js → Helpers/SettingsPanelHelper.js} +14 -0
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
- package/src/Utilities/Helpers/{barChartCellText.js → StyledColumns/BarStylesHelper.js} +33 -32
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -4
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +3 -3
- package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
- package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +15 -0
- package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -2
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +7 -7
- package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
- package/src/{agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js → Utilities/Helpers/StyledColumns/StyledColumnHelper.js} +64 -2
- package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
- package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +23 -9
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +114 -1
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
- package/src/Utilities/Services/RowSummaryService.js +4 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
- package/src/View/Alert/Utilities/getAlertType.js +1 -1
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +1 -1
- package/src/View/Alert/Utilities/mapAlertDefinition.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +2 -2
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +1 -1
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +1 -1
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +1 -1
- package/src/View/Comments/CommentsEditor.js +1 -1
- package/src/View/Comments/CommentsPopup.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -1
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/Popups/Utilities.js +1 -1
- package/src/View/Components/RangesComponent.d.ts +3 -3
- package/src/View/Components/RangesComponent.js +3 -7
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Dashboard/CustomDashboardButton.js +1 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryTable.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +3 -3
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Note/NoteEditor.js +1 -1
- package/src/View/Note/NotePopup.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +16 -20
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +14 -16
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextLayoutEditor.d.ts → BarStyleCellTextLayoutEditor.d.ts} +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +33 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.d.ts → BarStyleCellTextPreview.d.ts} +6 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/{BarChartCellTextPreview.js → BarStyleCellTextPreview.js} +6 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +2 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +7 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +11 -9
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +7 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +11 -15
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/View/Wizard/OnePageWizards.js +3 -1
- package/src/agGrid/AdaptableAgGrid.js +6 -6
- package/src/agGrid/AgGridColumnAdapter.js +16 -15
- package/src/agGrid/AgGridExportAdapter.js +1 -1
- package/src/agGrid/AgGridMenuAdapter.js +127 -2
- package/src/agGrid/cellRenderers/BadgeRenderer.js +1 -1
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +6 -6
- package/src/agGrid/cellRenderers/IconRenderer.js +2 -3
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +6 -6
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +7 -8
- package/src/agGrid/cellRenderers/RatingRenderer.js +2 -2
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/components/ColorPicker/ColorPicker.js +1 -1
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +41 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.js +2 -2
- package/src/types.d.ts +3 -3
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +0 -6
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +0 -24
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
- package/src/Utilities/Helpers/barChartCellText.d.ts +0 -63
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -15
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -15
- package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
- package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -63
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -115
- package/src/Utilities/utils/chunk.d.ts +0 -6
- package/src/Utilities/utils/chunk.js +0 -17
- package/src/Utilities/utils/clamp.d.ts +0 -5
- package/src/Utilities/utils/clamp.js +0 -7
- package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
- package/src/Utilities/utils/cloneDeepWith.js +0 -67
- package/src/Utilities/utils/debounce.d.ts +0 -20
- package/src/Utilities/utils/flatten.d.ts +0 -5
- package/src/Utilities/utils/flatten.js +0 -7
- package/src/Utilities/utils/flattenDeep.d.ts +0 -5
- package/src/Utilities/utils/flattenDeep.js +0 -7
- package/src/Utilities/utils/get.d.ts +0 -6
- package/src/Utilities/utils/get.js +0 -35
- package/src/Utilities/utils/index.d.ts +0 -22
- package/src/Utilities/utils/index.js +0 -22
- package/src/Utilities/utils/isArray.d.ts +0 -6
- package/src/Utilities/utils/isArray.js +0 -6
- package/src/Utilities/utils/isEqual.d.ts +0 -5
- package/src/Utilities/utils/isEqual.js +0 -124
- package/src/Utilities/utils/isObject.d.ts +0 -6
- package/src/Utilities/utils/isObject.js +0 -9
- package/src/Utilities/utils/isPlainObject.d.ts +0 -6
- package/src/Utilities/utils/isPlainObject.js +0 -17
- package/src/Utilities/utils/kebabCase.d.ts +0 -5
- package/src/Utilities/utils/kebabCase.js +0 -8
- package/src/Utilities/utils/merge.d.ts +0 -11
- package/src/Utilities/utils/merge.js +0 -40
- package/src/Utilities/utils/mergeWith.d.ts +0 -7
- package/src/Utilities/utils/mergeWith.js +0 -46
- package/src/Utilities/utils/orderBy.d.ts +0 -8
- package/src/Utilities/utils/orderBy.js +0 -30
- package/src/Utilities/utils/parseInt.d.ts +0 -6
- package/src/Utilities/utils/parseInt.js +0 -9
- package/src/Utilities/utils/sentenceCase.d.ts +0 -6
- package/src/Utilities/utils/sentenceCase.js +0 -15
- package/src/Utilities/utils/startCase.d.ts +0 -5
- package/src/Utilities/utils/startCase.js +0 -11
- package/src/Utilities/utils/throttle.d.ts +0 -17
- package/src/Utilities/utils/throttle.js +0 -19
- package/src/Utilities/utils/toNumber.d.ts +0 -5
- package/src/Utilities/utils/toNumber.js +0 -39
- package/src/Utilities/utils/uniq.d.ts +0 -7
- package/src/Utilities/utils/uniq.js +0 -9
- package/src/Utilities/utils/uniqBy.d.ts +0 -8
- package/src/Utilities/utils/uniqBy.js +0 -22
- package/src/Utilities/utils/words.d.ts +0 -7
- package/src/Utilities/utils/words.js +0 -10
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +0 -35
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
- package/src/agGrid/buildValueAggregationMenuItem.js +0 -111
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
- package/src/agGrid/createAgGridIcon.d.ts +0 -10
- package/src/agGrid/createAgGridIcon.js +0 -16
- /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
- /package/src/AdaptableState/StyledColumns/Common/{BarChartMarker.js → BarStyleProperties.js} +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
- /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
- /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
- /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
- /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { buildBarStyleCellTextLabels, getBarStyleCellTextSlotPresence, hasBarStyleCellTextConfigured, } from '../../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
3
3
|
import { Box, Flex } from '../../../../../components/Flex';
|
|
4
4
|
import { Card } from '../../../../../components/Card';
|
|
5
5
|
import { Tag } from '../../../../../components/Tag';
|
|
6
6
|
import { StyledColumnRangeBarListPreview } from './StyledColumnChartListPreviews';
|
|
7
|
-
import {
|
|
7
|
+
import { BarStyleCellTextPreview } from './BarStyleCellTextPreview';
|
|
8
8
|
const PREVIEW_CELL_CLASS = 'ab-RangeBarPreviewCell twa:inline-flex twa:items-center twa:min-w-[180px] twa:min-h-[36px] twa:px-2 twa:py-1 twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)]';
|
|
9
9
|
const getRangeBarPreviewSample = (range) => {
|
|
10
10
|
let min = 0;
|
|
@@ -25,17 +25,17 @@ const getRangeBarPreviewSample = (range) => {
|
|
|
25
25
|
const RangeBarPreviewContent = ({ range }) => {
|
|
26
26
|
const { sampleValue, valueFraction } = getRangeBarPreviewSample(range);
|
|
27
27
|
const cellTextProperties = range.CellTextProperties;
|
|
28
|
-
const labels =
|
|
29
|
-
const hasCellText =
|
|
28
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, Number.isInteger(sampleValue) ? String(sampleValue) : sampleValue.toFixed(1), `${(valueFraction * 100).toFixed(0)}%`);
|
|
29
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties) &&
|
|
30
30
|
Boolean(labels.cellValue || labels.percentage);
|
|
31
|
-
const presence =
|
|
31
|
+
const presence = getBarStyleCellTextSlotPresence(cellTextProperties);
|
|
32
32
|
const isVertical = range.Orientation === 'Vertical';
|
|
33
33
|
const cellTextClassName = 'ab-RangeBar__text twa:text-2 twa:leading-tight twa:truncate twa:max-w-full';
|
|
34
34
|
const chartEl = _jsx(StyledColumnRangeBarListPreview, { range: range });
|
|
35
35
|
if (hasCellText && presence.hasMerged && !presence.hasAbove && !presence.hasBelow) {
|
|
36
|
-
return (_jsxs(Box, { className: "ab-RangeBar__wrapper twa:relative twa:inline-flex", children: [chartEl, _jsx(
|
|
36
|
+
return (_jsxs(Box, { className: "ab-RangeBar__wrapper twa:relative twa:inline-flex", children: [chartEl, _jsx(BarStyleCellTextPreview, { mergedOverlayClassName: "ab-RangeBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" })] }));
|
|
37
37
|
}
|
|
38
|
-
return (_jsxs(Flex, { className: "ab-RangeBar__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && (_jsx(
|
|
38
|
+
return (_jsxs(Flex, { className: "ab-RangeBar__wrapper twa:relative", flexDirection: "column", alignItems: isVertical ? 'center' : 'stretch', style: { justifyContent: 'center', gap: hasCellText ? 2 : 0 }, children: [hasCellText && presence.hasAbove && (_jsx(BarStyleCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Above" })), _jsxs(Box, { className: "twa:relative twa:w-full", style: { display: 'inline-flex' }, children: [chartEl, hasCellText && presence.hasMerged && (_jsx(BarStyleCellTextPreview, { mergedOverlayClassName: "ab-RangeBar__text twa:absolute twa:inset-x-0 twa:top-1/2 twa:-translate-y-1/2 twa:px-1 twa:text-2 twa:truncate twa:pointer-events-none", cellTextProperties: cellTextProperties, labels: labels, vertical: "Merged" }))] }), hasCellText && presence.hasBelow && (_jsx(BarStyleCellTextPreview, { className: cellTextClassName, cellTextProperties: cellTextProperties, labels: labels, vertical: "Below" }))] }));
|
|
39
39
|
};
|
|
40
40
|
export const StyledColumnRangeBarPreview = ({ data }) => {
|
|
41
41
|
const range = data.RangeBarStyle;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
|
|
4
4
|
import { AdaptableHelper } from '../../../../../Utilities/Helpers/AdaptableHelper';
|
|
5
|
-
import { resolveSparklineOptionsForRender } from '../../../../../Utilities/Helpers/
|
|
5
|
+
import { resolveSparklineOptionsForRender } from '../../../../../Utilities/Helpers/StyledColumns/SparklineStyleHelper';
|
|
6
6
|
import { convertAdaptableStyleToCSS, hasCellBoxStyle, } from '../../../../../Utilities/Helpers/StyleHelper';
|
|
7
7
|
import { Box } from '../../../../../components/Flex';
|
|
8
8
|
import { Card } from '../../../../../components/Card';
|
|
@@ -3,8 +3,8 @@ import { CheckBox } from '../../../../components/CheckBox';
|
|
|
3
3
|
import ErrorBox from '../../../../components/ErrorBox';
|
|
4
4
|
import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
5
5
|
import { Tag } from '../../../../components/Tag';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { formatBarStyleCellTextLayoutSummary, getActiveBarStyleCellTextTokens, hasBarStyleCellTextConfigured, patchBarStyleCellTextPlacement, resolveBarStyleCellTextLayout, toggleBarStyleCellTextToken, } from '../../../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
7
|
+
import { BarStyleCellTextLayoutEditor } from './Components/BarStyleCellTextLayoutEditor';
|
|
8
8
|
import { OptionalColorPicker } from '../../../../components/ColorPicker';
|
|
9
9
|
import { getGraySwatchColor } from '../../../UIHelper';
|
|
10
10
|
import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
|
|
@@ -28,18 +28,14 @@ const formatOriginLabel = (origin) => {
|
|
|
28
28
|
}
|
|
29
29
|
return origin;
|
|
30
30
|
};
|
|
31
|
-
const formatPercentBarCellTextSummary = (cellText) => cellText
|
|
32
|
-
|
|
33
|
-
.join(' + ') ?? '';
|
|
34
|
-
const formatPercentBarToolTipSummary = (toolTipText) => toolTipText
|
|
35
|
-
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
36
|
-
.join(' + ') ?? '';
|
|
31
|
+
const formatPercentBarCellTextSummary = (cellText) => cellText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
|
|
32
|
+
const formatPercentBarToolTipSummary = (toolTipText) => toolTipText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
|
|
37
33
|
const buildStyledColumnPercentBarStyleSummaryStrings = (pb, options) => {
|
|
38
34
|
const items = [`Origin: ${formatOriginLabel(pb.Origin)}`];
|
|
39
|
-
if (
|
|
40
|
-
const tokens =
|
|
35
|
+
if (hasBarStyleCellTextConfigured(pb.CellTextProperties)) {
|
|
36
|
+
const tokens = getActiveBarStyleCellTextTokens(pb.CellTextProperties);
|
|
41
37
|
items.push(`Cell Text: ${formatPercentBarCellTextSummary(tokens)}`);
|
|
42
|
-
const layoutSummary =
|
|
38
|
+
const layoutSummary = formatBarStyleCellTextLayoutSummary(resolveBarStyleCellTextLayout(pb.CellTextProperties));
|
|
43
39
|
if (layoutSummary) {
|
|
44
40
|
items.push(`Placement: ${layoutSummary}`);
|
|
45
41
|
}
|
|
@@ -126,11 +122,11 @@ export const StyledColumnWizardStyleSection = (props) => {
|
|
|
126
122
|
});
|
|
127
123
|
};
|
|
128
124
|
const onCellTextLayoutToggle = (token, show) => {
|
|
129
|
-
update(
|
|
125
|
+
update(toggleBarStyleCellTextToken(cellTextProperties, token, show));
|
|
130
126
|
};
|
|
131
127
|
const onCellTextPlacementChange = (token, patch) => {
|
|
132
128
|
update({
|
|
133
|
-
CellTextProperties:
|
|
129
|
+
CellTextProperties: patchBarStyleCellTextPlacement(cellTextProperties, token, patch),
|
|
134
130
|
});
|
|
135
131
|
};
|
|
136
132
|
const onToolTipTextChanged = (token, checked) => {
|
|
@@ -149,11 +145,11 @@ export const StyledColumnWizardStyleSection = (props) => {
|
|
|
149
145
|
const { BackColor: _removed, ...rest } = pb;
|
|
150
146
|
props.onChange({ ...data, PercentBarStyle: rest });
|
|
151
147
|
};
|
|
152
|
-
const cellTextDisabled = !
|
|
148
|
+
const cellTextDisabled = !hasBarStyleCellTextConfigured(cellTextProperties) || disabled;
|
|
153
149
|
const currentOrigin = typeof pb.Origin === 'number'
|
|
154
150
|
? 'Min' // numeric origin doesn't fit the radio set; treat as Min for selection state
|
|
155
151
|
: pb.Origin ?? 'Auto';
|
|
156
|
-
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar Position" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the position of the cell text relative to the bar" })] }), _jsx(Card.Body, { children: _jsx(RadioGroup, { orientation: "vertical", name: "ab-percentbar-origin", value: currentOrigin, onRadioChange: handleOriginChange, children: ORIGIN_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, disabled: disabled, children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:min-w-[60px]", children: choice.label }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: choice.hint })] }) }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[540px]", children: "Pick which values to display and where each one sits around the bar (font properties take precedence over Format Column)" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsx(
|
|
152
|
+
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar Position" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the position of the cell text relative to the bar" })] }), _jsx(Card.Body, { children: _jsx(RadioGroup, { orientation: "vertical", name: "ab-percentbar-origin", value: currentOrigin, onRadioChange: handleOriginChange, children: ORIGIN_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, disabled: disabled, children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:min-w-[60px]", children: choice.label }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: choice.hint })] }) }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[540px]", children: "Pick which values to display and where each one sits around the bar (font properties take precedence over Format Column)" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsx(BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: onCellTextLayoutToggle, onPlacementChange: onCellTextPlacementChange }) }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: pb.Font, onChange: (next) => {
|
|
157
153
|
if (next) {
|
|
158
154
|
update({ Font: next });
|
|
159
155
|
}
|
package/src/View/UIHelper.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WizardStatus, } from './Components/SharedProps/EditableConfigEntityState';
|
|
2
2
|
import { FontWeight, FontStyle, StatusColour } from '../AdaptableState/Common/Enums';
|
|
3
3
|
import { StringExtensions } from '../Utilities/Extensions/StringExtensions';
|
|
4
|
-
import { getScheduleDescription as getScheduleDescriptionFromHelper } from '../Utilities/Helpers/ScheduleHelper';
|
|
4
|
+
import { getScheduleDescription as getScheduleDescriptionFromHelper } from '../Utilities/Helpers/Scheduling/ScheduleHelper';
|
|
5
5
|
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
6
6
|
import { resolveContainerElement } from '../Utilities/resolveContainerElement';
|
|
7
7
|
/** Generic swatch entries for the Colour Picker (resolved at runtime per active theme). */
|
|
@@ -8,7 +8,7 @@ import { Card } from '../../components/Card';
|
|
|
8
8
|
import { ButtonEdit } from '../Components/Buttons/ButtonEdit';
|
|
9
9
|
import { NamedQueryContext, } from '../../components/ExpressionEditor/NamedQueryContext';
|
|
10
10
|
import { OnePageWizard, useOnePageWizardContext } from './OnePageWizards';
|
|
11
|
-
import kebabCase from '../../Utilities/
|
|
11
|
+
import { kebabCase } from '../../Utilities/Extensions/StringExtensions';
|
|
12
12
|
import { Box } from '../../components/Flex';
|
|
13
13
|
import { twMerge } from '../../twMerge';
|
|
14
14
|
export const SummaryTag = (props) => (_jsx(Box, { ...props }));
|
|
@@ -163,6 +163,8 @@ export const OnePageWizard = (props) => {
|
|
|
163
163
|
return;
|
|
164
164
|
}
|
|
165
165
|
setCurrentSection(index);
|
|
166
|
-
}, children: [_jsx(KeyHint, { className:
|
|
166
|
+
}, children: [_jsx(KeyHint, { className: cn('twa:mr-2 twa:inline-block', {
|
|
167
|
+
'twa:text-accent-foreground': active,
|
|
168
|
+
}), children: navIndex }), _jsx("div", { className: "twa:flex-1", children: section.title }), _jsx(Icon, { name: "error", className: cn('twa:ml-2', validSectionsMap.get(index) !== true ? 'twa:visible' : 'twa:invisible') })] }, section.title));
|
|
167
169
|
}), selectedFeedback, _jsx(Box, { className: "twa:flex-1" }), _jsxs(KeyHint, { className: "ab-OnePageWizard__key-hint twa:leading-normal", children: [isMacLike() ? 'Cmd' : 'Ctrl', " + #", _jsx("br", {}), "or arrow keys", _jsx("br", {}), "to navigate"] })] }), _jsx(Flex, { flexDirection: "column", className: "ab-OnePageWizard__section-container twa:min-h-0 twa:min-w-0 twa:flex-1", children: renderSection(currentSection) })] }), _jsxs(Flex, { flexDirection: "row", alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer twa:p-2", children: [_jsx(SimpleButton, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => props.onHide?.(), tooltip: props.closeTooltip ?? 'Close wizard', accessLevel: ACCESS_LEVEL_FULL, children: props.closeText ?? 'CLOSE' }), _jsx(KeyHint, { className: "twa:ml-2", children: "Esc" }), _jsx(Box, { className: "ab-OnePageWizard__error twa:text-2 twa:mr-3 twa:flex-1 twa:text-destructive twa:text-end", children: firstErrorMessage }), _jsx(SimpleButton, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: ACCESS_LEVEL_FULL, children: props.finishText ?? 'Finish' })] })] }) }) }) }));
|
|
168
170
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import debounce from '../Utilities/
|
|
1
|
+
import { debounce } from '../Utilities/Helpers/TimingHelper';
|
|
2
2
|
import { createGrid, LocalEventService, } from 'ag-grid-enterprise';
|
|
3
3
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
4
4
|
import { PrimaryKeyDocsLink } from '../Utilities/Constants/DocumentationLinkConstants';
|
|
5
5
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
6
|
-
import { applyQuickSearchFindCssVars } from '../Utilities/Helpers/
|
|
6
|
+
import { applyQuickSearchFindCssVars } from '../Utilities/Helpers/QuickSearchHelper';
|
|
7
7
|
import Emitter from '../Utilities/Emitter';
|
|
8
8
|
import { applyDefaultAdaptableOptions } from '../AdaptableOptions/DefaultAdaptableOptions';
|
|
9
9
|
import { resolveContainerElement } from '../Utilities/resolveContainerElement';
|
|
@@ -20,7 +20,7 @@ import { ThemeService } from '../Utilities/Services/ThemeService';
|
|
|
20
20
|
import { ValidationService } from '../Utilities/Services/ValidationService';
|
|
21
21
|
import { ModuleService } from '../Utilities/Services/ModuleService';
|
|
22
22
|
import { CalculatedColumnExpressionService } from '../Utilities/Services/CalculatedColumnExpressionService';
|
|
23
|
-
import { expandCellDataChangedInfosWithCalculatedColumns } from '../Utilities/Services/
|
|
23
|
+
import { expandCellDataChangedInfosWithCalculatedColumns } from '../Utilities/Services/CalculatedColumnExpressionService';
|
|
24
24
|
import { QueryLanguageService } from '../Utilities/Services/QueryLanguageService';
|
|
25
25
|
import { AlertService } from '../Utilities/Services/AlertService';
|
|
26
26
|
import { TeamSharingService } from '../Utilities/Services/TeamSharingService';
|
|
@@ -86,8 +86,8 @@ import { ensureLoadingScreenPortalElement } from '../components/Modal';
|
|
|
86
86
|
import { AdaptableLoadingScreen } from '../View/Components/Popups/AdaptableLoadingScreen';
|
|
87
87
|
import { createElement } from 'react';
|
|
88
88
|
import { createAgStatusPanelComponent } from '../Utilities/createAgStatusPanelComponent';
|
|
89
|
-
import { only } from '../
|
|
90
|
-
import { weightedAverage } from '../
|
|
89
|
+
import { only } from '../AdaptableState/Aggregations/only';
|
|
90
|
+
import { weightedAverage } from '../AdaptableState/Aggregations/weightedAverage';
|
|
91
91
|
import { ROW_SUMMARY_ROW_ID } from '../AdaptableState/Common/RowSummary';
|
|
92
92
|
import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
|
|
93
93
|
import { AgGridExportAdapter } from './AgGridExportAdapter';
|
|
@@ -103,7 +103,7 @@ import { tagProvidedByAdaptable } from '../Utilities/adaptableOverrideCheck';
|
|
|
103
103
|
import { AgGridModulesAdapter } from './AgGridModulesAdapter';
|
|
104
104
|
import { getMarker } from '../devTools';
|
|
105
105
|
import { DeepMap } from '@infinite-table/infinite-react';
|
|
106
|
-
import { DateFormatter } from '../Utilities/Helpers/
|
|
106
|
+
import { DateFormatter } from '../Utilities/Helpers/DisplayFormatHelper';
|
|
107
107
|
import { clearPredicateDefMapMemo } from '../Api/Implementation/PredicateApiImpl';
|
|
108
108
|
import { AgGridFilterAdapterFactory } from './AgGridFilterAdapter';
|
|
109
109
|
import { AdaptableFilterHandler } from './AdaptableFilterHandler';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import kebabCase from '../Utilities/
|
|
1
|
+
import { kebabCase } from '../Utilities/Extensions/StringExtensions';
|
|
2
2
|
import { resolveDisplayFormat } from '../AdaptableState/Common/AdaptableFormatPresets';
|
|
3
|
-
import merge from '../Utilities/
|
|
4
|
-
import { resolveSparklineOptionsForRender } from '../Utilities/Helpers/
|
|
5
|
-
import {
|
|
3
|
+
import { merge } from '../Utilities/Extensions/ObjectExtensions';
|
|
4
|
+
import { resolveSparklineOptionsForRender } from '../Utilities/Helpers/StyledColumns/SparklineStyleHelper';
|
|
5
|
+
import { hasBarStyleCellTextConfigured } from '../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
6
6
|
import { convertAdaptableStyleToCSS, getAutoContrastTextColor, getVariableColor, hasCellBoxStyle, hasCellFontStyle, normalizeStyleForAgGrid, } from '../Utilities/Helpers/StyleHelper';
|
|
7
7
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
8
8
|
import { ACTION_COLUMN_TYPE, CALCULATED_COLUMN_TYPE, FDC3_COLUMN_TYPE, FREE_TEXT_COLUMN_TYPE, } from '../AdaptableState/Common/AdaptableColumn';
|
|
@@ -13,11 +13,11 @@ import { getBadgeRendererForColumn } from './cellRenderers/BadgeRenderer';
|
|
|
13
13
|
import { getBulletChartRendererForColumn } from './cellRenderers/BulletChartRenderer';
|
|
14
14
|
import { getRangeBarRendererForColumn } from './cellRenderers/RangeBarRenderer';
|
|
15
15
|
import { getRatingRendererForColumn } from './cellRenderers/RatingRenderer';
|
|
16
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
16
|
+
import { shouldRenderStyledColumnOnRow } from '../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
17
17
|
import { findIconStyleMappingForValue, getIconRendererForColumn, } from './cellRenderers/IconRenderer';
|
|
18
|
-
import
|
|
19
|
-
import { getRuleAlertProperties } from '../Utilities/Helpers/ScheduledAlertHelper';
|
|
20
|
-
import { isNegativeZeroCentredBand, expandGradientCellRanges, gradientStyleRangeLookupValueType, DEFAULT_GRADIENT_MIN_ALPHA, DEFAULT_GRADIENT_MAX_ALPHA, } from '../Utilities/Helpers/
|
|
18
|
+
import { clamp } from '../Utilities/Extensions/NumberExtensions';
|
|
19
|
+
import { getRuleAlertProperties } from '../Utilities/Helpers/Scheduling/ScheduledAlertHelper';
|
|
20
|
+
import { isNegativeZeroCentredBand, expandGradientCellRanges, gradientStyleRangeLookupValueType, DEFAULT_GRADIENT_MIN_ALPHA, DEFAULT_GRADIENT_MAX_ALPHA, } from '../Utilities/Helpers/StyledColumns/GradientStyleHelper';
|
|
21
21
|
import { AdaptableNumberEditor, AdaptableReactNumberEditor } from './editors/AdaptableNumberEditor';
|
|
22
22
|
import { AdaptableDateEditor, AdaptableReactDateEditor } from './editors/AdaptableDateEditor';
|
|
23
23
|
import { AgGridExportAdapter } from './AgGridExportAdapter';
|
|
@@ -27,7 +27,7 @@ import { AdaptableFilterHandler } from './AdaptableFilterHandler';
|
|
|
27
27
|
import { AgGridFilterAdapterFactory } from './AgGridFilterAdapter';
|
|
28
28
|
import { AgGridFloatingFilterAdapterFactory } from './AgGridFloatingFilterAdapter';
|
|
29
29
|
import { errorOnce } from './AdaptableLogger';
|
|
30
|
-
import { isUnsupportedColumnDataTypeForIconStyle } from '../Utilities/Helpers/
|
|
30
|
+
import { isUnsupportedColumnDataTypeForIconStyle } from '../Utilities/Helpers/StyledColumns/IconStyleHelper';
|
|
31
31
|
import { isWeightedAverageAggFuncName, } from '../AdaptableState/Common/AggregationColumns';
|
|
32
32
|
/**
|
|
33
33
|
* CSS property keys produced by `convertAdaptableStyleToCSS` from a
|
|
@@ -611,7 +611,7 @@ export class AgGridColumnAdapter {
|
|
|
611
611
|
if (ratingToolTip.includes('PercentageValue') && ratingMax > 0) {
|
|
612
612
|
const n = Number(params.value);
|
|
613
613
|
if (!isNaN(n)) {
|
|
614
|
-
const clamped =
|
|
614
|
+
const clamped = clamp(n, 0, ratingMax);
|
|
615
615
|
const percentageValue = (clamped / ratingMax) * 100;
|
|
616
616
|
const pct = `${percentageValue.toFixed(0)}%`;
|
|
617
617
|
returnValue = returnValue ? `${returnValue} (${pct})` : pct;
|
|
@@ -659,7 +659,7 @@ export class AgGridColumnAdapter {
|
|
|
659
659
|
}
|
|
660
660
|
else {
|
|
661
661
|
const scaleSpan = max - min;
|
|
662
|
-
const clamped =
|
|
662
|
+
const clamped = clamp(Number(params.value), min, max);
|
|
663
663
|
percentageValue = scaleSpan === 0 ? 0 : ((clamped - min) / scaleSpan) * 100;
|
|
664
664
|
}
|
|
665
665
|
returnValue += ` (${percentageValue.toFixed(0)}%)`;
|
|
@@ -1427,11 +1427,11 @@ export class AgGridColumnAdapter {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
const minAlphaBound = gradientStyle.MinAlpha ?? DEFAULT_GRADIENT_MIN_ALPHA;
|
|
1429
1429
|
const maxAlphaBound = gradientStyle.MaxAlpha ?? DEFAULT_GRADIENT_MAX_ALPHA;
|
|
1430
|
-
const lo = Math.min(
|
|
1431
|
-
const hi = Math.max(
|
|
1430
|
+
const lo = Math.min(clamp(minAlphaBound, 0, 1), clamp(maxAlphaBound, 0, 1));
|
|
1431
|
+
const hi = Math.max(clamp(minAlphaBound, 0, 1), clamp(maxAlphaBound, 0, 1));
|
|
1432
1432
|
const span = Math.abs(max - min);
|
|
1433
1433
|
let t = span === 0 ? 0.5 : (Number(colValue) - min) / span;
|
|
1434
|
-
t =
|
|
1434
|
+
t = clamp(t, 0, 1);
|
|
1435
1435
|
if (reverseGradient) {
|
|
1436
1436
|
t = 1 - t;
|
|
1437
1437
|
}
|
|
@@ -1446,7 +1446,8 @@ export class AgGridColumnAdapter {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
|
-
if (styledColumn.PercentBarStyle &&
|
|
1449
|
+
if (styledColumn.PercentBarStyle &&
|
|
1450
|
+
hasBarStyleCellTextConfigured(styledColumn.PercentBarStyle.CellTextProperties)) {
|
|
1450
1451
|
style.paddingTop = 0;
|
|
1451
1452
|
style.paddingBottom = 0;
|
|
1452
1453
|
}
|
|
@@ -5,7 +5,7 @@ import { createUuid } from '../AdaptableState/Uuid';
|
|
|
5
5
|
import { AG_GRID_GROUPED_COLUMN, AG_GRID_SELECTION_COLUMN, } from '../Utilities/Constants/GeneralConstants';
|
|
6
6
|
import { ExportModuleId } from '../Utilities/Constants/ModuleConstants';
|
|
7
7
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
8
|
-
import FormatHelper, { DateFormatter } from '../Utilities/Helpers/
|
|
8
|
+
import FormatHelper, { DateFormatter } from '../Utilities/Helpers/DisplayFormatHelper';
|
|
9
9
|
import { convertCSSAbsoluteFontSizeToPt, getVariableColor, sanitizeStyle, } from '../Utilities/Helpers/StyleHelper';
|
|
10
10
|
import { waitForTimeout } from '../Utilities/waitForTimeout';
|
|
11
11
|
export class AgGridExportAdapter {
|
|
@@ -2,8 +2,133 @@ import { isAdaptableElementIcon } from '../components/Icon';
|
|
|
2
2
|
import { iconToString } from '../components/icons';
|
|
3
3
|
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
4
4
|
import { MENU_SEPARATOR } from '../Utilities/Constants/GeneralConstants';
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { getAggFuncName, getDisplayAggFuncNames, isWeightedAverageAggregation, WEIGHTED_AVERAGE_AGG_FN_NAME, } from '../AdaptableState/Common/AggregationColumns';
|
|
6
|
+
/**
|
|
7
|
+
* Creates an AG Grid icon element for the given icon name.
|
|
8
|
+
*
|
|
9
|
+
* Mimics AG Grid's internal icon creation, producing a
|
|
10
|
+
* `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
|
|
11
|
+
* so the icon picks up AG Grid's own icon font/theme styling.
|
|
12
|
+
*
|
|
13
|
+
* @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
|
|
14
|
+
*/
|
|
15
|
+
function createAgGridIcon(name) {
|
|
16
|
+
const element = document.createElement('span');
|
|
17
|
+
element.className = `ag-icon ag-icon-${name}`;
|
|
18
|
+
element.setAttribute('role', 'presentation');
|
|
19
|
+
element.setAttribute('unselectable', 'on');
|
|
20
|
+
return element;
|
|
21
|
+
}
|
|
22
|
+
const toFuncLabel = (funcName) => {
|
|
23
|
+
if (funcName === 'avg') {
|
|
24
|
+
return 'Average';
|
|
25
|
+
}
|
|
26
|
+
if (funcName === 'weightedAvg') {
|
|
27
|
+
return 'Weighted Average';
|
|
28
|
+
}
|
|
29
|
+
return funcName ? funcName.charAt(0).toUpperCase() + funcName.slice(1) : funcName;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Builds the replacement for AG Grid's built-in `valueAggSubMenu` column menu item.
|
|
33
|
+
*
|
|
34
|
+
* AG Grid does not allow customizing the built-in submenu, so we rebuild an
|
|
35
|
+
* equivalent one: the column's existing aggregation functions plus a
|
|
36
|
+
* `Weighted Average` item whose submenu lists the numeric columns that can be
|
|
37
|
+
* used as the weight parameter.
|
|
38
|
+
*
|
|
39
|
+
* Both standard and weighted selections persist through the current Layout
|
|
40
|
+
* (`updateCurrentLayout`), so the existing `weightedAvg` aggFunc can read the
|
|
41
|
+
* chosen `weightedColumnId` back from the Layout.
|
|
42
|
+
*
|
|
43
|
+
* Weighted Average is never used in Pivot Layouts, so this only deals with the
|
|
44
|
+
* Table Layout aggregations and the caller skips it entirely in Pivot mode.
|
|
45
|
+
*/
|
|
46
|
+
function buildValueAggregationMenuItem(adaptableApi, menuContext) {
|
|
47
|
+
const column = menuContext.adaptableColumn;
|
|
48
|
+
const columnId = column.columnId;
|
|
49
|
+
const currentLayout = adaptableApi.layoutApi.getCurrentLayout();
|
|
50
|
+
const aggregationColumns = currentLayout.TableAggregationColumns || [];
|
|
51
|
+
const currentAggFunc = aggregationColumns.find((agg) => agg.ColumnId === columnId)?.AggFunc;
|
|
52
|
+
let activeAggFuncName;
|
|
53
|
+
if (currentAggFunc != null) {
|
|
54
|
+
const aggFuncName = getAggFuncName(currentAggFunc);
|
|
55
|
+
activeAggFuncName = aggFuncName === true ? column.aggregationFunction : aggFuncName;
|
|
56
|
+
}
|
|
57
|
+
const activeWeightColumnId = isWeightedAverageAggregation(currentAggFunc)
|
|
58
|
+
? currentAggFunc.weightedColumnId
|
|
59
|
+
: undefined;
|
|
60
|
+
const applyAggregation = (aggFuncValue) => {
|
|
61
|
+
const upsert = (cols) => {
|
|
62
|
+
const list = cols ? [...cols] : [];
|
|
63
|
+
const index = list.findIndex((col) => col.ColumnId === columnId);
|
|
64
|
+
if (index >= 0) {
|
|
65
|
+
list[index] = { ...list[index], AggFunc: aggFuncValue };
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
list.push({ ColumnId: columnId, AggFunc: aggFuncValue });
|
|
69
|
+
}
|
|
70
|
+
return list;
|
|
71
|
+
};
|
|
72
|
+
adaptableApi.layoutApi.updateCurrentLayout((layout) => {
|
|
73
|
+
const tableLayout = layout;
|
|
74
|
+
return {
|
|
75
|
+
...tableLayout,
|
|
76
|
+
TableAggregationColumns: upsert(tableLayout.TableAggregationColumns),
|
|
77
|
+
};
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const removeAggregation = () => {
|
|
81
|
+
adaptableApi.layoutApi.updateCurrentLayout((layout) => {
|
|
82
|
+
const tableLayout = layout;
|
|
83
|
+
return {
|
|
84
|
+
...tableLayout,
|
|
85
|
+
TableAggregationColumns: (tableLayout.TableAggregationColumns || []).filter((col) => col.ColumnId !== columnId),
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
// 'None' clears any aggregation for the column and is checked when none is set
|
|
90
|
+
const subMenu = [
|
|
91
|
+
{
|
|
92
|
+
name: 'None',
|
|
93
|
+
checked: activeAggFuncName == null,
|
|
94
|
+
action: () => removeAggregation(),
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
// getDisplayAggFuncNames already positions weightedAvg right after 'avg'
|
|
98
|
+
// (and only includes it when the column is eligible)
|
|
99
|
+
const aggFuncItems = getDisplayAggFuncNames(column).map((funcName) => {
|
|
100
|
+
// Weighted Average needs a weight column parameter, so instead of a plain
|
|
101
|
+
// action it gets a submenu listing the numeric columns usable as the weight.
|
|
102
|
+
if (funcName === WEIGHTED_AVERAGE_AGG_FN_NAME) {
|
|
103
|
+
const weightColumnItems = adaptableApi.columnApi
|
|
104
|
+
.getNumericColumns()
|
|
105
|
+
.filter((numericColumn) => numericColumn.columnId !== columnId)
|
|
106
|
+
.map((numericColumn) => ({
|
|
107
|
+
name: numericColumn.friendlyName ?? numericColumn.columnId,
|
|
108
|
+
checked: activeWeightColumnId === numericColumn.columnId,
|
|
109
|
+
action: () => applyAggregation({
|
|
110
|
+
type: 'weightedAverage',
|
|
111
|
+
weightedColumnId: numericColumn.columnId,
|
|
112
|
+
}),
|
|
113
|
+
}));
|
|
114
|
+
return {
|
|
115
|
+
name: 'Weighted Average',
|
|
116
|
+
checked: activeAggFuncName === WEIGHTED_AVERAGE_AGG_FN_NAME,
|
|
117
|
+
subMenu: weightColumnItems,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
name: toFuncLabel(funcName),
|
|
122
|
+
checked: activeAggFuncName === funcName,
|
|
123
|
+
action: () => applyAggregation(funcName),
|
|
124
|
+
};
|
|
125
|
+
});
|
|
126
|
+
subMenu.push(...aggFuncItems);
|
|
127
|
+
return {
|
|
128
|
+
name: 'Value Aggregation',
|
|
129
|
+
subMenu,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
7
132
|
export class AgGridMenuAdapter {
|
|
8
133
|
_adaptableInstance;
|
|
9
134
|
constructor(_adaptableInstance) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Badge } from '../../View/Components/Badge';
|
|
2
2
|
import { renderWithAdaptableContext } from '../../View/renderWithAdaptableContext';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
4
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
5
5
|
const OVERFLOW_CLASS = {
|
|
6
6
|
Truncate: 'ab-Badge__wrapper--truncate',
|
|
7
7
|
Wrap: 'ab-Badge__wrapper--wrap',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
2
|
-
import clamp from '../../Utilities/
|
|
3
|
-
import {
|
|
4
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
2
|
+
import { clamp } from '../../Utilities/Extensions/NumberExtensions';
|
|
3
|
+
import { buildBarStyleCellTextLabels, hasBarStyleCellTextConfigured, mountBarStyleCellText, } from '../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
4
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
5
5
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
6
6
|
const DEFAULT_BAR_HEIGHT = 8;
|
|
7
7
|
const DEFAULT_BAND_HEIGHT = 14;
|
|
@@ -155,7 +155,7 @@ export const getBulletChartRendererForColumn = (styledColumn, abColumn, api) =>
|
|
|
155
155
|
const barThickness = bulletStyle.Bar?.Height ?? DEFAULT_BAR_HEIGHT;
|
|
156
156
|
const bandThickness = Math.max(barThickness + 6, DEFAULT_BAND_HEIGHT);
|
|
157
157
|
const cellTextProperties = bulletStyle.CellTextProperties;
|
|
158
|
-
const hasCellText =
|
|
158
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties);
|
|
159
159
|
// Map a 0..1 value fraction onto the long-axis viewBox (0..100).
|
|
160
160
|
// In horizontal: 0 -> left, 1 -> right.
|
|
161
161
|
// In vertical: 0 -> bottom, 1 -> top (SVG y origin is at the top so
|
|
@@ -281,8 +281,8 @@ export const getBulletChartRendererForColumn = (styledColumn, abColumn, api) =>
|
|
|
281
281
|
// `valueFormatter` returns the raw value (a number here), so coerce
|
|
282
282
|
// to string before it flows into the helpers.
|
|
283
283
|
const formattedCellValue = String(params.formatValue?.(cellValue) ?? cellValue);
|
|
284
|
-
const labels =
|
|
285
|
-
|
|
284
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, formattedCellValue, `${(valueFraction * 100).toFixed(0)}%`);
|
|
285
|
+
mountBarStyleCellText({
|
|
286
286
|
wrapperEl: this.eGui,
|
|
287
287
|
mergedOverlayEl: svgContainer,
|
|
288
288
|
textClassName: 'ab-BulletChart__text',
|
|
@@ -2,9 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { IconComponent, isAdaptableSystemIcon, isAdaptableCustomIcon, isAdaptableElementIcon, } from '../../components/Icon';
|
|
3
3
|
import { renderWithAdaptableContext } from '../../View/renderWithAdaptableContext';
|
|
4
4
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
5
|
-
import { getIconStylePresetMappings } from '../../Utilities/Helpers/
|
|
6
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
7
|
-
import { isUnsupportedColumnDataTypeForIconStyle } from '../../Utilities/Helpers/iconStyledColumnColumnSupport';
|
|
5
|
+
import { getIconStylePresetMappings, isUnsupportedColumnDataTypeForIconStyle, } from '../../Utilities/Helpers/StyledColumns/IconStyleHelper';
|
|
6
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
8
7
|
import { errorOnce } from '../AdaptableLogger';
|
|
9
8
|
const DEFAULT_SIZE = 18;
|
|
10
9
|
const DEFAULT_GAP = 4;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
2
|
-
import clamp from '../../Utilities/
|
|
3
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
4
|
-
import {
|
|
2
|
+
import { clamp } from '../../Utilities/Extensions/NumberExtensions';
|
|
3
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
4
|
+
import { buildBarStyleCellTextLabels, hasBarStyleCellTextConfigured, mountBarStyleCellText, } from '../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
5
5
|
/**
|
|
6
6
|
* Resolve the origin value (in the same numeric space as `min`/`max`) the bar
|
|
7
7
|
* should grow from.
|
|
@@ -141,7 +141,7 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
141
141
|
}
|
|
142
142
|
// ----- Build the DOM -------------------------------------------------
|
|
143
143
|
const cellTextProperties = percentBarStyle.CellTextProperties;
|
|
144
|
-
const hasCellText =
|
|
144
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties);
|
|
145
145
|
// Wrapper always fills the cell. The bar is the flex-grow child so it
|
|
146
146
|
// claims whatever space the (compact) text rows leave, with a small
|
|
147
147
|
// floor to stay visible even on short rows.
|
|
@@ -189,8 +189,8 @@ export const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
189
189
|
// columns), which then propagates through the helpers as a non-string
|
|
190
190
|
// and breaks string-only operations (e.g. `.length` checks).
|
|
191
191
|
const formattedCellValue = String(params.formatValue?.(rawCellValue) ?? rawCellValue);
|
|
192
|
-
const labels =
|
|
193
|
-
|
|
192
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, formattedCellValue, `${percentageValue.toFixed(0)}%`);
|
|
193
|
+
mountBarStyleCellText({
|
|
194
194
|
wrapperEl: this.eGui,
|
|
195
195
|
mergedOverlayEl: barEl,
|
|
196
196
|
textClassName: 'ab-PercentBar__text',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
2
|
-
import clamp from '../../Utilities/
|
|
3
|
-
import {
|
|
4
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
2
|
+
import { clamp } from '../../Utilities/Extensions/NumberExtensions';
|
|
3
|
+
import { buildBarStyleCellTextLabels, hasBarStyleCellTextConfigured, mountBarStyleCellText, } from '../../Utilities/Helpers/StyledColumns/BarStylesHelper';
|
|
4
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
5
5
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
6
6
|
const DEFAULT_TRACK_HEIGHT = 4;
|
|
7
7
|
const DEFAULT_BAND_HEIGHT = 14;
|
|
@@ -47,8 +47,7 @@ const normaliseMarker = (override, defaults) => {
|
|
|
47
47
|
return {
|
|
48
48
|
Shape: shape,
|
|
49
49
|
Color: override?.Color ?? defaults.Color,
|
|
50
|
-
Size: override?.Size ??
|
|
51
|
-
(shape === 'Line' ? DEFAULT_LINE_MARKER_THICKNESS : defaults.Size),
|
|
50
|
+
Size: override?.Size ?? (shape === 'Line' ? DEFAULT_LINE_MARKER_THICKNESS : defaults.Size),
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
53
|
/**
|
|
@@ -124,7 +123,7 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
124
123
|
const trackThickness = trackProperties?.Height ?? DEFAULT_TRACK_HEIGHT;
|
|
125
124
|
const bandThickness = Math.max(trackThickness + 6, DEFAULT_BAND_HEIGHT);
|
|
126
125
|
const cellTextProperties = rangeStyle.CellTextProperties;
|
|
127
|
-
const hasCellText =
|
|
126
|
+
const hasCellText = hasBarStyleCellTextConfigured(cellTextProperties);
|
|
128
127
|
// Map a 0..1 fraction onto the long-axis viewBox (0..100). Vertical
|
|
129
128
|
// orientation inverts so that lower values appear at the bottom of
|
|
130
129
|
// the cell, matching user expectation.
|
|
@@ -262,8 +261,8 @@ export const getRangeBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
262
261
|
// `valueFormatter` returns the raw value (a number here), so coerce
|
|
263
262
|
// to string before it flows into the helpers.
|
|
264
263
|
const formattedCellValue = String(params.formatValue?.(numericValue) ?? numericValue);
|
|
265
|
-
const labels =
|
|
266
|
-
|
|
264
|
+
const labels = buildBarStyleCellTextLabels(cellTextProperties, formattedCellValue, `${pct.toFixed(0)}%`);
|
|
265
|
+
mountBarStyleCellText({
|
|
267
266
|
wrapperEl: this.eGui,
|
|
268
267
|
mergedOverlayEl: svgContainer,
|
|
269
268
|
textClassName: 'ab-RangeBar__text',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Helper from '../../Utilities/Helpers/Helper';
|
|
2
|
-
import clamp from '../../Utilities/
|
|
3
|
-
import { shouldRenderStyledColumnOnRow } from '
|
|
2
|
+
import { clamp } from '../../Utilities/Extensions/NumberExtensions';
|
|
3
|
+
import { shouldRenderStyledColumnOnRow } from '../../Utilities/Helpers/StyledColumns/StyledColumnHelper';
|
|
4
4
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
5
5
|
const DEFAULT_MAX = 5;
|
|
6
6
|
const DEFAULT_SIZE = 14;
|
|
@@ -3,7 +3,7 @@ import { renderWithAdaptableContext } from '../../../View/renderWithAdaptableCon
|
|
|
3
3
|
import { InternalAdaptableDateEditor, } from './InternalAdaptableDateEditor';
|
|
4
4
|
import { KeyCode } from 'ag-grid-enterprise';
|
|
5
5
|
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
|
|
6
|
-
import { DateFormatter } from '../../../Utilities/Helpers/
|
|
6
|
+
import { DateFormatter } from '../../../Utilities/Helpers/DisplayFormatHelper';
|
|
7
7
|
function shouldClearExistingValue(params) {
|
|
8
8
|
return params.eventKey === KeyCode.BACKSPACE || params.eventKey === KeyCode.DELETE;
|
|
9
9
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useCallback, useEffect } from 'react';
|
|
4
|
-
import debounce from '../../Utilities/
|
|
4
|
+
import { debounce } from '../../Utilities/Helpers/TimingHelper';
|
|
5
5
|
import { cn } from '../../lib/utils';
|
|
6
6
|
import Input from '../Input';
|
|
7
7
|
import { getVariableColor } from '../../Utilities/Helpers/StyleHelper';
|
|
@@ -4,7 +4,7 @@ import { useEffect, useLayoutEffect, useState } from 'react';
|
|
|
4
4
|
import useProperty from '../utils/useProperty';
|
|
5
5
|
import SimpleButton from '../SimpleButton';
|
|
6
6
|
import { ACCESS_LEVEL_FULL } from '../../Utilities/Constants/GeneralConstants';
|
|
7
|
-
import { DateFormatter } from '../../Utilities/Helpers/
|
|
7
|
+
import { DateFormatter } from '../../Utilities/Helpers/DisplayFormatHelper';
|
|
8
8
|
import { useDatepickerContext } from './DatepickerContext';
|
|
9
9
|
import { AdaptableDateInlineInput } from '../../View/Components/AdaptableInput/AdaptableDateInlineInput';
|
|
10
10
|
import { isValid, addYears, endOfYear, startOfYear, addDays, addBusinessDays, } from 'date-fns';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { createContext, useContext } from 'react';
|
|
4
|
-
import merge from '../../Utilities/
|
|
4
|
+
import { merge } from '../../Utilities/Extensions/ObjectExtensions';
|
|
5
5
|
import join from '../utils/join';
|
|
6
6
|
import { Box } from '../Flex';
|
|
7
7
|
const FormLayoutContext = createContext(null);
|