@adaptabletools/adaptable-cjs 23.0.4-canary.0 → 23.0.5-canary.0
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.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.js +0 -26
- 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/groupingMap.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/Buttons/EntityListActionButtons.js +0 -1
- 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/ColumnFilterMenu.js +0 -1
- 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 +0 -6
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -73
- 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/SelectableList/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.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
- package/src/Utilities/Services/Interface/IMetamodelService.js +0 -2
- package/src/Utilities/Services/MetamodelService.d.ts +0 -17
- package/src/Utilities/Services/MetamodelService.js +0 -167
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -104
- package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
- package/src/metamodel/adaptable-metamodel-model.js +0 -2
- package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
- package/src/metamodel/adaptable.metamodel.js +0 -1
|
@@ -62,13 +62,6 @@ function findInColDefs(colDefs, callback) {
|
|
|
62
62
|
}
|
|
63
63
|
const DEFAULT_COLUMN_WIDTH = 200;
|
|
64
64
|
const DEFAULT_AGG_FUNC = 'sum';
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* @param columnIds the column ids that we want to be in the order
|
|
68
|
-
* @param colDefs all the colDefs in the grid
|
|
69
|
-
* @returns the array of the given column ids, but also any other column id that is not in the given column ids, but
|
|
70
|
-
* has a column definition
|
|
71
|
-
*/
|
|
72
65
|
function getColumnOrderIdsForAllColDefs(columnIds = [], colDefs) {
|
|
73
66
|
const flatColDefs = flattenColDefs(colDefs);
|
|
74
67
|
const flatColIds = flatColDefs.map((c) => c.colId ?? c.field);
|
|
@@ -88,11 +81,6 @@ const COLUMN_EVENTS_THAT_TRIGGERS_AUTO_LAYOUT_SAVE = {
|
|
|
88
81
|
sortChanged: true,
|
|
89
82
|
columnRowGroupChanged: true,
|
|
90
83
|
...EXPAND_COLLAPSE_EVENTS,
|
|
91
|
-
// TODO check if all of those are needed
|
|
92
|
-
// stateUpdated: true,
|
|
93
|
-
// columnPinned: true,
|
|
94
|
-
// columnPivotChanged: true,
|
|
95
|
-
// columnValueChanged: true,
|
|
96
84
|
};
|
|
97
85
|
function isGridLayoutSame(options) {
|
|
98
86
|
const { layoutFromGrid: gridLayout, layoutFromModel: layout } = options;
|
|
@@ -112,8 +100,6 @@ function getDefaultColumnSizeStateForColDef(colId, colDef, options) {
|
|
|
112
100
|
...options?.defaultColDef,
|
|
113
101
|
};
|
|
114
102
|
if (options?.colTypes) {
|
|
115
|
-
// for col sizing, we want the columns sized as flex via col.type and defaultColDef
|
|
116
|
-
// to be sized as flex, even if they are not in the layout.ColumnSizing object
|
|
117
103
|
let colType = colDef?.type;
|
|
118
104
|
if (colType && !Array.isArray(colType)) {
|
|
119
105
|
colType = colType.split(',');
|
|
@@ -179,13 +165,10 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
179
165
|
}
|
|
180
166
|
this.initialRowSelection = options.initialRowSelection;
|
|
181
167
|
this.setOptions(options);
|
|
182
|
-
// this ensures the grand total columns are positioned correctly (before/after) even when changed at runtime
|
|
183
|
-
// see https://www.ag-grid.com/react-data-grid/pivoting-column-groups/#changing-data-filters-and-configurations
|
|
184
168
|
this.gridApi.setGridOption('enableStrictPivotColumnOrder', true);
|
|
185
169
|
this.setupEvents();
|
|
186
170
|
this.indexColumns();
|
|
187
171
|
this.setupPivotTotals();
|
|
188
|
-
// (globalThis as any).layoutManager = this;
|
|
189
172
|
}
|
|
190
173
|
destroy() {
|
|
191
174
|
if (this.destroyed) {
|
|
@@ -234,22 +217,16 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
234
217
|
if (type === 'columnResized' && !event.finished) {
|
|
235
218
|
return;
|
|
236
219
|
}
|
|
237
|
-
// called while dragging a column from the sidebar, to the row groups panel
|
|
238
220
|
if (type === 'displayedColumnsChanged' && event.source === 'uiColumnDragged') {
|
|
239
221
|
return;
|
|
240
222
|
}
|
|
241
223
|
this.warn(`globalAgGridEventListener-${type}`, event);
|
|
242
224
|
if (!this.currentLayout) {
|
|
243
225
|
const gridLayout = this.getLayoutModelFromGrid();
|
|
244
|
-
// if there's no layout set currently in AG Grid
|
|
245
|
-
// then emit the gridLayoutChanged event directly
|
|
246
|
-
// as we don't have a current layout to compare to
|
|
247
226
|
this.onGridLayoutChanged(gridLayout);
|
|
248
227
|
return;
|
|
249
228
|
}
|
|
250
229
|
const gridLayout = this.getLayoutModelFromGrid();
|
|
251
|
-
// but if we do have a current layout set
|
|
252
|
-
// then only emit the event if the layout has changed
|
|
253
230
|
if (!isGridLayoutSame({
|
|
254
231
|
layoutFromGrid: gridLayout,
|
|
255
232
|
layoutFromModel: this.currentLayout,
|
|
@@ -288,28 +265,16 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
288
265
|
this.idsToFields[colId] = field;
|
|
289
266
|
}
|
|
290
267
|
this.idsToColDefs[colId] = colDef;
|
|
291
|
-
// const col = this.gridApi.getColumn(colId);
|
|
292
|
-
// this.initialColumnWidths[colId] = colDef.width ?? colDef.initialWidth ?? DEFAULT_COLUMN_WIDTH; // this.gridApi.getColumn(colId).getActualWidth();
|
|
293
|
-
// this.initialColumnWidths[colId] = col.getActualWidth();
|
|
294
268
|
this.initialColumnWidths[colId] = this.getDefaultColumnWidthForCol(colId, colDef);
|
|
295
269
|
const rowGroupColumns = this.gridApi.getRowGroupColumns() ?? [];
|
|
296
270
|
rowGroupColumns.forEach((column) => {
|
|
297
271
|
const colId = column.getColId();
|
|
298
|
-
// const col = this.gridApi.getColumn(colId);
|
|
299
|
-
// const colDef = col.getColDef();
|
|
300
272
|
this.initialColumnWidths[colId] = this.getDefaultColumnWidthForCol(colId);
|
|
301
|
-
// colDef.width ?? colDef.initialWidth ?? DEFAULT_COLUMN_WIDTH;
|
|
302
273
|
});
|
|
303
274
|
};
|
|
304
275
|
colDefs.forEach(iteration);
|
|
305
276
|
}
|
|
306
277
|
onGridLayoutChanged(layout) {
|
|
307
|
-
// we want to have this check, since onGridLayoutChanged might be triggered
|
|
308
|
-
// by some AG Grid actions we're not interested - eg: filter changed
|
|
309
|
-
// and the state of which is not captured by the Layout Model
|
|
310
|
-
// so it would result in a layout object that's similar to the previous one
|
|
311
|
-
// that we fired
|
|
312
|
-
// hence we need this check here as well
|
|
313
278
|
if (this._prevFiredLayout && (0, isLayoutEqual_1.isLayoutEqual)(layout, this._prevFiredLayout)) {
|
|
314
279
|
return;
|
|
315
280
|
}
|
|
@@ -325,16 +290,11 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
325
290
|
layout.RowGroupedColumns.length > 0 &&
|
|
326
291
|
(prevLayout?.RowGroupedColumns || []).join(',') !== layout.RowGroupedColumns.join(',') &&
|
|
327
292
|
layout.RowGroupValues) {
|
|
328
|
-
// most likely the user has changed grouping via some AG Grid action
|
|
329
|
-
// and we need to make sure the expand/collapse state is applied
|
|
330
|
-
// but we want to suspend the listener
|
|
331
|
-
// as it would re-trigger another change
|
|
332
293
|
const unsupress = this.suspendAgGridListener();
|
|
333
294
|
this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
|
|
334
295
|
unsupress();
|
|
335
296
|
}
|
|
336
297
|
if (!shouldSkipTriggerChange) {
|
|
337
|
-
// emit an event that the layout has changed from the grid
|
|
338
298
|
this.emitSync('gridLayoutChanged', layout);
|
|
339
299
|
const log = this.infoLogger.extend('gridLayoutChanged');
|
|
340
300
|
const changes = (0, isLayoutEqual_1.getChanges)((0, normalizeLayoutModel_1.normalizeLayoutModel)(prevLayout), (0, normalizeLayoutModel_1.normalizeLayoutModel)(layout));
|
|
@@ -368,12 +328,10 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
368
328
|
let ColumnSizing = layout.ColumnSizing || {};
|
|
369
329
|
let ColumnVisibility = { ...layout.ColumnVisibility };
|
|
370
330
|
const storePivotResultColumns = !!prevLayout?.PivotResultColumnsOrder;
|
|
371
|
-
//let's also include the column widths of the pivotResult columns
|
|
372
331
|
pivotResultColumns.forEach((col) => {
|
|
373
332
|
const colId = col.getColId();
|
|
374
333
|
const Width = col.getActualWidth();
|
|
375
334
|
const initialWidth = this.initialColumnWidths[colId] ?? DEFAULT_COLUMN_WIDTH;
|
|
376
|
-
// but if the width is the initial/default width, don't include it in the ColumnSizing
|
|
377
335
|
if (Width !== initialWidth) {
|
|
378
336
|
ColumnSizing[colId] = {
|
|
379
337
|
Width,
|
|
@@ -383,9 +341,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
383
341
|
if (!Object.keys(ColumnSizing).length) {
|
|
384
342
|
ColumnSizing = undefined;
|
|
385
343
|
}
|
|
386
|
-
// from column visibility, let's remove all columns that are not actually in the pivot layout
|
|
387
|
-
// since having normal table columns here will break the equality check
|
|
388
|
-
// so we only want to keep the group columns and the pivot result columns
|
|
389
344
|
Object.keys(ColumnVisibility).forEach((colId) => {
|
|
390
345
|
const isInLayout = pivotResultColumnsSet.has(colId) || colId.startsWith(normalizeLayoutModel_1.AUTO_GROUP_COLUMN_ID__SINGLE);
|
|
391
346
|
if (!isInLayout) {
|
|
@@ -423,8 +378,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
423
378
|
PivotExpandLevel: prevLayout?.PivotExpandLevel ?? -1,
|
|
424
379
|
};
|
|
425
380
|
if (storePivotResultColumns) {
|
|
426
|
-
// Save all pivot result columns (including hidden ones from collapsed
|
|
427
|
-
// groups) in their current order, so the order is fully preserved.
|
|
428
381
|
const allPivotResultColumnsInOrder = this.gridApi
|
|
429
382
|
.getColumnState()
|
|
430
383
|
.filter((col) => pivotResultColumnsSet.has(col.colId));
|
|
@@ -467,11 +420,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
467
420
|
}, {});
|
|
468
421
|
const ColumnVisibility = columnState.reduce((acc, colState) => {
|
|
469
422
|
const colId = colState.colId;
|
|
470
|
-
// normally we take the initial width from this object
|
|
471
423
|
let initialWidth = this.initialColumnWidths[colId];
|
|
472
|
-
// but if this is a group column
|
|
473
|
-
// we try to infer it from the default width (when display type is single)
|
|
474
|
-
// or from the respective group column (when display type is multi)
|
|
475
424
|
if (initialWidth === undefined) {
|
|
476
425
|
if (colId === normalizeLayoutModel_1.AUTO_GROUP_COLUMN_ID__SINGLE) {
|
|
477
426
|
const groupByColId = this.gridApi.getRowGroupColumns()[0]?.getColId();
|
|
@@ -489,12 +438,8 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
489
438
|
colSizing.Flex = colState.flex;
|
|
490
439
|
ColumnSizing[colId] = colSizing;
|
|
491
440
|
}
|
|
492
|
-
// and only add the col width to the layout ColumnSizing
|
|
493
|
-
// if it's different from the initial default column width
|
|
494
441
|
else if (colState.width && initialWidth != colState.width) {
|
|
495
442
|
const colSizing = { ...ColumnSizing[colId] };
|
|
496
|
-
// Flex columns often report a computed width without flex in column state —
|
|
497
|
-
// keep explicit Flex sizing from the layout instead of replacing it with pixels.
|
|
498
443
|
if (colSizing.Flex == null) {
|
|
499
444
|
delete colSizing.Flex;
|
|
500
445
|
colSizing.Width = colState.width;
|
|
@@ -519,8 +464,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
519
464
|
return acc;
|
|
520
465
|
}, {});
|
|
521
466
|
if (gridState.pivot?.pivotMode && gridState.sort?.sortModel) {
|
|
522
|
-
// for pivot mode, we can't simply take the current sort from the ColumnState
|
|
523
|
-
// but we have to go via the sortModel from the grid state
|
|
524
467
|
ColumnSorts = gridState.sort.sortModel.map((sort) => {
|
|
525
468
|
return {
|
|
526
469
|
ColumnId: sort.colId,
|
|
@@ -542,8 +485,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
542
485
|
};
|
|
543
486
|
});
|
|
544
487
|
}
|
|
545
|
-
// if there's a current layout set
|
|
546
|
-
// we want to only return the AG Grid columns that are also in the current layout
|
|
547
488
|
if (this.currentLayout &&
|
|
548
489
|
this.currentLayout.TableColumns &&
|
|
549
490
|
this.currentLayout.TableColumns.length > 0) {
|
|
@@ -559,19 +500,11 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
559
500
|
});
|
|
560
501
|
}
|
|
561
502
|
}
|
|
562
|
-
// if (this.isTreeMode()) {
|
|
563
|
-
// // colsInLayout.add(GROUP_COLUMN_ID__SINGLE);
|
|
564
|
-
// }
|
|
565
503
|
TableColumns = TableColumns.filter((colId) => {
|
|
566
504
|
if (colsInLayout.has(colId)) {
|
|
567
505
|
return true;
|
|
568
506
|
}
|
|
569
|
-
// we might hit an edge case where we ungroup one of the 2+ group cols
|
|
570
|
-
// in the current layout - in which case in the prev state of the current layout
|
|
571
|
-
// we had the group column
|
|
572
|
-
// but now we will need to include the current column
|
|
573
507
|
if (colsInLayout.has(`${normalizeLayoutModel_1.AUTO_GROUP_COLUMN_ID__MULTI_PREFIX}${colId}`)) {
|
|
574
|
-
// ColumnVisibility[colId] = false;
|
|
575
508
|
return true;
|
|
576
509
|
}
|
|
577
510
|
const col = this.gridApi.getColumn(colId);
|
|
@@ -605,7 +538,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
605
538
|
}
|
|
606
539
|
if (RowGroupedColumns && RowGroupedColumns.length) {
|
|
607
540
|
const LayoutRowGroupedColumns = this.currentLayout?.RowGroupedColumns || this.currentLayout?.PivotGroupedColumns || [];
|
|
608
|
-
// if it's a new grouping, try and take it
|
|
609
541
|
const isGroupingNew = RowGroupedColumns && RowGroupedColumns.join(',') !== LayoutRowGroupedColumns.join(',');
|
|
610
542
|
if (this.currentLayout?.RowGroupValues) {
|
|
611
543
|
const currentRowGroupValues = this.currentLayout.RowGroupValues;
|
|
@@ -710,8 +642,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
710
642
|
const isPivot = this.isCurrentLayoutPivot();
|
|
711
643
|
const currentColumnGroupState = this.gridApi
|
|
712
644
|
.getColumnGroupState()
|
|
713
|
-
// if we're in a pivot layout, only include groups that are pivot groups
|
|
714
|
-
// as there are other fake groups in the grid as well
|
|
715
645
|
.filter((state) => (isPivot ? state.groupId.startsWith('pivotGroup_') : true));
|
|
716
646
|
if (currentColumnGroupValues.ColumnGroupDisplay === 'expanded') {
|
|
717
647
|
const collapsedGroupIds = currentColumnGroupState
|
|
@@ -783,14 +713,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
783
713
|
colDef = { ...colDef, maxWidth: colSizing.MaxWidth };
|
|
784
714
|
changed = true;
|
|
785
715
|
}
|
|
786
|
-
// this (width and flex) shouldn't be needed theoretically, as applyColumnState will apply sizing
|
|
787
|
-
// using the newly computed column state
|
|
788
|
-
// but for whatever reason, this is needed here, for some edge cases
|
|
789
|
-
// eg: when a layout has a column width a width and minWidth
|
|
790
|
-
// and then we create a new layout with a different width and different min width
|
|
791
|
-
// then if we don't have this code, the new layout might wrongly apply the previous
|
|
792
|
-
// minWidth as the current column width
|
|
793
|
-
// see #edge-case-min-width-width-mismatch
|
|
794
716
|
if (colSizing.Width !== undefined && colSizing.Width !== colDef.width) {
|
|
795
717
|
colDef = { ...colDef, width: colSizing.Width };
|
|
796
718
|
}
|
|
@@ -826,7 +748,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
826
748
|
console.warn('Setting TableColumns to empty array.');
|
|
827
749
|
layout.TableColumns = [];
|
|
828
750
|
}
|
|
829
|
-
// just in case the enduser provided falsy colIds, it will crash AG Grid internals
|
|
830
751
|
layout.TableColumns = layout.TableColumns.filter((colId) => colId != undefined);
|
|
831
752
|
layout = (0, normalizeLayoutModel_1.normalizeTableLayoutModel)(layout, { isTree: _options?.isTree ?? false });
|
|
832
753
|
const agGridState = {};
|
|
@@ -837,8 +758,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
837
758
|
const flatColDefs = flattenColDefs(colDefs);
|
|
838
759
|
const colDefsById = new Map(flatColDefs.map((colDef) => [colDef.colId ?? colDef.field, colDef]));
|
|
839
760
|
const getColDef = (colId) => colDefsById.get(colId);
|
|
840
|
-
// TODO to implement support for row selection in server-side row model
|
|
841
|
-
// agGridState.rowSelection = { ... }
|
|
842
761
|
agGridState.columnVisibility = {
|
|
843
762
|
hiddenColIds: flatColDefs
|
|
844
763
|
.filter((colDef) => {
|
|
@@ -928,7 +847,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
928
847
|
aggregationModel: TableAggregationColumns.map(({ colId, aggFunc }) => {
|
|
929
848
|
if (aggFunc === true) {
|
|
930
849
|
const colDef = getColDef(colId);
|
|
931
|
-
// fallback to SUM if no defaultAggFunc is defined
|
|
932
850
|
aggFunc = colDef?.defaultAggFunc || DEFAULT_AGG_FUNC;
|
|
933
851
|
}
|
|
934
852
|
return {
|
|
@@ -943,26 +861,9 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
943
861
|
static getAGGridInitialStateForPivotLayout(layout, colDefs) {
|
|
944
862
|
layout = (0, normalizeLayoutModel_1.normalizePivotLayoutModel)(layout);
|
|
945
863
|
const agGridState = {};
|
|
946
|
-
// const columnIds = getColumnOrderIdsForAllColDefs([], colDefs);
|
|
947
|
-
// agGridState.columnOrder = {
|
|
948
|
-
// orderedColIds: columnIds,
|
|
949
|
-
// };
|
|
950
864
|
const flatColDefs = flattenColDefs(colDefs);
|
|
951
865
|
const colDefsById = new Map(flatColDefs.map((colDef) => [colDef.colId ?? colDef.field, colDef]));
|
|
952
866
|
const getColDef = (colId) => colDefsById.get(colId);
|
|
953
|
-
// agGridState.columnVisibility = {
|
|
954
|
-
// hiddenColIds: flatColDefs
|
|
955
|
-
// .filter((colDef) => {
|
|
956
|
-
// const colId = colDef.colId ?? colDef.field;
|
|
957
|
-
// return (
|
|
958
|
-
// layout.ColumnVisibility?.[colId] === false ||
|
|
959
|
-
// !layout.OrderedColumns.includes(colId) ||
|
|
960
|
-
// colDef.hide ||
|
|
961
|
-
// colDef.initialHide
|
|
962
|
-
// );
|
|
963
|
-
// })
|
|
964
|
-
// .map((colDef) => colDef.colId ?? colDef.field),
|
|
965
|
-
// };
|
|
966
867
|
agGridState.pivot = {
|
|
967
868
|
pivotMode: true,
|
|
968
869
|
pivotColIds: layout.PivotColumns,
|
|
@@ -1030,7 +931,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1030
931
|
aggregationModel: PivotAggregationColumns.map(({ colId, aggFunc }) => {
|
|
1031
932
|
if (aggFunc === true) {
|
|
1032
933
|
const colDef = getColDef(colId);
|
|
1033
|
-
// fallback to SUM if no defaultAggFunc is defined
|
|
1034
934
|
aggFunc = colDef?.defaultAggFunc || DEFAULT_AGG_FUNC;
|
|
1035
935
|
}
|
|
1036
936
|
return {
|
|
@@ -1047,8 +947,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1047
947
|
layout = (0, normalizeLayoutModel_1.normalizeLayoutModel)(layout, { isTree: this.isTreeMode() });
|
|
1048
948
|
}
|
|
1049
949
|
this.currentLayout = layout;
|
|
1050
|
-
// we do this in order to avoid firing the `gridLayoutChanged` event
|
|
1051
|
-
// when actually applying the layout
|
|
1052
950
|
this._prevFiredLayout = layout;
|
|
1053
951
|
}
|
|
1054
952
|
setLayout(layout, options) {
|
|
@@ -1056,11 +954,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1056
954
|
const shouldSkipTriggerChange = options?.skipTriggerChange === true;
|
|
1057
955
|
const shouldSkipEqualityCheck = options?.force === true;
|
|
1058
956
|
if (!shouldSkipEqualityCheck && (0, isLayoutEqual_1.isLayoutEqual)(this.currentLayout, layout)) {
|
|
1059
|
-
// isLayoutEqual strips Ignore_* properties (ColumnHeaders, Filters, etc.)
|
|
1060
|
-
// so even when grid-derived properties match, we must sync currentLayout
|
|
1061
|
-
// to preserve any Ignore_* changes — otherwise getLayoutModelFromGrid
|
|
1062
|
-
// will copy stale values from this.currentLayout
|
|
1063
|
-
// this.currentLayout = layout;
|
|
1064
957
|
this.silentSetCurrentLayout(layout);
|
|
1065
958
|
return false;
|
|
1066
959
|
}
|
|
@@ -1094,12 +987,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1094
987
|
}
|
|
1095
988
|
applyLayout(layout, options) {
|
|
1096
989
|
this.warn('applyLayout', layout);
|
|
1097
|
-
// we want to do this supress/unsupress thing
|
|
1098
|
-
// as otherwise, our applyLayout will trigger an onChange event
|
|
1099
|
-
// which could trigger another setLayout
|
|
1100
|
-
// yes, we do check for same layout and bail out if it is the same
|
|
1101
|
-
// but we still want to avoid this unnecessary initial loop
|
|
1102
|
-
// which may cause more adaptable work
|
|
1103
990
|
const resume = this.suspendAgGridListener();
|
|
1104
991
|
const pivotMode = this.isInPivotMode();
|
|
1105
992
|
if (!!layout.SuppressAggFuncInHeader !== !!this.gridApi.getGridOption('suppressAggFuncInHeader')) {
|
|
@@ -1289,13 +1176,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1289
1176
|
const rowSelection = LayoutManager.getGridOptionForRowSelectionFromLayout(layout.RowSelection, this.initialRowSelection);
|
|
1290
1177
|
const prevRowSelection = this.gridApi.getGridOption('rowSelection');
|
|
1291
1178
|
this.gridApi.setGridOption('rowSelection', rowSelection);
|
|
1292
|
-
// AG Grid does not always refresh already-rendered cells in the selection
|
|
1293
|
-
// column when `rowSelection.checkboxes` is changed at runtime via setGridOption
|
|
1294
|
-
// (e.g. toggling `checkboxes` or `headerCheckbox`).
|
|
1295
|
-
// In the React wrapper this is masked by React-driven re-renders, but in the vanilla integration
|
|
1296
|
-
// the selection column keeps showing stale content until a manual
|
|
1297
|
-
// `refreshCells` is triggered. We force the refresh here so
|
|
1298
|
-
// all integrations behave consistently.
|
|
1299
1179
|
if (typeof prevRowSelection === 'object' &&
|
|
1300
1180
|
typeof rowSelection === 'object' &&
|
|
1301
1181
|
rowSelection.checkboxes !== prevRowSelection.checkboxes) {
|
|
@@ -1310,9 +1190,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1310
1190
|
applyTableLayout(layout, options) {
|
|
1311
1191
|
this.withSuppressColumnAnimation(() => {
|
|
1312
1192
|
this.ensureSelectionColumnPositionUnlocked(layout);
|
|
1313
|
-
// if we apply the state here, before calling setGridOption for groupDisplayType
|
|
1314
|
-
// the order is not always correctly applied
|
|
1315
|
-
// this.gridApi.applyColumnState(state);
|
|
1316
1193
|
const hasGroupedColumns = layout.RowGroupedColumns && layout.RowGroupedColumns.length;
|
|
1317
1194
|
if (hasGroupedColumns) {
|
|
1318
1195
|
const displayTypeFromLayout = (0, rowGroupDisplayType_1.rowGroupDisplayTypeToGridOption)(layout.RowGroupDisplayType);
|
|
@@ -1321,9 +1198,7 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1321
1198
|
this.gridApi.setGridOption('groupDisplayType', displayTypeFromLayout);
|
|
1322
1199
|
}
|
|
1323
1200
|
}
|
|
1324
|
-
// so we apply the state at the end
|
|
1325
1201
|
this.gridApi.applyColumnState(this.computeColumnStateForTableLayout(layout));
|
|
1326
|
-
// but also let's not forget to apply the row group values
|
|
1327
1202
|
if (hasGroupedColumns && layout.RowGroupValues && !options?.skipApplyRowGroupsExpandedState) {
|
|
1328
1203
|
this.applyRowGroupValues(layout.RowGroupValues, layout.RowGroupedColumns);
|
|
1329
1204
|
}
|
|
@@ -1391,11 +1266,9 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1391
1266
|
currentNode = currentNode.parent;
|
|
1392
1267
|
} while (currentNode.parent);
|
|
1393
1268
|
const shouldBeExpanded = defaultExpanded
|
|
1394
|
-
?
|
|
1395
|
-
// but this node should be expanded if it is not in the map
|
|
1269
|
+
?
|
|
1396
1270
|
!deepMap.has(nodePath)
|
|
1397
|
-
:
|
|
1398
|
-
// but this node should be expanded if it is in the map
|
|
1271
|
+
:
|
|
1399
1272
|
deepMap.has(nodePath);
|
|
1400
1273
|
node.expanded = shouldBeExpanded;
|
|
1401
1274
|
}
|
|
@@ -1413,9 +1286,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1413
1286
|
acc[colId] = index;
|
|
1414
1287
|
return acc;
|
|
1415
1288
|
}, {});
|
|
1416
|
-
// having this set to true will change pivot column order when there is sorting
|
|
1417
|
-
// and we don't want that to happen #keep-sorted-columns-in-same-order-as-unsorted
|
|
1418
|
-
// columnState.applyOrder = true;
|
|
1419
1289
|
const columnIds = getColumnOrderIdsForAllColDefs([
|
|
1420
1290
|
...layout.PivotColumns,
|
|
1421
1291
|
...(layout.PivotAggregationColumns || []).map((col) => col.ColumnId),
|
|
@@ -1435,10 +1305,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1435
1305
|
this.computeColumnSorts(layout, columnState);
|
|
1436
1306
|
this.computePinnedColumns(layout, columnState);
|
|
1437
1307
|
this.computePivotAggregations(layout, columnState);
|
|
1438
|
-
// Add pivot result columns to the state for ordering (will be applied with applyOrder: true later).
|
|
1439
|
-
// Some pivot result columns may already be in the state (e.g. added by computeColumnSorts),
|
|
1440
|
-
// so remove them first and re-add all pivot result columns in the persisted order,
|
|
1441
|
-
// merging any existing state (like sort info) back in.
|
|
1442
1308
|
if (Array.isArray(layout.PivotResultColumnsOrder)) {
|
|
1443
1309
|
const pivotResultColumnsOrderSet = new Set(layout.PivotResultColumnsOrder);
|
|
1444
1310
|
const existingPivotResultState = {};
|
|
@@ -1556,8 +1422,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1556
1422
|
}, {});
|
|
1557
1423
|
columnState.state.forEach((colState) => {
|
|
1558
1424
|
const colSortIndex = sortsToIndexes[colState.colId];
|
|
1559
|
-
// we delete them just to know if there are any left
|
|
1560
|
-
// after the forEach is done
|
|
1561
1425
|
delete sortsToIndexes[colState.colId];
|
|
1562
1426
|
const colSort = sorts[colSortIndex];
|
|
1563
1427
|
if (colSort != undefined) {
|
|
@@ -1570,8 +1434,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1570
1434
|
}
|
|
1571
1435
|
});
|
|
1572
1436
|
if (Object.keys(sortsToIndexes).length) {
|
|
1573
|
-
// if there are some sorts left which were not applied to the columnState
|
|
1574
|
-
// probably those are for pivot result columns, so we need to apply them as well
|
|
1575
1437
|
Object.keys(sortsToIndexes).forEach((colId) => {
|
|
1576
1438
|
const colSortIndex = sortsToIndexes[colId];
|
|
1577
1439
|
const colSort = sorts[colSortIndex];
|
|
@@ -1631,8 +1493,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1631
1493
|
if (visibility[colId] === false) {
|
|
1632
1494
|
return true;
|
|
1633
1495
|
}
|
|
1634
|
-
// for the selection column, return true even
|
|
1635
|
-
// if not explicitly listed in the TableColumns
|
|
1636
1496
|
if (colId === LayoutManager.SELECTION_COLUMN_ID && layout.RowSelection) {
|
|
1637
1497
|
return false;
|
|
1638
1498
|
}
|
|
@@ -1646,7 +1506,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1646
1506
|
colId: columnId,
|
|
1647
1507
|
hide: isColHidden(columnId),
|
|
1648
1508
|
pivot: false,
|
|
1649
|
-
// @ts-ignore
|
|
1650
1509
|
pivotIndex: null,
|
|
1651
1510
|
};
|
|
1652
1511
|
});
|
|
@@ -1658,11 +1517,9 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1658
1517
|
if (currentLayout) {
|
|
1659
1518
|
tableColumns = currentLayout.TableColumns;
|
|
1660
1519
|
if (currentLayout.ColumnVisibility) {
|
|
1661
|
-
// dont auto size hidden columns
|
|
1662
1520
|
tableColumns = tableColumns.filter((colId) => !currentLayout.ColumnVisibility[colId]);
|
|
1663
1521
|
}
|
|
1664
1522
|
if (currentLayout.ColumnSizing) {
|
|
1665
|
-
// dont auto size columns with a set sizing
|
|
1666
1523
|
tableColumns = tableColumns.filter((colId) => !currentLayout.ColumnSizing[colId]);
|
|
1667
1524
|
}
|
|
1668
1525
|
}
|
|
@@ -1685,34 +1542,16 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1685
1542
|
}
|
|
1686
1543
|
}
|
|
1687
1544
|
const columnState = this.computeColumnStateForPivotLayout(layout);
|
|
1688
|
-
// by simply calling this.gridApi.applyColumnState(columnState)
|
|
1689
|
-
// the order of aggregations is not preserved/guaranteed by ag-grid
|
|
1690
|
-
// so we want to apply multiple states - adding aggregations one by one
|
|
1691
|
-
// first: no aggregation
|
|
1692
|
-
// second: [agg[0]]
|
|
1693
|
-
// third: [agg[0], agg[1]]
|
|
1694
|
-
// fourth: ...etc
|
|
1695
|
-
// so we apply the states for all aggregations except the last one
|
|
1696
|
-
//
|
|
1697
1545
|
const aggregationsMapForOrder = (layout.PivotAggregationColumns || []).map((_, index) => layout.PivotAggregationColumns.slice(0, index));
|
|
1698
1546
|
aggregationsMapForOrder.forEach((agg) => {
|
|
1699
|
-
// we're mutating the columnState here
|
|
1700
1547
|
this.computePivotAggregations({ ...layout, PivotAggregationColumns: agg }, columnState);
|
|
1701
|
-
// and apply the state
|
|
1702
1548
|
this.gridApi.applyColumnState(columnState);
|
|
1703
1549
|
});
|
|
1704
|
-
// now recompute and apply the last one
|
|
1705
1550
|
this.computePivotAggregations(layout, columnState);
|
|
1706
|
-
// Apply order only on the final call when PivotResultColumns is specified
|
|
1707
1551
|
if (Array.isArray(layout.PivotResultColumnsOrder)) {
|
|
1708
1552
|
columnState.applyOrder = true;
|
|
1709
1553
|
}
|
|
1710
1554
|
this.gridApi.applyColumnState(columnState);
|
|
1711
|
-
// let's also include the column widths of the pivotResult columns
|
|
1712
|
-
// we can't simply include those in the columnState because the columnState will also apply order
|
|
1713
|
-
// but we don't want to affect the order of the pivotResult columns
|
|
1714
|
-
// so we'll do it manually, and apply the widths after the columnState
|
|
1715
|
-
// by using the gridApi.setColumnWidths method
|
|
1716
1555
|
if (layout.ColumnSizing) {
|
|
1717
1556
|
const colWidthForPivotResultColumns = [];
|
|
1718
1557
|
(this.gridApi.getPivotResultColumns() || []).forEach((col) => {
|
|
@@ -1729,20 +1568,12 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1729
1568
|
}
|
|
1730
1569
|
}
|
|
1731
1570
|
this.applyColumnGroupCollapseExpandState(layout);
|
|
1732
|
-
// but also let's not forget to apply the row group values
|
|
1733
1571
|
if (hasGroupedColumns && layout.RowGroupValues && !options?.skipApplyRowGroupsExpandedState) {
|
|
1734
1572
|
this.applyRowGroupValues(layout.RowGroupValues, layout.PivotGroupedColumns);
|
|
1735
1573
|
}
|
|
1736
1574
|
});
|
|
1737
1575
|
}
|
|
1738
1576
|
applyPivotTotals(layout) {
|
|
1739
|
-
/**
|
|
1740
|
-
* GrandTotalRow
|
|
1741
|
-
*/
|
|
1742
|
-
// is common to both Table and Pivot and is applied in applyLayout()
|
|
1743
|
-
/**
|
|
1744
|
-
* PivotGrandTotal
|
|
1745
|
-
*/
|
|
1746
1577
|
if (layout.PivotGrandTotal) {
|
|
1747
1578
|
const pivotGrandTotal = layout.PivotGrandTotal === true || layout.PivotGrandTotal === 'before'
|
|
1748
1579
|
? 'before'
|
|
@@ -1754,9 +1585,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1754
1585
|
else {
|
|
1755
1586
|
this.gridApi.setGridOption('pivotRowTotals', null);
|
|
1756
1587
|
}
|
|
1757
|
-
/**
|
|
1758
|
-
* PivotColumnTotal
|
|
1759
|
-
*/
|
|
1760
1588
|
if (layout.PivotColumnTotal) {
|
|
1761
1589
|
const pivotColumnTotal = layout.PivotColumnTotal === true || layout.PivotColumnTotal === 'before'
|
|
1762
1590
|
? 'before'
|
|
@@ -1779,7 +1607,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1779
1607
|
}
|
|
1780
1608
|
const colGroupDefs = allDisplayedColumnGroups
|
|
1781
1609
|
.map((colGroup) => colGroup.getDefinition())
|
|
1782
|
-
// we need to filter because there are some fake groups as well, no idea what for
|
|
1783
1610
|
.filter(Boolean);
|
|
1784
1611
|
const colGroupState = [];
|
|
1785
1612
|
const columnGroupExceptions = ColumnGroupValues?.ColumnGroupDisplay === 'collapsed' ||
|
|
@@ -1843,10 +1670,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1843
1670
|
}
|
|
1844
1671
|
return res;
|
|
1845
1672
|
}
|
|
1846
|
-
/**
|
|
1847
|
-
* Refreshes the sort order by refreshing the client side row model.
|
|
1848
|
-
* This is useful when custom sort comparers are defined and the sort needs to be re-applied after filtering.
|
|
1849
|
-
*/
|
|
1850
1673
|
refreshSort() {
|
|
1851
1674
|
this.withSuppressRowAnimation(() => {
|
|
1852
1675
|
this.gridApi.refreshClientSideRowModel('sort');
|
|
@@ -1911,7 +1734,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1911
1734
|
return;
|
|
1912
1735
|
}
|
|
1913
1736
|
this.patchColDefType(colDef, [exports.PIVOT_ANY_TOTAL_COL_TYPE, exports.PIVOT_AGGREGATION_TOTAL_COL_TYPE]);
|
|
1914
|
-
// we do this for all total cols, but we will hide the ones that are not visible
|
|
1915
1737
|
colDef.columnGroupShow = undefined;
|
|
1916
1738
|
const totalColConfig = this.getPivotTotalColumnConfig(colDef, this.currentLayout);
|
|
1917
1739
|
if (!totalColConfig.visible) {
|
|
@@ -1974,8 +1796,6 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
1974
1796
|
}
|
|
1975
1797
|
}
|
|
1976
1798
|
isInPivotMode() {
|
|
1977
|
-
// SSRM comes with its own pivot module implementation
|
|
1978
|
-
// see #ssrm_pivot_module
|
|
1979
1799
|
const isModuleRegistered = this.gridApi.isModuleRegistered('PivotModule') ||
|
|
1980
1800
|
this.gridApi.isModuleRegistered('ServerSideRowModelModule');
|
|
1981
1801
|
return isModuleRegistered && this.gridApi.isPivotMode();
|
|
@@ -2,7 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isPivotColumnTotal = isPivotColumnTotal;
|
|
4
4
|
function isPivotColumnTotal(colId) {
|
|
5
|
-
// pivot group total are spanning cross all aggregations
|
|
6
|
-
// therefore the last part of the colId is empty (hence the "dangling" underscore)
|
|
7
5
|
return colId?.startsWith('pivot_') && colId?.endsWith('_');
|
|
8
6
|
}
|
|
@@ -35,23 +35,16 @@ function normalizeTableLayoutModel(layout, options) {
|
|
|
35
35
|
layout.RowGroupedColumns = [];
|
|
36
36
|
}
|
|
37
37
|
if (!('SuppressAggFuncInHeader' in layout)) {
|
|
38
|
-
// make it an own property
|
|
39
38
|
layout.SuppressAggFuncInHeader = undefined;
|
|
40
39
|
}
|
|
41
40
|
if (!('GrandTotalRow' in layout)) {
|
|
42
|
-
// make it an own property
|
|
43
41
|
layout.GrandTotalRow = undefined;
|
|
44
42
|
}
|
|
45
43
|
if (!('RowSelection' in layout)) {
|
|
46
|
-
// make it an own property
|
|
47
44
|
layout.RowSelection = undefined;
|
|
48
45
|
}
|
|
49
46
|
const ColumnOrderSet = new Set(layout.TableColumns);
|
|
50
47
|
if (layout.RowGroupedColumns && layout.RowGroupedColumns.length && layout.TableColumns) {
|
|
51
|
-
// the layout.TableColumns might not include the group columns
|
|
52
|
-
//
|
|
53
|
-
// but we want to include those columnIds in the TableColumns
|
|
54
|
-
// so the layout is properly specified
|
|
55
48
|
let displayType = layout.RowGroupDisplayType;
|
|
56
49
|
if (!displayType) {
|
|
57
50
|
layout.TableColumns.some((columnId) => {
|
|
@@ -80,30 +73,20 @@ function normalizeTableLayoutModel(layout, options) {
|
|
|
80
73
|
[...layout.RowGroupedColumns].reverse().forEach((colId) => {
|
|
81
74
|
const groupColId = `${exports.AUTO_GROUP_COLUMN_ID__MULTI_PREFIX}${colId}`;
|
|
82
75
|
if (!ColumnOrderSet.has(groupColId) && !ColumnOrderSet.has(colId)) {
|
|
83
|
-
// add the col to the beginning of the layout.OrderedColumns
|
|
84
76
|
layout.TableColumns.unshift(colId);
|
|
85
77
|
ColumnOrderSet.add(colId);
|
|
86
|
-
// the .flatMap below will handle the rest
|
|
87
78
|
}
|
|
88
79
|
});
|
|
89
80
|
const MappedColumnOrder = layout.TableColumns.flatMap((colId) => {
|
|
90
81
|
if (GroupedCols.has(colId)) {
|
|
91
|
-
// if the column is grouped by
|
|
92
82
|
const groupColId = `${exports.AUTO_GROUP_COLUMN_ID__MULTI_PREFIX}${colId}`;
|
|
93
|
-
// but there's no column for this group in the layout
|
|
94
83
|
if (!ColumnOrderSet.has(groupColId)) {
|
|
95
|
-
// then we assume that the current column is basically the group column
|
|
96
|
-
// so we return both the group column and the current column
|
|
97
|
-
// but make the current column hidden
|
|
98
84
|
layout.ColumnVisibility[colId] = false;
|
|
99
85
|
return [groupColId, colId];
|
|
100
86
|
}
|
|
101
87
|
}
|
|
102
|
-
// if this is a group column
|
|
103
88
|
if (colId.startsWith(exports.AUTO_GROUP_COLUMN_ID__MULTI_PREFIX)) {
|
|
104
89
|
const simpleColId = colId.replace(exports.AUTO_GROUP_COLUMN_ID__MULTI_PREFIX, '');
|
|
105
|
-
// but the corresponding simple column is not in the layout
|
|
106
|
-
// then let's include it, with visibility set to false
|
|
107
90
|
if (!ColumnOrderSet.has(simpleColId)) {
|
|
108
91
|
layout.ColumnVisibility[simpleColId] = false;
|
|
109
92
|
return [colId, simpleColId];
|
|
@@ -119,8 +102,6 @@ function normalizeTableLayoutModel(layout, options) {
|
|
|
119
102
|
};
|
|
120
103
|
}
|
|
121
104
|
}
|
|
122
|
-
// there might be a case where there are we have an RowGroupedColumns array, but it's empty (or it's inexistent altogether)
|
|
123
|
-
// and there is no display type specified - so default it to single
|
|
124
105
|
if (!layout.RowGroupDisplayType && layout.TableColumns) {
|
|
125
106
|
layout.RowGroupDisplayType = 'single';
|
|
126
107
|
}
|
|
@@ -167,28 +148,21 @@ function normalizePivotLayoutModel(layout) {
|
|
|
167
148
|
};
|
|
168
149
|
}
|
|
169
150
|
if (!('SuppressAggFuncInHeader' in layout)) {
|
|
170
|
-
// make it an own property
|
|
171
151
|
layout.SuppressAggFuncInHeader = undefined;
|
|
172
152
|
}
|
|
173
153
|
if (!('GrandTotalRow' in layout)) {
|
|
174
|
-
// make it an own property
|
|
175
154
|
layout.GrandTotalRow = undefined;
|
|
176
155
|
}
|
|
177
156
|
if (!('PivotGrandTotal' in layout)) {
|
|
178
|
-
// make it an own property
|
|
179
157
|
layout.PivotGrandTotal = undefined;
|
|
180
158
|
}
|
|
181
159
|
if (!('PivotColumnTotal' in layout)) {
|
|
182
|
-
// make it an own property
|
|
183
160
|
layout.PivotColumnTotal = undefined;
|
|
184
161
|
}
|
|
185
162
|
if (!('RowSelection' in layout)) {
|
|
186
|
-
// make it an own property
|
|
187
163
|
layout.RowSelection = undefined;
|
|
188
164
|
}
|
|
189
|
-
// if (layout.PivotGroupedColumns && layout.PivotGroupedColumns.length) {
|
|
190
165
|
layout.RowGroupDisplayType = layout.RowGroupDisplayType || 'single';
|
|
191
|
-
// }
|
|
192
166
|
return layout;
|
|
193
167
|
}
|
|
194
168
|
function normalizeLayoutModel(layout, options) {
|
|
@@ -197,5 +171,4 @@ function normalizeLayoutModel(layout, options) {
|
|
|
197
171
|
}
|
|
198
172
|
return normalizeTableLayoutModel(layout, options);
|
|
199
173
|
}
|
|
200
|
-
//@ts-ignore
|
|
201
174
|
globalThis.normalizeTableLayoutModel = normalizeTableLayoutModel;
|