@adaptabletools/adaptable 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 +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/StyledColumnState.d.ts +8 -850
- package/src/AdaptableState/StyledColumnState.js +1 -9
- package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +9 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.d.ts +84 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +5 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +6 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +9 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
- package/src/AdaptableState/StyledColumns/IconStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.js +1 -0
- package/src/Api/ColumnScopeApi.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +1 -1
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +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.d.ts +3 -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/StyledColumns/BarStylesHelper.js +317 -0
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -2
- 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 -1
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +7 -12
- 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 +160 -127
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -3
- 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 +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/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 +2 -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 +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/AdaptablePopupModuleView.js +1 -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 +4 -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/Export/ExportSchedulesTab.js +3 -4
- package/src/View/Filter/FilterViewPanel.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/Layout/Wizard/sections/RowSummarySection.js +129 -103
- 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/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 +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +39 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +92 -52
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +33 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.d.ts +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +57 -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 +2 -4
- 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 +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +16 -7
- 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 +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +20 -60
- 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 -14
- package/src/agGrid/AgGridExportAdapter.js +1 -1
- package/src/agGrid/AgGridMenuAdapter.js +127 -2
- package/src/agGrid/cellRenderers/BadgeRenderer.js +8 -6
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +45 -44
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
- package/src/agGrid/cellRenderers/IconRenderer.js +15 -14
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +26 -98
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +52 -50
- 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 +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.esm.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 -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/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/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,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { CheckBox } from '../../../../components/CheckBox';
|
|
4
4
|
import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
5
|
-
import Panel from '../../../../components/Panel';
|
|
6
5
|
import SimpleButton from '../../../../components/SimpleButton';
|
|
7
6
|
import { ButtonNew } from '../../../Components/Buttons/ButtonNew';
|
|
8
7
|
import { Card } from '../../../../components/Card';
|
|
@@ -20,6 +19,9 @@ import { ColumnGroupTag } from '../../../Components/ColumnGroupTag';
|
|
|
20
19
|
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
21
20
|
import { Box, Flex } from '../../../../components/Flex';
|
|
22
21
|
import { SingleSelect } from '../../../../components/NewSelect';
|
|
22
|
+
import { CollapsibleWizardCard, getWizardAccordionSectionClassName, useWizardCardAccordion, } from '../../../Wizard/CollapsibleWizardCard';
|
|
23
|
+
import { cn } from '../../../../lib/utils';
|
|
24
|
+
import { objectListActionButtonClassName } from '../../../Components/AdaptableObjectList/objectListActionButtonStyles';
|
|
23
25
|
export const areSummaryRowsValid = (layout) => {
|
|
24
26
|
if (!layout.RowSummaries)
|
|
25
27
|
return true;
|
|
@@ -34,6 +36,7 @@ export const areSummaryRowsValid = (layout) => {
|
|
|
34
36
|
});
|
|
35
37
|
return valid;
|
|
36
38
|
};
|
|
39
|
+
const rowSummaryCardId = (index) => `row-summary-${index}`;
|
|
37
40
|
const availableExpressionsForColumnTypeCache = new Map();
|
|
38
41
|
const getAvailableExpressionsForColumnType = (columnType, availableScalarExpressions) => {
|
|
39
42
|
const key = columnType;
|
|
@@ -99,18 +102,27 @@ const getDefaultRowSummaryExpression = (column, availableScalarExpressions, layo
|
|
|
99
102
|
}
|
|
100
103
|
return optionValues[0] ?? null;
|
|
101
104
|
};
|
|
105
|
+
const RowSummaryPositionTag = ({ position }) => _jsx(Tag, { className: "twa:shrink-0", children: position });
|
|
106
|
+
const RowSummaryCardSummary = ({ rowSummary }) => {
|
|
107
|
+
const adaptable = useAdaptable();
|
|
108
|
+
const columnIds = Object.keys(rowSummary.ColumnsMap ?? {}).filter((colId) => colId !== 'Source' && colId !== 'Uuid');
|
|
109
|
+
if (!columnIds.length) {
|
|
110
|
+
return _jsx(Tag, { children: "No columns" });
|
|
111
|
+
}
|
|
112
|
+
return (_jsx(Flex, { flexWrap: "wrap", className: "twa:gap-1", children: columnIds.map((colId) => (_jsxs(ColumnTag, { children: [rowSummary.ColumnsMap[colId], "(", adaptable.api.columnApi.getFriendlyNameForColumnId(colId), ")"] }, colId))) }));
|
|
113
|
+
};
|
|
102
114
|
export const RowSummarySectionSummary = () => {
|
|
103
115
|
const adaptable = useAdaptable();
|
|
104
116
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
105
117
|
return (_jsx(Box, { className: "twa:flex twa:flex-col", children: layout.RowSummaries?.length ? (layout.RowSummaries.map((rowSummary, index) => {
|
|
106
|
-
return (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
118
|
+
return (_jsxs(Box, { className: "twa:mr-1 twa:mb-1", children: [rowSummary.Position, ":", ' ', Object.keys(rowSummary.ColumnsMap).map((colId) => {
|
|
119
|
+
if (colId === 'Source' || colId === 'Uuid')
|
|
120
|
+
return null;
|
|
121
|
+
return (_jsxs(ColumnTag, { className: "twa:mr-1", children: [rowSummary.ColumnsMap[colId], "(", adaptable.api.columnApi.getFriendlyNameForColumnId(colId), ")"] }, colId));
|
|
122
|
+
})] }, index));
|
|
111
123
|
})) : (_jsx(Tag, { children: "No Row Summaries" })) }));
|
|
112
124
|
};
|
|
113
|
-
const
|
|
125
|
+
const RowSummaryEditorForm = React.memo(({ rowSummary, onChange, availableScalarExpressions, }) => {
|
|
114
126
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
115
127
|
const adaptable = useAdaptable();
|
|
116
128
|
const columns = React.useMemo(() => {
|
|
@@ -126,109 +138,123 @@ const RowSummaryEditor = React.memo(({ rowSummary, onChange, availableScalarExpr
|
|
|
126
138
|
sortUnorderedItems: false,
|
|
127
139
|
}).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
128
140
|
}, [rowSummary.ColumnsMap]);
|
|
129
|
-
return (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
const column = adaptable.api.columnApi.getColumnWithColumnId(colId);
|
|
186
|
-
newColumnsMap[colId] = column
|
|
187
|
-
? getDefaultRowSummaryExpression(column, availableScalarExpressions, layout)
|
|
188
|
-
: null;
|
|
189
|
-
});
|
|
190
|
-
onChange({
|
|
191
|
-
...rowSummary,
|
|
192
|
-
ColumnsMap: newColumnsMap,
|
|
193
|
-
});
|
|
194
|
-
} }) })] })] })] }) }));
|
|
141
|
+
return (_jsxs(Box, { className: "twa:flex twa:flex-col twa:gap-3 twa:h-full twa:min-h-0 twa:overflow-hidden", children: [_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Position", children: _jsx(SingleSelect, { items: [
|
|
142
|
+
{
|
|
143
|
+
label: 'Top',
|
|
144
|
+
value: 'Top',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: 'Bottom',
|
|
148
|
+
value: 'Bottom',
|
|
149
|
+
},
|
|
150
|
+
], value: rowSummary.Position, onValueChange: (position) => {
|
|
151
|
+
onChange({
|
|
152
|
+
...rowSummary,
|
|
153
|
+
Position: position,
|
|
154
|
+
});
|
|
155
|
+
} }) }), _jsx(FormRow, { label: "", children: _jsx(CheckBox, { checked: rowSummary.IncludeOnlyFilteredRows ?? true, onChange: (IncludeOnlyFilteredRows) => {
|
|
156
|
+
onChange({
|
|
157
|
+
...rowSummary,
|
|
158
|
+
IncludeOnlyFilteredRows,
|
|
159
|
+
});
|
|
160
|
+
}, children: "Include Only Filtered Rows" }) })] }), _jsxs(Card, { shadow: false, className: "twa:flex-1 twa:min-h-0 twa:overflow-hidden twa:flex twa:flex-col", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Column Aggregations" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Select columns and choose an aggregation function for each" })] }), _jsx(Card.Body, { className: "twa:flex-1 twa:min-h-0 twa:overflow-hidden twa:p-1", children: _jsx(ValueSelector, { style: { minHeight: 0, maxHeight: '100%' }, showFilterInput: true, toggleSelectionOnRowClick: false, filter: columnFilter, toIdentifier: (column) => column.columnId, toLabel: (option) => option.friendlyName ?? option.columnId, options: columns, optionLayout: "label-beside-checkbox", toListLabel: (column) => {
|
|
161
|
+
const label = column.friendlyName ?? column.columnId;
|
|
162
|
+
const disabled = !(column.columnId in (rowSummary.ColumnsMap ?? {}));
|
|
163
|
+
if (disabled) {
|
|
164
|
+
return (_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [label, _jsx(ColumnGroupTag, { column: column }), _jsx(SingleSelect, { disabled: true, items: [{ label: 'Select Aggregation', value: null }] })] }));
|
|
165
|
+
}
|
|
166
|
+
const expressionOptions = buildRowSummaryExpressionOptions(column, availableScalarExpressions, layout);
|
|
167
|
+
const expression = rowSummary.ColumnsMap[column.columnId];
|
|
168
|
+
return (_jsxs(Flex, { children: [_jsxs(Flex, { className: "twa:mr-2", alignItems: 'center', children: [label, _jsx(ColumnGroupTag, { column: column })] }), _jsx(SingleSelect, { value: expression, items: expressionOptions, onValueChange: (expression) => {
|
|
169
|
+
onChange({
|
|
170
|
+
...rowSummary,
|
|
171
|
+
ColumnsMap: {
|
|
172
|
+
...rowSummary.ColumnsMap,
|
|
173
|
+
[column.columnId]: expression,
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
} })] }));
|
|
177
|
+
}, value: Object.keys(rowSummary.ColumnsMap), onChange: (colIds) => {
|
|
178
|
+
const newColumnsMap = {};
|
|
179
|
+
colIds.forEach((colId) => {
|
|
180
|
+
const existing = rowSummary.ColumnsMap[colId];
|
|
181
|
+
if (existing) {
|
|
182
|
+
newColumnsMap[colId] = existing;
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const column = adaptable.api.columnApi.getColumnWithColumnId(colId);
|
|
186
|
+
newColumnsMap[colId] = column
|
|
187
|
+
? getDefaultRowSummaryExpression(column, availableScalarExpressions, layout)
|
|
188
|
+
: null;
|
|
189
|
+
});
|
|
190
|
+
onChange({
|
|
191
|
+
...rowSummary,
|
|
192
|
+
ColumnsMap: newColumnsMap,
|
|
193
|
+
});
|
|
194
|
+
} }) })] })] }));
|
|
195
195
|
});
|
|
196
196
|
export const RowSummarySection = (props) => {
|
|
197
197
|
const adaptable = useAdaptable();
|
|
198
198
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
199
|
+
const rowSummaries = layout.RowSummaries ?? [];
|
|
199
200
|
const availableScalarExpressions = React.useMemo(() => {
|
|
200
201
|
const sytemExpressions = adaptable.api.internalApi
|
|
201
202
|
.getQueryLanguageService()
|
|
202
203
|
.getModuleExpressionFunctionsMap(LayoutModuleId).aggregatedScalarFunctions;
|
|
203
204
|
return sytemExpressions;
|
|
204
205
|
}, []);
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
206
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = useWizardCardAccordion(null);
|
|
207
|
+
const handleAddRowSummary = () => {
|
|
208
|
+
const newIndex = rowSummaries.length;
|
|
209
|
+
props.onChange({
|
|
210
|
+
...layout,
|
|
211
|
+
RowSummaries: [
|
|
212
|
+
...rowSummaries,
|
|
213
|
+
{
|
|
214
|
+
Position: 'Top',
|
|
215
|
+
ColumnsMap: {},
|
|
216
|
+
IncludeOnlyFilteredRows: true,
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
});
|
|
220
|
+
setExpandedId(rowSummaryCardId(newIndex));
|
|
221
|
+
};
|
|
222
|
+
const handleDeleteRowSummary = (index) => {
|
|
223
|
+
const cardId = rowSummaryCardId(index);
|
|
224
|
+
const newSummaries = [...rowSummaries];
|
|
225
|
+
newSummaries.splice(index, 1);
|
|
226
|
+
props.onChange({
|
|
227
|
+
...layout,
|
|
228
|
+
RowSummaries: newSummaries,
|
|
229
|
+
});
|
|
230
|
+
if (expandedId === cardId) {
|
|
231
|
+
setExpandedId(null);
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if (expandedId?.startsWith('row-summary-')) {
|
|
235
|
+
const expandedIndex = Number(expandedId.replace('row-summary-', ''));
|
|
236
|
+
if (!Number.isNaN(expandedIndex) && expandedIndex > index) {
|
|
237
|
+
setExpandedId(rowSummaryCardId(expandedIndex - 1));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
return (_jsxs(Box, { className: cn(getWizardAccordionSectionClassName(hasExpandedCard, expandedFillsSpace), 'twa:p-3'), children: [_jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:mb-2 twa:max-w-[520px] twa:shrink-0", children: "Add summary rows at the top or bottom of the grid with aggregated column values" }), _jsx(Flex, { className: "twa:justify-end twa:mb-2 twa:shrink-0", children: _jsx(ButtonNew, { onClick: handleAddRowSummary, children: "Add Row Summary" }) }), _jsx(Flex, { flexDirection: "column", className: "twa:gap-3 twa:min-h-0", children: rowSummaries.map((rowSummary, index) => {
|
|
242
|
+
const cardBinding = bindCard(rowSummaryCardId(index), { fillAvailable: true });
|
|
243
|
+
return (_jsx(CollapsibleWizardCard, { ...cardBinding, surface: "panel", "data-name": `row-summary-${index}`, title: `Row Summary ${index + 1}`, help: "Configure position, filters, and column aggregations for this summary row", collapsedHelp: false, compactSummary: _jsx(RowSummaryPositionTag, { position: rowSummary.Position }), headerVisual: !cardBinding.expanded ? (_jsx(RowSummaryPositionTag, { position: rowSummary.Position })) : undefined, headerActions: _jsxs(_Fragment, { children: [cardBinding.expanded ? (_jsx(SuspendToggleButton, { iconSize: 26, className: objectListActionButtonClassName('suspend'), onSuspend: () => {
|
|
244
|
+
const newSummaries = [...rowSummaries];
|
|
245
|
+
newSummaries[index] = { ...rowSummary, IsSuspended: true };
|
|
246
|
+
props.onChange({ ...layout, RowSummaries: newSummaries });
|
|
247
|
+
}, onUnSuspend: () => {
|
|
248
|
+
const newSummaries = [...rowSummaries];
|
|
249
|
+
newSummaries[index] = { ...rowSummary, IsSuspended: false };
|
|
250
|
+
props.onChange({ ...layout, RowSummaries: newSummaries });
|
|
251
|
+
}, suspendableObject: rowSummary })) : null, _jsx(SimpleButton, { icon: "delete", variant: "text", tooltip: "Delete row summary", className: objectListActionButtonClassName('delete'), onClick: () => handleDeleteRowSummary(index) })] }), summary: _jsx(RowSummaryCardSummary, { rowSummary: rowSummary }), className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:max-h-[420px] twa:overflow-hidden twa:flex twa:flex-col twa:!pt-0", children: _jsx(RowSummaryEditorForm, { rowSummary: rowSummary, availableScalarExpressions: availableScalarExpressions, onChange: (nextRowSummary) => {
|
|
252
|
+
const newSummaries = [...rowSummaries];
|
|
253
|
+
newSummaries[index] = nextRowSummary;
|
|
254
|
+
props.onChange({
|
|
255
|
+
...layout,
|
|
256
|
+
RowSummaries: newSummaries,
|
|
257
|
+
});
|
|
258
|
+
} }) }, rowSummaryCardId(index)));
|
|
259
|
+
}) })] }));
|
|
234
260
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import throttle from '../../Utilities/
|
|
2
|
+
import { throttle } from '../../Utilities/Helpers/TimingHelper';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import Textarea from '../../components/Textarea';
|
|
5
5
|
import SimpleButton from '../../components/SimpleButton';
|
|
@@ -7,7 +7,7 @@ import { useAdaptable } from '../AdaptableContext';
|
|
|
7
7
|
import { AdaptableButtonComponent } from '../Components/AdaptableButton';
|
|
8
8
|
import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
|
|
9
9
|
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
10
|
-
import FormatHelper from '../../Utilities/Helpers/
|
|
10
|
+
import FormatHelper from '../../Utilities/Helpers/DisplayFormatHelper';
|
|
11
11
|
import { ACCESS_LEVEL_READ_ONLY } from '../../Utilities/Constants/GeneralConstants';
|
|
12
12
|
const tableDOMProps = {
|
|
13
13
|
style: {
|
|
@@ -5,7 +5,7 @@ import { SummaryText, useOnePageAdaptableWizardContext, } from '../../Wizard/One
|
|
|
5
5
|
import { Tag } from '../../../components/Tag';
|
|
6
6
|
import { Box, Flex } from '../../../components/Flex';
|
|
7
7
|
import { Card } from '../../../components/Card';
|
|
8
|
-
import { plusMinusDecrementKeyFromOptionsOnly, plusMinusIncrementKeyFromOptionsOnly, plusMinusResolvedKeysConflict, plusMinusTriggerSameAsBaseline, resolvePlusMinusTriggerKeysForNudge, } from '../../../Utilities/Helpers/
|
|
8
|
+
import { plusMinusDecrementKeyFromOptionsOnly, plusMinusIncrementKeyFromOptionsOnly, plusMinusResolvedKeysConflict, plusMinusTriggerSameAsBaseline, resolvePlusMinusTriggerKeysForNudge, } from '../../../Utilities/Helpers/PlusMinusHelper';
|
|
9
9
|
export const PlusMinusSettingsSummary = () => {
|
|
10
10
|
const { data, api } = useOnePageAdaptableWizardContext();
|
|
11
11
|
const { incrementKey, decrementKey } = resolvePlusMinusTriggerKeysForNudge(data, api.optionsApi.getEditOptions().plusMinusOptions ?? {});
|
|
@@ -11,7 +11,7 @@ import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
|
11
11
|
import { useQuickSearchDebounced } from './useQuickSearchDebounced';
|
|
12
12
|
import { QuickSearchInput } from './QuickSearchInput';
|
|
13
13
|
import { Card } from '../../components/Card';
|
|
14
|
-
import { isQuickSearchStyleUnset, resolveQuickSearchCurrentTextMatchStyle, resolveQuickSearchTextMatchStyle, } from '../../Utilities/Helpers/
|
|
14
|
+
import { isQuickSearchStyleUnset, resolveQuickSearchCurrentTextMatchStyle, resolveQuickSearchTextMatchStyle, } from '../../Utilities/Helpers/QuickSearchHelper';
|
|
15
15
|
const QuickSearchStyleEditor = ({ api, helpText, headerText, style, updateStyle }) => (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: headerText }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: helpText })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyleComponent, { headless: true, hidePreview: true, className: "twa:h-full twa:flex-1 twa:rounded-none", api: api, Style: style, UpdateStyle: updateStyle }) })] }));
|
|
16
16
|
const QuickSearchPopupComponent = (props) => {
|
|
17
17
|
const [searchText, search] = useQuickSearchDebounced(props);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState, useMemo } from 'react';
|
|
2
|
-
import debounce from '../../Utilities/
|
|
2
|
+
import { debounce } from '../../Utilities/Helpers/TimingHelper';
|
|
3
3
|
import { QUICK_SEARCH_DEBOUNCE_TIME } from '../../Utilities/Constants/GeneralConstants';
|
|
4
4
|
export const useQuickSearchDebounced = (props) => {
|
|
5
5
|
const [searchText, setSearchText] = useState(props.QuickSearchText ?? '');
|
|
@@ -9,7 +9,7 @@ import { Box } from '../../../components/Flex';
|
|
|
9
9
|
import { Card } from '../../../components/Card';
|
|
10
10
|
import { SingleSelect } from '../../../components/NewSelect';
|
|
11
11
|
import ObjectFactory from '../../../Utilities/ObjectFactory';
|
|
12
|
-
import { buildCronExpression, buildRunAtIso, inferPresetFromCron, isScheduleValid as validateSchedule, parseOneOffDateFromRunAt, parseTimeFromSchedule, } from '../../../Utilities/Helpers/ScheduleHelper';
|
|
12
|
+
import { buildCronExpression, buildRunAtIso, inferPresetFromCron, isScheduleValid as validateSchedule, parseOneOffDateFromRunAt, parseTimeFromSchedule, } from '../../../Utilities/Helpers/Scheduling/ScheduleHelper';
|
|
13
13
|
export const isScheduleValid = (holder) => {
|
|
14
14
|
if (!holder?.Schedule) {
|
|
15
15
|
return 'Schedule is not specified';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import chunk from '../Utilities/
|
|
2
|
+
import { chunk } from '../Utilities/Extensions/ArrayExtensions';
|
|
3
3
|
import { CheckBox } from '../components/CheckBox';
|
|
4
4
|
import FormLayout, { FormRow } from '../components/FormLayout';
|
|
5
5
|
import { useAdaptable } from './AdaptableContext';
|
|
@@ -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). */
|
|
@@ -57,32 +57,47 @@ const getBadgeDefinitionSummaryItems = (badge, api) => {
|
|
|
57
57
|
items.push({ label: 'Rule', value: rule });
|
|
58
58
|
items.push({ label: 'Shape', value: badge.Shape ?? 'Rounded' });
|
|
59
59
|
items.push(...getBadgePillStyleSummaryItems(badge.PillStyle));
|
|
60
|
-
|
|
60
|
+
const iconProps = badge.IconProperties;
|
|
61
|
+
if (iconProps?.Icon) {
|
|
61
62
|
items.push({
|
|
62
63
|
label: 'Icon',
|
|
63
|
-
value: 'name' in
|
|
64
|
-
icon:
|
|
64
|
+
value: 'name' in iconProps.Icon ? iconProps.Icon.name : 'Custom',
|
|
65
|
+
icon: iconProps.Icon,
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
|
-
if (
|
|
68
|
+
if (iconProps?.IconOnly) {
|
|
68
69
|
items.push({ label: 'Icon Only', value: 'Yes' });
|
|
69
70
|
}
|
|
70
|
-
if (
|
|
71
|
-
items.push({ label: 'Icon Position', value:
|
|
71
|
+
if (iconProps?.Icon && iconProps.Position) {
|
|
72
|
+
items.push({ label: 'Icon Position', value: iconProps.Position });
|
|
72
73
|
}
|
|
73
|
-
if (typeof
|
|
74
|
-
items.push({ label: 'Icon Gap', value: `${
|
|
74
|
+
if (typeof iconProps?.Gap === 'number') {
|
|
75
|
+
items.push({ label: 'Icon Gap', value: `${iconProps.Gap}px` });
|
|
75
76
|
}
|
|
76
77
|
return items;
|
|
77
78
|
};
|
|
78
|
-
const BadgePreview = ({ badge, density, previewValue }) => (_jsx(Badge, { pillStyle: badge.PillStyle, icon: badge.Icon, iconPosition: badge.
|
|
79
|
+
const BadgePreview = ({ badge, density, previewValue }) => (_jsx(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 }));
|
|
79
80
|
const BadgeCardSummary = ({ badge, api }) => (_jsx(CollapsibleWizardValueSummary, { value: renderSummaryLabelValueTags(getBadgeDefinitionSummaryItems(badge, api)) }));
|
|
80
81
|
const BadgeEditorForm = (props) => {
|
|
81
82
|
const { api } = useOnePageAdaptableWizardContext();
|
|
82
83
|
const { badge, columnId, onChange } = props;
|
|
83
84
|
const predicateDefs = api.styledColumnApi.internalApi.getBadgePredicateDefsForColumn(columnId);
|
|
84
85
|
const currentShape = badge.Shape ?? 'Rounded';
|
|
85
|
-
const
|
|
86
|
+
const iconProps = badge.IconProperties;
|
|
87
|
+
const hasIcon = Boolean(iconProps?.Icon);
|
|
88
|
+
const updateIconProperties = (patch) => {
|
|
89
|
+
const next = {
|
|
90
|
+
...(iconProps ?? { Icon: undefined }),
|
|
91
|
+
...patch,
|
|
92
|
+
};
|
|
93
|
+
if (!next.Icon) {
|
|
94
|
+
const cleaned = { ...badge };
|
|
95
|
+
delete cleaned.IconProperties;
|
|
96
|
+
onChange(cleaned);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
onChange({ ...badge, IconProperties: next });
|
|
100
|
+
};
|
|
86
101
|
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-2", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Shape" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define shape of the corners for this badge" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(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) => (_jsx(Radio, { value: choice.value, children: choice.label }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Colours and font styling for the badge pill" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(BadgePillStyleEditor, { embedded: true, api: api, value: badge.PillStyle, onChange: (next) => {
|
|
87
102
|
if (next) {
|
|
88
103
|
onChange({ ...badge, PillStyle: next });
|
|
@@ -100,31 +115,23 @@ const BadgeEditorForm = (props) => {
|
|
|
100
115
|
}, onClear: () => onChange({
|
|
101
116
|
...badge,
|
|
102
117
|
Predicate: undefined,
|
|
103
|
-
}) })) : (_jsx(ErrorBox, { children: "Select a column first" })) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Icon" }), _jsx(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" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Icon", children: !
|
|
118
|
+
}) })) : (_jsx(ErrorBox, { children: "Select a column first" })) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Icon" }), _jsx(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" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Icon", children: !iconProps?.Icon || 'name' in iconProps.Icon ? (_jsx(AdaptableIconSelector, { value: iconProps?.Icon && 'name' in iconProps.Icon ? iconProps.Icon.name : undefined, onChange: (iconName) => {
|
|
104
119
|
if (iconName) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
Icon: {
|
|
108
|
-
name: iconName,
|
|
109
|
-
},
|
|
120
|
+
updateIconProperties({
|
|
121
|
+
Icon: { name: iconName },
|
|
110
122
|
});
|
|
111
123
|
}
|
|
112
124
|
else {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
IconOnly: undefined,
|
|
117
|
-
IconPosition: undefined,
|
|
118
|
-
IconGap: undefined,
|
|
119
|
-
});
|
|
125
|
+
const cleaned = { ...badge };
|
|
126
|
+
delete cleaned.IconProperties;
|
|
127
|
+
onChange(cleaned);
|
|
120
128
|
}
|
|
121
|
-
} })) : (_jsx(AdaptableIconComponent, { icon:
|
|
129
|
+
} })) : (_jsx(AdaptableIconComponent, { icon: iconProps.Icon })) }), _jsx(FormRow, { label: "Icon Position", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { disabled: !hasIcon, className: "twa:w-full", value: iconProps?.Position ?? 'Start', onValueChange: (v) => updateIconProperties({ Position: v }), items: [
|
|
122
130
|
{ value: 'Start', label: 'Start' },
|
|
123
131
|
{ value: 'End', label: 'End' },
|
|
124
|
-
] }) }) }), _jsx(FormRow, { label: "Show Icon Only", children: _jsx(CheckBox, { disabled: !hasIcon, checked:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
IconGap: typeof value === 'number' && value >= 0 ? value : undefined,
|
|
132
|
+
] }) }) }), _jsx(FormRow, { label: "Show Icon Only", children: _jsx(CheckBox, { disabled: !hasIcon, checked: iconProps?.IconOnly, onClick: () => updateIconProperties({ IconOnly: !iconProps?.IconOnly }) }) }), _jsx(FormRow, { label: "Icon Gap", children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(NumberInput, { disabled: !hasIcon || iconProps?.IconOnly, value: iconProps?.Gap ?? '', placeholder: "auto", step: 1, min: 0, style: { width: 70 }, onChange: (value) => {
|
|
133
|
+
updateIconProperties({
|
|
134
|
+
Gap: typeof value === 'number' && value >= 0 ? value : undefined,
|
|
128
135
|
});
|
|
129
136
|
} }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px between icon and text \u2014 leave blank to follow Density" })] }) })] }) })] })] }));
|
|
130
137
|
};
|
|
@@ -188,8 +195,7 @@ export const StyledColumnBadgeSection = (props) => {
|
|
|
188
195
|
? api.columnApi.getColumnDataTypeForColumnId(data.ColumnId)
|
|
189
196
|
: 'text';
|
|
190
197
|
const previewValue = getBadgePreviewValue(dataType);
|
|
191
|
-
const
|
|
192
|
-
const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = useWizardCardAccordion(initialExpandedCardId);
|
|
198
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = useWizardCardAccordion(null);
|
|
193
199
|
const handleAddBadge = () => {
|
|
194
200
|
const newIndex = badges.length;
|
|
195
201
|
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
|
}
|