@adaptabletools/adaptable 23.0.4 → 23.0.5-canary.1
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/agGrid.js +0 -31
- package/index.css +0 -64
- package/index.js +0 -31
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +1 -9
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -39
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +44 -16
- package/src/AdaptableState/Aggregations/only.js +0 -11
- package/src/AdaptableState/Aggregations/weightedAverage.d.ts +0 -1
- package/src/AdaptableState/Aggregations/weightedAverage.js +1 -27
- package/src/AdaptableState/Common/AdaptableColumn.js +0 -1
- package/src/AdaptableState/Common/AdaptableForm.js +0 -49
- package/src/AdaptableState/Common/AdaptableFormatPresets.js +0 -13
- package/src/AdaptableState/Common/AdaptablePredicate.js +3 -125
- package/src/AdaptableState/Common/AggregationColumns.js +0 -10
- package/src/AdaptableState/Common/Enums.js +0 -3
- package/src/AdaptableState/Common/Menu.js +1 -7
- package/src/AdaptableState/Common/MenuItem.js +0 -2
- package/src/AdaptableState/Common/Types.js +2 -5
- package/src/AdaptableState/StatusBarState.js +0 -3
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +0 -1
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +0 -4
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +0 -5
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +0 -8
- package/src/AdaptableState/Uuid.js +0 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +0 -4
- package/src/Api/Implementation/AlertApiImpl.js +0 -21
- package/src/Api/Implementation/ApiBase.js +0 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -1
- package/src/Api/Implementation/ChartingApiImpl.js +0 -3
- package/src/Api/Implementation/ColumnApiImpl.js +1 -15
- package/src/Api/Implementation/ColumnFilterApiImpl.js +0 -9
- package/src/Api/Implementation/ColumnScopeApiImpl.js +0 -21
- package/src/Api/Implementation/DashboardApiImpl.js +0 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +0 -1
- package/src/Api/Implementation/ExportApiImpl.js +0 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +0 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +0 -3
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -2
- package/src/Api/Implementation/GridApiImpl.js +1 -22
- package/src/Api/Implementation/GridFilterApiImpl.js +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -18
- package/src/Api/Implementation/LayoutHelpers.js +0 -16
- package/src/Api/Implementation/NamedQueryApiImpl.js +0 -1
- package/src/Api/Implementation/PredicateApiImpl.js +0 -5
- package/src/Api/Implementation/RowFormApiImpl.js +0 -2
- package/src/Api/Implementation/StateApiImpl.js +0 -7
- package/src/Api/Implementation/SystemStatusApiImpl.js +0 -2
- package/src/Api/Implementation/TeamSharingApiImpl.js +0 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +0 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +1 -39
- package/src/Api/Internal/AlertInternalApi.js +1 -102
- package/src/Api/Internal/CalculatedColumnInternalApi.js +0 -17
- package/src/Api/Internal/ChartingInternalApi.js +0 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +0 -52
- package/src/Api/Internal/ColumnInternalApi.js +0 -32
- package/src/Api/Internal/CustomSortInternalApi.js +0 -5
- package/src/Api/Internal/DashboardInternalApi.js +0 -23
- package/src/Api/Internal/DataImportInternalApi.js +0 -1
- package/src/Api/Internal/EventInternalApi.js +0 -2
- package/src/Api/Internal/ExportInternalApi.js +1 -16
- package/src/Api/Internal/ExpressionInternalApi.js +0 -23
- package/src/Api/Internal/Fdc3InternalApi.js +0 -9
- package/src/Api/Internal/FlashingCellInternalApi.js +0 -5
- package/src/Api/Internal/FormatColumnInternalApi.js +5 -107
- package/src/Api/Internal/FreeTextColumnInternalApi.js +0 -8
- package/src/Api/Internal/GridFilterInternalApi.js +0 -3
- package/src/Api/Internal/GridInternalApi.js +0 -37
- package/src/Api/Internal/LayoutInternalApi.js +0 -18
- package/src/Api/Internal/NamedQueryInternalApi.js +0 -9
- package/src/Api/Internal/PredicateInternalApi.js +0 -23
- package/src/Api/Internal/RowFormInternalApi.js +0 -18
- package/src/Api/Internal/StateInternalApi.js +0 -25
- package/src/Api/Internal/StyledColumnInternalApi.js +0 -62
- package/src/Api/Internal/TeamSharingInternalApi.js +0 -9
- package/src/Redux/ActionsReducers/AlertRedux.js +0 -24
- package/src/Redux/ActionsReducers/ApplicationRedux.js +0 -9
- package/src/Redux/ActionsReducers/BulkUpdateRedux.js +0 -6
- package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +1 -16
- package/src/Redux/ActionsReducers/ChartingRedux.js +0 -24
- package/src/Redux/ActionsReducers/CommentsRedux.js +0 -24
- package/src/Redux/ActionsReducers/CustomSortRedux.js +0 -24
- package/src/Redux/ActionsReducers/DashboardRedux.js +0 -33
- package/src/Redux/ActionsReducers/ExportRedux.js +0 -36
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +0 -24
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +0 -36
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +1 -20
- package/src/Redux/ActionsReducers/InternalRedux.js +0 -42
- package/src/Redux/ActionsReducers/LayoutRedux.js +1 -67
- package/src/Redux/ActionsReducers/NamedQueryRedux.js +0 -15
- package/src/Redux/ActionsReducers/NoteRedux.js +0 -14
- package/src/Redux/ActionsReducers/PluginsRedux.js +0 -3
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +0 -34
- package/src/Redux/ActionsReducers/PopupRedux.js +2 -6
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +0 -15
- package/src/Redux/ActionsReducers/ShortcutRedux.js +0 -24
- package/src/Redux/ActionsReducers/SmartEditRedux.js +0 -6
- package/src/Redux/ActionsReducers/StatusBarRedux.js +0 -6
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +0 -27
- package/src/Redux/ActionsReducers/SystemStatusRedux.js +0 -6
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +0 -1
- package/src/Redux/ActionsReducers/ThemeRedux.js +0 -26
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +0 -22
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +0 -3
- package/src/Redux/ActionsReducers/utils.js +0 -6
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +0 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +0 -25
- package/src/Redux/Store/AdaptableStore.js +5 -301
- package/src/Strategy/AdaptableModuleBase.js +0 -35
- package/src/Strategy/AlertModule.js +0 -9
- package/src/Strategy/CellSummaryModule.js +0 -12
- package/src/Strategy/ChartingModule.js +0 -1
- package/src/Strategy/ColumnFilterModule.js +1 -11
- package/src/Strategy/CommentModule.js +0 -2
- package/src/Strategy/DashboardModule.js +0 -4
- package/src/Strategy/ExportModule.js +0 -1
- package/src/Strategy/FlashingCellModule.js +0 -8
- package/src/Strategy/FormatColumnModule.js +0 -3
- package/src/Strategy/FreeTextColumnModule.js +0 -3
- package/src/Strategy/LayoutModule.js +0 -26
- package/src/Strategy/NoteModule.js +0 -3
- package/src/Strategy/PlusMinusModule.js +0 -3
- package/src/Strategy/SettingsPanelModule.js +0 -1
- package/src/Strategy/ShortcutModule.js +0 -1
- package/src/Strategy/SmartEditModule.js +0 -5
- package/src/Strategy/StatusBarModule.js +0 -7
- package/src/Strategy/StyledColumnModule.js +1 -16
- package/src/Strategy/TeamSharingModule.js +0 -9
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +0 -5
- package/src/Utilities/Constants/DocumentationLinkConstants.js +0 -1
- package/src/Utilities/Constants/GeneralConstants.js +0 -10
- package/src/Utilities/Constants/ObjectDefaultConstants.js +0 -3
- package/src/Utilities/Constants/ReduxConstants.js +4 -8
- package/src/Utilities/Emitter.js +0 -9
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +0 -8
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +0 -15
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +0 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +0 -16
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +0 -9
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +7 -78
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +0 -9
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +2 -16
- package/src/Utilities/Extensions/ArrayExtensions.js +1 -63
- package/src/Utilities/Extensions/NumberExtensions.js +0 -27
- package/src/Utilities/Extensions/ObjectExtensions.js +0 -36
- package/src/Utilities/Extensions/StringExtensions.js +0 -27
- package/src/Utilities/Helpers/ActionColumnHelper.js +0 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +0 -8
- package/src/Utilities/Helpers/DateHelper.js +0 -10
- package/src/Utilities/Helpers/DisplayFormatHelper.js +0 -8
- package/src/Utilities/Helpers/Helper.js +3 -9
- package/src/Utilities/Helpers/PlusMinusHelper.js +0 -20
- package/src/Utilities/Helpers/QuickSearchHelper.js +0 -5
- package/src/Utilities/Helpers/Scheduling/CronExpression.js +0 -43
- package/src/Utilities/Helpers/Scheduling/ScheduledReportHelper.js +0 -4
- package/src/Utilities/Helpers/SettingsPanelHelper.js +40 -4
- package/src/Utilities/Helpers/StyleHelper.js +0 -56
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +0 -46
- package/src/Utilities/Helpers/StyledColumns/GradientStyleHelper.js +0 -38
- package/src/Utilities/Helpers/StyledColumns/IconStyleHelper.js +0 -39
- package/src/Utilities/Helpers/StyledColumns/PercentBarStyleHelper.js +0 -1
- package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.js +0 -5
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +0 -37
- package/src/Utilities/Helpers/TimingHelper.js +0 -13
- package/src/Utilities/ObjectFactory.js +2 -4
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +0 -7
- package/src/Utilities/Services/AlertService.js +0 -1
- package/src/Utilities/Services/AnnotationsService.js +0 -22
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +0 -8
- package/src/Utilities/Services/ChartingService.js +0 -9
- package/src/Utilities/Services/DataService.js +0 -11
- package/src/Utilities/Services/Fdc3Service.js +0 -3
- package/src/Utilities/Services/FlashingCellService.js +0 -6
- package/src/Utilities/Services/ModuleService.js +0 -8
- package/src/Utilities/Services/QueryLanguageService.js +2 -25
- package/src/Utilities/Services/RowFormService.js +0 -1
- package/src/Utilities/Services/RowSummaryService.js +1 -20
- package/src/Utilities/Services/TeamSharingService.js +0 -15
- package/src/Utilities/Services/ThemeService.js +0 -7
- package/src/Utilities/Services/ValidationService.js +0 -21
- package/src/Utilities/createAgStatusPanelComponent.js +0 -3
- package/src/Utilities/getExpressionViewItems.js +0 -2
- package/src/Utilities/getObjectTagsViewItems.js +0 -1
- package/src/Utilities/getScrollbarSize.js +0 -1
- package/src/Utilities/logDeprecation.js +0 -3
- package/src/Utilities/resolveContainerElement.js +0 -21
- package/src/Utilities/runIfNotResolvedIn.js +0 -7
- package/src/Utilities/sortColumnStateForVisibleColumns.js +2 -12
- package/src/Utilities/waitForTimeout.js +0 -1
- package/src/Utilities/wizardSelection.js +0 -2
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/AdaptableView.js +1 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -23
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -2
- package/src/View/AdaptableWizardView/Wizard.js +0 -12
- package/src/View/AdaptableWizardView/helper.js +0 -11
- package/src/View/Alert/ActiveAlertsPanel.js +0 -2
- package/src/View/Alert/AlertStatusSubPanel.js +0 -8
- package/src/View/Alert/Utilities/getAlertType.js +0 -7
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +0 -5
- package/src/View/Alert/Utilities/mapAlertDefinition.js +0 -3
- package/src/View/Alert/Wizard/AlertWizard.js +0 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +0 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +0 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +0 -1
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +0 -3
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -7
- package/src/View/Charting/EditChartButton.js +1 -4
- package/src/View/Charting/ShowChartButton.js +0 -3
- package/src/View/Charting/useAgChartState.js +0 -5
- package/src/View/Charting/useChartingElements.js +0 -4
- package/src/View/Charting/useExternalChartState.js +0 -6
- package/src/View/ColumnInfo/ColumnInfo.js +7 -17
- package/src/View/Comments/CommentsEditor.js +1 -16
- package/src/View/Components/AdaptableButton/AdaptableButtonComponent.js +0 -1
- package/src/View/Components/AdaptableButton/AdaptableButtonView.js +0 -3
- package/src/View/Components/AdaptableDateInput/index.js +2 -9
- package/src/View/Components/AdaptableIconComponent/index.js +0 -4
- package/src/View/Components/AdaptableIconSelector/index.js +0 -3
- package/src/View/Components/AdaptableInput/index.js +0 -2
- package/src/View/Components/Badge/index.js +0 -8
- package/src/View/Components/Buttons/ButtonNewPage.js +1 -2
- package/src/View/Components/CellPopup/index.js +1 -2
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +0 -4
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +0 -4
- package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -46
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +0 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -20
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -16
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -4
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -6
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +0 -20
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +0 -5
- package/src/View/Components/ColumnFilter/utils.js +2 -9
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +0 -2
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +0 -1
- package/src/View/Components/EntityRulesEditor/index.js +1 -11
- package/src/View/Components/ExternalRenderer.js +1 -3
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -52
- package/src/View/Components/ModuleValueSelector/index.js +0 -2
- package/src/View/Components/Panels/PanelWithImage.js +1 -5
- package/src/View/Components/Panels/PanelWithRow.js +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +0 -6
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +0 -6
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -2
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +0 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +0 -3
- package/src/View/Components/Popups/AdaptableToaster.js +0 -2
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +0 -8
- package/src/View/Components/RangesComponent.js +0 -57
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +0 -3
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -6
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -18
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +0 -4
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
- package/src/View/Components/ValueSelector/index.js +0 -4
- package/src/View/Components/wizardColumnListStyles.js +0 -5
- package/src/View/Dashboard/CustomToolbar.js +1 -25
- package/src/View/Dashboard/PinnedToolbarsSelector.js +0 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -22
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +0 -1
- package/src/View/DataImport/systemFileHandlers.js +1 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +0 -27
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +0 -7
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -12
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +0 -10
- package/src/View/GridFilter/GridFilterPopup.js +0 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +0 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -31
- package/src/View/Layout/LayoutViewPanel.js +0 -2
- package/src/View/Layout/PivotDetailsPopoup.js +0 -2
- package/src/View/Layout/TransposedPopup.js +0 -7
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -6
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +0 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -32
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +0 -3
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +0 -2
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +0 -4
- package/src/View/Note/NotePopup.js +0 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +0 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +0 -4
- package/src/View/StatusBar/StatusBarPanel.js +0 -8
- package/src/View/StatusBar/StatusBarPopup.js +0 -2
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +0 -11
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +0 -28
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -25
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +0 -26
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +0 -40
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +0 -55
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +0 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +0 -21
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +0 -10
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +0 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -21
- package/src/View/SystemStatus/SystemStatusPopup.js +0 -1
- package/src/View/TeamSharing/SharedEntityObjectView.js +0 -1
- package/src/View/Theme/ThemeSelector.js +0 -1
- package/src/View/UIHelper.js +0 -6
- package/src/View/UIInterfaces.js +0 -1
- package/src/View/Wizard/CollapsibleWizardCard.js +1 -8
- package/src/View/Wizard/OnePageWizards.js +2 -9
- package/src/View/Wizard/SummaryColorTag.js +0 -1
- package/src/View/Wizard/useKeyboardNavigation.js +1 -3
- package/src/agGrid/Adaptable.js +0 -12
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +3 -482
- package/src/agGrid/AdaptableFilterHandler.js +0 -5
- package/src/agGrid/AdaptableLogger.js +0 -6
- package/src/agGrid/AgGridAdapter.js +3 -90
- package/src/agGrid/AgGridColumnAdapter.js +6 -168
- package/src/agGrid/AgGridExportAdapter.js +4 -106
- package/src/agGrid/AgGridFilterAdapter.js +0 -5
- package/src/agGrid/AgGridFloatingFilterAdapter.js +0 -10
- package/src/agGrid/AgGridMenuAdapter.js +0 -143
- package/src/agGrid/AgGridModulesAdapter.js +0 -2
- package/src/agGrid/AgGridOptionsService.js +0 -2
- package/src/agGrid/AgGridThemeAdapter.js +0 -7
- package/src/agGrid/agGridDataTypeDefinitions.js +0 -8
- package/src/agGrid/cellRenderers/BadgeRenderer.js +0 -10
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +1 -96
- package/src/agGrid/cellRenderers/IconRenderer.js +0 -55
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +0 -51
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +1 -50
- package/src/agGrid/cellRenderers/RatingRenderer.js +0 -40
- package/src/agGrid/editors/AdaptableDateEditor/index.js +0 -18
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +0 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +0 -11
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +0 -9
- package/src/agGrid/index.js +1 -9
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -73
- package/src/components/CodeBlock/index.d.ts +0 -1
- package/src/components/CodeBlock/index.js +1 -2
- package/src/components/ColorPicker/ColorPicker.js +0 -6
- package/src/components/Combobox/VirtualizedList.js +0 -5
- package/src/components/Combobox/index.js +5 -63
- package/src/components/Dashboard/Dashboard.js +1 -4
- package/src/components/Datepicker/index.js +2 -97
- package/src/components/DragAndDropContext/TabList.js +2 -6
- package/src/components/Drawer/index.js +0 -7
- package/src/components/Dropdown/index.js +0 -1
- package/src/components/DropdownButton/index.js +0 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -16
- package/src/components/ExpressionEditor/EditorButton.js +0 -1
- package/src/components/ExpressionEditor/EditorInput.js +1 -7
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +0 -1
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -14
- package/src/components/ExpressionEditor/NamedQueryContext.js +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -6
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +0 -12
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +0 -4
- package/src/components/ExpressionEditor/index.js +5 -14
- package/src/components/Icon/index.js +0 -2
- package/src/components/Input/NumberInput.js +0 -10
- package/src/components/Modal/Backdrop.js +0 -1
- package/src/components/OverlayTrigger/Overlay.js +0 -1
- package/src/components/OverlayTrigger/index.js +3 -15
- package/src/components/ProgressIndicator/ProgressIndicator.js +3 -16
- package/src/components/ResizeObserver/index.js +0 -7
- package/src/components/SimpleButton/index.js +2 -16
- package/src/components/Tabs/index.js +0 -3
- package/src/components/Tag/Tag.js +0 -1
- package/src/components/Tag/columnScopeTagHelpers.js +0 -2
- package/src/components/Textarea/index.js +1 -8
- package/src/components/Toggle/Toggle.js +1 -5
- package/src/components/Toggle/ToggleGroup.js +1 -3
- package/src/components/ToggleButton/index.js +1 -3
- package/src/components/Tree/TreeDropdown/index.js +2 -130
- package/src/components/Tree/treeUtils.js +0 -4
- package/src/components/WindowModal/WindowModal.js +1 -14
- package/src/components/WindowModal/useStacking.js +0 -7
- package/src/components/icons/bullet-chart.js +0 -4
- package/src/components/icons/icon-style.js +0 -4
- package/src/components/icons/index.js +26 -36
- package/src/components/icons/range-bar.js +0 -5
- package/src/components/icons/star.js +0 -1
- package/src/components/twUtils.js +3 -12
- package/src/components/ui/calendar.js +1 -9
- package/src/components/ui/combobox.js +0 -4
- package/src/components/utils/captureTabNavigation/getFocusableChildren.js +0 -1
- package/src/components/utils/useDraggable.js +0 -4
- package/src/components/utils/useProperty.js +0 -18
- package/src/devTools/index.js +0 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +0 -5
- package/src/layout-manager/src/destructurePivotColumnId.js +0 -19
- package/src/layout-manager/src/index.js +2 -182
- package/src/layout-manager/src/isLayoutEqual.js +0 -1
- package/src/layout-manager/src/isPivotColumnTotal.js +0 -2
- package/src/layout-manager/src/normalizeLayoutModel.js +0 -27
- package/src/layout-manager/src/simplifyLayoutModel.js +0 -11
- package/src/layout-manager/src/sortColumnIdsByOrder.js +2 -12
- package/src/lib/utils.js +0 -1
- package/src/migration/AdaptableUpgradeHelper.js +0 -2
- package/src/migration/VersionUpgrade17.js +0 -33
- package/src/migration/VersionUpgrade20.js +1 -21
- package/src/migration/VersionUpgrade21.js +0 -3
- package/src/migration/VersionUpgrade22.js +0 -11
- package/src/migration/VersionUpgrade23.js +0 -73
- package/src/parser/src/evaluator.js +0 -1
- package/src/parser/src/index.js +0 -1
- package/src/parser/src/parser.js +4 -103
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +0 -5
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +0 -2
- package/src/parser/src/tokenizer.js +0 -2
- package/src/parser/src/utils.js +0 -1
- package/src/renderReactRoot.js +0 -12
- package/src/setupDevTools.js +0 -6
- package/src/twMerge.js +0 -1
- package/src/types.d.ts +1 -1
- package/src/types.js +0 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/NamedObject.d.ts +0 -10
- package/src/AdaptableState/Common/NamedObject.js +0 -1
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +0 -35
- package/src/Utilities/ExpressionFunctions/groupingMap.js +0 -100
- package/src/Utilities/Interface/AdaptableToolPanelContext.d.ts +0 -4
- package/src/Utilities/Interface/AdaptableToolPanelContext.js +0 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
- package/src/Utilities/Services/Interface/IMetamodelService.js +0 -1
- package/src/Utilities/Services/MetamodelService.d.ts +0 -17
- package/src/Utilities/Services/MetamodelService.js +0 -162
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -99
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +0 -38
- package/src/View/Components/Buttons/EntityListActionButtons.js +0 -42
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.d.ts +0 -12
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +0 -67
- package/src/View/Components/EntityRowItem.d.ts +0 -7
- package/src/View/Components/EntityRowItem.js +0 -7
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +0 -3
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +0 -5
- package/src/View/Components/ModuleProfile.d.ts +0 -8
- package/src/View/Components/ModuleProfile.js +0 -10
- package/src/View/Components/ModuleSummary/ModuleDetail.d.ts +0 -23
- package/src/View/Components/ModuleSummary/ModuleDetail.js +0 -15
- package/src/View/Components/ModuleSummary/ModuleHeader.d.ts +0 -15
- package/src/View/Components/ModuleSummary/ModuleHeader.js +0 -15
- package/src/View/Components/ModuleSummary/SummaryRowItem.d.ts +0 -7
- package/src/View/Components/ModuleSummary/SummaryRowItem.js +0 -12
- package/src/View/Components/SharedProps/ModuleSummaryProps.d.ts +0 -9
- package/src/View/Components/SharedProps/ModuleSummaryProps.js +0 -1
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.d.ts +0 -13
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.js +0 -1
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.d.ts +0 -14
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.js +0 -1
- package/src/View/Components/StyleVisualItem.d.ts +0 -9
- package/src/View/Components/StyleVisualItem.js +0 -40
- package/src/View/Components/WizardSummaryPage.d.ts +0 -7
- package/src/View/Components/WizardSummaryPage.js +0 -17
- package/src/components/Accordion.d.ts +0 -7
- package/src/components/Accordion.js +0 -33
- package/src/components/FlexWithFooter.d.ts +0 -9
- package/src/components/FlexWithFooter.js +0 -13
- package/src/components/NotifyResize/index.d.ts +0 -9
- package/src/components/NotifyResize/index.js +0 -35
- package/src/components/PopupWithFooter.d.ts +0 -14
- package/src/components/PopupWithFooter.js +0 -11
- package/src/components/SelectableList/index.d.ts +0 -15
- package/src/components/SelectableList/index.js +0 -95
- package/src/components/SizedContainer/index.d.ts +0 -17
- package/src/components/SizedContainer/index.js +0 -20
- package/src/components/Table/index.d.ts +0 -4
- package/src/components/Table/index.js +0 -6
- package/src/components/WizardPanel/index.d.ts +0 -9
- package/src/components/WizardPanel/index.js +0 -7
- package/src/components/icons/align-justify.d.ts +0 -3
- package/src/components/icons/align-justify.js +0 -3
- package/src/components/icons/column-info.d.ts +0 -3
- package/src/components/icons/column-info.js +0 -3
- package/src/components/icons/gradient-column.d.ts +0 -3
- package/src/components/icons/gradient-column.js +0 -3
- package/src/components/icons/invalid.d.ts +0 -3
- package/src/components/icons/invalid.js +0 -3
- package/src/components/icons/logout copy.d.ts +0 -3
- package/src/components/icons/logout copy.js +0 -3
- package/src/components/icons/smart-edit.d.ts +0 -3
- package/src/components/icons/smart-edit.js +0 -3
- package/src/components/icons/team-share.d.ts +0 -3
- package/src/components/icons/team-share.js +0 -3
- package/src/components/icons/unchecked.d.ts +0 -3
- package/src/components/icons/unchecked.js +0 -3
- package/src/components/icons/user-filter.d.ts +0 -3
- package/src/components/icons/user-filter.js +0 -3
- package/src/components/utils/useContainerScrollObserver/index.d.ts +0 -6
- package/src/components/utils/useContainerScrollObserver/index.js +0 -79
- package/src/components/utils/useGlobalEvent.d.ts +0 -1
- package/src/components/utils/useGlobalEvent.js +0 -7
- package/src/components/utils/useLatest.d.ts +0 -1
- package/src/components/utils/useLatest.js +0 -6
- package/src/components/utils/usePropState.d.ts +0 -2
- package/src/components/utils/usePropState.js +0 -8
- package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
- package/src/metamodel/adaptable-metamodel-model.js +0 -1
- package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
- package/src/metamodel/adaptable.metamodel.js +0 -1
|
@@ -59,13 +59,6 @@ function findInColDefs(colDefs, callback) {
|
|
|
59
59
|
}
|
|
60
60
|
const DEFAULT_COLUMN_WIDTH = 200;
|
|
61
61
|
const DEFAULT_AGG_FUNC = 'sum';
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @param columnIds the column ids that we want to be in the order
|
|
65
|
-
* @param colDefs all the colDefs in the grid
|
|
66
|
-
* @returns the array of the given column ids, but also any other column id that is not in the given column ids, but
|
|
67
|
-
* has a column definition
|
|
68
|
-
*/
|
|
69
62
|
function getColumnOrderIdsForAllColDefs(columnIds = [], colDefs) {
|
|
70
63
|
const flatColDefs = flattenColDefs(colDefs);
|
|
71
64
|
const flatColIds = flatColDefs.map((c) => c.colId ?? c.field);
|
|
@@ -85,11 +78,6 @@ const COLUMN_EVENTS_THAT_TRIGGERS_AUTO_LAYOUT_SAVE = {
|
|
|
85
78
|
sortChanged: true,
|
|
86
79
|
columnRowGroupChanged: true,
|
|
87
80
|
...EXPAND_COLLAPSE_EVENTS,
|
|
88
|
-
// TODO check if all of those are needed
|
|
89
|
-
// stateUpdated: true,
|
|
90
|
-
// columnPinned: true,
|
|
91
|
-
// columnPivotChanged: true,
|
|
92
|
-
// columnValueChanged: true,
|
|
93
81
|
};
|
|
94
82
|
function isGridLayoutSame(options) {
|
|
95
83
|
const { layoutFromGrid: gridLayout, layoutFromModel: layout } = options;
|
|
@@ -109,8 +97,6 @@ function getDefaultColumnSizeStateForColDef(colId, colDef, options) {
|
|
|
109
97
|
...options?.defaultColDef,
|
|
110
98
|
};
|
|
111
99
|
if (options?.colTypes) {
|
|
112
|
-
// for col sizing, we want the columns sized as flex via col.type and defaultColDef
|
|
113
|
-
// to be sized as flex, even if they are not in the layout.ColumnSizing object
|
|
114
100
|
let colType = colDef?.type;
|
|
115
101
|
if (colType && !Array.isArray(colType)) {
|
|
116
102
|
colType = colType.split(',');
|
|
@@ -176,13 +162,10 @@ export class LayoutManager extends LMEmitter {
|
|
|
176
162
|
}
|
|
177
163
|
this.initialRowSelection = options.initialRowSelection;
|
|
178
164
|
this.setOptions(options);
|
|
179
|
-
// this ensures the grand total columns are positioned correctly (before/after) even when changed at runtime
|
|
180
|
-
// see https://www.ag-grid.com/react-data-grid/pivoting-column-groups/#changing-data-filters-and-configurations
|
|
181
165
|
this.gridApi.setGridOption('enableStrictPivotColumnOrder', true);
|
|
182
166
|
this.setupEvents();
|
|
183
167
|
this.indexColumns();
|
|
184
168
|
this.setupPivotTotals();
|
|
185
|
-
// (globalThis as any).layoutManager = this;
|
|
186
169
|
}
|
|
187
170
|
destroy() {
|
|
188
171
|
if (this.destroyed) {
|
|
@@ -231,22 +214,16 @@ export class LayoutManager extends LMEmitter {
|
|
|
231
214
|
if (type === 'columnResized' && !event.finished) {
|
|
232
215
|
return;
|
|
233
216
|
}
|
|
234
|
-
// called while dragging a column from the sidebar, to the row groups panel
|
|
235
217
|
if (type === 'displayedColumnsChanged' && event.source === 'uiColumnDragged') {
|
|
236
218
|
return;
|
|
237
219
|
}
|
|
238
220
|
this.warn(`globalAgGridEventListener-${type}`, event);
|
|
239
221
|
if (!this.currentLayout) {
|
|
240
222
|
const gridLayout = this.getLayoutModelFromGrid();
|
|
241
|
-
// if there's no layout set currently in AG Grid
|
|
242
|
-
// then emit the gridLayoutChanged event directly
|
|
243
|
-
// as we don't have a current layout to compare to
|
|
244
223
|
this.onGridLayoutChanged(gridLayout);
|
|
245
224
|
return;
|
|
246
225
|
}
|
|
247
226
|
const gridLayout = this.getLayoutModelFromGrid();
|
|
248
|
-
// but if we do have a current layout set
|
|
249
|
-
// then only emit the event if the layout has changed
|
|
250
227
|
if (!isGridLayoutSame({
|
|
251
228
|
layoutFromGrid: gridLayout,
|
|
252
229
|
layoutFromModel: this.currentLayout,
|
|
@@ -285,28 +262,16 @@ export class LayoutManager extends LMEmitter {
|
|
|
285
262
|
this.idsToFields[colId] = field;
|
|
286
263
|
}
|
|
287
264
|
this.idsToColDefs[colId] = colDef;
|
|
288
|
-
// const col = this.gridApi.getColumn(colId);
|
|
289
|
-
// this.initialColumnWidths[colId] = colDef.width ?? colDef.initialWidth ?? DEFAULT_COLUMN_WIDTH; // this.gridApi.getColumn(colId).getActualWidth();
|
|
290
|
-
// this.initialColumnWidths[colId] = col.getActualWidth();
|
|
291
265
|
this.initialColumnWidths[colId] = this.getDefaultColumnWidthForCol(colId, colDef);
|
|
292
266
|
const rowGroupColumns = this.gridApi.getRowGroupColumns() ?? [];
|
|
293
267
|
rowGroupColumns.forEach((column) => {
|
|
294
268
|
const colId = column.getColId();
|
|
295
|
-
// const col = this.gridApi.getColumn(colId);
|
|
296
|
-
// const colDef = col.getColDef();
|
|
297
269
|
this.initialColumnWidths[colId] = this.getDefaultColumnWidthForCol(colId);
|
|
298
|
-
// colDef.width ?? colDef.initialWidth ?? DEFAULT_COLUMN_WIDTH;
|
|
299
270
|
});
|
|
300
271
|
};
|
|
301
272
|
colDefs.forEach(iteration);
|
|
302
273
|
}
|
|
303
274
|
onGridLayoutChanged(layout) {
|
|
304
|
-
// we want to have this check, since onGridLayoutChanged might be triggered
|
|
305
|
-
// by some AG Grid actions we're not interested - eg: filter changed
|
|
306
|
-
// and the state of which is not captured by the Layout Model
|
|
307
|
-
// so it would result in a layout object that's similar to the previous one
|
|
308
|
-
// that we fired
|
|
309
|
-
// hence we need this check here as well
|
|
310
275
|
if (this._prevFiredLayout && isLayoutEqual(layout, this._prevFiredLayout)) {
|
|
311
276
|
return;
|
|
312
277
|
}
|
|
@@ -322,16 +287,11 @@ export class LayoutManager extends LMEmitter {
|
|
|
322
287
|
layout.RowGroupedColumns.length > 0 &&
|
|
323
288
|
(prevLayout?.RowGroupedColumns || []).join(',') !== layout.RowGroupedColumns.join(',') &&
|
|
324
289
|
layout.RowGroupValues) {
|
|
325
|
-
// most likely the user has changed grouping via some AG Grid action
|
|
326
|
-
// and we need to make sure the expand/collapse state is applied
|
|
327
|
-
// but we want to suspend the listener
|
|
328
|
-
// as it would re-trigger another change
|
|
329
290
|
const unsupress = this.suspendAgGridListener();
|
|
330
291
|
this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
|
|
331
292
|
unsupress();
|
|
332
293
|
}
|
|
333
294
|
if (!shouldSkipTriggerChange) {
|
|
334
|
-
// emit an event that the layout has changed from the grid
|
|
335
295
|
this.emitSync('gridLayoutChanged', layout);
|
|
336
296
|
const log = this.infoLogger.extend('gridLayoutChanged');
|
|
337
297
|
const changes = getChanges(normalizeLayoutModel(prevLayout), normalizeLayoutModel(layout));
|
|
@@ -365,12 +325,10 @@ export class LayoutManager extends LMEmitter {
|
|
|
365
325
|
let ColumnSizing = layout.ColumnSizing || {};
|
|
366
326
|
let ColumnVisibility = { ...layout.ColumnVisibility };
|
|
367
327
|
const storePivotResultColumns = !!prevLayout?.PivotResultColumnsOrder;
|
|
368
|
-
//let's also include the column widths of the pivotResult columns
|
|
369
328
|
pivotResultColumns.forEach((col) => {
|
|
370
329
|
const colId = col.getColId();
|
|
371
330
|
const Width = col.getActualWidth();
|
|
372
331
|
const initialWidth = this.initialColumnWidths[colId] ?? DEFAULT_COLUMN_WIDTH;
|
|
373
|
-
// but if the width is the initial/default width, don't include it in the ColumnSizing
|
|
374
332
|
if (Width !== initialWidth) {
|
|
375
333
|
ColumnSizing[colId] = {
|
|
376
334
|
Width,
|
|
@@ -380,9 +338,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
380
338
|
if (!Object.keys(ColumnSizing).length) {
|
|
381
339
|
ColumnSizing = undefined;
|
|
382
340
|
}
|
|
383
|
-
// from column visibility, let's remove all columns that are not actually in the pivot layout
|
|
384
|
-
// since having normal table columns here will break the equality check
|
|
385
|
-
// so we only want to keep the group columns and the pivot result columns
|
|
386
341
|
Object.keys(ColumnVisibility).forEach((colId) => {
|
|
387
342
|
const isInLayout = pivotResultColumnsSet.has(colId) || colId.startsWith(AUTO_GROUP_COLUMN_ID__SINGLE);
|
|
388
343
|
if (!isInLayout) {
|
|
@@ -420,8 +375,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
420
375
|
PivotExpandLevel: prevLayout?.PivotExpandLevel ?? -1,
|
|
421
376
|
};
|
|
422
377
|
if (storePivotResultColumns) {
|
|
423
|
-
// Save all pivot result columns (including hidden ones from collapsed
|
|
424
|
-
// groups) in their current order, so the order is fully preserved.
|
|
425
378
|
const allPivotResultColumnsInOrder = this.gridApi
|
|
426
379
|
.getColumnState()
|
|
427
380
|
.filter((col) => pivotResultColumnsSet.has(col.colId));
|
|
@@ -464,11 +417,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
464
417
|
}, {});
|
|
465
418
|
const ColumnVisibility = columnState.reduce((acc, colState) => {
|
|
466
419
|
const colId = colState.colId;
|
|
467
|
-
// normally we take the initial width from this object
|
|
468
420
|
let initialWidth = this.initialColumnWidths[colId];
|
|
469
|
-
// but if this is a group column
|
|
470
|
-
// we try to infer it from the default width (when display type is single)
|
|
471
|
-
// or from the respective group column (when display type is multi)
|
|
472
421
|
if (initialWidth === undefined) {
|
|
473
422
|
if (colId === AUTO_GROUP_COLUMN_ID__SINGLE) {
|
|
474
423
|
const groupByColId = this.gridApi.getRowGroupColumns()[0]?.getColId();
|
|
@@ -486,12 +435,8 @@ export class LayoutManager extends LMEmitter {
|
|
|
486
435
|
colSizing.Flex = colState.flex;
|
|
487
436
|
ColumnSizing[colId] = colSizing;
|
|
488
437
|
}
|
|
489
|
-
// and only add the col width to the layout ColumnSizing
|
|
490
|
-
// if it's different from the initial default column width
|
|
491
438
|
else if (colState.width && initialWidth != colState.width) {
|
|
492
439
|
const colSizing = { ...ColumnSizing[colId] };
|
|
493
|
-
// Flex columns often report a computed width without flex in column state —
|
|
494
|
-
// keep explicit Flex sizing from the layout instead of replacing it with pixels.
|
|
495
440
|
if (colSizing.Flex == null) {
|
|
496
441
|
delete colSizing.Flex;
|
|
497
442
|
colSizing.Width = colState.width;
|
|
@@ -516,8 +461,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
516
461
|
return acc;
|
|
517
462
|
}, {});
|
|
518
463
|
if (gridState.pivot?.pivotMode && gridState.sort?.sortModel) {
|
|
519
|
-
// for pivot mode, we can't simply take the current sort from the ColumnState
|
|
520
|
-
// but we have to go via the sortModel from the grid state
|
|
521
464
|
ColumnSorts = gridState.sort.sortModel.map((sort) => {
|
|
522
465
|
return {
|
|
523
466
|
ColumnId: sort.colId,
|
|
@@ -539,8 +482,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
539
482
|
};
|
|
540
483
|
});
|
|
541
484
|
}
|
|
542
|
-
// if there's a current layout set
|
|
543
|
-
// we want to only return the AG Grid columns that are also in the current layout
|
|
544
485
|
if (this.currentLayout &&
|
|
545
486
|
this.currentLayout.TableColumns &&
|
|
546
487
|
this.currentLayout.TableColumns.length > 0) {
|
|
@@ -556,19 +497,11 @@ export class LayoutManager extends LMEmitter {
|
|
|
556
497
|
});
|
|
557
498
|
}
|
|
558
499
|
}
|
|
559
|
-
// if (this.isTreeMode()) {
|
|
560
|
-
// // colsInLayout.add(GROUP_COLUMN_ID__SINGLE);
|
|
561
|
-
// }
|
|
562
500
|
TableColumns = TableColumns.filter((colId) => {
|
|
563
501
|
if (colsInLayout.has(colId)) {
|
|
564
502
|
return true;
|
|
565
503
|
}
|
|
566
|
-
// we might hit an edge case where we ungroup one of the 2+ group cols
|
|
567
|
-
// in the current layout - in which case in the prev state of the current layout
|
|
568
|
-
// we had the group column
|
|
569
|
-
// but now we will need to include the current column
|
|
570
504
|
if (colsInLayout.has(`${AUTO_GROUP_COLUMN_ID__MULTI_PREFIX}${colId}`)) {
|
|
571
|
-
// ColumnVisibility[colId] = false;
|
|
572
505
|
return true;
|
|
573
506
|
}
|
|
574
507
|
const col = this.gridApi.getColumn(colId);
|
|
@@ -602,7 +535,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
602
535
|
}
|
|
603
536
|
if (RowGroupedColumns && RowGroupedColumns.length) {
|
|
604
537
|
const LayoutRowGroupedColumns = this.currentLayout?.RowGroupedColumns || this.currentLayout?.PivotGroupedColumns || [];
|
|
605
|
-
// if it's a new grouping, try and take it
|
|
606
538
|
const isGroupingNew = RowGroupedColumns && RowGroupedColumns.join(',') !== LayoutRowGroupedColumns.join(',');
|
|
607
539
|
if (this.currentLayout?.RowGroupValues) {
|
|
608
540
|
const currentRowGroupValues = this.currentLayout.RowGroupValues;
|
|
@@ -707,8 +639,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
707
639
|
const isPivot = this.isCurrentLayoutPivot();
|
|
708
640
|
const currentColumnGroupState = this.gridApi
|
|
709
641
|
.getColumnGroupState()
|
|
710
|
-
// if we're in a pivot layout, only include groups that are pivot groups
|
|
711
|
-
// as there are other fake groups in the grid as well
|
|
712
642
|
.filter((state) => (isPivot ? state.groupId.startsWith('pivotGroup_') : true));
|
|
713
643
|
if (currentColumnGroupValues.ColumnGroupDisplay === 'expanded') {
|
|
714
644
|
const collapsedGroupIds = currentColumnGroupState
|
|
@@ -780,14 +710,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
780
710
|
colDef = { ...colDef, maxWidth: colSizing.MaxWidth };
|
|
781
711
|
changed = true;
|
|
782
712
|
}
|
|
783
|
-
// this (width and flex) shouldn't be needed theoretically, as applyColumnState will apply sizing
|
|
784
|
-
// using the newly computed column state
|
|
785
|
-
// but for whatever reason, this is needed here, for some edge cases
|
|
786
|
-
// eg: when a layout has a column width a width and minWidth
|
|
787
|
-
// and then we create a new layout with a different width and different min width
|
|
788
|
-
// then if we don't have this code, the new layout might wrongly apply the previous
|
|
789
|
-
// minWidth as the current column width
|
|
790
|
-
// see #edge-case-min-width-width-mismatch
|
|
791
713
|
if (colSizing.Width !== undefined && colSizing.Width !== colDef.width) {
|
|
792
714
|
colDef = { ...colDef, width: colSizing.Width };
|
|
793
715
|
}
|
|
@@ -823,7 +745,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
823
745
|
console.warn('Setting TableColumns to empty array.');
|
|
824
746
|
layout.TableColumns = [];
|
|
825
747
|
}
|
|
826
|
-
// just in case the enduser provided falsy colIds, it will crash AG Grid internals
|
|
827
748
|
layout.TableColumns = layout.TableColumns.filter((colId) => colId != undefined);
|
|
828
749
|
layout = normalizeTableLayoutModel(layout, { isTree: _options?.isTree ?? false });
|
|
829
750
|
const agGridState = {};
|
|
@@ -834,8 +755,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
834
755
|
const flatColDefs = flattenColDefs(colDefs);
|
|
835
756
|
const colDefsById = new Map(flatColDefs.map((colDef) => [colDef.colId ?? colDef.field, colDef]));
|
|
836
757
|
const getColDef = (colId) => colDefsById.get(colId);
|
|
837
|
-
// TODO to implement support for row selection in server-side row model
|
|
838
|
-
// agGridState.rowSelection = { ... }
|
|
839
758
|
agGridState.columnVisibility = {
|
|
840
759
|
hiddenColIds: flatColDefs
|
|
841
760
|
.filter((colDef) => {
|
|
@@ -925,7 +844,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
925
844
|
aggregationModel: TableAggregationColumns.map(({ colId, aggFunc }) => {
|
|
926
845
|
if (aggFunc === true) {
|
|
927
846
|
const colDef = getColDef(colId);
|
|
928
|
-
// fallback to SUM if no defaultAggFunc is defined
|
|
929
847
|
aggFunc = colDef?.defaultAggFunc || DEFAULT_AGG_FUNC;
|
|
930
848
|
}
|
|
931
849
|
return {
|
|
@@ -940,26 +858,9 @@ export class LayoutManager extends LMEmitter {
|
|
|
940
858
|
static getAGGridInitialStateForPivotLayout(layout, colDefs) {
|
|
941
859
|
layout = normalizePivotLayoutModel(layout);
|
|
942
860
|
const agGridState = {};
|
|
943
|
-
// const columnIds = getColumnOrderIdsForAllColDefs([], colDefs);
|
|
944
|
-
// agGridState.columnOrder = {
|
|
945
|
-
// orderedColIds: columnIds,
|
|
946
|
-
// };
|
|
947
861
|
const flatColDefs = flattenColDefs(colDefs);
|
|
948
862
|
const colDefsById = new Map(flatColDefs.map((colDef) => [colDef.colId ?? colDef.field, colDef]));
|
|
949
863
|
const getColDef = (colId) => colDefsById.get(colId);
|
|
950
|
-
// agGridState.columnVisibility = {
|
|
951
|
-
// hiddenColIds: flatColDefs
|
|
952
|
-
// .filter((colDef) => {
|
|
953
|
-
// const colId = colDef.colId ?? colDef.field;
|
|
954
|
-
// return (
|
|
955
|
-
// layout.ColumnVisibility?.[colId] === false ||
|
|
956
|
-
// !layout.OrderedColumns.includes(colId) ||
|
|
957
|
-
// colDef.hide ||
|
|
958
|
-
// colDef.initialHide
|
|
959
|
-
// );
|
|
960
|
-
// })
|
|
961
|
-
// .map((colDef) => colDef.colId ?? colDef.field),
|
|
962
|
-
// };
|
|
963
864
|
agGridState.pivot = {
|
|
964
865
|
pivotMode: true,
|
|
965
866
|
pivotColIds: layout.PivotColumns,
|
|
@@ -1027,7 +928,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1027
928
|
aggregationModel: PivotAggregationColumns.map(({ colId, aggFunc }) => {
|
|
1028
929
|
if (aggFunc === true) {
|
|
1029
930
|
const colDef = getColDef(colId);
|
|
1030
|
-
// fallback to SUM if no defaultAggFunc is defined
|
|
1031
931
|
aggFunc = colDef?.defaultAggFunc || DEFAULT_AGG_FUNC;
|
|
1032
932
|
}
|
|
1033
933
|
return {
|
|
@@ -1044,8 +944,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1044
944
|
layout = normalizeLayoutModel(layout, { isTree: this.isTreeMode() });
|
|
1045
945
|
}
|
|
1046
946
|
this.currentLayout = layout;
|
|
1047
|
-
// we do this in order to avoid firing the `gridLayoutChanged` event
|
|
1048
|
-
// when actually applying the layout
|
|
1049
947
|
this._prevFiredLayout = layout;
|
|
1050
948
|
}
|
|
1051
949
|
setLayout(layout, options) {
|
|
@@ -1053,11 +951,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1053
951
|
const shouldSkipTriggerChange = options?.skipTriggerChange === true;
|
|
1054
952
|
const shouldSkipEqualityCheck = options?.force === true;
|
|
1055
953
|
if (!shouldSkipEqualityCheck && isLayoutEqual(this.currentLayout, layout)) {
|
|
1056
|
-
// isLayoutEqual strips Ignore_* properties (ColumnHeaders, Filters, etc.)
|
|
1057
|
-
// so even when grid-derived properties match, we must sync currentLayout
|
|
1058
|
-
// to preserve any Ignore_* changes — otherwise getLayoutModelFromGrid
|
|
1059
|
-
// will copy stale values from this.currentLayout
|
|
1060
|
-
// this.currentLayout = layout;
|
|
1061
954
|
this.silentSetCurrentLayout(layout);
|
|
1062
955
|
return false;
|
|
1063
956
|
}
|
|
@@ -1091,12 +984,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1091
984
|
}
|
|
1092
985
|
applyLayout(layout, options) {
|
|
1093
986
|
this.warn('applyLayout', layout);
|
|
1094
|
-
// we want to do this supress/unsupress thing
|
|
1095
|
-
// as otherwise, our applyLayout will trigger an onChange event
|
|
1096
|
-
// which could trigger another setLayout
|
|
1097
|
-
// yes, we do check for same layout and bail out if it is the same
|
|
1098
|
-
// but we still want to avoid this unnecessary initial loop
|
|
1099
|
-
// which may cause more adaptable work
|
|
1100
987
|
const resume = this.suspendAgGridListener();
|
|
1101
988
|
const pivotMode = this.isInPivotMode();
|
|
1102
989
|
if (!!layout.SuppressAggFuncInHeader !== !!this.gridApi.getGridOption('suppressAggFuncInHeader')) {
|
|
@@ -1286,13 +1173,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1286
1173
|
const rowSelection = LayoutManager.getGridOptionForRowSelectionFromLayout(layout.RowSelection, this.initialRowSelection);
|
|
1287
1174
|
const prevRowSelection = this.gridApi.getGridOption('rowSelection');
|
|
1288
1175
|
this.gridApi.setGridOption('rowSelection', rowSelection);
|
|
1289
|
-
// AG Grid does not always refresh already-rendered cells in the selection
|
|
1290
|
-
// column when `rowSelection.checkboxes` is changed at runtime via setGridOption
|
|
1291
|
-
// (e.g. toggling `checkboxes` or `headerCheckbox`).
|
|
1292
|
-
// In the React wrapper this is masked by React-driven re-renders, but in the vanilla integration
|
|
1293
|
-
// the selection column keeps showing stale content until a manual
|
|
1294
|
-
// `refreshCells` is triggered. We force the refresh here so
|
|
1295
|
-
// all integrations behave consistently.
|
|
1296
1176
|
if (typeof prevRowSelection === 'object' &&
|
|
1297
1177
|
typeof rowSelection === 'object' &&
|
|
1298
1178
|
rowSelection.checkboxes !== prevRowSelection.checkboxes) {
|
|
@@ -1307,9 +1187,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1307
1187
|
applyTableLayout(layout, options) {
|
|
1308
1188
|
this.withSuppressColumnAnimation(() => {
|
|
1309
1189
|
this.ensureSelectionColumnPositionUnlocked(layout);
|
|
1310
|
-
// if we apply the state here, before calling setGridOption for groupDisplayType
|
|
1311
|
-
// the order is not always correctly applied
|
|
1312
|
-
// this.gridApi.applyColumnState(state);
|
|
1313
1190
|
const hasGroupedColumns = layout.RowGroupedColumns && layout.RowGroupedColumns.length;
|
|
1314
1191
|
if (hasGroupedColumns) {
|
|
1315
1192
|
const displayTypeFromLayout = rowGroupDisplayTypeToGridOption(layout.RowGroupDisplayType);
|
|
@@ -1318,9 +1195,7 @@ export class LayoutManager extends LMEmitter {
|
|
|
1318
1195
|
this.gridApi.setGridOption('groupDisplayType', displayTypeFromLayout);
|
|
1319
1196
|
}
|
|
1320
1197
|
}
|
|
1321
|
-
// so we apply the state at the end
|
|
1322
1198
|
this.gridApi.applyColumnState(this.computeColumnStateForTableLayout(layout));
|
|
1323
|
-
// but also let's not forget to apply the row group values
|
|
1324
1199
|
if (hasGroupedColumns && layout.RowGroupValues && !options?.skipApplyRowGroupsExpandedState) {
|
|
1325
1200
|
this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
|
|
1326
1201
|
}
|
|
@@ -1388,11 +1263,9 @@ export class LayoutManager extends LMEmitter {
|
|
|
1388
1263
|
currentNode = currentNode.parent;
|
|
1389
1264
|
} while (currentNode.parent);
|
|
1390
1265
|
const shouldBeExpanded = defaultExpanded
|
|
1391
|
-
?
|
|
1392
|
-
// but this node should be expanded if it is not in the map
|
|
1266
|
+
?
|
|
1393
1267
|
!deepMap.has(nodePath)
|
|
1394
|
-
:
|
|
1395
|
-
// but this node should be expanded if it is in the map
|
|
1268
|
+
:
|
|
1396
1269
|
deepMap.has(nodePath);
|
|
1397
1270
|
node.expanded = shouldBeExpanded;
|
|
1398
1271
|
}
|
|
@@ -1410,9 +1283,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1410
1283
|
acc[colId] = index;
|
|
1411
1284
|
return acc;
|
|
1412
1285
|
}, {});
|
|
1413
|
-
// having this set to true will change pivot column order when there is sorting
|
|
1414
|
-
// and we don't want that to happen #keep-sorted-columns-in-same-order-as-unsorted
|
|
1415
|
-
// columnState.applyOrder = true;
|
|
1416
1286
|
const columnIds = getColumnOrderIdsForAllColDefs([
|
|
1417
1287
|
...layout.PivotColumns,
|
|
1418
1288
|
...(layout.PivotAggregationColumns || []).map((col) => col.ColumnId),
|
|
@@ -1432,10 +1302,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1432
1302
|
this.computeColumnSorts(layout, columnState);
|
|
1433
1303
|
this.computePinnedColumns(layout, columnState);
|
|
1434
1304
|
this.computePivotAggregations(layout, columnState);
|
|
1435
|
-
// Add pivot result columns to the state for ordering (will be applied with applyOrder: true later).
|
|
1436
|
-
// Some pivot result columns may already be in the state (e.g. added by computeColumnSorts),
|
|
1437
|
-
// so remove them first and re-add all pivot result columns in the persisted order,
|
|
1438
|
-
// merging any existing state (like sort info) back in.
|
|
1439
1305
|
if (Array.isArray(layout.PivotResultColumnsOrder)) {
|
|
1440
1306
|
const pivotResultColumnsOrderSet = new Set(layout.PivotResultColumnsOrder);
|
|
1441
1307
|
const existingPivotResultState = {};
|
|
@@ -1553,8 +1419,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1553
1419
|
}, {});
|
|
1554
1420
|
columnState.state.forEach((colState) => {
|
|
1555
1421
|
const colSortIndex = sortsToIndexes[colState.colId];
|
|
1556
|
-
// we delete them just to know if there are any left
|
|
1557
|
-
// after the forEach is done
|
|
1558
1422
|
delete sortsToIndexes[colState.colId];
|
|
1559
1423
|
const colSort = sorts[colSortIndex];
|
|
1560
1424
|
if (colSort != undefined) {
|
|
@@ -1567,8 +1431,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1567
1431
|
}
|
|
1568
1432
|
});
|
|
1569
1433
|
if (Object.keys(sortsToIndexes).length) {
|
|
1570
|
-
// if there are some sorts left which were not applied to the columnState
|
|
1571
|
-
// probably those are for pivot result columns, so we need to apply them as well
|
|
1572
1434
|
Object.keys(sortsToIndexes).forEach((colId) => {
|
|
1573
1435
|
const colSortIndex = sortsToIndexes[colId];
|
|
1574
1436
|
const colSort = sorts[colSortIndex];
|
|
@@ -1628,8 +1490,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1628
1490
|
if (visibility[colId] === false) {
|
|
1629
1491
|
return true;
|
|
1630
1492
|
}
|
|
1631
|
-
// for the selection column, return true even
|
|
1632
|
-
// if not explicitly listed in the TableColumns
|
|
1633
1493
|
if (colId === LayoutManager.SELECTION_COLUMN_ID && layout.RowSelection) {
|
|
1634
1494
|
return false;
|
|
1635
1495
|
}
|
|
@@ -1643,7 +1503,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1643
1503
|
colId: columnId,
|
|
1644
1504
|
hide: isColHidden(columnId),
|
|
1645
1505
|
pivot: false,
|
|
1646
|
-
// @ts-ignore
|
|
1647
1506
|
pivotIndex: null,
|
|
1648
1507
|
};
|
|
1649
1508
|
});
|
|
@@ -1655,11 +1514,9 @@ export class LayoutManager extends LMEmitter {
|
|
|
1655
1514
|
if (currentLayout) {
|
|
1656
1515
|
tableColumns = currentLayout.TableColumns;
|
|
1657
1516
|
if (currentLayout.ColumnVisibility) {
|
|
1658
|
-
// dont auto size hidden columns
|
|
1659
1517
|
tableColumns = tableColumns.filter((colId) => !currentLayout.ColumnVisibility[colId]);
|
|
1660
1518
|
}
|
|
1661
1519
|
if (currentLayout.ColumnSizing) {
|
|
1662
|
-
// dont auto size columns with a set sizing
|
|
1663
1520
|
tableColumns = tableColumns.filter((colId) => !currentLayout.ColumnSizing[colId]);
|
|
1664
1521
|
}
|
|
1665
1522
|
}
|
|
@@ -1682,34 +1539,16 @@ export class LayoutManager extends LMEmitter {
|
|
|
1682
1539
|
}
|
|
1683
1540
|
}
|
|
1684
1541
|
const columnState = this.computeColumnStateForPivotLayout(layout);
|
|
1685
|
-
// by simply calling this.gridApi.applyColumnState(columnState)
|
|
1686
|
-
// the order of aggregations is not preserved/guaranteed by ag-grid
|
|
1687
|
-
// so we want to apply multiple states - adding aggregations one by one
|
|
1688
|
-
// first: no aggregation
|
|
1689
|
-
// second: [agg[0]]
|
|
1690
|
-
// third: [agg[0], agg[1]]
|
|
1691
|
-
// fourth: ...etc
|
|
1692
|
-
// so we apply the states for all aggregations except the last one
|
|
1693
|
-
//
|
|
1694
1542
|
const aggregationsMapForOrder = (layout.PivotAggregationColumns || []).map((_, index) => layout.PivotAggregationColumns.slice(0, index));
|
|
1695
1543
|
aggregationsMapForOrder.forEach((agg) => {
|
|
1696
|
-
// we're mutating the columnState here
|
|
1697
1544
|
this.computePivotAggregations({ ...layout, PivotAggregationColumns: agg }, columnState);
|
|
1698
|
-
// and apply the state
|
|
1699
1545
|
this.gridApi.applyColumnState(columnState);
|
|
1700
1546
|
});
|
|
1701
|
-
// now recompute and apply the last one
|
|
1702
1547
|
this.computePivotAggregations(layout, columnState);
|
|
1703
|
-
// Apply order only on the final call when PivotResultColumns is specified
|
|
1704
1548
|
if (Array.isArray(layout.PivotResultColumnsOrder)) {
|
|
1705
1549
|
columnState.applyOrder = true;
|
|
1706
1550
|
}
|
|
1707
1551
|
this.gridApi.applyColumnState(columnState);
|
|
1708
|
-
// let's also include the column widths of the pivotResult columns
|
|
1709
|
-
// we can't simply include those in the columnState because the columnState will also apply order
|
|
1710
|
-
// but we don't want to affect the order of the pivotResult columns
|
|
1711
|
-
// so we'll do it manually, and apply the widths after the columnState
|
|
1712
|
-
// by using the gridApi.setColumnWidths method
|
|
1713
1552
|
if (layout.ColumnSizing) {
|
|
1714
1553
|
const colWidthForPivotResultColumns = [];
|
|
1715
1554
|
(this.gridApi.getPivotResultColumns() || []).forEach((col) => {
|
|
@@ -1726,20 +1565,12 @@ export class LayoutManager extends LMEmitter {
|
|
|
1726
1565
|
}
|
|
1727
1566
|
}
|
|
1728
1567
|
this.applyColumnGroupCollapseExpandState(layout);
|
|
1729
|
-
// but also let's not forget to apply the row group values
|
|
1730
1568
|
if (hasGroupedColumns && layout.RowGroupValues && !options?.skipApplyRowGroupsExpandedState) {
|
|
1731
1569
|
this.applyRowGroupValues(layout.RowGroupValues, layout.PivotGroupedColumns);
|
|
1732
1570
|
}
|
|
1733
1571
|
});
|
|
1734
1572
|
}
|
|
1735
1573
|
applyPivotTotals(layout) {
|
|
1736
|
-
/**
|
|
1737
|
-
* GrandTotalRow
|
|
1738
|
-
*/
|
|
1739
|
-
// is common to both Table and Pivot and is applied in applyLayout()
|
|
1740
|
-
/**
|
|
1741
|
-
* PivotGrandTotal
|
|
1742
|
-
*/
|
|
1743
1574
|
if (layout.PivotGrandTotal) {
|
|
1744
1575
|
const pivotGrandTotal = layout.PivotGrandTotal === true || layout.PivotGrandTotal === 'before'
|
|
1745
1576
|
? 'before'
|
|
@@ -1751,9 +1582,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1751
1582
|
else {
|
|
1752
1583
|
this.gridApi.setGridOption('pivotRowTotals', null);
|
|
1753
1584
|
}
|
|
1754
|
-
/**
|
|
1755
|
-
* PivotColumnTotal
|
|
1756
|
-
*/
|
|
1757
1585
|
if (layout.PivotColumnTotal) {
|
|
1758
1586
|
const pivotColumnTotal = layout.PivotColumnTotal === true || layout.PivotColumnTotal === 'before'
|
|
1759
1587
|
? 'before'
|
|
@@ -1776,7 +1604,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1776
1604
|
}
|
|
1777
1605
|
const colGroupDefs = allDisplayedColumnGroups
|
|
1778
1606
|
.map((colGroup) => colGroup.getDefinition())
|
|
1779
|
-
// we need to filter because there are some fake groups as well, no idea what for
|
|
1780
1607
|
.filter(Boolean);
|
|
1781
1608
|
const colGroupState = [];
|
|
1782
1609
|
const columnGroupExceptions = ColumnGroupValues?.ColumnGroupDisplay === 'collapsed' ||
|
|
@@ -1840,10 +1667,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1840
1667
|
}
|
|
1841
1668
|
return res;
|
|
1842
1669
|
}
|
|
1843
|
-
/**
|
|
1844
|
-
* Refreshes the sort order by refreshing the client side row model.
|
|
1845
|
-
* This is useful when custom sort comparers are defined and the sort needs to be re-applied after filtering.
|
|
1846
|
-
*/
|
|
1847
1670
|
refreshSort() {
|
|
1848
1671
|
this.withSuppressRowAnimation(() => {
|
|
1849
1672
|
this.gridApi.refreshClientSideRowModel('sort');
|
|
@@ -1908,7 +1731,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1908
1731
|
return;
|
|
1909
1732
|
}
|
|
1910
1733
|
this.patchColDefType(colDef, [PIVOT_ANY_TOTAL_COL_TYPE, PIVOT_AGGREGATION_TOTAL_COL_TYPE]);
|
|
1911
|
-
// we do this for all total cols, but we will hide the ones that are not visible
|
|
1912
1734
|
colDef.columnGroupShow = undefined;
|
|
1913
1735
|
const totalColConfig = this.getPivotTotalColumnConfig(colDef, this.currentLayout);
|
|
1914
1736
|
if (!totalColConfig.visible) {
|
|
@@ -1971,8 +1793,6 @@ export class LayoutManager extends LMEmitter {
|
|
|
1971
1793
|
}
|
|
1972
1794
|
}
|
|
1973
1795
|
isInPivotMode() {
|
|
1974
|
-
// SSRM comes with its own pivot module implementation
|
|
1975
|
-
// see #ssrm_pivot_module
|
|
1976
1796
|
const isModuleRegistered = this.gridApi.isModuleRegistered('PivotModule') ||
|
|
1977
1797
|
this.gridApi.isModuleRegistered('ServerSideRowModelModule');
|
|
1978
1798
|
return isModuleRegistered && this.gridApi.isPivotMode();
|
|
@@ -29,23 +29,16 @@ export function normalizeTableLayoutModel(layout, options) {
|
|
|
29
29
|
layout.RowGroupedColumns = [];
|
|
30
30
|
}
|
|
31
31
|
if (!('SuppressAggFuncInHeader' in layout)) {
|
|
32
|
-
// make it an own property
|
|
33
32
|
layout.SuppressAggFuncInHeader = undefined;
|
|
34
33
|
}
|
|
35
34
|
if (!('GrandTotalRow' in layout)) {
|
|
36
|
-
// make it an own property
|
|
37
35
|
layout.GrandTotalRow = undefined;
|
|
38
36
|
}
|
|
39
37
|
if (!('RowSelection' in layout)) {
|
|
40
|
-
// make it an own property
|
|
41
38
|
layout.RowSelection = undefined;
|
|
42
39
|
}
|
|
43
40
|
const ColumnOrderSet = new Set(layout.TableColumns);
|
|
44
41
|
if (layout.RowGroupedColumns && layout.RowGroupedColumns.length && layout.TableColumns) {
|
|
45
|
-
// the layout.TableColumns might not include the group columns
|
|
46
|
-
//
|
|
47
|
-
// but we want to include those columnIds in the TableColumns
|
|
48
|
-
// so the layout is properly specified
|
|
49
42
|
let displayType = layout.RowGroupDisplayType;
|
|
50
43
|
if (!displayType) {
|
|
51
44
|
layout.TableColumns.some((columnId) => {
|
|
@@ -74,30 +67,20 @@ export function normalizeTableLayoutModel(layout, options) {
|
|
|
74
67
|
[...layout.RowGroupedColumns].reverse().forEach((colId) => {
|
|
75
68
|
const groupColId = `${AUTO_GROUP_COLUMN_ID__MULTI_PREFIX}${colId}`;
|
|
76
69
|
if (!ColumnOrderSet.has(groupColId) && !ColumnOrderSet.has(colId)) {
|
|
77
|
-
// add the col to the beginning of the layout.OrderedColumns
|
|
78
70
|
layout.TableColumns.unshift(colId);
|
|
79
71
|
ColumnOrderSet.add(colId);
|
|
80
|
-
// the .flatMap below will handle the rest
|
|
81
72
|
}
|
|
82
73
|
});
|
|
83
74
|
const MappedColumnOrder = layout.TableColumns.flatMap((colId) => {
|
|
84
75
|
if (GroupedCols.has(colId)) {
|
|
85
|
-
// if the column is grouped by
|
|
86
76
|
const groupColId = `${AUTO_GROUP_COLUMN_ID__MULTI_PREFIX}${colId}`;
|
|
87
|
-
// but there's no column for this group in the layout
|
|
88
77
|
if (!ColumnOrderSet.has(groupColId)) {
|
|
89
|
-
// then we assume that the current column is basically the group column
|
|
90
|
-
// so we return both the group column and the current column
|
|
91
|
-
// but make the current column hidden
|
|
92
78
|
layout.ColumnVisibility[colId] = false;
|
|
93
79
|
return [groupColId, colId];
|
|
94
80
|
}
|
|
95
81
|
}
|
|
96
|
-
// if this is a group column
|
|
97
82
|
if (colId.startsWith(AUTO_GROUP_COLUMN_ID__MULTI_PREFIX)) {
|
|
98
83
|
const simpleColId = colId.replace(AUTO_GROUP_COLUMN_ID__MULTI_PREFIX, '');
|
|
99
|
-
// but the corresponding simple column is not in the layout
|
|
100
|
-
// then let's include it, with visibility set to false
|
|
101
84
|
if (!ColumnOrderSet.has(simpleColId)) {
|
|
102
85
|
layout.ColumnVisibility[simpleColId] = false;
|
|
103
86
|
return [colId, simpleColId];
|
|
@@ -113,8 +96,6 @@ export function normalizeTableLayoutModel(layout, options) {
|
|
|
113
96
|
};
|
|
114
97
|
}
|
|
115
98
|
}
|
|
116
|
-
// there might be a case where there are we have an RowGroupedColumns array, but it's empty (or it's inexistent altogether)
|
|
117
|
-
// and there is no display type specified - so default it to single
|
|
118
99
|
if (!layout.RowGroupDisplayType && layout.TableColumns) {
|
|
119
100
|
layout.RowGroupDisplayType = 'single';
|
|
120
101
|
}
|
|
@@ -161,28 +142,21 @@ export function normalizePivotLayoutModel(layout) {
|
|
|
161
142
|
};
|
|
162
143
|
}
|
|
163
144
|
if (!('SuppressAggFuncInHeader' in layout)) {
|
|
164
|
-
// make it an own property
|
|
165
145
|
layout.SuppressAggFuncInHeader = undefined;
|
|
166
146
|
}
|
|
167
147
|
if (!('GrandTotalRow' in layout)) {
|
|
168
|
-
// make it an own property
|
|
169
148
|
layout.GrandTotalRow = undefined;
|
|
170
149
|
}
|
|
171
150
|
if (!('PivotGrandTotal' in layout)) {
|
|
172
|
-
// make it an own property
|
|
173
151
|
layout.PivotGrandTotal = undefined;
|
|
174
152
|
}
|
|
175
153
|
if (!('PivotColumnTotal' in layout)) {
|
|
176
|
-
// make it an own property
|
|
177
154
|
layout.PivotColumnTotal = undefined;
|
|
178
155
|
}
|
|
179
156
|
if (!('RowSelection' in layout)) {
|
|
180
|
-
// make it an own property
|
|
181
157
|
layout.RowSelection = undefined;
|
|
182
158
|
}
|
|
183
|
-
// if (layout.PivotGroupedColumns && layout.PivotGroupedColumns.length) {
|
|
184
159
|
layout.RowGroupDisplayType = layout.RowGroupDisplayType || 'single';
|
|
185
|
-
// }
|
|
186
160
|
return layout;
|
|
187
161
|
}
|
|
188
162
|
export function normalizeLayoutModel(layout, options) {
|
|
@@ -191,5 +165,4 @@ export function normalizeLayoutModel(layout, options) {
|
|
|
191
165
|
}
|
|
192
166
|
return normalizeTableLayoutModel(layout, options);
|
|
193
167
|
}
|
|
194
|
-
//@ts-ignore
|
|
195
168
|
globalThis.normalizeTableLayoutModel = normalizeTableLayoutModel;
|