@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
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useQuickSearchDebounced = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
5
|
+
const TimingHelper_1 = require("../../Utilities/Helpers/TimingHelper");
|
|
7
6
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
8
7
|
const useQuickSearchDebounced = (props) => {
|
|
9
8
|
const [searchText, setSearchText] = (0, react_1.useState)(props.QuickSearchText ?? '');
|
|
10
|
-
const debouncedRunQuickSearch = (0, react_1.useMemo)(() => (0,
|
|
9
|
+
const debouncedRunQuickSearch = (0, react_1.useMemo)(() => (0, TimingHelper_1.debounce)(props.onRunQuickSearch, GeneralConstants_1.QUICK_SEARCH_DEBOUNCE_TIME), [props.onRunQuickSearch]);
|
|
11
10
|
(0, react_1.useEffect)(() => {
|
|
12
11
|
setSearchText(props.QuickSearchText);
|
|
13
12
|
}, [props.QuickSearchText]);
|
|
@@ -13,7 +13,7 @@ const Flex_1 = require("../../../components/Flex");
|
|
|
13
13
|
const Card_1 = require("../../../components/Card");
|
|
14
14
|
const NewSelect_1 = require("../../../components/NewSelect");
|
|
15
15
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
16
|
-
const ScheduleHelper_1 = require("../../../Utilities/Helpers/ScheduleHelper");
|
|
16
|
+
const ScheduleHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduleHelper");
|
|
17
17
|
const isScheduleValid = (holder) => {
|
|
18
18
|
if (!holder?.Schedule) {
|
|
19
19
|
return 'Schedule is not specified';
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SpecialColumnSettingsWizardStep = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const
|
|
6
|
+
const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
|
|
7
7
|
const CheckBox_1 = require("../components/CheckBox");
|
|
8
8
|
const FormLayout_1 = tslib_1.__importStar(require("../components/FormLayout"));
|
|
9
9
|
const AdaptableContext_1 = require("./AdaptableContext");
|
|
@@ -39,6 +39,6 @@ const SpecialColumnSettingsWizardStep = (props) => {
|
|
|
39
39
|
{ name: 'first', size: '30%' },
|
|
40
40
|
{ size: '30%', name: 'second' },
|
|
41
41
|
{ size: '30%', name: 'third' },
|
|
42
|
-
], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "filterable", checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.optionsApi.getFilterOptions().enableFilterOnSpecialColumns, children: "Filterable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "resizable", checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }), children: "Resizable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "groupable", checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }), children: "Groupable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "sortable", checked: Sortable, onChange: (Sortable) => onSettingsChange({ Sortable }), children: "Sortable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "pivotable", checked: Pivotable, onChange: (Pivotable) => onSettingsChange({ Pivotable }), children: "Pivotable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "aggregatable", checked: Aggregatable, onChange: (Aggregatable) => onSettingsChange({ Aggregatable }), children: "Aggregatable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-smenu", checked: SuppressMenu, onChange: (SuppressMenu) => onSettingsChange({ SuppressMenu }), children: "Suppress Menu" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-movable", checked: SuppressMovable, onChange: (SuppressMovable) => onSettingsChange({ SuppressMovable }), children: "Suppress Movable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: true, checked: props.isEditable, children: "Editable" })] })] }) })] }), Boolean(possibleColumnTypes?.length) && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Column Types" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Assign custom column types to this column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }], children: (0,
|
|
42
|
+
], children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "filterable", checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.optionsApi.getFilterOptions().enableFilterOnSpecialColumns, children: "Filterable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "resizable", checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }), children: "Resizable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "groupable", checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }), children: "Groupable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "sortable", checked: Sortable, onChange: (Sortable) => onSettingsChange({ Sortable }), children: "Sortable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "pivotable", checked: Pivotable, onChange: (Pivotable) => onSettingsChange({ Pivotable }), children: "Pivotable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "aggregatable", checked: Aggregatable, onChange: (Aggregatable) => onSettingsChange({ Aggregatable }), children: "Aggregatable" })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-smenu", checked: SuppressMenu, onChange: (SuppressMenu) => onSettingsChange({ SuppressMenu }), children: "Suppress Menu" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": "suppres-movable", checked: SuppressMovable, onChange: (SuppressMovable) => onSettingsChange({ SuppressMovable }), children: "Suppress Movable" }), (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: true, checked: props.isEditable, children: "Editable" })] })] }) })] }), Boolean(possibleColumnTypes?.length) && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Column Types" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Assign custom column types to this column" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }], children: (0, ArrayExtensions_1.chunk)(possibleColumnTypes ?? [], 2)?.map(([first, second]) => ((0, jsx_runtime_1.jsxs)(FormLayout_1.FormRow, { children: [first && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": first, onChange: (checked) => handleColumnTypeChange(first, checked), checked: props.settings?.ColumnTypes?.includes?.(first), children: first })), second && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { "data-name": second, onChange: (checked) => handleColumnTypeChange(second, checked), checked: props.settings?.ColumnTypes?.includes?.(second), children: second }))] }, first))) }) })] }))] }));
|
|
43
43
|
};
|
|
44
44
|
exports.SpecialColumnSettingsWizardStep = SpecialColumnSettingsWizardStep;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
3
|
-
import { BadgePillStyle } from '../../../AdaptableState/
|
|
3
|
+
import { BadgePillStyle } from '../../../AdaptableState/StyledColumns/BadgeStyle';
|
|
4
4
|
export interface BadgePillStyleEditorProps {
|
|
5
5
|
api: AdaptableApi;
|
|
6
6
|
/** Current pill style (may be undefined / partial). */
|
|
@@ -61,32 +61,47 @@ const getBadgeDefinitionSummaryItems = (badge, api) => {
|
|
|
61
61
|
items.push({ label: 'Rule', value: rule });
|
|
62
62
|
items.push({ label: 'Shape', value: badge.Shape ?? 'Rounded' });
|
|
63
63
|
items.push(...(0, BadgePillStyleEditor_1.getBadgePillStyleSummaryItems)(badge.PillStyle));
|
|
64
|
-
|
|
64
|
+
const iconProps = badge.IconProperties;
|
|
65
|
+
if (iconProps?.Icon) {
|
|
65
66
|
items.push({
|
|
66
67
|
label: 'Icon',
|
|
67
|
-
value: 'name' in
|
|
68
|
-
icon:
|
|
68
|
+
value: 'name' in iconProps.Icon ? iconProps.Icon.name : 'Custom',
|
|
69
|
+
icon: iconProps.Icon,
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
|
-
if (
|
|
72
|
+
if (iconProps?.IconOnly) {
|
|
72
73
|
items.push({ label: 'Icon Only', value: 'Yes' });
|
|
73
74
|
}
|
|
74
|
-
if (
|
|
75
|
-
items.push({ label: 'Icon Position', value:
|
|
75
|
+
if (iconProps?.Icon && iconProps.Position) {
|
|
76
|
+
items.push({ label: 'Icon Position', value: iconProps.Position });
|
|
76
77
|
}
|
|
77
|
-
if (typeof
|
|
78
|
-
items.push({ label: 'Icon Gap', value: `${
|
|
78
|
+
if (typeof iconProps?.Gap === 'number') {
|
|
79
|
+
items.push({ label: 'Icon Gap', value: `${iconProps.Gap}px` });
|
|
79
80
|
}
|
|
80
81
|
return items;
|
|
81
82
|
};
|
|
82
|
-
const BadgePreview = ({ badge, density, previewValue }) => ((0, jsx_runtime_1.jsx)(Badge_1.Badge, { pillStyle: badge.PillStyle, icon: badge.Icon, iconPosition: badge.
|
|
83
|
+
const BadgePreview = ({ badge, density, previewValue }) => ((0, jsx_runtime_1.jsx)(Badge_1.Badge, { pillStyle: badge.PillStyle, icon: badge.IconProperties?.Icon, iconPosition: badge.IconProperties?.Position, shape: badge.Shape, density: density, iconGap: badge.IconProperties?.Gap, children: badge.IconProperties?.IconOnly ? '' : previewValue }));
|
|
83
84
|
const BadgeCardSummary = ({ badge, api }) => ((0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, SummaryColorTag_1.renderSummaryLabelValueTags)(getBadgeDefinitionSummaryItems(badge, api)) }));
|
|
84
85
|
const BadgeEditorForm = (props) => {
|
|
85
86
|
const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
86
87
|
const { badge, columnId, onChange } = props;
|
|
87
88
|
const predicateDefs = api.styledColumnApi.internalApi.getBadgePredicateDefsForColumn(columnId);
|
|
88
89
|
const currentShape = badge.Shape ?? 'Rounded';
|
|
89
|
-
const
|
|
90
|
+
const iconProps = badge.IconProperties;
|
|
91
|
+
const hasIcon = Boolean(iconProps?.Icon);
|
|
92
|
+
const updateIconProperties = (patch) => {
|
|
93
|
+
const next = {
|
|
94
|
+
...(iconProps ?? { Icon: undefined }),
|
|
95
|
+
...patch,
|
|
96
|
+
};
|
|
97
|
+
if (!next.Icon) {
|
|
98
|
+
const cleaned = { ...badge };
|
|
99
|
+
delete cleaned.IconProperties;
|
|
100
|
+
onChange(cleaned);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
onChange({ ...badge, IconProperties: next });
|
|
104
|
+
};
|
|
90
105
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-2", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Shape" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define shape of the corners for this badge" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Radio_1.RadioGroup, { orientation: "horizontal", name: `ab-badge-shape-${columnId}`, value: currentShape, onRadioChange: (value) => onChange({ ...badge, Shape: value }), className: "twa:gap-3", children: SHAPE_CHOICES.map((choice) => ((0, jsx_runtime_1.jsx)(Radio_1.default, { value: choice.value, children: choice.label }, choice.value))) }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Style" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Colours and font styling for the badge pill" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(BadgePillStyleEditor_1.BadgePillStyleEditor, { embedded: true, api: api, value: badge.PillStyle, onChange: (next) => {
|
|
91
106
|
if (next) {
|
|
92
107
|
onChange({ ...badge, PillStyle: next });
|
|
@@ -104,31 +119,23 @@ const BadgeEditorForm = (props) => {
|
|
|
104
119
|
}, onClear: () => onChange({
|
|
105
120
|
...badge,
|
|
106
121
|
Predicate: undefined,
|
|
107
|
-
}) })) : ((0, jsx_runtime_1.jsx)(ErrorBox_1.default, { children: "Select a column first" })) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Icon" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional icon inside the badge \u2014 position and spacing apply once an icon is selected" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon", children: !
|
|
122
|
+
}) })) : ((0, jsx_runtime_1.jsx)(ErrorBox_1.default, { children: "Select a column first" })) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Icon" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional icon inside the badge \u2014 position and spacing apply once an icon is selected" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon", children: !iconProps?.Icon || 'name' in iconProps.Icon ? ((0, jsx_runtime_1.jsx)(AdaptableIconSelector_1.AdaptableIconSelector, { value: iconProps?.Icon && 'name' in iconProps.Icon ? iconProps.Icon.name : undefined, onChange: (iconName) => {
|
|
108
123
|
if (iconName) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
Icon: {
|
|
112
|
-
name: iconName,
|
|
113
|
-
},
|
|
124
|
+
updateIconProperties({
|
|
125
|
+
Icon: { name: iconName },
|
|
114
126
|
});
|
|
115
127
|
}
|
|
116
128
|
else {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
IconOnly: undefined,
|
|
121
|
-
IconPosition: undefined,
|
|
122
|
-
IconGap: undefined,
|
|
123
|
-
});
|
|
129
|
+
const cleaned = { ...badge };
|
|
130
|
+
delete cleaned.IconProperties;
|
|
131
|
+
onChange(cleaned);
|
|
124
132
|
}
|
|
125
|
-
} })) : ((0, jsx_runtime_1.jsx)(AdaptableIconComponent_1.AdaptableIconComponent, { icon:
|
|
133
|
+
} })) : ((0, jsx_runtime_1.jsx)(AdaptableIconComponent_1.AdaptableIconComponent, { icon: iconProps.Icon })) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon Position", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { disabled: !hasIcon, className: "twa:w-full", value: iconProps?.Position ?? 'Start', onValueChange: (v) => updateIconProperties({ Position: v }), items: [
|
|
126
134
|
{ value: 'Start', label: 'Start' },
|
|
127
135
|
{ value: 'End', label: 'End' },
|
|
128
|
-
] }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Show Icon Only", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: !hasIcon, checked:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
IconGap: typeof value === 'number' && value >= 0 ? value : undefined,
|
|
136
|
+
] }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Show Icon Only", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: !hasIcon, checked: iconProps?.IconOnly, onClick: () => updateIconProperties({ IconOnly: !iconProps?.IconOnly }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Icon Gap", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-2", children: [(0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: !hasIcon || iconProps?.IconOnly, value: iconProps?.Gap ?? '', placeholder: "auto", step: 1, min: 0, style: { width: 70 }, onChange: (value) => {
|
|
137
|
+
updateIconProperties({
|
|
138
|
+
Gap: typeof value === 'number' && value >= 0 ? value : undefined,
|
|
132
139
|
});
|
|
133
140
|
} }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70", children: "px between icon and text \u2014 leave blank to follow Density" })] }) })] }) })] })] }));
|
|
134
141
|
};
|
|
@@ -198,8 +205,7 @@ const StyledColumnBadgeSection = (props) => {
|
|
|
198
205
|
? api.columnApi.getColumnDataTypeForColumnId(data.ColumnId)
|
|
199
206
|
: 'text';
|
|
200
207
|
const previewValue = getBadgePreviewValue(dataType);
|
|
201
|
-
const
|
|
202
|
-
const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(initialExpandedCardId);
|
|
208
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(null);
|
|
203
209
|
const handleAddBadge = () => {
|
|
204
210
|
const newIndex = badges.length;
|
|
205
211
|
props.onChange({
|
|
@@ -13,9 +13,7 @@ export interface StyledColumnFontStyleEditorProps {
|
|
|
13
13
|
disabled?: boolean;
|
|
14
14
|
/**
|
|
15
15
|
* When true, the Alignment row is omitted entirely. Used by Styled Columns
|
|
16
|
-
* that own horizontal alignment elsewhere (e.g.
|
|
17
|
-
* Center / Right" controls drive `CellTextAlignment`, so showing a second
|
|
18
|
-
* Alignment row inside the font editor is confusing).
|
|
16
|
+
* that own horizontal alignment elsewhere (e.g. Badge row layout).
|
|
19
17
|
*/
|
|
20
18
|
hideAlignment?: boolean;
|
|
21
19
|
}
|
|
@@ -13,7 +13,6 @@ const RangesComponent_1 = require("../../Components/RangesComponent");
|
|
|
13
13
|
const ColumnSelector_1 = require("../../Components/Selectors/ColumnSelector");
|
|
14
14
|
const UIHelper_1 = require("../../UIHelper");
|
|
15
15
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
16
|
-
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
|
|
17
16
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
|
|
18
17
|
const Flex_1 = require("../../../components/Flex");
|
|
19
18
|
const BulletRangesSummaryPreview_1 = require("./StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview");
|
|
@@ -22,10 +21,9 @@ const NewSelect_1 = require("../../../components/NewSelect");
|
|
|
22
21
|
const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
|
|
23
22
|
const Card_1 = require("../../../components/Card");
|
|
24
23
|
const SummaryColorTag_1 = require("../../Wizard/SummaryColorTag");
|
|
24
|
+
const BarStylesHelper_1 = require("../../../Utilities/Helpers/StyledColumns/BarStylesHelper");
|
|
25
|
+
const BarStyleCellTextLayoutEditor_1 = require("./StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor");
|
|
25
26
|
const BULLET_STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
26
|
-
// ---------------------------------------------------------------------------
|
|
27
|
-
// Summary helpers
|
|
28
|
-
// ---------------------------------------------------------------------------
|
|
29
27
|
const getTargetSummary = (target) => {
|
|
30
28
|
if (target == undefined) {
|
|
31
29
|
return null;
|
|
@@ -57,12 +55,8 @@ const formatBulletOriginLabel = (origin) => {
|
|
|
57
55
|
}
|
|
58
56
|
return origin;
|
|
59
57
|
};
|
|
60
|
-
const formatBulletCellTextSummary = (cellText) => cellText
|
|
61
|
-
|
|
62
|
-
.join(' + ') ?? '';
|
|
63
|
-
const formatBulletToolTipSummary = (toolTipText) => toolTipText
|
|
64
|
-
?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value'))
|
|
65
|
-
.join(' + ') ?? '';
|
|
58
|
+
const formatBulletCellTextSummary = (cellText) => cellText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
|
|
59
|
+
const formatBulletToolTipSummary = (toolTipText) => toolTipText?.map((t) => (t === 'CellValue' ? 'Cell Value' : 'Percent Value')).join(' + ') ?? '';
|
|
66
60
|
const getStyledColumnBulletRangesViewValues = (data) => {
|
|
67
61
|
const bullet = data.BulletChartStyle;
|
|
68
62
|
if (!bullet) {
|
|
@@ -78,11 +72,12 @@ const getStyledColumnBulletRangesViewValues = (data) => {
|
|
|
78
72
|
exports.getStyledColumnBulletRangesViewValues = getStyledColumnBulletRangesViewValues;
|
|
79
73
|
const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
|
|
80
74
|
const items = [];
|
|
81
|
-
const
|
|
75
|
+
const targetProperties = bullet.TargetProperties;
|
|
76
|
+
const targetSummary = getTargetSummary(targetProperties?.Target);
|
|
82
77
|
if (targetSummary) {
|
|
83
78
|
items.push(`Target: ${targetSummary}`);
|
|
84
79
|
}
|
|
85
|
-
const marker =
|
|
80
|
+
const marker = targetProperties?.Marker;
|
|
86
81
|
if (marker?.Shape && marker.Shape !== 'Line') {
|
|
87
82
|
items.push(`Target Marker Shape: ${marker.Shape}`);
|
|
88
83
|
}
|
|
@@ -95,19 +90,24 @@ const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
|
|
|
95
90
|
if (bullet.Orientation === 'Vertical') {
|
|
96
91
|
items.push('Orientation: Vertical');
|
|
97
92
|
}
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
const barProperties = bullet.Bar;
|
|
94
|
+
if (barProperties?.Color) {
|
|
95
|
+
items.push(`Bar Colour: ${barProperties.Color}`);
|
|
100
96
|
}
|
|
101
|
-
if (
|
|
102
|
-
items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${
|
|
97
|
+
if (barProperties?.Height != null) {
|
|
98
|
+
items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${barProperties.Height}px`);
|
|
103
99
|
}
|
|
104
100
|
items.push(`Origin: ${formatBulletOriginLabel(bullet.Origin)}`);
|
|
105
101
|
if (bullet.BackColor) {
|
|
106
102
|
items.push(`Back Colour: ${bullet.BackColor}`);
|
|
107
103
|
}
|
|
108
|
-
if (bullet.
|
|
109
|
-
|
|
110
|
-
items.push(`Cell Text
|
|
104
|
+
if ((0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(bullet.CellTextProperties)) {
|
|
105
|
+
const tokens = (0, BarStylesHelper_1.getActiveBarStyleCellTextTokens)(bullet.CellTextProperties);
|
|
106
|
+
items.push(`Cell Text: ${formatBulletCellTextSummary(tokens)}`);
|
|
107
|
+
const layoutSummary = (0, BarStylesHelper_1.formatBarStyleCellTextLayoutSummary)((0, BarStylesHelper_1.resolveBarStyleCellTextLayout)(bullet.CellTextProperties));
|
|
108
|
+
if (layoutSummary) {
|
|
109
|
+
items.push(`Placement: ${layoutSummary}`);
|
|
110
|
+
}
|
|
111
111
|
}
|
|
112
112
|
else if (options.includeEmptyCellText) {
|
|
113
113
|
items.push('Cell Text: None');
|
|
@@ -270,59 +270,70 @@ const StyledColumnWizardBulletSection = (props) => {
|
|
|
270
270
|
});
|
|
271
271
|
}, [data, bullet]);
|
|
272
272
|
// -- Target ----------------------------------------------------------------
|
|
273
|
-
const currentMode = getSimpleTargetMode(bullet.Target);
|
|
273
|
+
const currentMode = getSimpleTargetMode(bullet.TargetProperties?.Target);
|
|
274
|
+
const updateTargetProperties = (patch) => {
|
|
275
|
+
const merged = {
|
|
276
|
+
...bullet.TargetProperties,
|
|
277
|
+
...patch,
|
|
278
|
+
};
|
|
279
|
+
// Strip the wrapper when nothing meaningful is left.
|
|
280
|
+
const isEmpty = merged.Target == undefined && merged.Marker == undefined;
|
|
281
|
+
update({ TargetProperties: isEmpty ? undefined : merged });
|
|
282
|
+
};
|
|
283
|
+
const setTarget = (target) => updateTargetProperties({ Target: target });
|
|
274
284
|
const handleTargetModeChange = (mode) => {
|
|
275
285
|
if (mode === 'None') {
|
|
276
|
-
|
|
277
|
-
delete next.Target;
|
|
278
|
-
props.onChange({ ...data, BulletChartStyle: next });
|
|
286
|
+
setTarget(undefined);
|
|
279
287
|
return;
|
|
280
288
|
}
|
|
281
289
|
if (mode === 'Col-Avg' || mode === 'Col-Median') {
|
|
282
|
-
|
|
290
|
+
setTarget(mode);
|
|
283
291
|
return;
|
|
284
292
|
}
|
|
285
293
|
if (mode === 'Number') {
|
|
286
|
-
|
|
294
|
+
setTarget(minMaxRangeValues?.max ?? 0);
|
|
287
295
|
return;
|
|
288
296
|
}
|
|
289
297
|
if (mode === 'Column') {
|
|
290
298
|
// Use the first available numeric column (excluding the styled column itself)
|
|
291
|
-
const candidate = api.columnApi
|
|
292
|
-
|
|
293
|
-
.find((c) => c.columnId !== data.ColumnId);
|
|
294
|
-
update({ Target: candidate?.columnId ?? '' });
|
|
299
|
+
const candidate = api.columnApi.getNumericColumns().find((c) => c.columnId !== data.ColumnId);
|
|
300
|
+
setTarget(candidate?.columnId ?? '');
|
|
295
301
|
return;
|
|
296
302
|
}
|
|
297
303
|
};
|
|
298
304
|
const handleNumericTargetChange = (value) => {
|
|
299
|
-
|
|
300
|
-
update({ Target: 0 });
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
update({ Target: value });
|
|
304
|
-
}
|
|
305
|
+
setTarget(value == undefined || isNaN(value) ? 0 : value);
|
|
305
306
|
};
|
|
306
307
|
const handleColumnTargetChange = (columnId) => {
|
|
307
|
-
|
|
308
|
+
setTarget(columnId);
|
|
309
|
+
};
|
|
310
|
+
// -- Bar -------------------------------------------------------------------
|
|
311
|
+
const updateBar = (patch) => {
|
|
312
|
+
const merged = {
|
|
313
|
+
...bullet.Bar,
|
|
314
|
+
...patch,
|
|
315
|
+
};
|
|
316
|
+
const isEmpty = merged.Color == undefined && merged.Height == undefined;
|
|
317
|
+
update({ Bar: isEmpty ? undefined : merged });
|
|
308
318
|
};
|
|
309
319
|
// -- Marker ----------------------------------------------------------------
|
|
310
320
|
const updateMarker = (patch) => {
|
|
311
|
-
|
|
312
|
-
|
|
321
|
+
updateTargetProperties({
|
|
322
|
+
Marker: {
|
|
313
323
|
Shape: 'Line',
|
|
314
|
-
...bullet.
|
|
324
|
+
...bullet.TargetProperties?.Marker,
|
|
315
325
|
...patch,
|
|
316
326
|
},
|
|
317
327
|
});
|
|
318
328
|
};
|
|
319
329
|
// -- Cell text -------------------------------------------------------------
|
|
320
|
-
const toggleCellText = (token,
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
330
|
+
const toggleCellText = (token, show) => {
|
|
331
|
+
update((0, BarStylesHelper_1.toggleBarStyleCellTextToken)(bullet.CellTextProperties, token, show));
|
|
332
|
+
};
|
|
333
|
+
const onCellTextPlacementChange = (token, patch) => {
|
|
334
|
+
update({
|
|
335
|
+
CellTextProperties: (0, BarStylesHelper_1.patchBarStyleCellTextPlacement)(bullet.CellTextProperties, token, patch),
|
|
336
|
+
});
|
|
326
337
|
};
|
|
327
338
|
const toggleToolTipText = (token, checked) => {
|
|
328
339
|
const current = bullet.ToolTipText ?? [];
|
|
@@ -331,9 +342,6 @@ const StyledColumnWizardBulletSection = (props) => {
|
|
|
331
342
|
: current.filter((t) => t !== token);
|
|
332
343
|
update({ ToolTipText: next });
|
|
333
344
|
};
|
|
334
|
-
const handleCellTextPositionChange = (pos) => {
|
|
335
|
-
update({ CellTextPosition: pos });
|
|
336
|
-
};
|
|
337
345
|
// -------------------------------------------------------------------------
|
|
338
346
|
// Render
|
|
339
347
|
// -------------------------------------------------------------------------
|
|
@@ -346,22 +354,29 @@ const StyledColumnWizardBulletSection = (props) => {
|
|
|
346
354
|
if (variant === 'ranges') {
|
|
347
355
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Ranges" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define qualitative bands for the bullet scale" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(RangesComponent_1.RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, ranges: bullet.CellRanges, rangeValueType: bullet.RangeValueType, onRangeValueTypeChange: onRangeValueTypeChange, columnComparison: bullet.ColumnComparison, updateRanges: onUpdateRanges, updateColumnComparison: onUpdateColumnComparison, hideColumnComparison: true }) })] }) }));
|
|
348
356
|
}
|
|
349
|
-
const
|
|
350
|
-
? bullet.Target
|
|
351
|
-
:
|
|
352
|
-
|
|
357
|
+
const primaryTarget = Array.isArray(bullet.TargetProperties?.Target)
|
|
358
|
+
? bullet.TargetProperties?.Target?.[0]
|
|
359
|
+
: bullet.TargetProperties?.Target;
|
|
360
|
+
const numericTargetValue = typeof primaryTarget === 'number'
|
|
361
|
+
? primaryTarget
|
|
362
|
+
: typeof primaryTarget?.Value === 'number'
|
|
363
|
+
? primaryTarget.Value
|
|
353
364
|
: undefined;
|
|
354
|
-
const columnTargetValue = typeof
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
365
|
+
const columnTargetValue = typeof primaryTarget === 'string' &&
|
|
366
|
+
primaryTarget !== 'Col-Avg' &&
|
|
367
|
+
primaryTarget !== 'Col-Median'
|
|
368
|
+
? primaryTarget
|
|
369
|
+
: typeof primaryTarget?.Value === 'string'
|
|
370
|
+
? primaryTarget.Value
|
|
358
371
|
: undefined;
|
|
372
|
+
const markerCfg = bullet.TargetProperties?.Marker;
|
|
359
373
|
const marker = {
|
|
360
|
-
Shape:
|
|
361
|
-
Color:
|
|
362
|
-
Size:
|
|
374
|
+
Shape: markerCfg?.Shape ?? 'Line',
|
|
375
|
+
Color: markerCfg?.Color ?? '',
|
|
376
|
+
Size: markerCfg?.Size ?? (markerCfg?.Shape === 'Line' ? 2 : 8),
|
|
363
377
|
};
|
|
364
|
-
const
|
|
378
|
+
const cellTextProperties = bullet.CellTextProperties;
|
|
379
|
+
const cellTextDisabled = !(0, BarStylesHelper_1.hasBarStyleCellTextConfigured)(cellTextProperties) || disabled;
|
|
365
380
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Target" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Select a target value for the bullet scale" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Target:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[180px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: currentMode, onValueChange: (v) => handleTargetModeChange(v), items: [
|
|
366
381
|
{ value: 'None', label: 'None' },
|
|
367
382
|
{ value: 'Number', label: 'Fixed Number' },
|
|
@@ -371,9 +386,9 @@ const StyledColumnWizardBulletSection = (props) => {
|
|
|
371
386
|
] }) }) }), currentMode === 'Number' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Target Value:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", value: numericTargetValue ?? '', onChange: (e) => handleNumericTargetChange(e.target.value === '' ? undefined : Number(e.target.value)) }) }) })), currentMode === 'Column' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Target Column:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[220px]", children: (0, jsx_runtime_1.jsx)(ColumnSelector_1.ColumnSelector, { type: "number", value: columnTargetValue ?? '', onChange: handleColumnTargetChange, filterColumn: (c) => c.columnId !== data.ColumnId, placeholder: "Select numeric column" }) }) })), currentMode !== 'None' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Marker Shape:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: marker.Shape, onValueChange: (s) => updateMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Marker Colour:", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: marker.Color || undefined, onChange: (c) => updateMarker({ Color: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Marker Size:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: marker.Size, onChange: (e) => updateMarker({ Size: Number(e.target.value) }) }) }) })] }))] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Bar" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the bar orientation and height" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Orientation:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: bullet.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
|
|
372
387
|
{ value: 'Horizontal', label: 'Horizontal' },
|
|
373
388
|
{ value: 'Vertical', label: 'Vertical' },
|
|
374
|
-
] }) }) }), bullet.Orientation === 'Vertical' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", (0, jsx_runtime_1.jsx)("code", { children: "rowHeight" }), " on ", (0, jsx_runtime_1.jsx)("code", { children: " gridOptions " }), " or use", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getRowHeight" }), "."] }) })), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Bar Colour:", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: bullet.
|
|
375
|
-
|
|
376
|
-
}), placeholder: "8" }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Origin:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' :
|
|
389
|
+
] }) }) }), bullet.Orientation === 'Vertical' && ((0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "", children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", (0, jsx_runtime_1.jsx)("code", { children: "rowHeight" }), " on ", (0, jsx_runtime_1.jsx)("code", { children: " gridOptions " }), " or use", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getRowHeight" }), "."] }) })), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Bar Colour:", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: disabled, api: api, value: bullet.Bar?.Color, onChange: (c) => updateBar({ Color: c }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[100px]", children: (0, jsx_runtime_1.jsx)(AdaptableInput_1.default, { type: "number", min: 1, value: bullet.Bar?.Height ?? '', onChange: (e) => updateBar({
|
|
390
|
+
Height: e.target.value === '' ? undefined : Number(e.target.value),
|
|
391
|
+
}), placeholder: "8" }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Origin:", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[160px]", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : bullet.Origin ?? 'Auto', onValueChange: (v) => {
|
|
377
392
|
if (v === 'Auto' || v === 'Zero') {
|
|
378
393
|
update({ Origin: v });
|
|
379
394
|
}
|
|
@@ -383,11 +398,7 @@ const StyledColumnWizardBulletSection = (props) => {
|
|
|
383
398
|
}, items: [
|
|
384
399
|
{ value: 'Auto', label: 'Auto' },
|
|
385
400
|
{ value: 'Zero', label: 'Zero' },
|
|
386
|
-
] }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell Text" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "
|
|
387
|
-
{ value: 'Above', label: 'Above Bar' },
|
|
388
|
-
{ value: 'Below', label: 'Below Bar' },
|
|
389
|
-
{ value: 'Merged', label: 'Merged' },
|
|
390
|
-
] }) }) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
|
|
401
|
+
] }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Cell Text" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick which values to display and where each one sits around the bar" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...BULLET_STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(BarStyleCellTextLayoutEditor_1.BarStyleCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: (0, jsx_runtime_1.jsx)(StyledColumnSliceStyleEditors_1.StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
|
|
391
402
|
if (next) {
|
|
392
403
|
update({ Font: next });
|
|
393
404
|
}
|
|
@@ -11,7 +11,7 @@ const Tag_1 = require("../../../components/Tag");
|
|
|
11
11
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
12
12
|
const Flex_1 = require("../../../components/Flex");
|
|
13
13
|
const NumberInput_1 = require("../../../components/Input/NumberInput");
|
|
14
|
-
const
|
|
14
|
+
const GradientStyleHelper_1 = require("../../../Utilities/Helpers/StyledColumns/GradientStyleHelper");
|
|
15
15
|
const StyledColumnSliceStyleEditors_1 = require("./StyledColumnSliceStyleEditors");
|
|
16
16
|
const Card_1 = require("../../../components/Card");
|
|
17
17
|
const SummaryColorTag_1 = require("../../Wizard/SummaryColorTag");
|
|
@@ -23,8 +23,8 @@ function formatGradientToolTipSummary(opts) {
|
|
|
23
23
|
.join(' + ');
|
|
24
24
|
}
|
|
25
25
|
const buildStyledColumnGradientStyleSummaryStrings = (gs, options) => {
|
|
26
|
-
const minA = gs.MinAlpha ??
|
|
27
|
-
const maxA = gs.MaxAlpha ??
|
|
26
|
+
const minA = gs.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
27
|
+
const maxA = gs.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
28
28
|
const items = [`Alpha: ${minA} → ${maxA}`];
|
|
29
29
|
if (gs.AutoContrastText) {
|
|
30
30
|
items.push('Auto Contrast: On');
|
|
@@ -90,10 +90,10 @@ const StyledColumnWizardGradientSection = (props) => {
|
|
|
90
90
|
patchGradient({ ToolTipText: next });
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
|
-
const minAlphaDisplay = gs.MinAlpha ??
|
|
94
|
-
const maxAlphaDisplay = gs.MaxAlpha ??
|
|
95
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Transparency" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: ["Used at low and high ends of range; defaults are ",
|
|
96
|
-
if (v ===
|
|
93
|
+
const minAlphaDisplay = gs.MinAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA;
|
|
94
|
+
const maxAlphaDisplay = gs.MaxAlpha ?? GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA;
|
|
95
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:mb-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Transparency" }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[480px]", children: ["Used at low and high ends of range; defaults are ", GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA, " &", ' ', GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA, " (Min 0 fades out lowest values)"] })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(FormLayout_1.default, { sizes: [...STYLE_FORM_SIZES], children: (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Alpha range:", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2 twa:flex-wrap twa:gap-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-sm", children: "Min" }), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: disabled, className: "twa:w-20", value: minAlphaDisplay, min: 0, max: 1, step: 0.05, onChange: (v) => {
|
|
96
|
+
if (v === GradientStyleHelper_1.DEFAULT_GRADIENT_MIN_ALPHA) {
|
|
97
97
|
const { MinAlpha: _m, ...rest } = gs;
|
|
98
98
|
props.onChange({ ...data, GradientStyle: rest });
|
|
99
99
|
}
|
|
@@ -101,7 +101,7 @@ const StyledColumnWizardGradientSection = (props) => {
|
|
|
101
101
|
patchGradient({ MinAlpha: v });
|
|
102
102
|
}
|
|
103
103
|
} })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-sm", children: "Max" }), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: disabled, className: "twa:w-20", value: maxAlphaDisplay, min: 0, max: 1, step: 0.05, onChange: (v) => {
|
|
104
|
-
if (v ===
|
|
104
|
+
if (v === GradientStyleHelper_1.DEFAULT_GRADIENT_MAX_ALPHA) {
|
|
105
105
|
const { MaxAlpha: _m, ...rest } = gs;
|
|
106
106
|
props.onChange({ ...data, GradientStyle: rest });
|
|
107
107
|
}
|