@adaptabletools/adaptable 18.0.0-canary.3 → 18.0.0-canary.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +4 -21
- package/agGrid.js +9 -26
- package/base.css +27 -21
- package/base.css.map +1 -1
- package/index.css +108 -88
- package/index.css.map +1 -1
- package/package.json +4 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -109
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -7
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +11 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +39 -0
- package/src/AdaptableOptions/DataImportOptions.d.ts +2 -2
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -26
- package/src/AdaptableOptions/MenuOptions.d.ts +11 -71
- package/src/AdaptableOptions/MenuOptions.js +1 -99
- package/src/AdaptableOptions/NoteOptions.d.ts +25 -0
- package/src/AdaptableOptions/StateOptions.d.ts +6 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +9 -4
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ColumnApi.d.ts +13 -0
- package/src/Api/CommentApi.d.ts +20 -22
- package/src/Api/ConfigApi.d.ts +4 -5
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +42 -14
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +30 -0
- package/src/Api/Implementation/ActionRowApiImpl.js +3 -7
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +3 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
- package/src/Api/Implementation/AlertApiImpl.js +5 -10
- package/src/Api/Implementation/ApiBase.d.ts +5 -3
- package/src/Api/Implementation/ApiBase.js +8 -2
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- 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/CommentsApiImpl.d.ts +8 -5
- package/src/Api/Implementation/CommentsApiImpl.js +12 -6
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +34 -30
- 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.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 +10 -3
- package/src/Api/Implementation/GridApiImpl.js +78 -23
- package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -7
- package/src/Api/Implementation/LayoutApiImpl.js +19 -13
- package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
- package/src/Api/Implementation/NoteApiImpl.js +40 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -4
- package/src/Api/Implementation/OptionsApiImpl.js +4 -4
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +64 -18
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +3 -15
- package/src/Api/Implementation/ThemeApiImpl.js +2 -7
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +14 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +30 -25
- package/src/Api/Internal/ActionRowInternalApi.d.ts +6 -1
- package/src/Api/Internal/ActionRowInternalApi.js +117 -38
- package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -8
- package/src/Api/Internal/AdaptableInternalApi.js +25 -37
- package/src/Api/Internal/AlertInternalApi.js +4 -17
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +78 -14
- package/src/Api/Internal/ChartingInternalApi.js +13 -13
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +35 -31
- package/src/Api/Internal/ColumnInternalApi.d.ts +6 -1
- package/src/Api/Internal/ColumnInternalApi.js +19 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +14 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +33 -2
- package/src/Api/Internal/DashboardInternalApi.js +5 -11
- package/src/Api/Internal/DataImportInternalApi.js +3 -9
- package/src/Api/Internal/DataSetInternalApi.js +3 -8
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +8 -5
- package/src/Api/Internal/ExpressionInternalApi.js +2 -12
- package/src/Api/Internal/Fdc3InternalApi.js +3 -12
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +1 -4
- package/src/Api/Internal/FormatColumnInternalApi.js +26 -28
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +61 -1
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +9 -9
- package/src/Api/Internal/GridInternalApi.d.ts +23 -3
- package/src/Api/Internal/GridInternalApi.js +151 -44
- 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/NoteInternalApi.js +14 -0
- package/src/Api/Internal/PredicateInternalApi.js +5 -40
- package/src/Api/Internal/ScheduleInternalApi.js +1 -6
- package/src/Api/Internal/StyledColumnInternalApi.js +5 -5
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +3 -8
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +17 -9
- package/src/Api/NoteApi.d.ts +48 -0
- package/src/Api/OptionsApi.d.ts +8 -8
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/Api/UserInterfaceApi.d.ts +15 -13
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +4 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
- package/src/PredefinedConfig/CommentState.d.ts +27 -23
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -14
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +4 -0
- 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 +15 -1
- package/src/PredefinedConfig/Common/Menu.js +116 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
- package/src/PredefinedConfig/Common/RowSummary.js +17 -0
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/FormatColumnState.d.ts +6 -1
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +12 -22
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -3
- package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
- package/src/PredefinedConfig/StyledColumnState.d.ts +5 -0
- package/src/PredefinedConfig/SystemState.d.ts +12 -4
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -4
- package/src/Redux/ActionsReducers/CommentsRedux.js +0 -34
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +32 -10
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +29 -28
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -13
- package/src/Redux/ActionsReducers/PopupRedux.js +0 -19
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +15 -4
- package/src/Redux/ActionsReducers/SystemRedux.js +24 -9
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +70 -80
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +11 -12
- package/src/Strategy/AdaptableModuleBase.js +17 -23
- package/src/Strategy/AlertModule.d.ts +2 -3
- package/src/Strategy/AlertModule.js +4 -57
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/BulkUpdateModule.js +2 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +4 -5
- package/src/Strategy/CalculatedColumnModule.js +8 -28
- package/src/Strategy/CellSummaryModule.d.ts +10 -8
- package/src/Strategy/CellSummaryModule.js +85 -70
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +3 -4
- package/src/Strategy/ColumnFilterModule.js +37 -121
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/ColumnInfoModule.js +6 -4
- package/src/Strategy/CommentModule.d.ts +11 -0
- package/src/Strategy/CommentModule.js +70 -0
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.js +4 -3
- package/src/Strategy/DashboardModule.d.ts +3 -4
- package/src/Strategy/DashboardModule.js +11 -28
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataImportModule.d.ts +4 -4
- package/src/Strategy/DataImportModule.js +8 -8
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.d.ts +1 -2
- package/src/Strategy/ExportModule.js +39 -42
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +3 -13
- package/src/Strategy/FlashingCellModule.d.ts +3 -4
- package/src/Strategy/FlashingCellModule.js +8 -21
- package/src/Strategy/FormatColumnModule.d.ts +1 -3
- package/src/Strategy/FormatColumnModule.js +27 -91
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -2
- package/src/Strategy/FreeTextColumnModule.js +2 -32
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/GridInfoModule.js +5 -3
- package/src/Strategy/Interface/IModule.d.ts +3 -4
- package/src/Strategy/LayoutModule.d.ts +5 -6
- package/src/Strategy/LayoutModule.js +77 -122
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +3 -3
- package/src/Strategy/NoteModule.js +55 -0
- package/src/Strategy/PlusMinusModule.d.ts +2 -2
- package/src/Strategy/PlusMinusModule.js +3 -3
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.d.ts +3 -3
- package/src/Strategy/SettingsPanelModule.js +6 -6
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +2 -1
- package/src/Strategy/StyledColumnModule.d.ts +2 -2
- package/src/Strategy/StyledColumnModule.js +45 -40
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/SystemStatusModule.js +4 -3
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +1 -0
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +2 -0
- package/src/Utilities/Constants/GeneralConstants.js +2 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +6 -6
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +7 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +433 -3
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +19 -58
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +4 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +6 -24
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +4 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +26 -19
- package/src/Utilities/Services/CellPopupService.js +2 -3
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
- package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -181
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/ModuleService.js +6 -2
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +4 -3
- package/src/Utilities/Services/ReportService.d.ts +7 -5
- package/src/Utilities/Services/ReportService.js +243 -24
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +22 -0
- package/src/Utilities/Services/RowSummaryService.js +141 -0
- 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/AdaptableView.js +1 -3
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsEditor.js +28 -17
- package/src/View/Comments/CommentsPopup.js +25 -13
- 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/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.js +34 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +9 -1
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +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/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -9
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +19 -6
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +11 -7
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +9 -5
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +195 -0
- 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 +17 -1
- 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} +20 -17
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +14 -10
- package/src/View/Theme/ThemeSelector.js +3 -3
- package/src/agGrid/ActionColumnRenderer.js +7 -6
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +8 -5292
- package/src/agGrid/AdaptableAgGrid.d.ts +346 -0
- package/src/agGrid/AdaptableAgGrid.js +3910 -0
- package/src/agGrid/AdaptableLogger.js +77 -11
- package/src/agGrid/AgGridAdapter.d.ts +64 -0
- package/src/agGrid/AgGridAdapter.js +589 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +54 -0
- package/src/agGrid/AgGridColumnAdapter.js +794 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +44 -0
- package/src/agGrid/AgGridMenuAdapter.js +600 -0
- package/src/agGrid/AgGridOptionsService.d.ts +15 -0
- package/src/agGrid/AgGridOptionsService.js +76 -0
- package/src/agGrid/BadgeRenderer.js +8 -2
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/PercentBarRenderer.js +3 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +7 -0
- package/src/agGrid/buildSortedColumnStateForLayout.js +120 -0
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +71 -18
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +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/CheckBox/index.js +1 -1
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +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/InfiniteTable/index.js +2 -2
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +4 -3
- package/src/components/ProgressIndicator/ProgressIndicator.js +15 -6
- package/src/components/Select/Select.d.ts +3 -1
- package/src/components/Select/Select.js +4 -2
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/components/icons/copy.d.ts +3 -0
- package/src/components/icons/copy.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 +14 -0
- package/src/components/icons/note.js +2 -2
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +4 -0
- 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 +203 -47
- package/src/metamodel/adaptable.metamodel.js +1 -9313
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +48 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +11 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +342 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +6 -0
- 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 +7 -2
- package/src/parser/src/types.js +1 -2
- package/src/types.d.ts +27 -20
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableOptions/CommentsOptions.d.ts +0 -28
- package/src/AdaptableOptions/NotesOptions.d.ts +0 -16
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/Api/Implementation/NotesApiImpl.d.ts +0 -16
- package/src/Api/Implementation/NotesApiImpl.js +0 -39
- 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 -39
- package/src/Strategy/CommentsModule.d.ts +0 -16
- package/src/Strategy/CommentsModule.js +0 -77
- package/src/Strategy/NotesModule.js +0 -57
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -133
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -686
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -668
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
- /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
- /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
- /package/src/PredefinedConfig/{NotesState.js → Common/TransposeConfig.js} +0 -0
- /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/NoteState.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
|
+
import { GetContextMenuItems, GetContextMenuItemsParams, GetMainMenuItems, GetMainMenuItemsParams, MenuItemDef } from '@ag-grid-community/core';
|
|
3
|
+
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
+
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
5
|
+
export declare class AgGridMenuAdapter {
|
|
6
|
+
private adaptableInstance;
|
|
7
|
+
constructor(adaptableInstance: AdaptableAgGrid);
|
|
8
|
+
private get adaptableOptions();
|
|
9
|
+
private get adaptableApi();
|
|
10
|
+
destroy(): void;
|
|
11
|
+
buildColumnMenu(params: GetMainMenuItemsParams, originalGetMainMenuItems: GetMainMenuItems): (string | MenuItemDef)[];
|
|
12
|
+
buildContextMenu(params: GetContextMenuItemsParams, originalGetContextMenuItems: GetContextMenuItems): (string | MenuItemDef)[];
|
|
13
|
+
private removeConsecutiveSeparators;
|
|
14
|
+
private createColumnMenuContextObject;
|
|
15
|
+
private createAdaptableContextMenuItems;
|
|
16
|
+
private createContextMenuContextObject;
|
|
17
|
+
private mapAdaptableMenuItemToAgGridMenuDefinition;
|
|
18
|
+
private mapCustomMenuItemToAgGridMenuDefinition;
|
|
19
|
+
private mapUserMenuItemToAgGridMenuDefinition;
|
|
20
|
+
private buildContextMenuDefaultStructure;
|
|
21
|
+
/**
|
|
22
|
+
* Hide menu group with no subitems or elevate single subitem to parent level
|
|
23
|
+
*/
|
|
24
|
+
private normalizeMenuGroup;
|
|
25
|
+
/**
|
|
26
|
+
* Default strategy for menu items: return as is if there is only one item, otherwise group them under a parent item
|
|
27
|
+
*/
|
|
28
|
+
private getModuleSpecificStructure;
|
|
29
|
+
private getExportContextMenuStructure;
|
|
30
|
+
private getLayoutContextMenuStructure;
|
|
31
|
+
private buildMenuGroupParent;
|
|
32
|
+
private buildColumnMenuDefaultStructure;
|
|
33
|
+
private getColumnFilterColumnMenuStructure;
|
|
34
|
+
private getLayoutColumnMenuStructure;
|
|
35
|
+
private getStyledColumnColumnMenuStructure;
|
|
36
|
+
private mapAdaptableMenuItemToSystemMenuItems;
|
|
37
|
+
private createAdaptableColumnMenuItems;
|
|
38
|
+
private mapAdaptableIconToAgGridIcon;
|
|
39
|
+
/**
|
|
40
|
+
* The output of this function is used to build the column header menu if the AG Grid Menu Module is NOT present
|
|
41
|
+
* This is controlled by the AdaptableAgGrid.embedColumnMenu property
|
|
42
|
+
*/
|
|
43
|
+
buildStandaloneColumnHeader(adaptableColumn: AdaptableColumn): AdaptableMenuItem[];
|
|
44
|
+
}
|
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
import { isAdaptableElementIcon } from '../components/Icon';
|
|
2
|
+
import { iconToString } from '../components/icons';
|
|
3
|
+
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
4
|
+
export class AgGridMenuAdapter {
|
|
5
|
+
constructor(adaptableInstance) {
|
|
6
|
+
this.adaptableInstance = adaptableInstance;
|
|
7
|
+
}
|
|
8
|
+
get adaptableOptions() {
|
|
9
|
+
return this.adaptableInstance.adaptableOptions;
|
|
10
|
+
}
|
|
11
|
+
get adaptableApi() {
|
|
12
|
+
return this.adaptableInstance.api;
|
|
13
|
+
}
|
|
14
|
+
destroy() {
|
|
15
|
+
this.adaptableInstance = null;
|
|
16
|
+
}
|
|
17
|
+
buildColumnMenu(params, originalGetMainMenuItems) {
|
|
18
|
+
var _a;
|
|
19
|
+
const menuOptions = this.adaptableOptions.menuOptions;
|
|
20
|
+
const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
|
|
21
|
+
if (!params.column) {
|
|
22
|
+
// return only AG Grid context if the Adaptable column is not found (should not happen)
|
|
23
|
+
return agGridMenuItems;
|
|
24
|
+
}
|
|
25
|
+
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId((_a = params.column) === null || _a === void 0 ? void 0 : _a.getColId());
|
|
26
|
+
const menuContext = this.createColumnMenuContextObject(adaptableColumn, params.column);
|
|
27
|
+
const adaptableMenuItems = this.createAdaptableColumnMenuItems(menuContext);
|
|
28
|
+
const defaultColumnMenuStructure = this.buildColumnMenuDefaultStructure(adaptableMenuItems, menuContext);
|
|
29
|
+
// 1. first check if there is a custom column menu defined
|
|
30
|
+
if (typeof menuOptions.customColumnMenu === 'function') {
|
|
31
|
+
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => ({
|
|
32
|
+
menuType: 'AgGrid',
|
|
33
|
+
name: itemName,
|
|
34
|
+
}));
|
|
35
|
+
const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
|
|
36
|
+
const customMenuItems = menuOptions
|
|
37
|
+
.customColumnMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
|
|
38
|
+
defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(defaultColumnMenuStructure) }))
|
|
39
|
+
.filter(Boolean);
|
|
40
|
+
return customMenuItems
|
|
41
|
+
.map((customMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext))
|
|
42
|
+
.filter(Boolean);
|
|
43
|
+
}
|
|
44
|
+
// 2. if not, return the default context menu
|
|
45
|
+
const defaultContextMenu = [
|
|
46
|
+
...agGridMenuItems,
|
|
47
|
+
'separator',
|
|
48
|
+
...defaultColumnMenuStructure.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
|
|
49
|
+
];
|
|
50
|
+
return this.removeConsecutiveSeparators(defaultContextMenu);
|
|
51
|
+
}
|
|
52
|
+
buildContextMenu(params, originalGetContextMenuItems) {
|
|
53
|
+
var _a;
|
|
54
|
+
// we do this in order to refresh the internal state of selected cells (technically query the AG Grid cellRanges)
|
|
55
|
+
// (right-click selected the current cell, but this was not reflected in the internal state of the selected cells)
|
|
56
|
+
this.adaptableInstance.refreshSelectedCellsState();
|
|
57
|
+
const menuOptions = this.adaptableOptions.menuOptions;
|
|
58
|
+
const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
|
|
59
|
+
if (!params.column) {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId((_a = params.column) === null || _a === void 0 ? void 0 : _a.getColId());
|
|
63
|
+
const menuContext = this.createContextMenuContextObject(params, adaptableColumn);
|
|
64
|
+
const adaptableMenuItems = this.createAdaptableContextMenuItems(menuContext);
|
|
65
|
+
const defaultContextMenuStructure = this.buildContextMenuDefaultStructure(adaptableMenuItems, menuContext);
|
|
66
|
+
// 1. first check if there is a custom context menu defined
|
|
67
|
+
if (typeof menuOptions.customContextMenu === 'function') {
|
|
68
|
+
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => ({
|
|
69
|
+
menuType: 'AgGrid',
|
|
70
|
+
name: itemName,
|
|
71
|
+
}));
|
|
72
|
+
const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
|
|
73
|
+
const customMenuItems = menuOptions
|
|
74
|
+
.customContextMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
|
|
75
|
+
defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(defaultContextMenuStructure) }))
|
|
76
|
+
.filter(Boolean);
|
|
77
|
+
return customMenuItems
|
|
78
|
+
.map((customMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext))
|
|
79
|
+
.filter(Boolean);
|
|
80
|
+
}
|
|
81
|
+
// 2. if not, return the default context menu
|
|
82
|
+
const agGridCopyItems = agGridMenuItems.filter((item) => ['copy', 'copyWithHeaders', 'copyWithGroupHeaders', 'cut', 'paste'].includes(item));
|
|
83
|
+
const otherAgGridItems = agGridMenuItems.filter((item) => !agGridCopyItems.includes(item) &&
|
|
84
|
+
// we provide Adaptable exports in the context menu
|
|
85
|
+
!['export', 'csvExport', 'excelExport'].includes(item));
|
|
86
|
+
const defaultContextMenu = [
|
|
87
|
+
this.mapCustomMenuItemToAgGridMenuDefinition({
|
|
88
|
+
menuType: 'Group',
|
|
89
|
+
label: 'Copy & Paste',
|
|
90
|
+
icon: {
|
|
91
|
+
name: 'copy',
|
|
92
|
+
},
|
|
93
|
+
subMenuItems: agGridCopyItems.map((item) => ({
|
|
94
|
+
menuType: 'AgGrid',
|
|
95
|
+
name: item,
|
|
96
|
+
})),
|
|
97
|
+
}, menuContext),
|
|
98
|
+
...otherAgGridItems,
|
|
99
|
+
'separator',
|
|
100
|
+
...defaultContextMenuStructure.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
|
|
101
|
+
];
|
|
102
|
+
return this.removeConsecutiveSeparators(defaultContextMenu);
|
|
103
|
+
}
|
|
104
|
+
// due to entitlements or other reasons, some menu items might be hidden, leading to consecutive separators
|
|
105
|
+
removeConsecutiveSeparators(menuItems, separator = 'separator') {
|
|
106
|
+
return menuItems.reduce((acc, item, index, array) => {
|
|
107
|
+
if (item === separator && array[index + 1] === separator) {
|
|
108
|
+
return acc;
|
|
109
|
+
}
|
|
110
|
+
acc.push(item);
|
|
111
|
+
return acc;
|
|
112
|
+
}, []);
|
|
113
|
+
}
|
|
114
|
+
createColumnMenuContextObject(adaptableColumn, agGridColumn) {
|
|
115
|
+
return Object.assign(Object.assign({}, this.adaptableInstance.api.internalApi.buildBaseContext()), { adaptableColumn: adaptableColumn, agGridColumn: agGridColumn, isRowGroupColumn: this.adaptableInstance.api.columnApi.isAutoRowGroupColumn(agGridColumn.getColId()) });
|
|
116
|
+
}
|
|
117
|
+
createAdaptableContextMenuItems(menuContext) {
|
|
118
|
+
let contextMenuItems = [];
|
|
119
|
+
this.adaptableInstance.adaptableModules.forEach((module) => {
|
|
120
|
+
let menuItems = module.createContextMenuItems(menuContext);
|
|
121
|
+
if (menuItems) {
|
|
122
|
+
contextMenuItems.push(...menuItems.filter(Boolean).filter((item) => item.isVisible !== false));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
this.adaptableInstance._emitSync('CreateAdaptableContextMenuItems', {
|
|
126
|
+
items: contextMenuItems,
|
|
127
|
+
menuContext: menuContext,
|
|
128
|
+
});
|
|
129
|
+
return contextMenuItems;
|
|
130
|
+
}
|
|
131
|
+
createContextMenuContextObject(params, adaptableColumn) {
|
|
132
|
+
// lets build a picture of what has been right clicked. Will take time to get right but lets start
|
|
133
|
+
let isSingleSelectedColumn = false;
|
|
134
|
+
let isSelectedCell = false;
|
|
135
|
+
let isSelectedRow = false;
|
|
136
|
+
// row group columns dont provide an AdapTable Column so return bare minimum
|
|
137
|
+
if (!adaptableColumn) {
|
|
138
|
+
return Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { isSelectedCell: false, isSelectedRow: false, gridCell: undefined, adaptableColumn: undefined, agGridColumn: params.column, rowNode: params.node, isGroupedNode: params.node ? params.node.group : false, isSingleSelectedColumn: false, isSingleSelectedCell: false, primaryKeyValue: undefined, selectedCellInfo: undefined, selectedRowInfo: undefined, isRowGroupColumn: this.adaptableApi.columnApi.isAutoRowGroupColumn(params.column.getColId()) });
|
|
139
|
+
}
|
|
140
|
+
const clickedCell = this.adaptableInstance.getGridCellFromRowNode(params.node, adaptableColumn.columnId);
|
|
141
|
+
const selectedCellInfo = this.adaptableApi.gridApi.getSelectedCellInfo();
|
|
142
|
+
if (selectedCellInfo) {
|
|
143
|
+
let matchedCell = selectedCellInfo.gridCells.find((gc) => gc != null &&
|
|
144
|
+
gc.column == clickedCell.column &&
|
|
145
|
+
gc.primaryKeyValue == clickedCell.primaryKeyValue);
|
|
146
|
+
isSelectedCell = matchedCell != null;
|
|
147
|
+
if (isSelectedCell) {
|
|
148
|
+
isSingleSelectedColumn = ArrayExtensions.CorrectLength(selectedCellInfo.columns, 1);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const selectedRowInfo = this.adaptableApi.gridApi.getSelectedRowInfo();
|
|
152
|
+
if (selectedRowInfo) {
|
|
153
|
+
const matchedPKValue = selectedRowInfo.gridRows.find((gr) => gr != null && gr.primaryKeyValue == clickedCell.primaryKeyValue);
|
|
154
|
+
isSelectedRow = matchedPKValue != null;
|
|
155
|
+
}
|
|
156
|
+
return Object.assign(Object.assign({}, this.adaptableApi.internalApi.buildBaseContext()), { isSelectedCell: isSelectedCell, isSelectedRow: isSelectedRow, gridCell: clickedCell, adaptableColumn: adaptableColumn, agGridColumn: params.column, rowNode: params.node, isGroupedNode: params.node ? params.node.group : false, isSingleSelectedColumn: isSingleSelectedColumn, isSingleSelectedCell: isSelectedCell && (selectedCellInfo === null || selectedCellInfo === void 0 ? void 0 : selectedCellInfo.gridCells.length) == 1, primaryKeyValue: clickedCell ? clickedCell.primaryKeyValue : undefined, selectedCellInfo: selectedCellInfo, selectedRowInfo: selectedRowInfo, isRowGroupColumn: this.adaptableApi.columnApi.isAutoRowGroupColumn(params.column.getColId()) });
|
|
157
|
+
}
|
|
158
|
+
mapAdaptableMenuItemToAgGridMenuDefinition(adaptableMenuItem) {
|
|
159
|
+
var _a;
|
|
160
|
+
if (adaptableMenuItem === '-') {
|
|
161
|
+
return 'separator';
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
name: adaptableMenuItem.label,
|
|
165
|
+
action: adaptableMenuItem.onClick
|
|
166
|
+
? adaptableMenuItem.onClick
|
|
167
|
+
: adaptableMenuItem.reduxAction
|
|
168
|
+
? () => this.adaptableInstance.api.internalApi.dispatchReduxAction(adaptableMenuItem.reduxAction)
|
|
169
|
+
: undefined,
|
|
170
|
+
icon: this.mapAdaptableIconToAgGridIcon(adaptableMenuItem.icon, {
|
|
171
|
+
fill: 'var(--ab-color-text-on-primary)',
|
|
172
|
+
}),
|
|
173
|
+
subMenu: (_a = adaptableMenuItem.subItems) === null || _a === void 0 ? void 0 : _a.map((subMenuItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(subMenuItem)),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext) {
|
|
177
|
+
var _a;
|
|
178
|
+
if (customMenuItem === '-') {
|
|
179
|
+
return 'separator';
|
|
180
|
+
}
|
|
181
|
+
if (customMenuItem.menuType === 'Group') {
|
|
182
|
+
return {
|
|
183
|
+
name: customMenuItem.label,
|
|
184
|
+
icon: this.mapAdaptableIconToAgGridIcon(customMenuItem.icon, {
|
|
185
|
+
fill: 'var(--ab-color-text-on-primary)',
|
|
186
|
+
}),
|
|
187
|
+
disabled: customMenuItem.disabled,
|
|
188
|
+
subMenu: !customMenuItem.disabled
|
|
189
|
+
? (_a = customMenuItem.subMenuItems) === null || _a === void 0 ? void 0 : _a.map((subMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(subMenuItem, menuContext)).filter(Boolean)
|
|
190
|
+
: undefined,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
if (customMenuItem.menuType === 'AgGrid') {
|
|
194
|
+
return customMenuItem.name;
|
|
195
|
+
}
|
|
196
|
+
if (customMenuItem.menuType === 'Adaptable') {
|
|
197
|
+
return this.mapAdaptableMenuItemToAgGridMenuDefinition(customMenuItem);
|
|
198
|
+
}
|
|
199
|
+
if (customMenuItem.menuType === 'User') {
|
|
200
|
+
return this.mapUserMenuItemToAgGridMenuDefinition(customMenuItem, menuContext);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
mapUserMenuItemToAgGridMenuDefinition(userMenuItem, menuContext) {
|
|
204
|
+
var _a;
|
|
205
|
+
if (userMenuItem.hidden) {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
return {
|
|
209
|
+
name: userMenuItem.label,
|
|
210
|
+
action: () => (userMenuItem.onClick ? userMenuItem.onClick(menuContext) : null),
|
|
211
|
+
icon: this.mapAdaptableIconToAgGridIcon(userMenuItem.icon, {
|
|
212
|
+
fill: 'var(--ab-color-text-on-primary)',
|
|
213
|
+
}),
|
|
214
|
+
disabled: userMenuItem.disabled,
|
|
215
|
+
subMenu: (_a = userMenuItem.subMenuItems) === null || _a === void 0 ? void 0 : _a.map((subMenuItem) => {
|
|
216
|
+
return this.mapCustomMenuItemToAgGridMenuDefinition(subMenuItem, menuContext);
|
|
217
|
+
}).filter(Boolean),
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
buildContextMenuDefaultStructure(availableMenuItems, menuContext) {
|
|
221
|
+
// Alert
|
|
222
|
+
const alertMenuItems = this.getModuleSpecificStructure('Alert', availableMenuItems);
|
|
223
|
+
// BulkUpdate
|
|
224
|
+
const bulkUpdateMenuItems = this.getModuleSpecificStructure('BulkUpdate', availableMenuItems);
|
|
225
|
+
// CalculatedColumn
|
|
226
|
+
const calculatedColumnMenuItems = this.getModuleSpecificStructure('CalculatedColumn', availableMenuItems);
|
|
227
|
+
// CellSummary
|
|
228
|
+
const cellSummaryMenuItems = this.getModuleSpecificStructure('CellSummary', availableMenuItems);
|
|
229
|
+
// ColumnFilter
|
|
230
|
+
const columnFilterMenuItems = this.getModuleSpecificStructure('ColumnFilter', availableMenuItems);
|
|
231
|
+
// ColumnInfo
|
|
232
|
+
const columnInfoMenuItems = this.getModuleSpecificStructure('ColumnInfo', availableMenuItems);
|
|
233
|
+
// Comment
|
|
234
|
+
const commentMenuItems = this.getModuleSpecificStructure('Comment', availableMenuItems);
|
|
235
|
+
// Dashboard
|
|
236
|
+
const dashboardMenuItems = this.getModuleSpecificStructure('Dashboard', availableMenuItems);
|
|
237
|
+
// DataImport
|
|
238
|
+
const dataImportMenuItems = this.getModuleSpecificStructure('DataImport', availableMenuItems);
|
|
239
|
+
// Export
|
|
240
|
+
const exportMenuItems = this.getExportContextMenuStructure(availableMenuItems);
|
|
241
|
+
// FDC3
|
|
242
|
+
const fdc3MenuItems = this.getModuleSpecificStructure('Fdc3', availableMenuItems);
|
|
243
|
+
// FlashingCell
|
|
244
|
+
const flashingCellMenuItems = this.getModuleSpecificStructure('FlashingCell', availableMenuItems);
|
|
245
|
+
// GridInfo
|
|
246
|
+
const gridInfoMenuItems = this.getModuleSpecificStructure('GridInfo', availableMenuItems);
|
|
247
|
+
// Layout
|
|
248
|
+
const [gridActionItems, otherLayoutItems] = this.getLayoutContextMenuStructure(availableMenuItems);
|
|
249
|
+
// Note
|
|
250
|
+
const noteMenuItems = this.getModuleSpecificStructure('Note', availableMenuItems);
|
|
251
|
+
// SettingsPanel
|
|
252
|
+
const settingsPanelMenuItems = this.getModuleSpecificStructure('SettingsPanel', availableMenuItems);
|
|
253
|
+
// SmartEdit
|
|
254
|
+
const smartEditMenuItems = this.getModuleSpecificStructure('SmartEdit', availableMenuItems);
|
|
255
|
+
// SystemStatus
|
|
256
|
+
const systemStatusMenuItems = this.getModuleSpecificStructure('SystemStatus', availableMenuItems);
|
|
257
|
+
/**
|
|
258
|
+
* Custom structures
|
|
259
|
+
*/
|
|
260
|
+
const gridMenuItem = {
|
|
261
|
+
name: 'grid-group',
|
|
262
|
+
label: 'Grid',
|
|
263
|
+
// TODO
|
|
264
|
+
module: 'ColumnInfo',
|
|
265
|
+
isVisible: true,
|
|
266
|
+
icon: {
|
|
267
|
+
name: 'grid',
|
|
268
|
+
},
|
|
269
|
+
subItems: [
|
|
270
|
+
...gridActionItems,
|
|
271
|
+
...otherLayoutItems,
|
|
272
|
+
...cellSummaryMenuItems,
|
|
273
|
+
...dataImportMenuItems,
|
|
274
|
+
...systemStatusMenuItems,
|
|
275
|
+
...gridInfoMenuItems,
|
|
276
|
+
],
|
|
277
|
+
};
|
|
278
|
+
const editMenuItem = {
|
|
279
|
+
name: 'edit-group',
|
|
280
|
+
label: 'Edit',
|
|
281
|
+
// TODO
|
|
282
|
+
module: 'ColumnInfo',
|
|
283
|
+
isVisible: true,
|
|
284
|
+
icon: {
|
|
285
|
+
name: 'edit-table',
|
|
286
|
+
},
|
|
287
|
+
subItems: [...bulkUpdateMenuItems, ...smartEditMenuItems],
|
|
288
|
+
};
|
|
289
|
+
const columnMenuItem = {
|
|
290
|
+
name: 'column-group',
|
|
291
|
+
label: 'Column',
|
|
292
|
+
// TODO
|
|
293
|
+
module: 'ColumnInfo',
|
|
294
|
+
isVisible: true,
|
|
295
|
+
icon: {
|
|
296
|
+
name: 'columns',
|
|
297
|
+
},
|
|
298
|
+
subItems: [...calculatedColumnMenuItems, ...columnInfoMenuItems],
|
|
299
|
+
};
|
|
300
|
+
return this.removeConsecutiveSeparators([
|
|
301
|
+
...exportMenuItems,
|
|
302
|
+
'-',
|
|
303
|
+
...noteMenuItems,
|
|
304
|
+
...commentMenuItems,
|
|
305
|
+
...columnFilterMenuItems,
|
|
306
|
+
...flashingCellMenuItems,
|
|
307
|
+
...alertMenuItems,
|
|
308
|
+
...fdc3MenuItems,
|
|
309
|
+
'-',
|
|
310
|
+
...settingsPanelMenuItems,
|
|
311
|
+
...dashboardMenuItems,
|
|
312
|
+
'-',
|
|
313
|
+
...this.normalizeMenuGroup(editMenuItem),
|
|
314
|
+
'-',
|
|
315
|
+
...this.normalizeMenuGroup(gridMenuItem),
|
|
316
|
+
...this.normalizeMenuGroup(columnMenuItem),
|
|
317
|
+
], '-');
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Hide menu group with no subitems or elevate single subitem to parent level
|
|
321
|
+
*/
|
|
322
|
+
normalizeMenuGroup(menuItem) {
|
|
323
|
+
var _a, _b;
|
|
324
|
+
if (!((_a = menuItem.subItems) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
325
|
+
return [];
|
|
326
|
+
}
|
|
327
|
+
if (((_b = menuItem.subItems) === null || _b === void 0 ? void 0 : _b.length) === 1) {
|
|
328
|
+
return [menuItem.subItems[0]];
|
|
329
|
+
}
|
|
330
|
+
return [menuItem];
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Default strategy for menu items: return as is if there is only one item, otherwise group them under a parent item
|
|
334
|
+
*/
|
|
335
|
+
getModuleSpecificStructure(module, menuItems) {
|
|
336
|
+
const moduleItems = menuItems.filter((menuItem) => menuItem.module === module);
|
|
337
|
+
if (moduleItems.length > 1) {
|
|
338
|
+
const moduleInfo = this.adaptableInstance.ModuleService.getModuleInfoByModule(module);
|
|
339
|
+
return [this.buildMenuGroupParent(module, moduleItems)];
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
return moduleItems;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
getExportContextMenuStructure(menuItems) {
|
|
346
|
+
const exportMenuItems = menuItems.filter((menuItem) => menuItem.module === 'Export');
|
|
347
|
+
if (!exportMenuItems.length) {
|
|
348
|
+
return [];
|
|
349
|
+
}
|
|
350
|
+
const visualReportItems = exportMenuItems.filter((item) => item.name.startsWith('export-visual-data-excel'));
|
|
351
|
+
const visualDataExportItems = visualReportItems.length
|
|
352
|
+
? [
|
|
353
|
+
this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-visual-data-excel')), {
|
|
354
|
+
label: 'Visual Data',
|
|
355
|
+
icon: false,
|
|
356
|
+
}),
|
|
357
|
+
]
|
|
358
|
+
: [];
|
|
359
|
+
const allDataExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-all-data')), {
|
|
360
|
+
label: 'All Data',
|
|
361
|
+
icon: false,
|
|
362
|
+
}));
|
|
363
|
+
const currentDataExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-current-data')), {
|
|
364
|
+
label: 'Current Data',
|
|
365
|
+
icon: false,
|
|
366
|
+
}));
|
|
367
|
+
const selectedCellsExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-selected-cells')), {
|
|
368
|
+
label: 'Selected Cells',
|
|
369
|
+
icon: false,
|
|
370
|
+
}));
|
|
371
|
+
const selectedRowsExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-selected-rows')), {
|
|
372
|
+
label: 'Selected Rows',
|
|
373
|
+
icon: false,
|
|
374
|
+
}));
|
|
375
|
+
return this.normalizeMenuGroup(this.buildMenuGroupParent('Export', [
|
|
376
|
+
...visualDataExportItems,
|
|
377
|
+
...allDataExportItems,
|
|
378
|
+
...currentDataExportItems,
|
|
379
|
+
...selectedCellsExportItems,
|
|
380
|
+
...selectedRowsExportItems,
|
|
381
|
+
], {
|
|
382
|
+
label: 'Export',
|
|
383
|
+
icon: 'export',
|
|
384
|
+
}));
|
|
385
|
+
}
|
|
386
|
+
getLayoutContextMenuStructure(menuItems) {
|
|
387
|
+
const layoutMenuItems = menuItems.filter((menuItem) => menuItem.module === 'Layout');
|
|
388
|
+
if (!layoutMenuItems.length) {
|
|
389
|
+
return [[], []];
|
|
390
|
+
}
|
|
391
|
+
const gridActionsItemNames = [
|
|
392
|
+
'layout-clear-selection',
|
|
393
|
+
'layout-select-all',
|
|
394
|
+
'layout-auto-size',
|
|
395
|
+
];
|
|
396
|
+
const gridActionsItems = layoutMenuItems.filter((item) => gridActionsItemNames.includes(item.name));
|
|
397
|
+
const otherLayoutItems = layoutMenuItems.filter((item) => !gridActionsItemNames.includes(item.name));
|
|
398
|
+
return [gridActionsItems, otherLayoutItems];
|
|
399
|
+
}
|
|
400
|
+
buildMenuGroupParent(module, menuItems, config) {
|
|
401
|
+
var _a, _b;
|
|
402
|
+
const moduleInfo = this.adaptableInstance.ModuleService.getModuleInfoByModule(module);
|
|
403
|
+
const icon = config && config.icon === false
|
|
404
|
+
? undefined
|
|
405
|
+
: { name: (_a = config === null || config === void 0 ? void 0 : config.icon) !== null && _a !== void 0 ? _a : moduleInfo.Glyph };
|
|
406
|
+
return {
|
|
407
|
+
name: 'menu-group',
|
|
408
|
+
label: (_b = config === null || config === void 0 ? void 0 : config.label) !== null && _b !== void 0 ? _b : moduleInfo.FriendlyName,
|
|
409
|
+
isVisible: true,
|
|
410
|
+
module: moduleInfo.ModuleName,
|
|
411
|
+
icon,
|
|
412
|
+
subItems: menuItems,
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
buildColumnMenuDefaultStructure(availableMenuItems, menuContext) {
|
|
416
|
+
// CalculatedColumn
|
|
417
|
+
const calculatedColumnMenuItems = this.getModuleSpecificStructure('CalculatedColumn', availableMenuItems);
|
|
418
|
+
// CellSummary
|
|
419
|
+
const cellSummaryMenuItems = this.getModuleSpecificStructure('CellSummary', availableMenuItems);
|
|
420
|
+
// ColumnFilter
|
|
421
|
+
const [columnFilterGroup, filterVisibilityItems] = this.getColumnFilterColumnMenuStructure(availableMenuItems);
|
|
422
|
+
// ColumnInfo
|
|
423
|
+
const columnInfoMenuItems = this.getModuleSpecificStructure('ColumnInfo', availableMenuItems);
|
|
424
|
+
// CustomSort
|
|
425
|
+
const customSortMenuItems = this.getModuleSpecificStructure('CustomSort', availableMenuItems);
|
|
426
|
+
// Dashboard
|
|
427
|
+
const dashboardMenuItems = this.getModuleSpecificStructure('Dashboard', availableMenuItems);
|
|
428
|
+
// DataImport
|
|
429
|
+
const dataImportMenuItems = this.getModuleSpecificStructure('DataImport', availableMenuItems);
|
|
430
|
+
// FlashingCell
|
|
431
|
+
const flashingCellMenuItems = this.getModuleSpecificStructure('FlashingCell', availableMenuItems);
|
|
432
|
+
// FormatColumn
|
|
433
|
+
const formatColumnMenuItems = this.getModuleSpecificStructure('FormatColumn', availableMenuItems);
|
|
434
|
+
// FreeTextColumn
|
|
435
|
+
const freeTextColumnMenuItems = this.getModuleSpecificStructure('FreeTextColumn', availableMenuItems);
|
|
436
|
+
// GridInfo
|
|
437
|
+
const gridInfoMenuItems = this.getModuleSpecificStructure('GridInfo', availableMenuItems);
|
|
438
|
+
// Layout
|
|
439
|
+
const [gridSelectItems, columnSelectItems, columnActionGroup, otherLayoutItems] = this.getLayoutColumnMenuStructure(availableMenuItems);
|
|
440
|
+
// PlusMinus
|
|
441
|
+
const plusMinusMenuItems = this.getModuleSpecificStructure('PlusMinus', availableMenuItems);
|
|
442
|
+
// SettingsPanel
|
|
443
|
+
const settingsPanelMenuItems = this.getModuleSpecificStructure('SettingsPanel', availableMenuItems);
|
|
444
|
+
// StyledColumn
|
|
445
|
+
const styledColumnMenuItems = this.getStyledColumnColumnMenuStructure(availableMenuItems);
|
|
446
|
+
// SystemStatus
|
|
447
|
+
const systemStatusMenuItems = this.getModuleSpecificStructure('SystemStatus', availableMenuItems);
|
|
448
|
+
/**
|
|
449
|
+
* Custom structures
|
|
450
|
+
*/
|
|
451
|
+
const gridMenuItem = {
|
|
452
|
+
name: 'grid-group',
|
|
453
|
+
label: 'Grid',
|
|
454
|
+
// TODO
|
|
455
|
+
module: 'ColumnInfo',
|
|
456
|
+
isVisible: true,
|
|
457
|
+
icon: {
|
|
458
|
+
name: 'grid',
|
|
459
|
+
},
|
|
460
|
+
subItems: [
|
|
461
|
+
...otherLayoutItems,
|
|
462
|
+
...filterVisibilityItems,
|
|
463
|
+
...gridSelectItems,
|
|
464
|
+
...cellSummaryMenuItems,
|
|
465
|
+
...dataImportMenuItems,
|
|
466
|
+
...systemStatusMenuItems,
|
|
467
|
+
...gridInfoMenuItems,
|
|
468
|
+
],
|
|
469
|
+
};
|
|
470
|
+
const columnMenuItem = {
|
|
471
|
+
name: 'column-group',
|
|
472
|
+
label: 'Column',
|
|
473
|
+
// TODO
|
|
474
|
+
module: 'ColumnInfo',
|
|
475
|
+
isVisible: true,
|
|
476
|
+
icon: {
|
|
477
|
+
name: 'columns',
|
|
478
|
+
},
|
|
479
|
+
subItems: [
|
|
480
|
+
...columnActionGroup,
|
|
481
|
+
...calculatedColumnMenuItems,
|
|
482
|
+
...freeTextColumnMenuItems,
|
|
483
|
+
...customSortMenuItems,
|
|
484
|
+
...plusMinusMenuItems,
|
|
485
|
+
...columnSelectItems,
|
|
486
|
+
...columnInfoMenuItems,
|
|
487
|
+
],
|
|
488
|
+
};
|
|
489
|
+
const createStyleMenuItem = {
|
|
490
|
+
name: 'styling-group',
|
|
491
|
+
label: 'Styling',
|
|
492
|
+
// TODO
|
|
493
|
+
module: 'ColumnInfo',
|
|
494
|
+
isVisible: true,
|
|
495
|
+
icon: {
|
|
496
|
+
name: 'brush',
|
|
497
|
+
},
|
|
498
|
+
subItems: [...formatColumnMenuItems, ...styledColumnMenuItems, ...flashingCellMenuItems],
|
|
499
|
+
};
|
|
500
|
+
return this.removeConsecutiveSeparators([
|
|
501
|
+
...settingsPanelMenuItems,
|
|
502
|
+
...dashboardMenuItems,
|
|
503
|
+
...columnFilterGroup,
|
|
504
|
+
...this.normalizeMenuGroup(createStyleMenuItem),
|
|
505
|
+
...this.normalizeMenuGroup(gridMenuItem),
|
|
506
|
+
...this.normalizeMenuGroup(columnMenuItem),
|
|
507
|
+
], '-');
|
|
508
|
+
}
|
|
509
|
+
getColumnFilterColumnMenuStructure(menuItems) {
|
|
510
|
+
const columnFilterMenuItems = menuItems.filter((menuItem) => menuItem.module === 'ColumnFilter');
|
|
511
|
+
const filterVisibilityItems = columnFilterMenuItems.filter((item) => ['column-filter-bar-hide', 'column-filter-bar-show'].includes(item.name));
|
|
512
|
+
const filterActionItems = columnFilterMenuItems.filter((item) => ['column-filter-clear', 'column-filter-suspend', 'column-filter-unsuspend'].includes(item.name));
|
|
513
|
+
const columnFilterGroup = filterActionItems.length
|
|
514
|
+
? [
|
|
515
|
+
{
|
|
516
|
+
name: 'column-filter-group',
|
|
517
|
+
label: 'Filter',
|
|
518
|
+
module: 'ColumnFilter',
|
|
519
|
+
isVisible: true,
|
|
520
|
+
icon: {
|
|
521
|
+
name: 'filter',
|
|
522
|
+
},
|
|
523
|
+
subItems: filterActionItems,
|
|
524
|
+
},
|
|
525
|
+
]
|
|
526
|
+
: [];
|
|
527
|
+
return [columnFilterGroup, filterVisibilityItems];
|
|
528
|
+
}
|
|
529
|
+
getLayoutColumnMenuStructure(menuItems) {
|
|
530
|
+
const layoutMenuItems = menuItems.filter((menuItem) => menuItem.module === 'Layout');
|
|
531
|
+
if (!layoutMenuItems.length) {
|
|
532
|
+
return [[], [], [], []];
|
|
533
|
+
}
|
|
534
|
+
const columnSelectItemNames = [
|
|
535
|
+
'layout-column-select-preserve',
|
|
536
|
+
'layout-column-select-reset',
|
|
537
|
+
'layout-column-select',
|
|
538
|
+
];
|
|
539
|
+
const columnSelectItems = layoutMenuItems.filter((item) => columnSelectItemNames.includes(item.name));
|
|
540
|
+
const gridSelectItems = layoutMenuItems.filter((item) => item.name === 'layout-grid-select');
|
|
541
|
+
const columnActionGroup = layoutMenuItems.filter((item) => ['layout-column-caption-change', 'layout-column-hide'].includes(item.name));
|
|
542
|
+
const otherLayoutItems = layoutMenuItems.filter((item) => !columnSelectItemNames.includes(item.name) &&
|
|
543
|
+
!['layout-column-caption-change', 'layout-column-hide'].includes(item.name) &&
|
|
544
|
+
item.name !== 'layout-grid-select');
|
|
545
|
+
return [gridSelectItems, columnSelectItems, columnActionGroup, otherLayoutItems];
|
|
546
|
+
}
|
|
547
|
+
getStyledColumnColumnMenuStructure(menuItems) {
|
|
548
|
+
const styledColumnMenuItems = menuItems.filter((menuItem) => menuItem.module === 'StyledColumn');
|
|
549
|
+
return styledColumnMenuItems;
|
|
550
|
+
}
|
|
551
|
+
mapAdaptableMenuItemToSystemMenuItems(adaptableMenuItems) {
|
|
552
|
+
return (adaptableMenuItems !== null && adaptableMenuItems !== void 0 ? adaptableMenuItems : []).map((menuItem) => {
|
|
553
|
+
if (menuItem === '-') {
|
|
554
|
+
return menuItem;
|
|
555
|
+
}
|
|
556
|
+
let subItems = menuItem.subItems;
|
|
557
|
+
if (subItems && subItems.length > 0) {
|
|
558
|
+
subItems = subItems.map((subItem) => this.mapAdaptableMenuItemToSystemMenuItems(subItem.subItems));
|
|
559
|
+
}
|
|
560
|
+
return Object.assign(Object.assign({}, menuItem), { menuType: 'Adaptable', subItems });
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
createAdaptableColumnMenuItems(menuContext) {
|
|
564
|
+
let contextMenuItems = [];
|
|
565
|
+
this.adaptableInstance.adaptableModules.forEach((s) => {
|
|
566
|
+
let menuItems = s.createColumnMenuItems(menuContext.adaptableColumn);
|
|
567
|
+
if (menuItems) {
|
|
568
|
+
contextMenuItems.push(...menuItems.filter(Boolean).filter((item) => item.isVisible !== false));
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
return contextMenuItems;
|
|
572
|
+
}
|
|
573
|
+
// TODO AFL MIG: pretty sure this logic is duplicated in several other places
|
|
574
|
+
mapAdaptableIconToAgGridIcon(adaptableIcon, style) {
|
|
575
|
+
const icon = this.adaptableInstance.api.userInterfaceApi.internalApi.prepareAdaptableIconDef(adaptableIcon);
|
|
576
|
+
if (isAdaptableElementIcon(icon)) {
|
|
577
|
+
let element = icon.element;
|
|
578
|
+
if (typeof element === 'string') {
|
|
579
|
+
return element;
|
|
580
|
+
}
|
|
581
|
+
// THe element neets to be cloned.
|
|
582
|
+
// when it is used in more than one plce the element is removed from the DOM
|
|
583
|
+
return element.cloneNode(true);
|
|
584
|
+
}
|
|
585
|
+
else {
|
|
586
|
+
return iconToString(icon, {
|
|
587
|
+
fill: 'var(--ab-color-text-on-primary)',
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
/**
|
|
592
|
+
* The output of this function is used to build the column header menu if the AG Grid Menu Module is NOT present
|
|
593
|
+
* This is controlled by the AdaptableAgGrid.embedColumnMenu property
|
|
594
|
+
*/
|
|
595
|
+
buildStandaloneColumnHeader(adaptableColumn) {
|
|
596
|
+
const agGridColumn = this.adaptableInstance.getAgGridColumnForColumnId(adaptableColumn.columnId);
|
|
597
|
+
const menuContext = this.createColumnMenuContextObject(adaptableColumn, agGridColumn);
|
|
598
|
+
return this.createAdaptableColumnMenuItems(menuContext);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
|
+
import { GridOptions, ManagedGridOptionKey } from '@ag-grid-community/core';
|
|
3
|
+
export declare class AgGridOptionsService {
|
|
4
|
+
private adaptableInstance;
|
|
5
|
+
private gridOptionsPropertyCache;
|
|
6
|
+
private colDefPropertyCache;
|
|
7
|
+
constructor(adaptableInstance: AdaptableAgGrid);
|
|
8
|
+
destroy(): void;
|
|
9
|
+
setGridOptionsProperty<T extends keyof GridOptions>(gridOptions: GridOptions, propertyName: T, propertyGetter: (userPropertyValue: GridOptions[T]) => GridOptions[T] | undefined): GridOptions;
|
|
10
|
+
getUserGridOptionsProperty<T extends keyof GridOptions>(propertyName: T): GridOptions[T];
|
|
11
|
+
revertGridOptionsPropertyToUserValue(propertyName: ManagedGridOptionKey): void;
|
|
12
|
+
CAREFUL_patchGridOptionsProperty<T extends keyof GridOptions>(propertyName: T, value: GridOptions[T]): void;
|
|
13
|
+
revertGridOptionsPropertiesToUserValue<T extends keyof GridOptions>(gridOptions: GridOptions, propertyNames: T[]): void;
|
|
14
|
+
private get agGridAdapter();
|
|
15
|
+
}
|