@adaptabletools/adaptable-cjs 18.0.0-canary.9 → 18.0.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/base.css +18 -20
- package/base.css.map +1 -1
- package/index.css +22 -20
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +5 -6
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +3 -2
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +14 -13
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +94 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +20 -9
- package/src/AdaptableOptions/ContextMenuOptions.d.ts +94 -0
- package/src/AdaptableOptions/CustomSortOptions.d.ts +2 -2
- package/src/AdaptableOptions/DataImportOptions.d.ts +2 -2
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -26
- package/src/AdaptableOptions/NoteOptions.d.ts +12 -3
- package/src/AdaptableOptions/PredicateOptions.d.ts +2 -2
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
- package/src/AdaptableOptions/StateOptions.d.ts +6 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +16 -6
- package/src/Api/ColumnApi.d.ts +13 -0
- package/src/Api/ColumnMenuApi.d.ts +13 -0
- package/src/Api/{ScopeApi.d.ts → ColumnScopeApi.d.ts} +28 -28
- package/src/Api/CommentApi.d.ts +20 -22
- package/src/Api/ConfigApi.d.ts +3 -4
- package/src/Api/ContextMenuApi.d.ts +9 -0
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/Events/CommentChanged.js +2 -0
- package/src/Api/Events/GridDataChanged.d.ts +1 -1
- package/src/Api/FlashingCellApi.d.ts +2 -2
- package/src/Api/GridApi.d.ts +32 -4
- package/src/Api/Implementation/ActionColumnApiImpl.js +3 -6
- package/src/Api/Implementation/ActionRowApiImpl.js +3 -7
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +7 -5
- package/src/Api/Implementation/AdaptableApiImpl.js +9 -5
- package/src/Api/Implementation/AlertApiImpl.js +8 -13
- package/src/Api/Implementation/ApiBase.d.ts +6 -4
- package/src/Api/Implementation/ApiBase.js +11 -5
- package/src/Api/Implementation/CalendarApiImpl.js +1 -6
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/ChartingApiImpl.js +3 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -0
- package/src/Api/Implementation/ColumnApiImpl.js +48 -16
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +8 -0
- package/src/Api/Implementation/ColumnMenuApiImpl.js +16 -0
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +33 -0
- package/src/Api/Implementation/{ScopeApiImpl.js → ColumnScopeApiImpl.js} +48 -15
- package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -5
- package/src/Api/Implementation/CommentsApiImpl.js +6 -6
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +21 -25
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +7 -0
- package/src/Api/Implementation/ContextMenuApiImpl.js +13 -0
- package/src/Api/Implementation/DashboardApiImpl.js +1 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +14 -19
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -2
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -8
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -2
- package/src/Api/Implementation/GridApiImpl.js +52 -11
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -7
- package/src/Api/Implementation/LayoutApiImpl.js +6 -15
- package/src/Api/Implementation/{NotesApiImpl.d.ts → NoteApiImpl.d.ts} +8 -8
- package/src/Api/Implementation/{NotesApiImpl.js → NoteApiImpl.js} +14 -14
- package/src/Api/Implementation/OptionsApiImpl.d.ts +6 -5
- package/src/Api/Implementation/OptionsApiImpl.js +7 -4
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/TeamSharingApiImpl.js +3 -15
- package/src/Api/Implementation/ThemeApiImpl.js +2 -7
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +14 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +32 -27
- package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -0
- package/src/Api/Internal/ActionRowInternalApi.js +19 -46
- package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
- package/src/Api/Internal/AdaptableInternalApi.js +16 -30
- package/src/Api/Internal/AlertInternalApi.d.ts +2 -2
- package/src/Api/Internal/AlertInternalApi.js +7 -20
- package/src/Api/Internal/CalculatedColumnInternalApi.js +10 -16
- package/src/Api/Internal/ChartingInternalApi.js +13 -13
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +24 -30
- package/src/Api/Internal/ColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/ColumnInternalApi.js +8 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -1
- package/src/Api/Internal/CommentsInternalApi.js +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +5 -11
- package/src/Api/Internal/DataImportInternalApi.js +3 -9
- package/src/Api/Internal/DataSetInternalApi.js +2 -7
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +8 -5
- package/src/Api/Internal/ExpressionInternalApi.js +3 -13
- package/src/Api/Internal/Fdc3InternalApi.js +3 -12
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +3 -6
- package/src/Api/Internal/FormatColumnInternalApi.js +37 -30
- package/src/Api/Internal/FreeTextColumnInternalApi.js +4 -3
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +8 -8
- package/src/Api/Internal/GridInternalApi.d.ts +2 -0
- package/src/Api/Internal/GridInternalApi.js +28 -40
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -0
- package/src/Api/Internal/LayoutInternalApi.js +26 -19
- package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
- package/src/Api/Internal/{NotesInternalApi.js → NoteInternalApi.js} +6 -5
- package/src/Api/Internal/PredicateInternalApi.d.ts +6 -6
- package/src/Api/Internal/PredicateInternalApi.js +5 -40
- package/src/Api/Internal/ScheduleInternalApi.js +1 -6
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +2 -2
- package/src/Api/Internal/StyledColumnInternalApi.js +8 -9
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -7
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +9 -12
- package/src/Api/NoteApi.d.ts +48 -0
- package/src/Api/NoteApi.js +2 -0
- package/src/Api/OptionsApi.d.ts +14 -10
- package/src/Api/UserInterfaceApi.d.ts +15 -13
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
- package/src/PredefinedConfig/AlertState.d.ts +2 -2
- package/src/PredefinedConfig/CommentState.d.ts +27 -23
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
- package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -14
- package/src/PredefinedConfig/Common/{AdaptableScope.d.ts → ColumnScope.d.ts} +1 -1
- package/src/PredefinedConfig/Common/ColumnScope.js +2 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +1 -5
- package/src/PredefinedConfig/Common/Enums.d.ts +4 -1
- package/src/PredefinedConfig/Common/Enums.js +3 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.d.ts +39 -4
- package/src/PredefinedConfig/Common/Menu.js +126 -0
- package/src/PredefinedConfig/Common/RowScope.d.ts +17 -0
- package/src/PredefinedConfig/Common/RowScope.js +2 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +15 -1
- package/src/PredefinedConfig/Common/RowSummary.js +17 -1
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
- package/src/PredefinedConfig/Common/TransposeConfig.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/ExportState.d.ts +2 -2
- package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +9 -5
- package/src/PredefinedConfig/LayoutState.d.ts +2 -2
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +4 -4
- package/src/PredefinedConfig/NoteState.js +2 -0
- package/src/PredefinedConfig/PlusMinusState.d.ts +2 -2
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +2 -2
- package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
- package/src/PredefinedConfig/ShortcutState.d.ts +2 -2
- package/src/PredefinedConfig/StyledColumnState.d.ts +5 -5
- package/src/PredefinedConfig/SystemState.d.ts +5 -4
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -4
- package/src/Redux/ActionsReducers/CommentsRedux.js +1 -39
- package/src/Redux/ActionsReducers/LayoutRedux.js +12 -10
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +31 -31
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -13
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -22
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +11 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +14 -11
- package/src/Redux/Store/AdaptableStore.js +39 -32
- package/src/Strategy/AdaptableModuleBase.d.ts +10 -10
- package/src/Strategy/AdaptableModuleBase.js +13 -16
- package/src/Strategy/AlertModule.d.ts +3 -2
- package/src/Strategy/AlertModule.js +4 -4
- package/src/Strategy/BulkUpdateModule.d.ts +3 -2
- package/src/Strategy/BulkUpdateModule.js +2 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +3 -4
- package/src/Strategy/CalculatedColumnModule.js +18 -14
- package/src/Strategy/CellSummaryModule.d.ts +9 -9
- package/src/Strategy/CellSummaryModule.js +96 -107
- package/src/Strategy/ColumnFilterModule.d.ts +3 -3
- package/src/Strategy/ColumnFilterModule.js +36 -57
- package/src/Strategy/ColumnInfoModule.d.ts +3 -3
- package/src/Strategy/ColumnInfoModule.js +6 -4
- package/src/Strategy/CommentModule.d.ts +12 -0
- package/src/Strategy/CommentModule.js +75 -0
- package/src/Strategy/CustomSortModule.d.ts +1 -2
- package/src/Strategy/CustomSortModule.js +3 -2
- package/src/Strategy/DashboardModule.d.ts +3 -3
- package/src/Strategy/DashboardModule.js +10 -20
- package/src/Strategy/DataImportModule.d.ts +4 -4
- package/src/Strategy/DataImportModule.js +8 -8
- package/src/Strategy/ExportModule.d.ts +1 -2
- package/src/Strategy/ExportModule.js +56 -42
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +3 -13
- package/src/Strategy/FlashingCellModule.d.ts +4 -3
- package/src/Strategy/FlashingCellModule.js +10 -10
- package/src/Strategy/FormatColumnModule.d.ts +1 -1
- package/src/Strategy/FormatColumnModule.js +29 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -2
- package/src/Strategy/FreeTextColumnModule.js +2 -2
- package/src/Strategy/GridInfoModule.d.ts +3 -3
- package/src/Strategy/GridInfoModule.js +5 -3
- package/src/Strategy/Interface/IModule.d.ts +4 -4
- package/src/Strategy/LayoutModule.d.ts +4 -10
- package/src/Strategy/LayoutModule.js +50 -150
- package/src/Strategy/NoteModule.d.ts +10 -0
- package/src/Strategy/NoteModule.js +60 -0
- package/src/Strategy/PlusMinusModule.d.ts +1 -2
- package/src/Strategy/PlusMinusModule.js +5 -5
- package/src/Strategy/SettingsPanelModule.d.ts +3 -3
- package/src/Strategy/SettingsPanelModule.js +6 -6
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.d.ts +3 -2
- package/src/Strategy/SmartEditModule.js +2 -1
- package/src/Strategy/StyledColumnModule.d.ts +2 -1
- package/src/Strategy/StyledColumnModule.js +42 -22
- package/src/Strategy/SystemStatusModule.d.ts +3 -3
- package/src/Strategy/SystemStatusModule.js +6 -3
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +4 -2
- package/src/Strategy/Utilities/getScopeViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +144 -7
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +21 -1
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/MenuItem.d.ts +10 -7
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +7 -25
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +12 -10
- package/src/Utilities/Services/CellPopupService.js +4 -4
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
- package/src/Utilities/Services/LicenseService/index.js +1 -198
- package/src/Utilities/Services/ModuleService.js +6 -2
- package/src/Utilities/Services/QueryLanguageService.js +2 -2
- package/src/Utilities/Services/ReportService.d.ts +7 -5
- package/src/Utilities/Services/ReportService.js +245 -26
- package/src/Utilities/Services/RowSummaryService.d.ts +26 -0
- package/src/Utilities/Services/RowSummaryService.js +160 -0
- package/src/Utilities/Services/ValidationService.js +2 -2
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +18 -0
- package/src/Utilities/license/decode.js +1 -70
- package/src/Utilities/license/hashing.js +1 -47
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/Alert/AlertEntityRow.js +1 -1
- package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +2 -2
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
- package/src/View/ColumnInfo/ColumnInfo.js +1 -1
- package/src/View/Comments/CommentsEditor.js +28 -17
- package/src/View/Comments/CommentsPopup.js +15 -7
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +46 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/CellPopup/index.d.ts +1 -0
- package/src/View/Components/CellPopup/index.js +6 -3
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts +3 -3
- package/src/View/Components/EntityRulesEditor/index.d.ts +3 -3
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/FilterForm/QuickFilterValues.js +39 -23
- package/src/View/Components/NewScopeComponent.d.ts +5 -5
- package/src/View/Components/NewScopeComponent.js +6 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +10 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -10
- package/src/View/Components/RangesComponent.d.ts +2 -2
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +2 -2
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +4 -2
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +20 -7
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +27 -12
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/TransposedPopup.js +20 -19
- package/src/View/Layout/Wizard/LayoutWizard.js +38 -3
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +18 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +181 -0
- package/src/View/License/LicenseWatermark.js +1 -66
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +16 -11
- package/src/View/PlusMinus/PlusMinusSummary.js +2 -2
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +5 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +38 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -1
- package/src/agGrid/ActionColumnRenderer.js +40 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +11 -16
- package/src/agGrid/AdaptableAgGrid.js +230 -250
- package/src/agGrid/AgGridAdapter.d.ts +4 -2
- package/src/agGrid/AgGridAdapter.js +12 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -3
- package/src/agGrid/AgGridColumnAdapter.js +42 -71
- package/src/agGrid/AgGridMenuAdapter.d.ts +25 -8
- package/src/agGrid/AgGridMenuAdapter.js +405 -74
- package/src/agGrid/AgGridOptionsService.d.ts +4 -1
- package/src/agGrid/AgGridOptionsService.js +22 -0
- package/src/agGrid/BadgeRenderer.d.ts +2 -2
- package/src/agGrid/BadgeRenderer.js +24 -11
- package/src/agGrid/PercentBarRenderer.js +2 -1
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +7 -0
- package/src/agGrid/buildSortedColumnStateForLayout.js +124 -0
- package/src/agGrid/defaultAdaptableOptions.js +7 -12
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/sortColumnStateForVisibleColumns.d.ts +12 -0
- package/src/agGrid/sortColumnStateForVisibleColumns.js +50 -0
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +1 -56
- package/src/components/Accordion.d.ts +7 -0
- package/src/components/Accordion.js +41 -0
- package/src/components/Datepicker/index.js +10 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +3 -17
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/ProgressIndicator/ProgressIndicator.js +15 -6
- package/src/components/Select/Select.d.ts +1 -1
- package/src/components/Select/Select.js +3 -1
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/components/icons/collapse-all.d.ts +3 -0
- package/src/components/icons/collapse-all.js +7 -0
- package/src/components/icons/copy.d.ts +3 -0
- package/src/components/icons/copy.js +7 -0
- package/src/components/icons/csv.d.ts +3 -0
- package/src/components/icons/csv.js +7 -0
- package/src/components/icons/data-object.d.ts +3 -0
- package/src/components/icons/data-object.js +7 -0
- package/src/components/icons/excel.d.ts +3 -0
- package/src/components/icons/excel.js +8 -0
- package/src/components/icons/expand-all.d.ts +3 -0
- package/src/components/icons/expand-all.js +7 -0
- package/src/components/icons/filter-off.d.ts +3 -0
- package/src/components/icons/filter-off.js +7 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +7 -0
- package/src/components/icons/index.js +22 -0
- package/src/components/icons/note.js +2 -2
- package/src/components/icons/select-all.d.ts +3 -0
- package/src/components/icons/select-all.js +7 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +7 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +7 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +222 -116
- package/src/metamodel/adaptable.metamodel.js +1 -9429
- package/src/parser/src/parser.js +576 -553
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -4
- package/src/parser/src/types.d.ts +2 -2
- package/src/parser/src/types.js +1 -2
- package/src/types.d.ts +32 -25
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +0 -234
- package/src/AdaptableOptions/MenuOptions.js +0 -99
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/Api/Implementation/ScopeApiImpl.d.ts +0 -33
- package/src/Api/Internal/NotesInternalApi.d.ts +0 -4
- package/src/Api/NotesApi.d.ts +0 -48
- package/src/PredefinedConfig/CellAddress.d.ts +0 -13
- package/src/PredefinedConfig/CellAddress.js +0 -5
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
- package/src/Strategy/CommentsModule.d.ts +0 -17
- package/src/Strategy/CommentsModule.js +0 -86
- package/src/Strategy/NotesModule.d.ts +0 -10
- package/src/Strategy/NotesModule.js +0 -61
- package/src/Utilities/Services/SummaryService.d.ts +0 -19
- package/src/Utilities/Services/SummaryService.js +0 -33
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- /package/src/{Api/Events/CommentsChangedInfo.js → AdaptableOptions/ColumnMenuOptions.js} +0 -0
- /package/src/{Api/NotesApi.js → AdaptableOptions/ContextMenuOptions.js} +0 -0
- /package/src/Api/{ScopeApi.js → ColumnMenuApi.js} +0 -0
- /package/src/{PredefinedConfig/Common/AdaptableScope.js → Api/ColumnScopeApi.js} +0 -0
- /package/src/{PredefinedConfig/NotesState.js → Api/ContextMenuApi.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -63,12 +63,12 @@ const ColumnInfoModule_1 = require("../Strategy/ColumnInfoModule");
|
|
|
63
63
|
const SettingsPanelModule_1 = require("../Strategy/SettingsPanelModule");
|
|
64
64
|
const StatusBarModule_1 = require("../Strategy/StatusBarModule");
|
|
65
65
|
const ChartingModule_1 = require("../Strategy/ChartingModule");
|
|
66
|
-
const
|
|
66
|
+
const NoteModule_1 = require("../Strategy/NoteModule");
|
|
67
67
|
const StyledColumnModule_1 = require("../Strategy/StyledColumnModule");
|
|
68
68
|
const Fdc3Module_1 = require("../Strategy/Fdc3Module");
|
|
69
69
|
const GridFilterModule_1 = require("../Strategy/GridFilterModule");
|
|
70
70
|
const NamedQueryModule_1 = require("../Strategy/NamedQueryModule");
|
|
71
|
-
const
|
|
71
|
+
const CommentModule_1 = require("../Strategy/CommentModule");
|
|
72
72
|
const AdaptableNumberEditor_1 = require("./editors/AdaptableNumberEditor");
|
|
73
73
|
const AdaptableDateEditor_1 = require("./editors/AdaptableDateEditor");
|
|
74
74
|
const Helper_1 = require("../Utilities/Helpers/Helper");
|
|
@@ -99,7 +99,8 @@ const AdaptableUpgradeHelper_1 = require("../migration/AdaptableUpgradeHelper");
|
|
|
99
99
|
const Modal_1 = require("../components/Modal");
|
|
100
100
|
const AdaptableLoadingScreen_1 = require("../View/Components/Popups/AdaptableLoadingScreen");
|
|
101
101
|
const react_1 = require("react");
|
|
102
|
-
const
|
|
102
|
+
const AdaptableHelper_1 = require("../Utilities/Helpers/AdaptableHelper");
|
|
103
|
+
const buildSortedColumnStateForLayout_1 = require("./buildSortedColumnStateForLayout");
|
|
103
104
|
const RowNodeProto = core_1.RowNode.prototype;
|
|
104
105
|
const RowNode_dispatchLocalEvent = RowNodeProto.dispatchLocalEvent;
|
|
105
106
|
/**
|
|
@@ -147,7 +148,7 @@ class AdaptableAgGrid {
|
|
|
147
148
|
* once layouts are properly handled with the new aggrid methods & events
|
|
148
149
|
* we can remove this hack
|
|
149
150
|
*/
|
|
150
|
-
this.
|
|
151
|
+
this.previousAgGridLayoutState = '';
|
|
151
152
|
this.columnMinMaxValuesCache = {};
|
|
152
153
|
this.renderReactRoot = (node, container) => (0, renderReactRoot_1.renderReactRoot)(node, container);
|
|
153
154
|
/**
|
|
@@ -258,6 +259,7 @@ class AdaptableAgGrid {
|
|
|
258
259
|
async _initAdaptableAgGrid(config) {
|
|
259
260
|
var _a, _b;
|
|
260
261
|
// Phase 1: Preprocess Adaptable Options
|
|
262
|
+
this._isDetailGrid = config.isDetailGrid === true;
|
|
261
263
|
this.lifecycleState = 'preprocessOptions';
|
|
262
264
|
this._rawAdaptableOptions = config.adaptableOptions;
|
|
263
265
|
if (StringExtensions_1.default.IsNullOrEmptyOrWhiteSpace(this._rawAdaptableOptions.adaptableId)) {
|
|
@@ -299,6 +301,7 @@ class AdaptableAgGrid {
|
|
|
299
301
|
this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
|
|
300
302
|
const perfLoadStore = this.logger.beginPerf(`loadStore()`);
|
|
301
303
|
this.adaptableStore = this.initAdaptableStore();
|
|
304
|
+
this.forPlugins((plugin) => plugin.afterInitStore(this));
|
|
302
305
|
await this.adaptableStore.loadStore({
|
|
303
306
|
adaptable: this,
|
|
304
307
|
adaptableStateKey: this.adaptableOptions.adaptableStateKey,
|
|
@@ -308,15 +311,14 @@ class AdaptableAgGrid {
|
|
|
308
311
|
* e.g. adding default Layout, migrating deprecated state, etc.
|
|
309
312
|
*/
|
|
310
313
|
postLoadHook: (state) => {
|
|
311
|
-
if (this.adaptableOptions.autoMigrateState) {
|
|
314
|
+
if (this.adaptableOptions.stateOptions.autoMigrateState) {
|
|
312
315
|
state = AdaptableUpgradeHelper_1.AdaptableUpgradeHelper.migrateAdaptableState(state, {
|
|
313
316
|
// version 16 actually includes all versions up until 16
|
|
314
317
|
fromVersion: 16,
|
|
315
318
|
logger: this.logger,
|
|
316
319
|
});
|
|
317
320
|
}
|
|
318
|
-
state = this.
|
|
319
|
-
state = this.normaliseToolPanelState(state);
|
|
321
|
+
state = this.normalizeAdaptableState(state, config.gridOptions);
|
|
320
322
|
return state;
|
|
321
323
|
},
|
|
322
324
|
});
|
|
@@ -326,8 +328,7 @@ class AdaptableAgGrid {
|
|
|
326
328
|
return Promise.reject('Adaptable was destroyed while loading the store.');
|
|
327
329
|
// FIXME AFL MIG: is this enough?! talk with the team
|
|
328
330
|
}
|
|
329
|
-
this.forPlugins((plugin) => plugin.
|
|
330
|
-
this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
|
|
331
|
+
this.forPlugins((plugin) => plugin.afterInitialStateLoaded(this));
|
|
331
332
|
// do this now so it sets module entitlements
|
|
332
333
|
this.EntitlementService.setModulesEntitlements();
|
|
333
334
|
/**
|
|
@@ -363,7 +364,7 @@ class AdaptableAgGrid {
|
|
|
363
364
|
this.api.themeApi.applyCurrentTheme();
|
|
364
365
|
this.validatePrimaryKey();
|
|
365
366
|
this.embedColumnMenu = this.agGridAdapter.isModulePresent(core_1.ModuleNames.MenuModule);
|
|
366
|
-
this.api.internalApi.setTreeMode(this.agGridAdapter.
|
|
367
|
+
this.api.internalApi.setTreeMode(!!this.agGridAdapter.getAgGridApi().getGridOption('treeData'));
|
|
367
368
|
// TODO AFL MIG: we could just patch the defautl Layout on init? instead
|
|
368
369
|
this.checkShouldClearExistingFiltersOrSearches();
|
|
369
370
|
this.applyColumnFiltering();
|
|
@@ -371,6 +372,16 @@ class AdaptableAgGrid {
|
|
|
371
372
|
this.temporaryAdaptableStateUpdates();
|
|
372
373
|
this.redrawBody();
|
|
373
374
|
this.refreshHeader();
|
|
375
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
376
|
+
if (currentLayout.EnablePivot) {
|
|
377
|
+
// this is very very strange!
|
|
378
|
+
// for some projects, if the initial layout is pivot, the columnDefs of the pivot resutl columns are NOT derived correctly from the main colDefs
|
|
379
|
+
// doing the following line fixes the issue because it foces the pivot columns to be created again
|
|
380
|
+
// this proj works without the hack: /tests/pages/format-column/initial-pivot-layout.page.tsx
|
|
381
|
+
// but this proj needs the hack: /tests/pages/format-column/initial-pivot-layout-docs.page.tsx
|
|
382
|
+
this.agGridAdapter.setGridOption('pivotMode', false);
|
|
383
|
+
this.agGridAdapter.setGridOption('pivotMode', true);
|
|
384
|
+
}
|
|
374
385
|
// create the module menu (for use in the dashboard and the toolpanel)
|
|
375
386
|
// TODO see #create-create-module-menu - make sure it's the same here and there
|
|
376
387
|
this.ModuleService.createModuleMenus();
|
|
@@ -387,14 +398,18 @@ class AdaptableAgGrid {
|
|
|
387
398
|
adaptableApi: this.api,
|
|
388
399
|
agGridApi: this.agGridAdapter.getAgGridApi(),
|
|
389
400
|
});
|
|
390
|
-
this.api.userInterfaceApi.hideLoadingScreen();
|
|
391
401
|
perfInitAdaptableAgGrid.end();
|
|
392
402
|
return Promise.resolve(this.api);
|
|
393
403
|
}
|
|
394
|
-
|
|
404
|
+
normalizeAdaptableState(state, gridOptions) {
|
|
405
|
+
state = this.normaliseLayoutState(state, gridOptions);
|
|
406
|
+
state = this.normaliseToolPanelState(state);
|
|
407
|
+
return state;
|
|
408
|
+
}
|
|
409
|
+
normaliseLayoutState(state, gridOptions) {
|
|
395
410
|
var _a, _b, _c, _d, _e, _f;
|
|
396
411
|
if (this.shouldCreateDefaultLayout(state, this.adaptableOptions)) {
|
|
397
|
-
const defaultLayout = this.createDefaultLayout(state,
|
|
412
|
+
const defaultLayout = this.createDefaultLayout(state, gridOptions.columnDefs);
|
|
398
413
|
const layoutState = state.Layout || {};
|
|
399
414
|
const availableLayouts = layoutState.Layouts || [];
|
|
400
415
|
availableLayouts.push(defaultLayout);
|
|
@@ -430,7 +445,7 @@ class AdaptableAgGrid {
|
|
|
430
445
|
* logic where layout is applied, it is easier and
|
|
431
446
|
* less error prone to just remove it.
|
|
432
447
|
*/
|
|
433
|
-
if (
|
|
448
|
+
if (gridOptions.rowModelType === 'viewport') {
|
|
434
449
|
(_f = state.Layout.Layouts) === null || _f === void 0 ? void 0 : _f.forEach((layout) => {
|
|
435
450
|
if (layout.RowGroupedColumns) {
|
|
436
451
|
delete layout.RowGroupedColumns;
|
|
@@ -462,15 +477,13 @@ class AdaptableAgGrid {
|
|
|
462
477
|
}
|
|
463
478
|
refreshQuickFilter() {
|
|
464
479
|
const isQuickFilterVisible = this.api.internalApi.getSystemState().IsQuickFilterVisible;
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
else {
|
|
473
|
-
this.api.columnFilterApi.hideQuickFilterBar();
|
|
480
|
+
if (this.isQuickFilterAvailable()) {
|
|
481
|
+
if (isQuickFilterVisible) {
|
|
482
|
+
this.api.columnFilterApi.showQuickFilterBar();
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
this.api.columnFilterApi.hideQuickFilterBar();
|
|
486
|
+
}
|
|
474
487
|
}
|
|
475
488
|
}
|
|
476
489
|
applyColumnFiltering() {
|
|
@@ -889,12 +902,30 @@ class AdaptableAgGrid {
|
|
|
889
902
|
}
|
|
890
903
|
return original_floatingFiltersHeight;
|
|
891
904
|
});
|
|
905
|
+
/**
|
|
906
|
+
* `excelStyles`
|
|
907
|
+
*/
|
|
908
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'excelStyles', (original_excelStyles) => {
|
|
909
|
+
// we need this here just to register the original excelStyles in the service
|
|
910
|
+
return original_excelStyles;
|
|
911
|
+
});
|
|
912
|
+
/**
|
|
913
|
+
* `processPivotResultColDef`
|
|
914
|
+
*/
|
|
915
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', () => {
|
|
916
|
+
return (colDef) => {
|
|
917
|
+
if (this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
|
|
918
|
+
colDef.floatingFilter = false;
|
|
919
|
+
colDef.filter = false;
|
|
920
|
+
}
|
|
921
|
+
};
|
|
922
|
+
});
|
|
892
923
|
/**
|
|
893
924
|
* `columnTypes`
|
|
894
925
|
*/
|
|
895
926
|
// this will have to go/be heavily extended with https://github.com/AdaptableTools/adaptable/issues/2230
|
|
896
927
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'columnTypes', (original_columnTypes) => {
|
|
897
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
928
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
898
929
|
const providedColumnTypes = original_columnTypes || {};
|
|
899
930
|
const gridOptionsColumnTypes = gridOptions.columnTypes || {};
|
|
900
931
|
const patchedColumnTypes = Object.assign(providedColumnTypes, {
|
|
@@ -911,6 +942,12 @@ class AdaptableAgGrid {
|
|
|
911
942
|
abColDefTupleNumberArray: (_j = gridOptionsColumnTypes.abColDefTupleNumberArray) !== null && _j !== void 0 ? _j : {},
|
|
912
943
|
abColDefObjectNumberArray: (_k = gridOptionsColumnTypes.abColDefObjectNumberArray) !== null && _k !== void 0 ? _k : {},
|
|
913
944
|
});
|
|
945
|
+
const customColumnTypes = (_l = this.api.columnApi.getColumnTypes()) !== null && _l !== void 0 ? _l : [];
|
|
946
|
+
for (const customColumnType of customColumnTypes) {
|
|
947
|
+
if (!patchedColumnTypes[customColumnType]) {
|
|
948
|
+
patchedColumnTypes[customColumnType] = {};
|
|
949
|
+
}
|
|
950
|
+
}
|
|
914
951
|
if (patchedColumnTypes.abColDefNumber.cellEditor == undefined) {
|
|
915
952
|
patchedColumnTypes.abColDefNumber.cellEditor =
|
|
916
953
|
this.variant === 'react' ? AdaptableNumberEditor_1.ReactAdaptableNumberEditor : AdaptableNumberEditor_1.AdaptableNumberEditor;
|
|
@@ -945,6 +982,9 @@ class AdaptableAgGrid {
|
|
|
945
982
|
return revertedDateTypeDefinitions;
|
|
946
983
|
});
|
|
947
984
|
}
|
|
985
|
+
isDetailGrid() {
|
|
986
|
+
return this._isDetailGrid;
|
|
987
|
+
}
|
|
948
988
|
/**
|
|
949
989
|
* Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
|
|
950
990
|
*/
|
|
@@ -958,7 +998,9 @@ class AdaptableAgGrid {
|
|
|
958
998
|
// framework wrapper may pass the rowData as a prop
|
|
959
999
|
const rowData = agGridApi.getGridOption('rowData');
|
|
960
1000
|
this.initWithLazyData = rowData == undefined || rowData.length === 0;
|
|
961
|
-
this.
|
|
1001
|
+
if (this.initWithLazyData) {
|
|
1002
|
+
this.logger.info('initWithLazyData = TRUE');
|
|
1003
|
+
}
|
|
962
1004
|
if (!this.getAgGridContainerElement()) {
|
|
963
1005
|
// initialize the agGridContainerElement from the AgGrid instance
|
|
964
1006
|
// @ts-ignore
|
|
@@ -986,19 +1028,21 @@ class AdaptableAgGrid {
|
|
|
986
1028
|
}
|
|
987
1029
|
getAllColumnDefinitions(agGridColDefs) {
|
|
988
1030
|
const allColDefs = this.enhanceColDefsWithSpecialColumns(agGridColDefs !== null && agGridColDefs !== void 0 ? agGridColDefs : this.agGridAdapter.getAgGridApi().getColumnDefs());
|
|
989
|
-
this.agGridAdapter.assignColumnIdsToColDefs(allColDefs);
|
|
990
1031
|
return allColDefs;
|
|
991
1032
|
}
|
|
992
1033
|
getSpecialColDefs() {
|
|
993
|
-
|
|
1034
|
+
const specialColDefs = [
|
|
994
1035
|
...this.api.calculatedColumnApi.internalApi.getColDefsForCalculatedColumns(),
|
|
995
1036
|
...this.api.actionColumnApi.getColDefsForActionColumns(),
|
|
996
1037
|
...this.api.freeTextColumnApi.internalApi.getColDefsForFreeTextColumns(),
|
|
997
1038
|
...this.api.actionRowApi.internalApi.getColDefsForActionRowColumns(),
|
|
998
1039
|
...this.api.fdc3Api.internalApi.getFdc3ActionColDefs(),
|
|
999
1040
|
];
|
|
1041
|
+
this.agGridAdapter.assignColumnIdsToColDefs(specialColDefs);
|
|
1042
|
+
return specialColDefs;
|
|
1000
1043
|
}
|
|
1001
1044
|
enhanceColDefsWithSpecialColumns(agGridColDefs) {
|
|
1045
|
+
this.agGridAdapter.assignColumnIdsToColDefs(agGridColDefs);
|
|
1002
1046
|
const specialColDefs = this.getSpecialColDefs();
|
|
1003
1047
|
const isSpecialColDef = (colDef) => {
|
|
1004
1048
|
const { type } = colDef;
|
|
@@ -1022,7 +1066,9 @@ class AdaptableAgGrid {
|
|
|
1022
1066
|
else {
|
|
1023
1067
|
if (!isSpecialColDef(colDef)) {
|
|
1024
1068
|
// if it's not a special column, return it as is
|
|
1025
|
-
|
|
1069
|
+
// without a minWidth, columns in details grid are VERY wide
|
|
1070
|
+
// so the line below fixes https://github.com/AdaptableTools/adaptable/issues/2559
|
|
1071
|
+
return Object.assign({ minWidth: 10 }, colDef);
|
|
1026
1072
|
}
|
|
1027
1073
|
const newlyCreatedSpecialColDef = specialColDefs.find((specialColDef) => specialColDef.colId === colDef.colId);
|
|
1028
1074
|
if (newlyCreatedSpecialColDef) {
|
|
@@ -1030,7 +1076,9 @@ class AdaptableAgGrid {
|
|
|
1030
1076
|
processedSpecialColDefIds.push(colDef.colId);
|
|
1031
1077
|
// merge the user defined colDef with the special col def
|
|
1032
1078
|
// this way the user may provide some custom settings for the special col def (tooltip, etc)
|
|
1033
|
-
const mergedColDef = Object.assign(Object.assign({
|
|
1079
|
+
const mergedColDef = Object.assign(Object.assign({
|
|
1080
|
+
// see above comment for minWidth
|
|
1081
|
+
minWidth: 10 }, colDef), newlyCreatedSpecialColDef);
|
|
1034
1082
|
return mergedColDef;
|
|
1035
1083
|
}
|
|
1036
1084
|
else {
|
|
@@ -1059,7 +1107,7 @@ class AdaptableAgGrid {
|
|
|
1059
1107
|
return resultColDefs;
|
|
1060
1108
|
}
|
|
1061
1109
|
useRowNodeLookUp() {
|
|
1062
|
-
return this.agGridAdapter.
|
|
1110
|
+
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1063
1111
|
}
|
|
1064
1112
|
getAgGridContainerElement() {
|
|
1065
1113
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
@@ -1082,10 +1130,7 @@ class AdaptableAgGrid {
|
|
|
1082
1130
|
// This method returns selected cells ONLY (if selection mode is cells or multiple cells).
|
|
1083
1131
|
// If the selection mode is row it will returns nothing - use the setSelectedRows() method
|
|
1084
1132
|
refreshSelectedCellsState() {
|
|
1085
|
-
|
|
1086
|
-
const isRangeSelectionModuleRegistered = this.agGridAdapter.isModulePresent(core_1.ModuleNames.RangeSelectionModule);
|
|
1087
|
-
if (!isRangeSelectionModuleRegistered ||
|
|
1088
|
-
!((_a = this.agGridAdapter.getLiveGridOptions()) === null || _a === void 0 ? void 0 : _a.enableRangeSelection) === true) {
|
|
1133
|
+
if (!this.isGridRangeSelectable()) {
|
|
1089
1134
|
return;
|
|
1090
1135
|
}
|
|
1091
1136
|
const selectedCellInfo = this.agGridAdapter.deriveSelectedCellInfoFromAgGrid();
|
|
@@ -1096,8 +1141,8 @@ class AdaptableAgGrid {
|
|
|
1096
1141
|
return selectedCellInfo;
|
|
1097
1142
|
}
|
|
1098
1143
|
refreshSelectedRowsState() {
|
|
1099
|
-
if (!this.
|
|
1100
|
-
return
|
|
1144
|
+
if (!this.isGridRowSelectable()) {
|
|
1145
|
+
return;
|
|
1101
1146
|
}
|
|
1102
1147
|
const selectedRowInfo = this.agGridAdapter.deriveSelectedRowInfoFromAgGrid();
|
|
1103
1148
|
this.api.gridApi.internalApi.setSelectedRows(selectedRowInfo);
|
|
@@ -1105,9 +1150,13 @@ class AdaptableAgGrid {
|
|
|
1105
1150
|
this.api.eventApi.emit('RowSelectionChanged', rowSelectionChangedInfo);
|
|
1106
1151
|
return selectedRowInfo;
|
|
1107
1152
|
}
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1153
|
+
isGridRowSelectable() {
|
|
1154
|
+
const rowSelection = this.agGridAdapter.getAgGridApi().getGridOption('rowSelection');
|
|
1155
|
+
return rowSelection === 'single' || rowSelection === 'multiple';
|
|
1156
|
+
}
|
|
1157
|
+
isGridRangeSelectable() {
|
|
1158
|
+
return (this.agGridAdapter.isModulePresent(core_1.ModuleNames.RangeSelectionModule) &&
|
|
1159
|
+
this.agGridAdapter.getGridOption('enableRangeSelection'));
|
|
1111
1160
|
}
|
|
1112
1161
|
initAdaptableStore() {
|
|
1113
1162
|
const perfNewAdaptableStore = this.logger.beginPerf(`initAdaptableStore()`);
|
|
@@ -1123,15 +1172,26 @@ class AdaptableAgGrid {
|
|
|
1123
1172
|
var _a, _b, _c;
|
|
1124
1173
|
const agGridState = {};
|
|
1125
1174
|
const currentLayoutName = (_a = adaptableState.Layout) === null || _a === void 0 ? void 0 : _a.CurrentLayout;
|
|
1126
|
-
const
|
|
1175
|
+
const _currentLayout = currentLayoutName &&
|
|
1127
1176
|
((_c = (_b = adaptableState.Layout) === null || _b === void 0 ? void 0 : _b.Layouts) === null || _c === void 0 ? void 0 : _c.find((l) => l.Name === currentLayoutName));
|
|
1128
|
-
if (!
|
|
1177
|
+
if (!_currentLayout) {
|
|
1129
1178
|
return agGridState;
|
|
1130
1179
|
}
|
|
1131
|
-
const
|
|
1132
|
-
const
|
|
1180
|
+
const currentLayout = (0, AdaptableHelper_1.removeUuidAndSource)(_currentLayout);
|
|
1181
|
+
const allAgGridFlattenedColDefs = this.agGridAdapter.getFlattenedColDefs(agGridColDefs);
|
|
1182
|
+
const allAgGridColDefIds = allAgGridFlattenedColDefs.map((colDef) => colDef.colId);
|
|
1183
|
+
const { columnApi } = this.api;
|
|
1184
|
+
// also add the row group columns, if they are specified in the layout
|
|
1185
|
+
currentLayout.Columns.forEach((colId) => {
|
|
1186
|
+
if (columnApi.isAutoRowGroupColumn(colId)) {
|
|
1187
|
+
allAgGridColDefIds.push(colId);
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
const getColDef = (colId) => allAgGridFlattenedColDefs.find((colDef) => colDef.colId === colId);
|
|
1133
1191
|
agGridState.columnVisibility = {
|
|
1134
|
-
hiddenColIds:
|
|
1192
|
+
hiddenColIds: allAgGridFlattenedColDefs
|
|
1193
|
+
.filter((colDef) => { var _a; return !((_a = currentLayout.Columns) === null || _a === void 0 ? void 0 : _a.includes(colDef.colId)) || colDef.hide || colDef.initialHide; })
|
|
1194
|
+
.map((colDef) => colDef.colId),
|
|
1135
1195
|
};
|
|
1136
1196
|
agGridState.columnOrder = {
|
|
1137
1197
|
orderedColIds: (0, sortWithOrder_1.sortWithOrderArray)(allAgGridColDefIds, currentLayout.Columns || [], {
|
|
@@ -1327,16 +1387,17 @@ class AdaptableAgGrid {
|
|
|
1327
1387
|
// ADD filter event
|
|
1328
1388
|
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
|
|
1329
1389
|
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
1330
|
-
this.debouncedSaveGridLayout();
|
|
1390
|
+
this.debouncedSaveGridLayout(type);
|
|
1331
1391
|
}
|
|
1332
1392
|
}));
|
|
1333
1393
|
/**
|
|
1334
1394
|
* Save Layout if Display Row Groups is "dynamic
|
|
1335
1395
|
*/
|
|
1336
|
-
this.debouncedSaveGridLayout = (0, debounce_1.default)(() => {
|
|
1396
|
+
this.debouncedSaveGridLayout = (0, debounce_1.default)((type) => {
|
|
1337
1397
|
if (!this.isReady) {
|
|
1338
1398
|
return;
|
|
1339
1399
|
}
|
|
1400
|
+
this.logger.info('Event Triggering Auto Layout Save', type || '');
|
|
1340
1401
|
this.updateLayoutFromGrid();
|
|
1341
1402
|
}, GeneralConstants_1.HALF_SECOND);
|
|
1342
1403
|
const rowGroupEventsThatTriggersAutoLayoutSave = [
|
|
@@ -1346,7 +1407,7 @@ class AdaptableAgGrid {
|
|
|
1346
1407
|
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = (type) => {
|
|
1347
1408
|
if (rowGroupEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
1348
1409
|
if (this.adaptableOptions.layoutOptions.displayRowGroups == 'dynamic') {
|
|
1349
|
-
this.debouncedSaveGridLayout();
|
|
1410
|
+
this.debouncedSaveGridLayout(type);
|
|
1350
1411
|
}
|
|
1351
1412
|
}
|
|
1352
1413
|
}));
|
|
@@ -1370,7 +1431,7 @@ class AdaptableAgGrid {
|
|
|
1370
1431
|
*/
|
|
1371
1432
|
this.agGridAdapter.getAgGridApi().addEventListener(core_1.Events.EVENT_COLUMN_RESIZED, (this.listenerColumnResized = (params) => {
|
|
1372
1433
|
if (params.finished == true && params.type == 'columnResized' && params.column) {
|
|
1373
|
-
this.debouncedSaveGridLayout();
|
|
1434
|
+
this.debouncedSaveGridLayout(params.type);
|
|
1374
1435
|
}
|
|
1375
1436
|
}));
|
|
1376
1437
|
/**
|
|
@@ -1417,26 +1478,6 @@ class AdaptableAgGrid {
|
|
|
1417
1478
|
this.onSortChanged();
|
|
1418
1479
|
this.debouncedSetSelectedCells();
|
|
1419
1480
|
}));
|
|
1420
|
-
const showGroupingTotalsAsHeader = this.adaptableOptions.groupingOptions.showGroupingTotalsAsHeader;
|
|
1421
|
-
/**
|
|
1422
|
-
* Use Case: Model has updated
|
|
1423
|
-
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
1424
|
-
*/
|
|
1425
|
-
this.agGridAdapter.getAgGridApi().addEventListener(core_1.Events.EVENT_MODEL_UPDATED, (this.listenerModelUpdated = (params) => {
|
|
1426
|
-
if (showGroupingTotalsAsHeader) {
|
|
1427
|
-
if (params && params.api) {
|
|
1428
|
-
const pinnedData = params.api.getPinnedTopRow(0);
|
|
1429
|
-
const model = params.api.getModel();
|
|
1430
|
-
const rootNode = model.getRootNode();
|
|
1431
|
-
if (!pinnedData) {
|
|
1432
|
-
params.api.setPinnedTopRowData([rootNode.aggData]);
|
|
1433
|
-
}
|
|
1434
|
-
else {
|
|
1435
|
-
pinnedData.updateData(rootNode.aggData);
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
}));
|
|
1440
1481
|
const eventsThatTriggerChartingChanges = [
|
|
1441
1482
|
core_1.Events.EVENT_CHART_CREATED,
|
|
1442
1483
|
/** Chart Range selection has changed */
|
|
@@ -1552,7 +1593,6 @@ class AdaptableAgGrid {
|
|
|
1552
1593
|
this.AlertService = new AlertService_1.AlertService(this.api);
|
|
1553
1594
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
|
|
1554
1595
|
this.Fdc3Service = new Fdc3Service_1.Fdc3Service(this.api);
|
|
1555
|
-
this.SummaryService = new SummaryService_1.SummaryService(this.api);
|
|
1556
1596
|
this.CellPopupService = new CellPopupService_1.CellPopupService(this.api);
|
|
1557
1597
|
this.RowEditService = new RowEditService_1.RowEditService(this.api);
|
|
1558
1598
|
this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.optionsApi.getAdaptableOptions(), true);
|
|
@@ -1573,7 +1613,7 @@ class AdaptableAgGrid {
|
|
|
1573
1613
|
modules.set(ModuleConstants.ChartingModuleId, new ChartingModule_1.ChartingModule(this.api));
|
|
1574
1614
|
modules.set(ModuleConstants.ColumnFilterModuleId, new ColumnFilterModule_1.ColumnFilterModule(this.api));
|
|
1575
1615
|
modules.set(ModuleConstants.ColumnInfoModuleId, new ColumnInfoModule_1.ColumnInfoModule(this.api));
|
|
1576
|
-
modules.set(ModuleConstants.
|
|
1616
|
+
modules.set(ModuleConstants.CommentModuleId, new CommentModule_1.CommentModule(this.api));
|
|
1577
1617
|
modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule_1.CustomSortModule(this.api));
|
|
1578
1618
|
modules.set(ModuleConstants.DashboardModuleId, new DashboardModule_1.DashboardModule(this.api));
|
|
1579
1619
|
modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule_1.DataChangeHistoryModule(this.api));
|
|
@@ -1588,7 +1628,7 @@ class AdaptableAgGrid {
|
|
|
1588
1628
|
modules.set(ModuleConstants.GridInfoModuleId, new GridInfoModule_1.GridInfoModule(this.api));
|
|
1589
1629
|
modules.set(ModuleConstants.LayoutModuleId, new LayoutModule_1.LayoutModule(this.api));
|
|
1590
1630
|
modules.set(ModuleConstants.NamedQueryModuleId, new NamedQueryModule_1.NamedQueryModule(this.api));
|
|
1591
|
-
modules.set(ModuleConstants.
|
|
1631
|
+
modules.set(ModuleConstants.NoteModuleId, new NoteModule_1.NoteModule(this.api));
|
|
1592
1632
|
modules.set(ModuleConstants.PlusMinusModuleId, new PlusMinusModule_1.PlusMinusModule(this.api));
|
|
1593
1633
|
modules.set(ModuleConstants.QuickSearchModuleId, new QuickSearchModule_1.QuickSearchModule(this.api));
|
|
1594
1634
|
modules.set(ModuleConstants.ScheduleModuleId, new ScheduleModule_1.ScheduleModule(this.api));
|
|
@@ -1613,7 +1653,9 @@ class AdaptableAgGrid {
|
|
|
1613
1653
|
this.api.eventApi.on('AdaptableReady', () => {
|
|
1614
1654
|
var _a, _b;
|
|
1615
1655
|
// update status bar state
|
|
1616
|
-
const adaptableStatusPanels = (_b = (_a = this.agGridAdapter
|
|
1656
|
+
const adaptableStatusPanels = (_b = (_a = this.agGridAdapter
|
|
1657
|
+
.getAgGridApi()
|
|
1658
|
+
.getGridOption('statusBar')) === null || _a === void 0 ? void 0 : _a.statusPanels) === null || _b === void 0 ? void 0 : _b.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key));
|
|
1617
1659
|
const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
|
|
1618
1660
|
// need to add only the adaptable panels
|
|
1619
1661
|
statusBarModule.syncStateWithOptions(adaptableStatusPanels);
|
|
@@ -1646,13 +1688,14 @@ class AdaptableAgGrid {
|
|
|
1646
1688
|
// TODO AFL MIG: check why this assertion is here
|
|
1647
1689
|
.getAllDisplayedColumnGroups();
|
|
1648
1690
|
const groupsCount = {};
|
|
1649
|
-
const colsToGroups = columnGroupChildren.reduce((acc, columnGroup) => {
|
|
1691
|
+
const colsToGroups = (columnGroupChildren !== null && columnGroupChildren !== void 0 ? columnGroupChildren : []).reduce((acc, columnGroup) => {
|
|
1650
1692
|
var _a, _b, _c;
|
|
1651
1693
|
if (!((_b = (_a = columnGroup.getProvidedColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
|
|
1652
1694
|
return acc;
|
|
1653
1695
|
}
|
|
1654
1696
|
const ColumnGroupId = columnGroup.getGroupId();
|
|
1655
|
-
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
|
|
1697
|
+
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
|
|
1698
|
+
.marryChildren;
|
|
1656
1699
|
const FriendlyName = (_c = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
|
|
1657
1700
|
const columnsInGroup = columnGroup.getLeafColumns();
|
|
1658
1701
|
columnsInGroup.forEach((col) => {
|
|
@@ -2178,50 +2221,20 @@ class AdaptableAgGrid {
|
|
|
2178
2221
|
});
|
|
2179
2222
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
2180
2223
|
}
|
|
2181
|
-
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState) {
|
|
2224
|
+
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState, layout) {
|
|
2225
|
+
layout = layout || this.api.layoutApi.getCurrentLayout();
|
|
2226
|
+
visibleColumnList = visibleColumnList || layout.Columns;
|
|
2182
2227
|
columnState = columnState || this.agGridAdapter.getAgGridApi().getColumnState();
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
return acc;
|
|
2194
|
-
}, {});
|
|
2195
|
-
const result = [...columnState]
|
|
2196
|
-
.sort((colState1, colState2) => {
|
|
2197
|
-
const colId1 = colState1.colId;
|
|
2198
|
-
const colId2 = colState2.colId;
|
|
2199
|
-
const originalIndex1 = columnsStateIndexes[colId1];
|
|
2200
|
-
const originalIndex2 = columnsStateIndexes[colId2];
|
|
2201
|
-
const isRowGroup1 = this.api.columnApi.isAutoRowGroupColumn(colId1);
|
|
2202
|
-
const isRowGroup2 = this.api.columnApi.isAutoRowGroupColumn(colId2);
|
|
2203
|
-
if (isRowGroup1 && isRowGroup2) {
|
|
2204
|
-
return 1;
|
|
2205
|
-
}
|
|
2206
|
-
if (isRowGroup1) {
|
|
2207
|
-
return -1;
|
|
2208
|
-
}
|
|
2209
|
-
if (isRowGroup2) {
|
|
2210
|
-
return 1;
|
|
2211
|
-
}
|
|
2212
|
-
if (newVisibleColumnsMap[colId1] != null && newVisibleColumnsMap[colId2] == null) {
|
|
2213
|
-
return -1;
|
|
2214
|
-
}
|
|
2215
|
-
if (newVisibleColumnsMap[colId1] == null && newVisibleColumnsMap[colId2] != null) {
|
|
2216
|
-
return 1;
|
|
2217
|
-
}
|
|
2218
|
-
if (newVisibleColumnsMap[colId1] == null && newVisibleColumnsMap[colId2] == null) {
|
|
2219
|
-
return originalIndex1 - originalIndex2;
|
|
2220
|
-
}
|
|
2221
|
-
return newVisibleColumnsMap[colState1.colId] - newVisibleColumnsMap[colState2.colId];
|
|
2222
|
-
})
|
|
2223
|
-
.map((colState) => (Object.assign(Object.assign({}, colState), { hide: NewVisibleColumnIdsMap[colState.colId] == null })));
|
|
2224
|
-
return result;
|
|
2228
|
+
return (0, buildSortedColumnStateForLayout_1.buildSortedColumnStateForLayout)({
|
|
2229
|
+
columnState: columnState.map((colState) => {
|
|
2230
|
+
return {
|
|
2231
|
+
colId: colState.colId,
|
|
2232
|
+
hide: colState.hide,
|
|
2233
|
+
};
|
|
2234
|
+
}),
|
|
2235
|
+
layout: Object.assign(Object.assign({}, layout), { Columns: visibleColumnList }),
|
|
2236
|
+
gridOptions: this.agGridAdapter.getLiveGridOptions(),
|
|
2237
|
+
});
|
|
2225
2238
|
}
|
|
2226
2239
|
getDistinctValuesForColumn(column, distinctValuesParams) {
|
|
2227
2240
|
let gridCells = this.getGridCellsForPermittedValues(column, distinctValuesParams);
|
|
@@ -2406,10 +2419,10 @@ class AdaptableAgGrid {
|
|
|
2406
2419
|
});
|
|
2407
2420
|
}
|
|
2408
2421
|
getAgGridRowModelType() {
|
|
2409
|
-
var _a
|
|
2422
|
+
var _a;
|
|
2410
2423
|
// it seems that this can be null so we need explicitly to return "clientSide" in this case
|
|
2411
2424
|
// need to check that for ServerSideRowModel it is ALWAYS returned...
|
|
2412
|
-
return (
|
|
2425
|
+
return (_a = this.agGridAdapter.getAgGridApi().getGridOption('rowModelType')) !== null && _a !== void 0 ? _a : 'clientSide';
|
|
2413
2426
|
}
|
|
2414
2427
|
getAllRowNodes(config) {
|
|
2415
2428
|
let rowNodes = [];
|
|
@@ -2532,7 +2545,7 @@ class AdaptableAgGrid {
|
|
|
2532
2545
|
}
|
|
2533
2546
|
canGenerateCharts() {
|
|
2534
2547
|
return (this.agGridAdapter.isModulePresent(core_1.ModuleNames.GridChartsModule) &&
|
|
2535
|
-
this.agGridAdapter.
|
|
2548
|
+
this.agGridAdapter.getAgGridApi().getGridOption('enableCharts'));
|
|
2536
2549
|
}
|
|
2537
2550
|
canDisplaySparklines() {
|
|
2538
2551
|
return this.agGridAdapter.isModulePresent(core_1.ModuleNames.SparklinesModule);
|
|
@@ -2748,7 +2761,7 @@ class AdaptableAgGrid {
|
|
|
2748
2761
|
setRowGroupColumns(columnIds) {
|
|
2749
2762
|
this.agGridAdapter.getAgGridApi().setRowGroupColumns(columnIds);
|
|
2750
2763
|
}
|
|
2751
|
-
|
|
2764
|
+
getAllGridColumns() {
|
|
2752
2765
|
return this.agGridAdapter.getAgGridApi().getAllGridColumns();
|
|
2753
2766
|
}
|
|
2754
2767
|
clearRowGroupColumns() {
|
|
@@ -2929,7 +2942,7 @@ class AdaptableAgGrid {
|
|
|
2929
2942
|
else {
|
|
2930
2943
|
(_b = this.agGridAdapter.getAgGridApi()) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
2931
2944
|
}
|
|
2932
|
-
this.
|
|
2945
|
+
this.previousAgGridLayoutState = '';
|
|
2933
2946
|
const gridContainerElement = this.getAgGridContainerElement();
|
|
2934
2947
|
if (gridContainerElement) {
|
|
2935
2948
|
gridContainerElement.removeEventListener('keydown', this.agGridListenerKeydown);
|
|
@@ -3047,55 +3060,86 @@ class AdaptableAgGrid {
|
|
|
3047
3060
|
ephemeralGridApi.destroy();
|
|
3048
3061
|
}
|
|
3049
3062
|
exportVisualDataToExcel() {
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3063
|
+
try {
|
|
3064
|
+
const exportExcelStyles = this.ReportService.buildExcelStylesForVisualReports();
|
|
3065
|
+
this.agGridOptionsService.CAREFUL_patchGridOptionsProperty('excelStyles', exportExcelStyles);
|
|
3066
|
+
this.agGridAdapter.getAgGridApi().exportDataAsExcel({
|
|
3067
|
+
sheetName: 'Sheet 1',
|
|
3068
|
+
fileName: this.ReportService.getReportFileName(this.adaptableOptions.adaptableId, 'Excel'),
|
|
3069
|
+
// delegate the cell value processing to Adaptable
|
|
3070
|
+
processCellCallback: ({ node, column, value }) => {
|
|
3071
|
+
var _a;
|
|
3072
|
+
const columnId = column.getColId();
|
|
3073
|
+
if ((node === null || node === void 0 ? void 0 : node.group) &&
|
|
3074
|
+
(this.api.columnApi.isAutoRowGroupColumn(columnId) ||
|
|
3075
|
+
// we would still need to process the cell if this is a group row with an aggregated value
|
|
3076
|
+
((_a = node === null || node === void 0 ? void 0 : node.aggData) === null || _a === void 0 ? void 0 : _a[columnId]) == undefined)) {
|
|
3077
|
+
// skip processing of row groups, this was already handled in processRowGroupCallback()
|
|
3078
|
+
return value;
|
|
3079
|
+
}
|
|
3080
|
+
return this.processCellForExcelExport(node, columnId);
|
|
3081
|
+
},
|
|
3082
|
+
processRowGroupCallback: (params) => {
|
|
3083
|
+
var _a;
|
|
3084
|
+
// recreating the standard AG Grid styling for row groups: 'Parent -> Child'
|
|
3085
|
+
// additionally the values are formatted
|
|
3086
|
+
let rowGroupNode = params.node;
|
|
3087
|
+
const isFooterRow = rowGroupNode.footer;
|
|
3088
|
+
const rowGroupSummary = [(_a = this.processRowGroupForExcelExport(rowGroupNode)) !== null && _a !== void 0 ? _a : ''];
|
|
3089
|
+
while (rowGroupNode.parent) {
|
|
3090
|
+
rowGroupNode = rowGroupNode.parent;
|
|
3091
|
+
const formattedParentNode = this.processRowGroupForExcelExport(rowGroupNode);
|
|
3092
|
+
if (formattedParentNode) {
|
|
3093
|
+
rowGroupSummary.push(formattedParentNode);
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
let summary = rowGroupSummary.reverse().join(' -> ');
|
|
3097
|
+
if (isFooterRow) {
|
|
3098
|
+
summary = `Total: ${summary}`;
|
|
3099
|
+
}
|
|
3100
|
+
return summary;
|
|
3101
|
+
},
|
|
3102
|
+
});
|
|
3103
|
+
this.agGridOptionsService.revertGridOptionsPropertyToUserValue('excelStyles');
|
|
3104
|
+
}
|
|
3105
|
+
catch (error) {
|
|
3106
|
+
this.logger.consoleError('Error exporting visual data to Excel', error);
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
processRowGroupForExcelExport(rowNode) {
|
|
3110
|
+
var _a, _b, _c, _d, _e;
|
|
3111
|
+
const columnId = (_c = (_a = rowNode.field) !== null && _a !== void 0 ? _a : (_b = rowNode.rowGroupColumn) === null || _b === void 0 ? void 0 : _b.getColId()) !== null && _c !== void 0 ? _c : (_e = (_d = rowNode.rowGroupColumn) === null || _d === void 0 ? void 0 : _d.getColDef()) === null || _e === void 0 ? void 0 : _e.field;
|
|
3112
|
+
if (!columnId || !rowNode.key) {
|
|
3113
|
+
return;
|
|
3114
|
+
}
|
|
3115
|
+
let rawValue = rowNode.key;
|
|
3116
|
+
if (this.api.columnApi.getColumnDataTypeForColumnId(columnId) === 'Date' &&
|
|
3117
|
+
typeof rawValue === 'string' &&
|
|
3118
|
+
// rawValue is composed only of digits
|
|
3119
|
+
/^\d+$/.test(rawValue)) {
|
|
3120
|
+
// AG-Grid converts the value to string, we have to reconvert it back
|
|
3121
|
+
const dateRawValue = parseInt(rawValue);
|
|
3122
|
+
if (dateRawValue != undefined) {
|
|
3123
|
+
// @ts-ignore
|
|
3124
|
+
rawValue = dateRawValue;
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
return this.ReportService.getCellExportValueFromRawValue(rowNode, rawValue, columnId);
|
|
3128
|
+
}
|
|
3129
|
+
processCellForExcelExport(rowNode, columnId) {
|
|
3130
|
+
if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
|
|
3131
|
+
const cellKey = this.agGridColumnAdapter.getExcelClassNameForCell(columnId, this.getPrimaryKeyValueFromRowNode(rowNode));
|
|
3132
|
+
const isoFormattedDate = this.ReportService.getExcelStyleWithFormattedDate(cellKey);
|
|
3133
|
+
if (isoFormattedDate) {
|
|
3134
|
+
// this is a Date cell which will be formatted by Excel
|
|
3135
|
+
return isoFormattedDate;
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
return this.ReportService.getCellExportValueFromRowNode(rowNode, columnId);
|
|
3096
3139
|
}
|
|
3097
3140
|
isQuickFilterAvailable() {
|
|
3098
|
-
if (this.api.layoutApi.
|
|
3141
|
+
if (this.api.layoutApi.isCurrentLayoutPivot() &&
|
|
3142
|
+
this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
|
|
3099
3143
|
// hide completely the quick filter if pivot is enabled
|
|
3100
3144
|
return false;
|
|
3101
3145
|
}
|
|
@@ -3131,10 +3175,6 @@ class AdaptableAgGrid {
|
|
|
3131
3175
|
layout.PinnedColumnsMap = layout.PinnedColumnsMap || {};
|
|
3132
3176
|
layout.PinnedColumnsMap[actionRowColumn.colId] = actionRowColumn.pinned;
|
|
3133
3177
|
}
|
|
3134
|
-
const layoutColumnsMap = layout.Columns.reduce((acc, colId) => {
|
|
3135
|
-
acc[colId] = true;
|
|
3136
|
-
return acc;
|
|
3137
|
-
}, {});
|
|
3138
3178
|
const columnsState = this.agGridAdapter.getAgGridApi().getColumnState();
|
|
3139
3179
|
const columnsStateIndexes = {};
|
|
3140
3180
|
const columnsStateMap = columnsState.reduce((acc, colState, index) => {
|
|
@@ -3166,20 +3206,19 @@ class AdaptableAgGrid {
|
|
|
3166
3206
|
.getPivotResultColumns()) === null || _b === void 0 ? void 0 : _b.map((column) => column.getColId())) || [];
|
|
3167
3207
|
let isChanged = false;
|
|
3168
3208
|
const colsToAutoSize = {};
|
|
3169
|
-
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
|
|
3209
|
+
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState, layout);
|
|
3170
3210
|
newColumnsState = newColumnsState
|
|
3171
3211
|
.map((colState) => {
|
|
3172
3212
|
var _a, _b, _c;
|
|
3173
3213
|
const { colId } = colState;
|
|
3174
3214
|
const oldColState = columnsStateMap[colId];
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
const newColState = Object.assign(Object.assign({}, oldColState), { hide });
|
|
3215
|
+
// it's important to have width here, so it's not inherited from the existing colState
|
|
3216
|
+
// which could be from a different layout
|
|
3217
|
+
const newColState = Object.assign(Object.assign(Object.assign({}, oldColState), { width: null }), colState);
|
|
3179
3218
|
if (layout.ColumnWidthMap && layout.ColumnWidthMap[colId] != null) {
|
|
3180
3219
|
newColState.width = layout.ColumnWidthMap[colId];
|
|
3181
3220
|
}
|
|
3182
|
-
else if (!hide) {
|
|
3221
|
+
else if (!colState.hide) {
|
|
3183
3222
|
// autosize only the columns which are part of the selected layout
|
|
3184
3223
|
colsToAutoSize[colId] = true;
|
|
3185
3224
|
}
|
|
@@ -3188,11 +3227,7 @@ class AdaptableAgGrid {
|
|
|
3188
3227
|
}
|
|
3189
3228
|
newColState.rowGroupIndex =
|
|
3190
3229
|
groupedColumnsIndexesMap[colId] != null ? groupedColumnsIndexesMap[colId] : null;
|
|
3191
|
-
const previousRowGroup = newColState.rowGroup;
|
|
3192
3230
|
newColState.rowGroup = newColState.rowGroupIndex != null;
|
|
3193
|
-
if (!previousRowGroup && newColState.rowGroup) {
|
|
3194
|
-
this.agGridColumnAdapter.triggerSetupColumnKeyCreator(colId);
|
|
3195
|
-
}
|
|
3196
3231
|
const normalizePinned = (pinnedValue) => {
|
|
3197
3232
|
if (typeof pinnedValue === 'string') {
|
|
3198
3233
|
return pinnedValue;
|
|
@@ -3297,14 +3332,13 @@ class AdaptableAgGrid {
|
|
|
3297
3332
|
// as otherwise column order is not preserved properly when
|
|
3298
3333
|
// going from pivoted to unpivoted layout
|
|
3299
3334
|
if (shouldUpdatePivoted) {
|
|
3300
|
-
this.agGridAdapter.
|
|
3335
|
+
this.agGridAdapter.setGridOption('pivotMode', pivoted);
|
|
3301
3336
|
}
|
|
3302
3337
|
const perfApplyColumnState = this.logger.beginPerf('applyColumnState (layout.isChanged)');
|
|
3303
3338
|
this.agGridAdapter.getAgGridApi().applyColumnState({
|
|
3304
3339
|
state: newColumnsState,
|
|
3305
3340
|
applyOrder: true,
|
|
3306
3341
|
});
|
|
3307
|
-
this.applyGroupColumnWidth(layout);
|
|
3308
3342
|
perfApplyColumnState.end();
|
|
3309
3343
|
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
3310
3344
|
this.agGridAdapter.getAgGridApi().setPivotColumns(layout.PivotColumns || []);
|
|
@@ -3335,7 +3369,9 @@ class AdaptableAgGrid {
|
|
|
3335
3369
|
else {
|
|
3336
3370
|
if (((_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.layoutOptions) === null || _f === void 0 ? void 0 : _f.autoSizeColumnsInLayout) &&
|
|
3337
3371
|
colsToAutoSizeArray.length) {
|
|
3338
|
-
|
|
3372
|
+
requestAnimationFrame(() => {
|
|
3373
|
+
this.autoSizeColumns(colsToAutoSizeArray);
|
|
3374
|
+
});
|
|
3339
3375
|
}
|
|
3340
3376
|
}
|
|
3341
3377
|
this.forPlugins((plugin) => {
|
|
@@ -3359,38 +3395,6 @@ class AdaptableAgGrid {
|
|
|
3359
3395
|
}
|
|
3360
3396
|
return null;
|
|
3361
3397
|
}
|
|
3362
|
-
/**
|
|
3363
|
-
* Setting layout works by modifing the column state.
|
|
3364
|
-
* The column state is based on the current existing columns.
|
|
3365
|
-
* At this point the column groups do not exist, and the widths from layout are not applied.
|
|
3366
|
-
*
|
|
3367
|
-
* After the col sate is applied and the column groups are created we need
|
|
3368
|
-
* to apply the state again to update the widths of the group columns.
|
|
3369
|
-
*/
|
|
3370
|
-
applyGroupColumnWidth(layout) {
|
|
3371
|
-
if (!layout.RowGroupedColumns || !layout.RowGroupedColumns.length) {
|
|
3372
|
-
return;
|
|
3373
|
-
}
|
|
3374
|
-
const groupColumnWithDifferentWidths = this.agGridAdapter
|
|
3375
|
-
.getAgGridApi()
|
|
3376
|
-
.getColumnState()
|
|
3377
|
-
.reduce((acc, col) => {
|
|
3378
|
-
var _a;
|
|
3379
|
-
if (this.api.columnApi.isAutoRowGroupColumn(col.colId)) {
|
|
3380
|
-
const widthInLayout = (_a = layout.ColumnWidthMap) === null || _a === void 0 ? void 0 : _a[col.colId];
|
|
3381
|
-
if (widthInLayout && widthInLayout !== col.width) {
|
|
3382
|
-
acc.push(Object.assign(Object.assign({}, col), { width: widthInLayout }));
|
|
3383
|
-
}
|
|
3384
|
-
}
|
|
3385
|
-
return acc;
|
|
3386
|
-
}, []);
|
|
3387
|
-
if (groupColumnWithDifferentWidths.length === 0) {
|
|
3388
|
-
return;
|
|
3389
|
-
}
|
|
3390
|
-
this.agGridAdapter.getAgGridApi().applyColumnState({
|
|
3391
|
-
state: groupColumnWithDifferentWidths,
|
|
3392
|
-
});
|
|
3393
|
-
}
|
|
3394
3398
|
onRowDataChanged({ rowNode, oldData, newData, }) {
|
|
3395
3399
|
if (oldData == null || oldData == undefined) {
|
|
3396
3400
|
return;
|
|
@@ -3569,12 +3573,12 @@ class AdaptableAgGrid {
|
|
|
3569
3573
|
if (!dataChangedScope.wholeRow) {
|
|
3570
3574
|
const columnIds = this.api.expressionApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
|
|
3571
3575
|
if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
3572
|
-
if (this.api.
|
|
3576
|
+
if (this.api.columnScopeApi.scopeIsAll(styleModule.Scope)) {
|
|
3573
3577
|
dataChangedScope.wholeRow = true;
|
|
3574
3578
|
return;
|
|
3575
3579
|
}
|
|
3576
3580
|
else {
|
|
3577
|
-
this.api.
|
|
3581
|
+
this.api.columnScopeApi
|
|
3578
3582
|
.getColumnsForScope(styleModule.Scope)
|
|
3579
3583
|
.map((c) => c.columnId)
|
|
3580
3584
|
.forEach((colId) => {
|
|
@@ -3687,15 +3691,18 @@ class AdaptableAgGrid {
|
|
|
3687
3691
|
var _a, _b;
|
|
3688
3692
|
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
3689
3693
|
const columnState = agGridApi.getColumnState();
|
|
3694
|
+
const expandedState = agGridApi.getState().rowGroupExpansion || { expandedRowGroupIds: [] };
|
|
3695
|
+
const currentLayoutState = { columnState, expandedState };
|
|
3690
3696
|
try {
|
|
3691
|
-
|
|
3692
|
-
|
|
3697
|
+
// TODO
|
|
3698
|
+
const stringifiedLayoutState = JSON.stringify(currentLayoutState);
|
|
3699
|
+
if (stringifiedLayoutState === this.previousAgGridLayoutState) {
|
|
3693
3700
|
// same grid column state as a previous,
|
|
3694
3701
|
// so no need to update, as the layout has already been updated
|
|
3695
3702
|
// for this grid column state
|
|
3696
3703
|
return;
|
|
3697
3704
|
}
|
|
3698
|
-
this.
|
|
3705
|
+
this.previousAgGridLayoutState = stringifiedLayoutState;
|
|
3699
3706
|
}
|
|
3700
3707
|
catch (ex) {
|
|
3701
3708
|
this.logger.consoleError('Error stringifying column state', ex);
|
|
@@ -3903,32 +3910,5 @@ class AdaptableAgGrid {
|
|
|
3903
3910
|
};
|
|
3904
3911
|
});
|
|
3905
3912
|
}
|
|
3906
|
-
setPinnedRows(pinnedRows, location) {
|
|
3907
|
-
const gridApi = this.agGridAdapter.getAgGridApi();
|
|
3908
|
-
switch (location) {
|
|
3909
|
-
case 'top':
|
|
3910
|
-
gridApi.setGridOption('pinnedTopRowData', pinnedRows);
|
|
3911
|
-
break;
|
|
3912
|
-
case 'bottom':
|
|
3913
|
-
gridApi.setGridOption('pinnedBottomRowData', pinnedRows);
|
|
3914
|
-
break;
|
|
3915
|
-
}
|
|
3916
|
-
}
|
|
3917
|
-
setupRowSummaries() {
|
|
3918
|
-
var _a;
|
|
3919
|
-
const rowSummaries = (_a = this.api.internalApi.getAdaptableState().System.RowSummary.rowSummaries) !== null && _a !== void 0 ? _a : [];
|
|
3920
|
-
const { top, bottom } = rowSummaries.reduce((acc, summaryRow) => {
|
|
3921
|
-
const row = summaryRow.RowData;
|
|
3922
|
-
if (summaryRow.Position === 'Bottom' || !summaryRow.Position) {
|
|
3923
|
-
acc.bottom.push(row);
|
|
3924
|
-
}
|
|
3925
|
-
else {
|
|
3926
|
-
acc.top.push(row);
|
|
3927
|
-
}
|
|
3928
|
-
return acc;
|
|
3929
|
-
}, { top: [], bottom: [] });
|
|
3930
|
-
this.setPinnedRows(top, 'top');
|
|
3931
|
-
this.setPinnedRows(bottom, 'bottom');
|
|
3932
|
-
}
|
|
3933
3913
|
}
|
|
3934
3914
|
exports.AdaptableAgGrid = AdaptableAgGrid;
|