@adaptabletools/adaptable 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 +1 -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 +45 -15
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +8 -0
- package/src/Api/Implementation/ColumnMenuApiImpl.js +12 -0
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +33 -0
- package/src/Api/Implementation/{ScopeApiImpl.js → ColumnScopeApiImpl.js} +46 -13
- 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 +9 -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} +12 -12
- 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 +7 -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} +4 -3
- 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 +1 -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 +1 -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 +125 -1
- package/src/PredefinedConfig/Common/RowScope.d.ts +17 -0
- package/src/PredefinedConfig/Common/RowScope.js +1 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +15 -1
- package/src/PredefinedConfig/Common/RowSummary.js +16 -0
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
- package/src/PredefinedConfig/Common/TransposeConfig.js +1 -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 +1 -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 +0 -34
- 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} +24 -24
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -13
- package/src/Redux/ActionsReducers/PopupRedux.js +0 -19
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +11 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +12 -9
- package/src/Redux/Store/AdaptableStore.js +40 -33
- 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 +70 -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 +11 -21
- 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 +58 -44
- 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 +55 -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 +1 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +6 -6
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +143 -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 +19 -0
- 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 -193
- 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 +155 -0
- package/src/Utilities/Services/ValidationService.js +2 -2
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +14 -0
- package/src/Utilities/license/decode.js +1 -65
- package/src/Utilities/license/hashing.js +1 -43
- 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 +42 -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 +174 -0
- package/src/View/License/LicenseWatermark.js +1 -61
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +14 -9
- 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 +120 -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 +46 -0
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +0 -54
- package/src/components/Accordion.d.ts +7 -0
- package/src/components/Accordion.js +36 -0
- package/src/components/CheckBox/index.js +1 -1
- 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 +1 -14
- 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 +4 -0
- package/src/components/icons/copy.d.ts +3 -0
- package/src/components/icons/copy.js +4 -0
- package/src/components/icons/csv.d.ts +3 -0
- package/src/components/icons/csv.js +4 -0
- package/src/components/icons/data-object.d.ts +3 -0
- package/src/components/icons/data-object.js +4 -0
- package/src/components/icons/excel.d.ts +3 -0
- package/src/components/icons/excel.js +5 -0
- package/src/components/icons/expand-all.d.ts +3 -0
- package/src/components/icons/expand-all.js +4 -0
- package/src/components/icons/filter-off.d.ts +3 -0
- package/src/components/icons/filter-off.js +4 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +4 -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 +4 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +4 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +4 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +222 -116
- package/src/metamodel/adaptable.metamodel.js +1 -9426
- 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.esm.tsbuildinfo +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +0 -234
- package/src/AdaptableOptions/MenuOptions.js +0 -95
- 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 -4
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
- package/src/Strategy/CommentsModule.d.ts +0 -17
- package/src/Strategy/CommentsModule.js +0 -81
- package/src/Strategy/NotesModule.d.ts +0 -10
- package/src/Strategy/NotesModule.js +0 -56
- package/src/Utilities/Services/SummaryService.d.ts +0 -19
- package/src/Utilities/Services/SummaryService.js +0 -29
- 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
|
@@ -59,12 +59,12 @@ import { ColumnInfoModule } from '../Strategy/ColumnInfoModule';
|
|
|
59
59
|
import { SettingsPanelModule } from '../Strategy/SettingsPanelModule';
|
|
60
60
|
import { StatusBarModule } from '../Strategy/StatusBarModule';
|
|
61
61
|
import { ChartingModule } from '../Strategy/ChartingModule';
|
|
62
|
-
import {
|
|
62
|
+
import { NoteModule } from '../Strategy/NoteModule';
|
|
63
63
|
import { StyledColumnModule } from '../Strategy/StyledColumnModule';
|
|
64
64
|
import { Fdc3Module } from '../Strategy/Fdc3Module';
|
|
65
65
|
import { GridFilterModule } from '../Strategy/GridFilterModule';
|
|
66
66
|
import { NamedQueryModule } from '../Strategy/NamedQueryModule';
|
|
67
|
-
import {
|
|
67
|
+
import { CommentModule } from '../Strategy/CommentModule';
|
|
68
68
|
import { AdaptableNumberEditor, ReactAdaptableNumberEditor } from './editors/AdaptableNumberEditor';
|
|
69
69
|
import { AdaptableDateEditor, ReactAdaptableDateEditor } from './editors/AdaptableDateEditor';
|
|
70
70
|
import { Helper } from '../Utilities/Helpers/Helper';
|
|
@@ -95,7 +95,8 @@ import { AdaptableUpgradeHelper } from '../migration/AdaptableUpgradeHelper';
|
|
|
95
95
|
import { ensurePortalElement } from '../components/Modal';
|
|
96
96
|
import { AdaptableLoadingScreen } from '../View/Components/Popups/AdaptableLoadingScreen';
|
|
97
97
|
import { createElement } from 'react';
|
|
98
|
-
import {
|
|
98
|
+
import { removeUuidAndSource } from '../Utilities/Helpers/AdaptableHelper';
|
|
99
|
+
import { buildSortedColumnStateForLayout } from './buildSortedColumnStateForLayout';
|
|
99
100
|
const RowNodeProto = RowNode.prototype;
|
|
100
101
|
const RowNode_dispatchLocalEvent = RowNodeProto.dispatchLocalEvent;
|
|
101
102
|
/**
|
|
@@ -143,7 +144,7 @@ export class AdaptableAgGrid {
|
|
|
143
144
|
* once layouts are properly handled with the new aggrid methods & events
|
|
144
145
|
* we can remove this hack
|
|
145
146
|
*/
|
|
146
|
-
this.
|
|
147
|
+
this.previousAgGridLayoutState = '';
|
|
147
148
|
this.columnMinMaxValuesCache = {};
|
|
148
149
|
this.renderReactRoot = (node, container) => defaultRenderReactRoot(node, container);
|
|
149
150
|
/**
|
|
@@ -254,6 +255,7 @@ export class AdaptableAgGrid {
|
|
|
254
255
|
async _initAdaptableAgGrid(config) {
|
|
255
256
|
var _a, _b;
|
|
256
257
|
// Phase 1: Preprocess Adaptable Options
|
|
258
|
+
this._isDetailGrid = config.isDetailGrid === true;
|
|
257
259
|
this.lifecycleState = 'preprocessOptions';
|
|
258
260
|
this._rawAdaptableOptions = config.adaptableOptions;
|
|
259
261
|
if (StringExtensions.IsNullOrEmptyOrWhiteSpace(this._rawAdaptableOptions.adaptableId)) {
|
|
@@ -295,6 +297,7 @@ export class AdaptableAgGrid {
|
|
|
295
297
|
this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
|
|
296
298
|
const perfLoadStore = this.logger.beginPerf(`loadStore()`);
|
|
297
299
|
this.adaptableStore = this.initAdaptableStore();
|
|
300
|
+
this.forPlugins((plugin) => plugin.afterInitStore(this));
|
|
298
301
|
await this.adaptableStore.loadStore({
|
|
299
302
|
adaptable: this,
|
|
300
303
|
adaptableStateKey: this.adaptableOptions.adaptableStateKey,
|
|
@@ -304,15 +307,14 @@ export class AdaptableAgGrid {
|
|
|
304
307
|
* e.g. adding default Layout, migrating deprecated state, etc.
|
|
305
308
|
*/
|
|
306
309
|
postLoadHook: (state) => {
|
|
307
|
-
if (this.adaptableOptions.autoMigrateState) {
|
|
310
|
+
if (this.adaptableOptions.stateOptions.autoMigrateState) {
|
|
308
311
|
state = AdaptableUpgradeHelper.migrateAdaptableState(state, {
|
|
309
312
|
// version 16 actually includes all versions up until 16
|
|
310
313
|
fromVersion: 16,
|
|
311
314
|
logger: this.logger,
|
|
312
315
|
});
|
|
313
316
|
}
|
|
314
|
-
state = this.
|
|
315
|
-
state = this.normaliseToolPanelState(state);
|
|
317
|
+
state = this.normalizeAdaptableState(state, config.gridOptions);
|
|
316
318
|
return state;
|
|
317
319
|
},
|
|
318
320
|
});
|
|
@@ -322,8 +324,7 @@ export class AdaptableAgGrid {
|
|
|
322
324
|
return Promise.reject('Adaptable was destroyed while loading the store.');
|
|
323
325
|
// FIXME AFL MIG: is this enough?! talk with the team
|
|
324
326
|
}
|
|
325
|
-
this.forPlugins((plugin) => plugin.
|
|
326
|
-
this.forPlugins((plugin) => plugin.afterInitModules(this, this.adaptableModules));
|
|
327
|
+
this.forPlugins((plugin) => plugin.afterInitialStateLoaded(this));
|
|
327
328
|
// do this now so it sets module entitlements
|
|
328
329
|
this.EntitlementService.setModulesEntitlements();
|
|
329
330
|
/**
|
|
@@ -359,7 +360,7 @@ export class AdaptableAgGrid {
|
|
|
359
360
|
this.api.themeApi.applyCurrentTheme();
|
|
360
361
|
this.validatePrimaryKey();
|
|
361
362
|
this.embedColumnMenu = this.agGridAdapter.isModulePresent(ModuleNames.MenuModule);
|
|
362
|
-
this.api.internalApi.setTreeMode(this.agGridAdapter.
|
|
363
|
+
this.api.internalApi.setTreeMode(!!this.agGridAdapter.getAgGridApi().getGridOption('treeData'));
|
|
363
364
|
// TODO AFL MIG: we could just patch the defautl Layout on init? instead
|
|
364
365
|
this.checkShouldClearExistingFiltersOrSearches();
|
|
365
366
|
this.applyColumnFiltering();
|
|
@@ -367,6 +368,16 @@ export class AdaptableAgGrid {
|
|
|
367
368
|
this.temporaryAdaptableStateUpdates();
|
|
368
369
|
this.redrawBody();
|
|
369
370
|
this.refreshHeader();
|
|
371
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
372
|
+
if (currentLayout.EnablePivot) {
|
|
373
|
+
// this is very very strange!
|
|
374
|
+
// for some projects, if the initial layout is pivot, the columnDefs of the pivot resutl columns are NOT derived correctly from the main colDefs
|
|
375
|
+
// doing the following line fixes the issue because it foces the pivot columns to be created again
|
|
376
|
+
// this proj works without the hack: /tests/pages/format-column/initial-pivot-layout.page.tsx
|
|
377
|
+
// but this proj needs the hack: /tests/pages/format-column/initial-pivot-layout-docs.page.tsx
|
|
378
|
+
this.agGridAdapter.setGridOption('pivotMode', false);
|
|
379
|
+
this.agGridAdapter.setGridOption('pivotMode', true);
|
|
380
|
+
}
|
|
370
381
|
// create the module menu (for use in the dashboard and the toolpanel)
|
|
371
382
|
// TODO see #create-create-module-menu - make sure it's the same here and there
|
|
372
383
|
this.ModuleService.createModuleMenus();
|
|
@@ -383,14 +394,18 @@ export class AdaptableAgGrid {
|
|
|
383
394
|
adaptableApi: this.api,
|
|
384
395
|
agGridApi: this.agGridAdapter.getAgGridApi(),
|
|
385
396
|
});
|
|
386
|
-
this.api.userInterfaceApi.hideLoadingScreen();
|
|
387
397
|
perfInitAdaptableAgGrid.end();
|
|
388
398
|
return Promise.resolve(this.api);
|
|
389
399
|
}
|
|
390
|
-
|
|
400
|
+
normalizeAdaptableState(state, gridOptions) {
|
|
401
|
+
state = this.normaliseLayoutState(state, gridOptions);
|
|
402
|
+
state = this.normaliseToolPanelState(state);
|
|
403
|
+
return state;
|
|
404
|
+
}
|
|
405
|
+
normaliseLayoutState(state, gridOptions) {
|
|
391
406
|
var _a, _b, _c, _d, _e, _f;
|
|
392
407
|
if (this.shouldCreateDefaultLayout(state, this.adaptableOptions)) {
|
|
393
|
-
const defaultLayout = this.createDefaultLayout(state,
|
|
408
|
+
const defaultLayout = this.createDefaultLayout(state, gridOptions.columnDefs);
|
|
394
409
|
const layoutState = state.Layout || {};
|
|
395
410
|
const availableLayouts = layoutState.Layouts || [];
|
|
396
411
|
availableLayouts.push(defaultLayout);
|
|
@@ -426,7 +441,7 @@ export class AdaptableAgGrid {
|
|
|
426
441
|
* logic where layout is applied, it is easier and
|
|
427
442
|
* less error prone to just remove it.
|
|
428
443
|
*/
|
|
429
|
-
if (
|
|
444
|
+
if (gridOptions.rowModelType === 'viewport') {
|
|
430
445
|
(_f = state.Layout.Layouts) === null || _f === void 0 ? void 0 : _f.forEach((layout) => {
|
|
431
446
|
if (layout.RowGroupedColumns) {
|
|
432
447
|
delete layout.RowGroupedColumns;
|
|
@@ -458,15 +473,13 @@ export class AdaptableAgGrid {
|
|
|
458
473
|
}
|
|
459
474
|
refreshQuickFilter() {
|
|
460
475
|
const isQuickFilterVisible = this.api.internalApi.getSystemState().IsQuickFilterVisible;
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
else {
|
|
469
|
-
this.api.columnFilterApi.hideQuickFilterBar();
|
|
476
|
+
if (this.isQuickFilterAvailable()) {
|
|
477
|
+
if (isQuickFilterVisible) {
|
|
478
|
+
this.api.columnFilterApi.showQuickFilterBar();
|
|
479
|
+
}
|
|
480
|
+
else {
|
|
481
|
+
this.api.columnFilterApi.hideQuickFilterBar();
|
|
482
|
+
}
|
|
470
483
|
}
|
|
471
484
|
}
|
|
472
485
|
applyColumnFiltering() {
|
|
@@ -885,12 +898,30 @@ export class AdaptableAgGrid {
|
|
|
885
898
|
}
|
|
886
899
|
return original_floatingFiltersHeight;
|
|
887
900
|
});
|
|
901
|
+
/**
|
|
902
|
+
* `excelStyles`
|
|
903
|
+
*/
|
|
904
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'excelStyles', (original_excelStyles) => {
|
|
905
|
+
// we need this here just to register the original excelStyles in the service
|
|
906
|
+
return original_excelStyles;
|
|
907
|
+
});
|
|
908
|
+
/**
|
|
909
|
+
* `processPivotResultColDef`
|
|
910
|
+
*/
|
|
911
|
+
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'processPivotResultColDef', () => {
|
|
912
|
+
return (colDef) => {
|
|
913
|
+
if (this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
|
|
914
|
+
colDef.floatingFilter = false;
|
|
915
|
+
colDef.filter = false;
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
});
|
|
888
919
|
/**
|
|
889
920
|
* `columnTypes`
|
|
890
921
|
*/
|
|
891
922
|
// this will have to go/be heavily extended with https://github.com/AdaptableTools/adaptable/issues/2230
|
|
892
923
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'columnTypes', (original_columnTypes) => {
|
|
893
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
924
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
894
925
|
const providedColumnTypes = original_columnTypes || {};
|
|
895
926
|
const gridOptionsColumnTypes = gridOptions.columnTypes || {};
|
|
896
927
|
const patchedColumnTypes = Object.assign(providedColumnTypes, {
|
|
@@ -907,6 +938,12 @@ export class AdaptableAgGrid {
|
|
|
907
938
|
abColDefTupleNumberArray: (_j = gridOptionsColumnTypes.abColDefTupleNumberArray) !== null && _j !== void 0 ? _j : {},
|
|
908
939
|
abColDefObjectNumberArray: (_k = gridOptionsColumnTypes.abColDefObjectNumberArray) !== null && _k !== void 0 ? _k : {},
|
|
909
940
|
});
|
|
941
|
+
const customColumnTypes = (_l = this.api.columnApi.getColumnTypes()) !== null && _l !== void 0 ? _l : [];
|
|
942
|
+
for (const customColumnType of customColumnTypes) {
|
|
943
|
+
if (!patchedColumnTypes[customColumnType]) {
|
|
944
|
+
patchedColumnTypes[customColumnType] = {};
|
|
945
|
+
}
|
|
946
|
+
}
|
|
910
947
|
if (patchedColumnTypes.abColDefNumber.cellEditor == undefined) {
|
|
911
948
|
patchedColumnTypes.abColDefNumber.cellEditor =
|
|
912
949
|
this.variant === 'react' ? ReactAdaptableNumberEditor : AdaptableNumberEditor;
|
|
@@ -941,6 +978,9 @@ export class AdaptableAgGrid {
|
|
|
941
978
|
return revertedDateTypeDefinitions;
|
|
942
979
|
});
|
|
943
980
|
}
|
|
981
|
+
isDetailGrid() {
|
|
982
|
+
return this._isDetailGrid;
|
|
983
|
+
}
|
|
944
984
|
/**
|
|
945
985
|
* Either initializes the AG Grid instance or delegates it to the framework wrappers (React/Anglar)
|
|
946
986
|
*/
|
|
@@ -954,7 +994,9 @@ export class AdaptableAgGrid {
|
|
|
954
994
|
// framework wrapper may pass the rowData as a prop
|
|
955
995
|
const rowData = agGridApi.getGridOption('rowData');
|
|
956
996
|
this.initWithLazyData = rowData == undefined || rowData.length === 0;
|
|
957
|
-
this.
|
|
997
|
+
if (this.initWithLazyData) {
|
|
998
|
+
this.logger.info('initWithLazyData = TRUE');
|
|
999
|
+
}
|
|
958
1000
|
if (!this.getAgGridContainerElement()) {
|
|
959
1001
|
// initialize the agGridContainerElement from the AgGrid instance
|
|
960
1002
|
// @ts-ignore
|
|
@@ -982,19 +1024,21 @@ export class AdaptableAgGrid {
|
|
|
982
1024
|
}
|
|
983
1025
|
getAllColumnDefinitions(agGridColDefs) {
|
|
984
1026
|
const allColDefs = this.enhanceColDefsWithSpecialColumns(agGridColDefs !== null && agGridColDefs !== void 0 ? agGridColDefs : this.agGridAdapter.getAgGridApi().getColumnDefs());
|
|
985
|
-
this.agGridAdapter.assignColumnIdsToColDefs(allColDefs);
|
|
986
1027
|
return allColDefs;
|
|
987
1028
|
}
|
|
988
1029
|
getSpecialColDefs() {
|
|
989
|
-
|
|
1030
|
+
const specialColDefs = [
|
|
990
1031
|
...this.api.calculatedColumnApi.internalApi.getColDefsForCalculatedColumns(),
|
|
991
1032
|
...this.api.actionColumnApi.getColDefsForActionColumns(),
|
|
992
1033
|
...this.api.freeTextColumnApi.internalApi.getColDefsForFreeTextColumns(),
|
|
993
1034
|
...this.api.actionRowApi.internalApi.getColDefsForActionRowColumns(),
|
|
994
1035
|
...this.api.fdc3Api.internalApi.getFdc3ActionColDefs(),
|
|
995
1036
|
];
|
|
1037
|
+
this.agGridAdapter.assignColumnIdsToColDefs(specialColDefs);
|
|
1038
|
+
return specialColDefs;
|
|
996
1039
|
}
|
|
997
1040
|
enhanceColDefsWithSpecialColumns(agGridColDefs) {
|
|
1041
|
+
this.agGridAdapter.assignColumnIdsToColDefs(agGridColDefs);
|
|
998
1042
|
const specialColDefs = this.getSpecialColDefs();
|
|
999
1043
|
const isSpecialColDef = (colDef) => {
|
|
1000
1044
|
const { type } = colDef;
|
|
@@ -1018,7 +1062,9 @@ export class AdaptableAgGrid {
|
|
|
1018
1062
|
else {
|
|
1019
1063
|
if (!isSpecialColDef(colDef)) {
|
|
1020
1064
|
// if it's not a special column, return it as is
|
|
1021
|
-
|
|
1065
|
+
// without a minWidth, columns in details grid are VERY wide
|
|
1066
|
+
// so the line below fixes https://github.com/AdaptableTools/adaptable/issues/2559
|
|
1067
|
+
return Object.assign({ minWidth: 10 }, colDef);
|
|
1022
1068
|
}
|
|
1023
1069
|
const newlyCreatedSpecialColDef = specialColDefs.find((specialColDef) => specialColDef.colId === colDef.colId);
|
|
1024
1070
|
if (newlyCreatedSpecialColDef) {
|
|
@@ -1026,7 +1072,9 @@ export class AdaptableAgGrid {
|
|
|
1026
1072
|
processedSpecialColDefIds.push(colDef.colId);
|
|
1027
1073
|
// merge the user defined colDef with the special col def
|
|
1028
1074
|
// this way the user may provide some custom settings for the special col def (tooltip, etc)
|
|
1029
|
-
const mergedColDef = Object.assign(Object.assign({
|
|
1075
|
+
const mergedColDef = Object.assign(Object.assign({
|
|
1076
|
+
// see above comment for minWidth
|
|
1077
|
+
minWidth: 10 }, colDef), newlyCreatedSpecialColDef);
|
|
1030
1078
|
return mergedColDef;
|
|
1031
1079
|
}
|
|
1032
1080
|
else {
|
|
@@ -1055,7 +1103,7 @@ export class AdaptableAgGrid {
|
|
|
1055
1103
|
return resultColDefs;
|
|
1056
1104
|
}
|
|
1057
1105
|
useRowNodeLookUp() {
|
|
1058
|
-
return this.agGridAdapter.
|
|
1106
|
+
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1059
1107
|
}
|
|
1060
1108
|
getAgGridContainerElement() {
|
|
1061
1109
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
@@ -1078,10 +1126,7 @@ export class AdaptableAgGrid {
|
|
|
1078
1126
|
// This method returns selected cells ONLY (if selection mode is cells or multiple cells).
|
|
1079
1127
|
// If the selection mode is row it will returns nothing - use the setSelectedRows() method
|
|
1080
1128
|
refreshSelectedCellsState() {
|
|
1081
|
-
|
|
1082
|
-
const isRangeSelectionModuleRegistered = this.agGridAdapter.isModulePresent(ModuleNames.RangeSelectionModule);
|
|
1083
|
-
if (!isRangeSelectionModuleRegistered ||
|
|
1084
|
-
!((_a = this.agGridAdapter.getLiveGridOptions()) === null || _a === void 0 ? void 0 : _a.enableRangeSelection) === true) {
|
|
1129
|
+
if (!this.isGridRangeSelectable()) {
|
|
1085
1130
|
return;
|
|
1086
1131
|
}
|
|
1087
1132
|
const selectedCellInfo = this.agGridAdapter.deriveSelectedCellInfoFromAgGrid();
|
|
@@ -1092,8 +1137,8 @@ export class AdaptableAgGrid {
|
|
|
1092
1137
|
return selectedCellInfo;
|
|
1093
1138
|
}
|
|
1094
1139
|
refreshSelectedRowsState() {
|
|
1095
|
-
if (!this.
|
|
1096
|
-
return
|
|
1140
|
+
if (!this.isGridRowSelectable()) {
|
|
1141
|
+
return;
|
|
1097
1142
|
}
|
|
1098
1143
|
const selectedRowInfo = this.agGridAdapter.deriveSelectedRowInfoFromAgGrid();
|
|
1099
1144
|
this.api.gridApi.internalApi.setSelectedRows(selectedRowInfo);
|
|
@@ -1101,9 +1146,13 @@ export class AdaptableAgGrid {
|
|
|
1101
1146
|
this.api.eventApi.emit('RowSelectionChanged', rowSelectionChangedInfo);
|
|
1102
1147
|
return selectedRowInfo;
|
|
1103
1148
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1149
|
+
isGridRowSelectable() {
|
|
1150
|
+
const rowSelection = this.agGridAdapter.getAgGridApi().getGridOption('rowSelection');
|
|
1151
|
+
return rowSelection === 'single' || rowSelection === 'multiple';
|
|
1152
|
+
}
|
|
1153
|
+
isGridRangeSelectable() {
|
|
1154
|
+
return (this.agGridAdapter.isModulePresent(ModuleNames.RangeSelectionModule) &&
|
|
1155
|
+
this.agGridAdapter.getGridOption('enableRangeSelection'));
|
|
1107
1156
|
}
|
|
1108
1157
|
initAdaptableStore() {
|
|
1109
1158
|
const perfNewAdaptableStore = this.logger.beginPerf(`initAdaptableStore()`);
|
|
@@ -1119,15 +1168,26 @@ export class AdaptableAgGrid {
|
|
|
1119
1168
|
var _a, _b, _c;
|
|
1120
1169
|
const agGridState = {};
|
|
1121
1170
|
const currentLayoutName = (_a = adaptableState.Layout) === null || _a === void 0 ? void 0 : _a.CurrentLayout;
|
|
1122
|
-
const
|
|
1171
|
+
const _currentLayout = currentLayoutName &&
|
|
1123
1172
|
((_c = (_b = adaptableState.Layout) === null || _b === void 0 ? void 0 : _b.Layouts) === null || _c === void 0 ? void 0 : _c.find((l) => l.Name === currentLayoutName));
|
|
1124
|
-
if (!
|
|
1173
|
+
if (!_currentLayout) {
|
|
1125
1174
|
return agGridState;
|
|
1126
1175
|
}
|
|
1127
|
-
const
|
|
1128
|
-
const
|
|
1176
|
+
const currentLayout = removeUuidAndSource(_currentLayout);
|
|
1177
|
+
const allAgGridFlattenedColDefs = this.agGridAdapter.getFlattenedColDefs(agGridColDefs);
|
|
1178
|
+
const allAgGridColDefIds = allAgGridFlattenedColDefs.map((colDef) => colDef.colId);
|
|
1179
|
+
const { columnApi } = this.api;
|
|
1180
|
+
// also add the row group columns, if they are specified in the layout
|
|
1181
|
+
currentLayout.Columns.forEach((colId) => {
|
|
1182
|
+
if (columnApi.isAutoRowGroupColumn(colId)) {
|
|
1183
|
+
allAgGridColDefIds.push(colId);
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
const getColDef = (colId) => allAgGridFlattenedColDefs.find((colDef) => colDef.colId === colId);
|
|
1129
1187
|
agGridState.columnVisibility = {
|
|
1130
|
-
hiddenColIds:
|
|
1188
|
+
hiddenColIds: allAgGridFlattenedColDefs
|
|
1189
|
+
.filter((colDef) => { var _a; return !((_a = currentLayout.Columns) === null || _a === void 0 ? void 0 : _a.includes(colDef.colId)) || colDef.hide || colDef.initialHide; })
|
|
1190
|
+
.map((colDef) => colDef.colId),
|
|
1131
1191
|
};
|
|
1132
1192
|
agGridState.columnOrder = {
|
|
1133
1193
|
orderedColIds: sortWithOrderArray(allAgGridColDefIds, currentLayout.Columns || [], {
|
|
@@ -1323,16 +1383,17 @@ export class AdaptableAgGrid {
|
|
|
1323
1383
|
// ADD filter event
|
|
1324
1384
|
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = (type) => {
|
|
1325
1385
|
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
1326
|
-
this.debouncedSaveGridLayout();
|
|
1386
|
+
this.debouncedSaveGridLayout(type);
|
|
1327
1387
|
}
|
|
1328
1388
|
}));
|
|
1329
1389
|
/**
|
|
1330
1390
|
* Save Layout if Display Row Groups is "dynamic
|
|
1331
1391
|
*/
|
|
1332
|
-
this.debouncedSaveGridLayout = debounce(() => {
|
|
1392
|
+
this.debouncedSaveGridLayout = debounce((type) => {
|
|
1333
1393
|
if (!this.isReady) {
|
|
1334
1394
|
return;
|
|
1335
1395
|
}
|
|
1396
|
+
this.logger.info('Event Triggering Auto Layout Save', type || '');
|
|
1336
1397
|
this.updateLayoutFromGrid();
|
|
1337
1398
|
}, HALF_SECOND);
|
|
1338
1399
|
const rowGroupEventsThatTriggersAutoLayoutSave = [
|
|
@@ -1342,7 +1403,7 @@ export class AdaptableAgGrid {
|
|
|
1342
1403
|
this.agGridAdapter.getAgGridApi().addGlobalListener((this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = (type) => {
|
|
1343
1404
|
if (rowGroupEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
1344
1405
|
if (this.adaptableOptions.layoutOptions.displayRowGroups == 'dynamic') {
|
|
1345
|
-
this.debouncedSaveGridLayout();
|
|
1406
|
+
this.debouncedSaveGridLayout(type);
|
|
1346
1407
|
}
|
|
1347
1408
|
}
|
|
1348
1409
|
}));
|
|
@@ -1366,7 +1427,7 @@ export class AdaptableAgGrid {
|
|
|
1366
1427
|
*/
|
|
1367
1428
|
this.agGridAdapter.getAgGridApi().addEventListener(Events.EVENT_COLUMN_RESIZED, (this.listenerColumnResized = (params) => {
|
|
1368
1429
|
if (params.finished == true && params.type == 'columnResized' && params.column) {
|
|
1369
|
-
this.debouncedSaveGridLayout();
|
|
1430
|
+
this.debouncedSaveGridLayout(params.type);
|
|
1370
1431
|
}
|
|
1371
1432
|
}));
|
|
1372
1433
|
/**
|
|
@@ -1413,26 +1474,6 @@ export class AdaptableAgGrid {
|
|
|
1413
1474
|
this.onSortChanged();
|
|
1414
1475
|
this.debouncedSetSelectedCells();
|
|
1415
1476
|
}));
|
|
1416
|
-
const showGroupingTotalsAsHeader = this.adaptableOptions.groupingOptions.showGroupingTotalsAsHeader;
|
|
1417
|
-
/**
|
|
1418
|
-
* Use Case: Model has updated
|
|
1419
|
-
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
1420
|
-
*/
|
|
1421
|
-
this.agGridAdapter.getAgGridApi().addEventListener(Events.EVENT_MODEL_UPDATED, (this.listenerModelUpdated = (params) => {
|
|
1422
|
-
if (showGroupingTotalsAsHeader) {
|
|
1423
|
-
if (params && params.api) {
|
|
1424
|
-
const pinnedData = params.api.getPinnedTopRow(0);
|
|
1425
|
-
const model = params.api.getModel();
|
|
1426
|
-
const rootNode = model.getRootNode();
|
|
1427
|
-
if (!pinnedData) {
|
|
1428
|
-
params.api.setPinnedTopRowData([rootNode.aggData]);
|
|
1429
|
-
}
|
|
1430
|
-
else {
|
|
1431
|
-
pinnedData.updateData(rootNode.aggData);
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
}
|
|
1435
|
-
}));
|
|
1436
1477
|
const eventsThatTriggerChartingChanges = [
|
|
1437
1478
|
Events.EVENT_CHART_CREATED,
|
|
1438
1479
|
/** Chart Range selection has changed */
|
|
@@ -1548,7 +1589,6 @@ export class AdaptableAgGrid {
|
|
|
1548
1589
|
this.AlertService = new AlertService(this.api);
|
|
1549
1590
|
this.TeamSharingService = new TeamSharingService(this.api);
|
|
1550
1591
|
this.Fdc3Service = new Fdc3Service(this.api);
|
|
1551
|
-
this.SummaryService = new SummaryService(this.api);
|
|
1552
1592
|
this.CellPopupService = new CellPopupService(this.api);
|
|
1553
1593
|
this.RowEditService = new RowEditService(this.api);
|
|
1554
1594
|
this.MetamodelService = new MetamodelService(() => this.api.optionsApi.getAdaptableOptions(), true);
|
|
@@ -1569,7 +1609,7 @@ export class AdaptableAgGrid {
|
|
|
1569
1609
|
modules.set(ModuleConstants.ChartingModuleId, new ChartingModule(this.api));
|
|
1570
1610
|
modules.set(ModuleConstants.ColumnFilterModuleId, new ColumnFilterModule(this.api));
|
|
1571
1611
|
modules.set(ModuleConstants.ColumnInfoModuleId, new ColumnInfoModule(this.api));
|
|
1572
|
-
modules.set(ModuleConstants.
|
|
1612
|
+
modules.set(ModuleConstants.CommentModuleId, new CommentModule(this.api));
|
|
1573
1613
|
modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule(this.api));
|
|
1574
1614
|
modules.set(ModuleConstants.DashboardModuleId, new DashboardModule(this.api));
|
|
1575
1615
|
modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule(this.api));
|
|
@@ -1584,7 +1624,7 @@ export class AdaptableAgGrid {
|
|
|
1584
1624
|
modules.set(ModuleConstants.GridInfoModuleId, new GridInfoModule(this.api));
|
|
1585
1625
|
modules.set(ModuleConstants.LayoutModuleId, new LayoutModule(this.api));
|
|
1586
1626
|
modules.set(ModuleConstants.NamedQueryModuleId, new NamedQueryModule(this.api));
|
|
1587
|
-
modules.set(ModuleConstants.
|
|
1627
|
+
modules.set(ModuleConstants.NoteModuleId, new NoteModule(this.api));
|
|
1588
1628
|
modules.set(ModuleConstants.PlusMinusModuleId, new PlusMinusModule(this.api));
|
|
1589
1629
|
modules.set(ModuleConstants.QuickSearchModuleId, new QuickSearchModule(this.api));
|
|
1590
1630
|
modules.set(ModuleConstants.ScheduleModuleId, new ScheduleModule(this.api));
|
|
@@ -1609,7 +1649,9 @@ export class AdaptableAgGrid {
|
|
|
1609
1649
|
this.api.eventApi.on('AdaptableReady', () => {
|
|
1610
1650
|
var _a, _b;
|
|
1611
1651
|
// update status bar state
|
|
1612
|
-
const adaptableStatusPanels = (_b = (_a = this.agGridAdapter
|
|
1652
|
+
const adaptableStatusPanels = (_b = (_a = this.agGridAdapter
|
|
1653
|
+
.getAgGridApi()
|
|
1654
|
+
.getGridOption('statusBar')) === null || _a === void 0 ? void 0 : _a.statusPanels) === null || _b === void 0 ? void 0 : _b.filter((statusPanel) => this.adaptableStatusPanelKeys.includes(statusPanel.key));
|
|
1613
1655
|
const statusBarModule = this.ModuleService.getModuleById(ModuleConstants.StatusBarModuleId);
|
|
1614
1656
|
// need to add only the adaptable panels
|
|
1615
1657
|
statusBarModule.syncStateWithOptions(adaptableStatusPanels);
|
|
@@ -1642,13 +1684,14 @@ export class AdaptableAgGrid {
|
|
|
1642
1684
|
// TODO AFL MIG: check why this assertion is here
|
|
1643
1685
|
.getAllDisplayedColumnGroups();
|
|
1644
1686
|
const groupsCount = {};
|
|
1645
|
-
const colsToGroups = columnGroupChildren.reduce((acc, columnGroup) => {
|
|
1687
|
+
const colsToGroups = (columnGroupChildren !== null && columnGroupChildren !== void 0 ? columnGroupChildren : []).reduce((acc, columnGroup) => {
|
|
1646
1688
|
var _a, _b, _c;
|
|
1647
1689
|
if (!((_b = (_a = columnGroup.getProvidedColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
|
|
1648
1690
|
return acc;
|
|
1649
1691
|
}
|
|
1650
1692
|
const ColumnGroupId = columnGroup.getGroupId();
|
|
1651
|
-
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
|
|
1693
|
+
const AllowGroupSplit = !columnGroup.getProvidedColumnGroup().getColGroupDef()
|
|
1694
|
+
.marryChildren;
|
|
1652
1695
|
const FriendlyName = (_c = columnGroup.getProvidedColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
|
|
1653
1696
|
const columnsInGroup = columnGroup.getLeafColumns();
|
|
1654
1697
|
columnsInGroup.forEach((col) => {
|
|
@@ -2174,50 +2217,20 @@ export class AdaptableAgGrid {
|
|
|
2174
2217
|
});
|
|
2175
2218
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
2176
2219
|
}
|
|
2177
|
-
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState) {
|
|
2220
|
+
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState, layout) {
|
|
2221
|
+
layout = layout || this.api.layoutApi.getCurrentLayout();
|
|
2222
|
+
visibleColumnList = visibleColumnList || layout.Columns;
|
|
2178
2223
|
columnState = columnState || this.agGridAdapter.getAgGridApi().getColumnState();
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
return acc;
|
|
2190
|
-
}, {});
|
|
2191
|
-
const result = [...columnState]
|
|
2192
|
-
.sort((colState1, colState2) => {
|
|
2193
|
-
const colId1 = colState1.colId;
|
|
2194
|
-
const colId2 = colState2.colId;
|
|
2195
|
-
const originalIndex1 = columnsStateIndexes[colId1];
|
|
2196
|
-
const originalIndex2 = columnsStateIndexes[colId2];
|
|
2197
|
-
const isRowGroup1 = this.api.columnApi.isAutoRowGroupColumn(colId1);
|
|
2198
|
-
const isRowGroup2 = this.api.columnApi.isAutoRowGroupColumn(colId2);
|
|
2199
|
-
if (isRowGroup1 && isRowGroup2) {
|
|
2200
|
-
return 1;
|
|
2201
|
-
}
|
|
2202
|
-
if (isRowGroup1) {
|
|
2203
|
-
return -1;
|
|
2204
|
-
}
|
|
2205
|
-
if (isRowGroup2) {
|
|
2206
|
-
return 1;
|
|
2207
|
-
}
|
|
2208
|
-
if (newVisibleColumnsMap[colId1] != null && newVisibleColumnsMap[colId2] == null) {
|
|
2209
|
-
return -1;
|
|
2210
|
-
}
|
|
2211
|
-
if (newVisibleColumnsMap[colId1] == null && newVisibleColumnsMap[colId2] != null) {
|
|
2212
|
-
return 1;
|
|
2213
|
-
}
|
|
2214
|
-
if (newVisibleColumnsMap[colId1] == null && newVisibleColumnsMap[colId2] == null) {
|
|
2215
|
-
return originalIndex1 - originalIndex2;
|
|
2216
|
-
}
|
|
2217
|
-
return newVisibleColumnsMap[colState1.colId] - newVisibleColumnsMap[colState2.colId];
|
|
2218
|
-
})
|
|
2219
|
-
.map((colState) => (Object.assign(Object.assign({}, colState), { hide: NewVisibleColumnIdsMap[colState.colId] == null })));
|
|
2220
|
-
return result;
|
|
2224
|
+
return buildSortedColumnStateForLayout({
|
|
2225
|
+
columnState: columnState.map((colState) => {
|
|
2226
|
+
return {
|
|
2227
|
+
colId: colState.colId,
|
|
2228
|
+
hide: colState.hide,
|
|
2229
|
+
};
|
|
2230
|
+
}),
|
|
2231
|
+
layout: Object.assign(Object.assign({}, layout), { Columns: visibleColumnList }),
|
|
2232
|
+
gridOptions: this.agGridAdapter.getLiveGridOptions(),
|
|
2233
|
+
});
|
|
2221
2234
|
}
|
|
2222
2235
|
getDistinctValuesForColumn(column, distinctValuesParams) {
|
|
2223
2236
|
let gridCells = this.getGridCellsForPermittedValues(column, distinctValuesParams);
|
|
@@ -2402,10 +2415,10 @@ export class AdaptableAgGrid {
|
|
|
2402
2415
|
});
|
|
2403
2416
|
}
|
|
2404
2417
|
getAgGridRowModelType() {
|
|
2405
|
-
var _a
|
|
2418
|
+
var _a;
|
|
2406
2419
|
// it seems that this can be null so we need explicitly to return "clientSide" in this case
|
|
2407
2420
|
// need to check that for ServerSideRowModel it is ALWAYS returned...
|
|
2408
|
-
return (
|
|
2421
|
+
return (_a = this.agGridAdapter.getAgGridApi().getGridOption('rowModelType')) !== null && _a !== void 0 ? _a : 'clientSide';
|
|
2409
2422
|
}
|
|
2410
2423
|
getAllRowNodes(config) {
|
|
2411
2424
|
let rowNodes = [];
|
|
@@ -2528,7 +2541,7 @@ export class AdaptableAgGrid {
|
|
|
2528
2541
|
}
|
|
2529
2542
|
canGenerateCharts() {
|
|
2530
2543
|
return (this.agGridAdapter.isModulePresent(ModuleNames.GridChartsModule) &&
|
|
2531
|
-
this.agGridAdapter.
|
|
2544
|
+
this.agGridAdapter.getAgGridApi().getGridOption('enableCharts'));
|
|
2532
2545
|
}
|
|
2533
2546
|
canDisplaySparklines() {
|
|
2534
2547
|
return this.agGridAdapter.isModulePresent(ModuleNames.SparklinesModule);
|
|
@@ -2744,7 +2757,7 @@ export class AdaptableAgGrid {
|
|
|
2744
2757
|
setRowGroupColumns(columnIds) {
|
|
2745
2758
|
this.agGridAdapter.getAgGridApi().setRowGroupColumns(columnIds);
|
|
2746
2759
|
}
|
|
2747
|
-
|
|
2760
|
+
getAllGridColumns() {
|
|
2748
2761
|
return this.agGridAdapter.getAgGridApi().getAllGridColumns();
|
|
2749
2762
|
}
|
|
2750
2763
|
clearRowGroupColumns() {
|
|
@@ -2925,7 +2938,7 @@ export class AdaptableAgGrid {
|
|
|
2925
2938
|
else {
|
|
2926
2939
|
(_b = this.agGridAdapter.getAgGridApi()) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
2927
2940
|
}
|
|
2928
|
-
this.
|
|
2941
|
+
this.previousAgGridLayoutState = '';
|
|
2929
2942
|
const gridContainerElement = this.getAgGridContainerElement();
|
|
2930
2943
|
if (gridContainerElement) {
|
|
2931
2944
|
gridContainerElement.removeEventListener('keydown', this.agGridListenerKeydown);
|
|
@@ -3043,55 +3056,86 @@ export class AdaptableAgGrid {
|
|
|
3043
3056
|
ephemeralGridApi.destroy();
|
|
3044
3057
|
}
|
|
3045
3058
|
exportVisualDataToExcel() {
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
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
|
-
|
|
3059
|
+
try {
|
|
3060
|
+
const exportExcelStyles = this.ReportService.buildExcelStylesForVisualReports();
|
|
3061
|
+
this.agGridOptionsService.CAREFUL_patchGridOptionsProperty('excelStyles', exportExcelStyles);
|
|
3062
|
+
this.agGridAdapter.getAgGridApi().exportDataAsExcel({
|
|
3063
|
+
sheetName: 'Sheet 1',
|
|
3064
|
+
fileName: this.ReportService.getReportFileName(this.adaptableOptions.adaptableId, 'Excel'),
|
|
3065
|
+
// delegate the cell value processing to Adaptable
|
|
3066
|
+
processCellCallback: ({ node, column, value }) => {
|
|
3067
|
+
var _a;
|
|
3068
|
+
const columnId = column.getColId();
|
|
3069
|
+
if ((node === null || node === void 0 ? void 0 : node.group) &&
|
|
3070
|
+
(this.api.columnApi.isAutoRowGroupColumn(columnId) ||
|
|
3071
|
+
// we would still need to process the cell if this is a group row with an aggregated value
|
|
3072
|
+
((_a = node === null || node === void 0 ? void 0 : node.aggData) === null || _a === void 0 ? void 0 : _a[columnId]) == undefined)) {
|
|
3073
|
+
// skip processing of row groups, this was already handled in processRowGroupCallback()
|
|
3074
|
+
return value;
|
|
3075
|
+
}
|
|
3076
|
+
return this.processCellForExcelExport(node, columnId);
|
|
3077
|
+
},
|
|
3078
|
+
processRowGroupCallback: (params) => {
|
|
3079
|
+
var _a;
|
|
3080
|
+
// recreating the standard AG Grid styling for row groups: 'Parent -> Child'
|
|
3081
|
+
// additionally the values are formatted
|
|
3082
|
+
let rowGroupNode = params.node;
|
|
3083
|
+
const isFooterRow = rowGroupNode.footer;
|
|
3084
|
+
const rowGroupSummary = [(_a = this.processRowGroupForExcelExport(rowGroupNode)) !== null && _a !== void 0 ? _a : ''];
|
|
3085
|
+
while (rowGroupNode.parent) {
|
|
3086
|
+
rowGroupNode = rowGroupNode.parent;
|
|
3087
|
+
const formattedParentNode = this.processRowGroupForExcelExport(rowGroupNode);
|
|
3088
|
+
if (formattedParentNode) {
|
|
3089
|
+
rowGroupSummary.push(formattedParentNode);
|
|
3090
|
+
}
|
|
3091
|
+
}
|
|
3092
|
+
let summary = rowGroupSummary.reverse().join(' -> ');
|
|
3093
|
+
if (isFooterRow) {
|
|
3094
|
+
summary = `Total: ${summary}`;
|
|
3095
|
+
}
|
|
3096
|
+
return summary;
|
|
3097
|
+
},
|
|
3098
|
+
});
|
|
3099
|
+
this.agGridOptionsService.revertGridOptionsPropertyToUserValue('excelStyles');
|
|
3100
|
+
}
|
|
3101
|
+
catch (error) {
|
|
3102
|
+
this.logger.consoleError('Error exporting visual data to Excel', error);
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
processRowGroupForExcelExport(rowNode) {
|
|
3106
|
+
var _a, _b, _c, _d, _e;
|
|
3107
|
+
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;
|
|
3108
|
+
if (!columnId || !rowNode.key) {
|
|
3109
|
+
return;
|
|
3110
|
+
}
|
|
3111
|
+
let rawValue = rowNode.key;
|
|
3112
|
+
if (this.api.columnApi.getColumnDataTypeForColumnId(columnId) === 'Date' &&
|
|
3113
|
+
typeof rawValue === 'string' &&
|
|
3114
|
+
// rawValue is composed only of digits
|
|
3115
|
+
/^\d+$/.test(rawValue)) {
|
|
3116
|
+
// AG-Grid converts the value to string, we have to reconvert it back
|
|
3117
|
+
const dateRawValue = parseInt(rawValue);
|
|
3118
|
+
if (dateRawValue != undefined) {
|
|
3119
|
+
// @ts-ignore
|
|
3120
|
+
rawValue = dateRawValue;
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
return this.ReportService.getCellExportValueFromRawValue(rowNode, rawValue, columnId);
|
|
3124
|
+
}
|
|
3125
|
+
processCellForExcelExport(rowNode, columnId) {
|
|
3126
|
+
if (this.api.exportApi.internalApi.isVisualDataExportInProgress()) {
|
|
3127
|
+
const cellKey = this.agGridColumnAdapter.getExcelClassNameForCell(columnId, this.getPrimaryKeyValueFromRowNode(rowNode));
|
|
3128
|
+
const isoFormattedDate = this.ReportService.getExcelStyleWithFormattedDate(cellKey);
|
|
3129
|
+
if (isoFormattedDate) {
|
|
3130
|
+
// this is a Date cell which will be formatted by Excel
|
|
3131
|
+
return isoFormattedDate;
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3134
|
+
return this.ReportService.getCellExportValueFromRowNode(rowNode, columnId);
|
|
3092
3135
|
}
|
|
3093
3136
|
isQuickFilterAvailable() {
|
|
3094
|
-
if (this.api.layoutApi.
|
|
3137
|
+
if (this.api.layoutApi.isCurrentLayoutPivot() &&
|
|
3138
|
+
this.adaptableOptions.columnFilterOptions.useAdaptableColumnFiltering) {
|
|
3095
3139
|
// hide completely the quick filter if pivot is enabled
|
|
3096
3140
|
return false;
|
|
3097
3141
|
}
|
|
@@ -3127,10 +3171,6 @@ export class AdaptableAgGrid {
|
|
|
3127
3171
|
layout.PinnedColumnsMap = layout.PinnedColumnsMap || {};
|
|
3128
3172
|
layout.PinnedColumnsMap[actionRowColumn.colId] = actionRowColumn.pinned;
|
|
3129
3173
|
}
|
|
3130
|
-
const layoutColumnsMap = layout.Columns.reduce((acc, colId) => {
|
|
3131
|
-
acc[colId] = true;
|
|
3132
|
-
return acc;
|
|
3133
|
-
}, {});
|
|
3134
3174
|
const columnsState = this.agGridAdapter.getAgGridApi().getColumnState();
|
|
3135
3175
|
const columnsStateIndexes = {};
|
|
3136
3176
|
const columnsStateMap = columnsState.reduce((acc, colState, index) => {
|
|
@@ -3162,20 +3202,19 @@ export class AdaptableAgGrid {
|
|
|
3162
3202
|
.getPivotResultColumns()) === null || _b === void 0 ? void 0 : _b.map((column) => column.getColId())) || [];
|
|
3163
3203
|
let isChanged = false;
|
|
3164
3204
|
const colsToAutoSize = {};
|
|
3165
|
-
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
|
|
3205
|
+
let newColumnsState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState, layout);
|
|
3166
3206
|
newColumnsState = newColumnsState
|
|
3167
3207
|
.map((colState) => {
|
|
3168
3208
|
var _a, _b, _c;
|
|
3169
3209
|
const { colId } = colState;
|
|
3170
3210
|
const oldColState = columnsStateMap[colId];
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
const newColState = Object.assign(Object.assign({}, oldColState), { hide });
|
|
3211
|
+
// it's important to have width here, so it's not inherited from the existing colState
|
|
3212
|
+
// which could be from a different layout
|
|
3213
|
+
const newColState = Object.assign(Object.assign(Object.assign({}, oldColState), { width: null }), colState);
|
|
3175
3214
|
if (layout.ColumnWidthMap && layout.ColumnWidthMap[colId] != null) {
|
|
3176
3215
|
newColState.width = layout.ColumnWidthMap[colId];
|
|
3177
3216
|
}
|
|
3178
|
-
else if (!hide) {
|
|
3217
|
+
else if (!colState.hide) {
|
|
3179
3218
|
// autosize only the columns which are part of the selected layout
|
|
3180
3219
|
colsToAutoSize[colId] = true;
|
|
3181
3220
|
}
|
|
@@ -3184,11 +3223,7 @@ export class AdaptableAgGrid {
|
|
|
3184
3223
|
}
|
|
3185
3224
|
newColState.rowGroupIndex =
|
|
3186
3225
|
groupedColumnsIndexesMap[colId] != null ? groupedColumnsIndexesMap[colId] : null;
|
|
3187
|
-
const previousRowGroup = newColState.rowGroup;
|
|
3188
3226
|
newColState.rowGroup = newColState.rowGroupIndex != null;
|
|
3189
|
-
if (!previousRowGroup && newColState.rowGroup) {
|
|
3190
|
-
this.agGridColumnAdapter.triggerSetupColumnKeyCreator(colId);
|
|
3191
|
-
}
|
|
3192
3227
|
const normalizePinned = (pinnedValue) => {
|
|
3193
3228
|
if (typeof pinnedValue === 'string') {
|
|
3194
3229
|
return pinnedValue;
|
|
@@ -3293,14 +3328,13 @@ export class AdaptableAgGrid {
|
|
|
3293
3328
|
// as otherwise column order is not preserved properly when
|
|
3294
3329
|
// going from pivoted to unpivoted layout
|
|
3295
3330
|
if (shouldUpdatePivoted) {
|
|
3296
|
-
this.agGridAdapter.
|
|
3331
|
+
this.agGridAdapter.setGridOption('pivotMode', pivoted);
|
|
3297
3332
|
}
|
|
3298
3333
|
const perfApplyColumnState = this.logger.beginPerf('applyColumnState (layout.isChanged)');
|
|
3299
3334
|
this.agGridAdapter.getAgGridApi().applyColumnState({
|
|
3300
3335
|
state: newColumnsState,
|
|
3301
3336
|
applyOrder: true,
|
|
3302
3337
|
});
|
|
3303
|
-
this.applyGroupColumnWidth(layout);
|
|
3304
3338
|
perfApplyColumnState.end();
|
|
3305
3339
|
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
3306
3340
|
this.agGridAdapter.getAgGridApi().setPivotColumns(layout.PivotColumns || []);
|
|
@@ -3331,7 +3365,9 @@ export class AdaptableAgGrid {
|
|
|
3331
3365
|
else {
|
|
3332
3366
|
if (((_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.layoutOptions) === null || _f === void 0 ? void 0 : _f.autoSizeColumnsInLayout) &&
|
|
3333
3367
|
colsToAutoSizeArray.length) {
|
|
3334
|
-
|
|
3368
|
+
requestAnimationFrame(() => {
|
|
3369
|
+
this.autoSizeColumns(colsToAutoSizeArray);
|
|
3370
|
+
});
|
|
3335
3371
|
}
|
|
3336
3372
|
}
|
|
3337
3373
|
this.forPlugins((plugin) => {
|
|
@@ -3355,38 +3391,6 @@ export class AdaptableAgGrid {
|
|
|
3355
3391
|
}
|
|
3356
3392
|
return null;
|
|
3357
3393
|
}
|
|
3358
|
-
/**
|
|
3359
|
-
* Setting layout works by modifing the column state.
|
|
3360
|
-
* The column state is based on the current existing columns.
|
|
3361
|
-
* At this point the column groups do not exist, and the widths from layout are not applied.
|
|
3362
|
-
*
|
|
3363
|
-
* After the col sate is applied and the column groups are created we need
|
|
3364
|
-
* to apply the state again to update the widths of the group columns.
|
|
3365
|
-
*/
|
|
3366
|
-
applyGroupColumnWidth(layout) {
|
|
3367
|
-
if (!layout.RowGroupedColumns || !layout.RowGroupedColumns.length) {
|
|
3368
|
-
return;
|
|
3369
|
-
}
|
|
3370
|
-
const groupColumnWithDifferentWidths = this.agGridAdapter
|
|
3371
|
-
.getAgGridApi()
|
|
3372
|
-
.getColumnState()
|
|
3373
|
-
.reduce((acc, col) => {
|
|
3374
|
-
var _a;
|
|
3375
|
-
if (this.api.columnApi.isAutoRowGroupColumn(col.colId)) {
|
|
3376
|
-
const widthInLayout = (_a = layout.ColumnWidthMap) === null || _a === void 0 ? void 0 : _a[col.colId];
|
|
3377
|
-
if (widthInLayout && widthInLayout !== col.width) {
|
|
3378
|
-
acc.push(Object.assign(Object.assign({}, col), { width: widthInLayout }));
|
|
3379
|
-
}
|
|
3380
|
-
}
|
|
3381
|
-
return acc;
|
|
3382
|
-
}, []);
|
|
3383
|
-
if (groupColumnWithDifferentWidths.length === 0) {
|
|
3384
|
-
return;
|
|
3385
|
-
}
|
|
3386
|
-
this.agGridAdapter.getAgGridApi().applyColumnState({
|
|
3387
|
-
state: groupColumnWithDifferentWidths,
|
|
3388
|
-
});
|
|
3389
|
-
}
|
|
3390
3394
|
onRowDataChanged({ rowNode, oldData, newData, }) {
|
|
3391
3395
|
if (oldData == null || oldData == undefined) {
|
|
3392
3396
|
return;
|
|
@@ -3565,12 +3569,12 @@ export class AdaptableAgGrid {
|
|
|
3565
3569
|
if (!dataChangedScope.wholeRow) {
|
|
3566
3570
|
const columnIds = this.api.expressionApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
|
|
3567
3571
|
if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
3568
|
-
if (this.api.
|
|
3572
|
+
if (this.api.columnScopeApi.scopeIsAll(styleModule.Scope)) {
|
|
3569
3573
|
dataChangedScope.wholeRow = true;
|
|
3570
3574
|
return;
|
|
3571
3575
|
}
|
|
3572
3576
|
else {
|
|
3573
|
-
this.api.
|
|
3577
|
+
this.api.columnScopeApi
|
|
3574
3578
|
.getColumnsForScope(styleModule.Scope)
|
|
3575
3579
|
.map((c) => c.columnId)
|
|
3576
3580
|
.forEach((colId) => {
|
|
@@ -3683,15 +3687,18 @@ export class AdaptableAgGrid {
|
|
|
3683
3687
|
var _a, _b;
|
|
3684
3688
|
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
3685
3689
|
const columnState = agGridApi.getColumnState();
|
|
3690
|
+
const expandedState = agGridApi.getState().rowGroupExpansion || { expandedRowGroupIds: [] };
|
|
3691
|
+
const currentLayoutState = { columnState, expandedState };
|
|
3686
3692
|
try {
|
|
3687
|
-
|
|
3688
|
-
|
|
3693
|
+
// TODO
|
|
3694
|
+
const stringifiedLayoutState = JSON.stringify(currentLayoutState);
|
|
3695
|
+
if (stringifiedLayoutState === this.previousAgGridLayoutState) {
|
|
3689
3696
|
// same grid column state as a previous,
|
|
3690
3697
|
// so no need to update, as the layout has already been updated
|
|
3691
3698
|
// for this grid column state
|
|
3692
3699
|
return;
|
|
3693
3700
|
}
|
|
3694
|
-
this.
|
|
3701
|
+
this.previousAgGridLayoutState = stringifiedLayoutState;
|
|
3695
3702
|
}
|
|
3696
3703
|
catch (ex) {
|
|
3697
3704
|
this.logger.consoleError('Error stringifying column state', ex);
|
|
@@ -3899,31 +3906,4 @@ export class AdaptableAgGrid {
|
|
|
3899
3906
|
};
|
|
3900
3907
|
});
|
|
3901
3908
|
}
|
|
3902
|
-
setPinnedRows(pinnedRows, location) {
|
|
3903
|
-
const gridApi = this.agGridAdapter.getAgGridApi();
|
|
3904
|
-
switch (location) {
|
|
3905
|
-
case 'top':
|
|
3906
|
-
gridApi.setGridOption('pinnedTopRowData', pinnedRows);
|
|
3907
|
-
break;
|
|
3908
|
-
case 'bottom':
|
|
3909
|
-
gridApi.setGridOption('pinnedBottomRowData', pinnedRows);
|
|
3910
|
-
break;
|
|
3911
|
-
}
|
|
3912
|
-
}
|
|
3913
|
-
setupRowSummaries() {
|
|
3914
|
-
var _a;
|
|
3915
|
-
const rowSummaries = (_a = this.api.internalApi.getAdaptableState().System.RowSummary.rowSummaries) !== null && _a !== void 0 ? _a : [];
|
|
3916
|
-
const { top, bottom } = rowSummaries.reduce((acc, summaryRow) => {
|
|
3917
|
-
const row = summaryRow.RowData;
|
|
3918
|
-
if (summaryRow.Position === 'Bottom' || !summaryRow.Position) {
|
|
3919
|
-
acc.bottom.push(row);
|
|
3920
|
-
}
|
|
3921
|
-
else {
|
|
3922
|
-
acc.top.push(row);
|
|
3923
|
-
}
|
|
3924
|
-
return acc;
|
|
3925
|
-
}, { top: [], bottom: [] });
|
|
3926
|
-
this.setPinnedRows(top, 'top');
|
|
3927
|
-
this.setPinnedRows(bottom, 'bottom');
|
|
3928
|
-
}
|
|
3929
3909
|
}
|